Downloads - Paul Johnson Homepage - FreeFaculty.org
Downloads - Paul Johnson Homepage - FreeFaculty.org
Downloads - Paul Johnson Homepage - FreeFaculty.org
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
POLS 706 PSYCH 650/790 : Spring 2012<br />
<strong>Paul</strong> E. <strong>Johnson</strong><br />
pauljohn@ku.edu<br />
Professor, Political Science<br />
Assoc. Director, Center for Research Methods and Data Analysis<br />
1541 Lilac Lane, Room 523 470 Watson Library<br />
Office Hours: 2-4 M&W + Appt., POLS: (785) 864-9086 CRMDA: (785)864-3353<br />
GTA: Matt Miles , 408 Blake Hall<br />
Luke McCune , 10 Fraser Hall<br />
KU BlackBoard: http://courseware.ku.edu<br />
Lectures: http://pj.freefaculty.<strong>org</strong>/guides<br />
Textbooks<br />
Verzani, John. 2005. Using R for Introductory Statistics. Chapman & Hall/CRC.<br />
John Fox. 2008. Applied Regression Analysis and Generalized Linear Models. Beverly Hills: Sage.<br />
Zuur, Alain, Elena N. Ieno, and Erik HWG Meesters. 2009. A Beginner’s Guide to R. (KU Library-Ebook)<br />
<strong>Johnson</strong>, <strong>Paul</strong>. Stuff Worth Knowing. Newest edition always available in the KU Blackboard system.<br />
Course Topics: distributions, inference, regression analysis<br />
Prerequisites: One semester of statistics and/or research design. Algebra is vital and will be used regularly.<br />
Calculus is not required, but helpful in understanding derivations.<br />
Grades<br />
Tests: Midterm Exam: 2 x 25%<br />
Final Exam: 30%<br />
Homework Exercises: 20%<br />
Software<br />
You can use any software you want, but we can only help you with SAS and R. R is the “hot new” thing.<br />
SAS is a venerable “old friend”. SPSS is frowned upon because it “dumbs down” too many user choices.<br />
Stata is quite nice, you should look into it as well.<br />
What is in KU Blackboard?<br />
1. Announcements<br />
2. <strong>Downloads</strong>: Readings, example code, and other miscellaneous items.<br />
3. A “forum” (or “bulletin board”) where we want you to ask questions. DON’T email us individually,<br />
always ask publicly.<br />
1
Why http://pj.freefaculty.<strong>org</strong>?<br />
Blackboard is a closed system and it is difficult to keep up-to-date. It also excludes non-students. I want<br />
my course notes and programs to remain available to you after the semester is over. Students at other<br />
institutions often find these pages useful.<br />
Everything is <strong>org</strong>anized this rubric: http://pj.freefaculty.<strong>org</strong>/guides. The sections are “Computing-<br />
HOWTOs”, “Rcourse”, “stat”, “c-programming”, and “java-programming.”<br />
In the top section of “stat”, I have a Java applet that displays a “mind map” of the statistical offerings. If<br />
that does not help you to understand what’s going on, just browse down the page and the directory list is<br />
available.<br />
What files will you see there? The folders include source code that I use to produce the slide shows, the<br />
“pdf” output files, R code files, and maybe some graphics.<br />
Subversion repository.<br />
There is another way to keep up to date. I put everything–I mean everything–code, document markup,<br />
etc–into a “version management system” called Subversion. If you register for a free CRMDA account, you<br />
can have direct access to all of these files in an easy-to-update folder. Follow along with the instructions in my<br />
Subversion writeup: http://pj.freefaculty.<strong>org</strong>/guides/Computing-HOWTO/SubversionUse/SVN-intro.<br />
pdf to obtain access.<br />
About Computing Skills<br />
1. The ability to use a computer effectively is vital for all researchers. While this course is not primarily<br />
about computing, I still want to help you become effective users.<br />
2
Along those lines, I have been working on a book manuscript for a long time called Stuff Worth Knowing:<br />
And Not Much More. It is almost finished, and you might want to browse the chapter headings to see<br />
if it has some advice that will help you. I’ll make sure there is always a copy somewhere in the KU<br />
Blackboard page for this class.<br />
2. From time to time, I will set aside time to tell you neat things about computing. That’s not something<br />
I will test you about. It just makes me happy.<br />
3. Tips:<br />
Conduct<br />
(a) Keep your projects <strong>org</strong>anized into separate folders.<br />
(b) Develop a good backup scheme. Today, I integrate backup with version management in Subversion,<br />
but mirroring is also a handy way to backup.<br />
(c) Never put blank spaces in file names or directory names. It creates trouble when interacting with<br />
other systems.<br />
(d) Become a “grown up” software user: join email lists like “r-help”, (http://www.r-project.<strong>org</strong>),<br />
semnet (http://www2.gsu.edu/~mkteer/semnet.html), etc. I suggest you get an account on<br />
Gmail for those lists (and learn how to use labels and filters on Gmail).<br />
(e) Learn to make professional looking tables and graphs. If you can’t make them, at least learn what<br />
they are supposed to look like!<br />
Students are expected to comply with University codes, policies, laws, and guidelines. Information on<br />
academic misconduct is available at the following address: http://www.studenthandbook.ku.edu/codes.<br />
shtml#Academic%20Misconduct.<br />
Schedule of Readings<br />
1. Jan 17. Welcome, Howdy, Install your software and get going.<br />
You can use whatever kind of computer OS you like, whatever software you like. I can show you how<br />
to get some things done with L Y X and R that will be more difficult with MS Word, but the choice<br />
is up to you. My opinion is that technical work–especially research computing–is quite a bit different<br />
than pointing and clicking in Microsoft Office, but you will have to draw your own conclusions.<br />
(a) For Documents: Most of my documents are prepared with LYX, a “GUI editor” for L A TEX documents.<br />
LYX is available for all major OS (http://www.lyx.<strong>org</strong>). If you want to work on<br />
documents of type “*.lyx”, you need LYX (and the things it requires). If you are on Windows or<br />
Macintosh, I suggest you download the full installer “bundle”, rather than the small script that<br />
tries to separately download the individual pieces.<br />
(b) For Stats: R is easy and free to install on just about any operating system. R for Macintosh<br />
includes a pretty good built-in file editor. For Linux, there is no editor at all, and in Windows<br />
there is a poor editor. What to do?<br />
i. If you are a Windows user, I have system setup advice on the CRMDA web pages.<br />
http://web.ku.edu/~quant/cgi-bin/mw1/index.php?title=Windows:AdminTips<br />
Probably the easiest-to-manage R setup would include “RStudio” as the editor, but in the lab<br />
many Windows people also like Notepad++. I use Emacs with ESS (http://www.emacswiki.<br />
<strong>org</strong>/emacs/ESSWindowsAdvice). But you can choose.<br />
If I were you, I’d turn off “hide extensions of known file types in Windows.”<br />
ii. If you use Linux, install Emacs, install ESS.<br />
(c) For Stats: SAS exists and offers some fitting routines that are handy.<br />
3
(d) The CRMDA has some “remote desktop accessible” Microsoft Windows workstations. You can<br />
use a remote desktop client program to access those systems and try them out. We are improving<br />
the documentation at (http://quant.ku.edu/mw1).<br />
2. Jan 19. Describing One Variable (primarily numeric variables)<br />
Read: Verzani, Ch. 1 & 2, Fox, Chapter 3.1<br />
Priorities: histogram, kernel density, mean, median, mode, standard deviation, variance, scaling<br />
Lecture: /stat/Descriptive/CentralTendencyAndDispersion<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Descriptive/CentralTendencyAndDispersion/CentralTendencyAndDi<br />
pdf<br />
3. Jan 24. Describing Two Variables<br />
Read: Verzani, Ch. 3, Fox, Chapter 3.2, 3.3<br />
Priorities: scatterplot, barplot, boxplot, correlation<br />
Lecture: /stat/Descriptive/ScatterBoxBarPlots<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Descriptive/ScatterBoxBarPlots<br />
4. Jan 26. Regression Survey: The “Big Picture” For This Course<br />
Read: Fox, Ch. 2<br />
Math Refresher: If you have f<strong>org</strong>otten college algebra, please consider the Emergency Math Review<br />
of material in Stuff Worth Knowing. I’d suggest Chapter 10 “Summation Signs” & 11 “Curves in<br />
Theory”.<br />
Lecture: stat/Regression/Overview<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression/Overview/Regression-Overview-Lecture.pdf<br />
5. Jan 31. Statistical Distributions<br />
Read: Verzani, Chapter 5 & 6<br />
<strong>Paul</strong> E. <strong>Johnson</strong>, “Distribution Overview: Probability by the Seat of the Pants,” http://pj.freefaculty.<br />
<strong>org</strong>/guides/stat/Distributions/DistributionOverview/DistributionReview.pdf<br />
an essay I have created just for this purpose!<br />
Browse through this: Regress+ Compendium of Statistical Distributions http://www.causascientia.<br />
<strong>org</strong>/math_stat/Dists/Compendium.pdf<br />
Math Refresher: If you never took calculus–or f<strong>org</strong>ot–I suggest you review “Integrals are not Scarey”<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Math/Integrals/Integrals-guide.pdf. There is<br />
a more extended discussion of integrals in Stuff Worth Knowing.<br />
Lecture: /stat/Distributions/DistributionOverview/ http://pj.freefaculty.<strong>org</strong>/guides/stat/Distributions/<br />
DistributionOverview/DistributionReview-1-lecture.pdf<br />
6. Feb 2. Statistical Distributions (continued): Using R to Explore Distributions:<br />
Read: Catch up on what I assigned before.<br />
Lecture: /Rcourse/rRandomVariables<br />
http://pj.freefaculty.<strong>org</strong>/guides/Rcourse/rRandomVariables/rRandomVariables.pdf<br />
7. Feb 7. Central Limit Theorem and Sampling Distributions<br />
4
Read: Bowen & Weisberg, An Introduction to Data Analysis, Ch. 10 “Statistical Inference” (available<br />
in the Blackboard)<br />
Lecture: stat/Inferential/CentralLimitTheorem http://pj.freefaculty.<strong>org</strong>/guides/stat/Inferential/<br />
CentralLimitTheorem/CLT-lecture1.pdf<br />
8. Feb 9. Confidence Intervals<br />
Read: Verzani, Ch. 7<br />
Lecture: stat/Inferential/ConfIntervals<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Inferential/ConfIntervals/ConfIntervals-lecture.pdf<br />
9. Feb 14. Hypothesis Testing<br />
Read: Verzani, Ch. 8<br />
Lecture: stat/Inferential/HypoTesting<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Inferential/HypoTesting/SignifTests-lecture.pdf<br />
10. Feb 16. Regression: One Input Variable<br />
Read: Verzani, Ch. 3.4, and Ch. 10; Fox, Ch 5.1; Cohen, et al, Ch. 2<br />
Lecture: stat/Regression/ElementaryOLS<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression/ElementaryOLS/Regression-1-lecture.pdf<br />
11. Feb 21. Regression: Hypo testing: t tests, F test, Confidence Intervals<br />
Read: *Woolridge, Introductory Econometrics, Chapter 3; Fox, Ch. 6.1<br />
Lecture: stat/Regression/ElementaryOLS http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression/<br />
ElementaryOLS/Regression-2-lecture.pdf<br />
12. Feb 23. Regression: Review & Worked Examples<br />
13. Feb 28. Test 1<br />
14. Mar 1. Regression: Multiple Inputs<br />
Read: *Woolridge, Introductory Econometrics, Chapter 3; Verzani, Ch. 11; Cohen, Ch. 3<br />
Lecture: stat/Regression/MultipleRegression<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression/MultipleRegression/Regression-MultipleInputs-lectu<br />
15. Mar 6. Regression: Semi-partial Correlations, etc:<br />
Read: Cohen, Ch. 5.5<br />
Lecture: http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression/MultipleRegression/Regression-MultipleInp<br />
pdf<br />
16. Mar 8. Regression Assumptions and Plots For Checking Them<br />
Read: Cohen, Ch. 4<br />
Lecture: http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression/MultipleRegression/Regression-MultipleInp<br />
pdf<br />
5
17. Mar 13. Nonlinear Regression I<br />
Read: Fox, Ch. 12.3, Cohen, Ch. 6.1, 6.2, 6.4<br />
Lecture: /stat/Regression-Nonlinear/Nonlinear-Overview/<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression-Nonlinear/Nonlinear-Overview/Nonlinear-1-Overviewpdf<br />
18. Mar 15. Nonlinear Regression, II<br />
Read: Fox, Ch 18, Cohen, Ch. 6.6<br />
Lecture: /stat/Regression-Nonlinear/Nonparametric-Loess-Splines/ http://pj.freefaculty.<strong>org</strong>/guides/<br />
stat/Regression-Nonlinear/Nonparametric-Loess-Splines/Nonparametric-1-lecture.pdf<br />
19. Mar 27. Error Term Trouble: Heteroskedasticity & Autocorrelation<br />
Read: Cohen, Ch 4.4.4-4.4.5; 4.5.4-4.5.5<br />
Lecture: /stat/Regression/Heteroskedasticity-WLS http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression/<br />
Heteroskedasticity-WLS/Heteroskedasticity-WLS-lecture.pdf<br />
Lecture: /stat/Regression/TimeSeries http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression/TimeSeries/<br />
TimeSeries-1-lecture.pdf<br />
20. Mar 29. Test #2.<br />
21. Apr 3. Categorical Predictors<br />
Read: Cohen, Ch. 8<br />
Lecture: /stat/Regression/CategoricalPredictors/lecture-1 http://pj.freefaculty.<strong>org</strong>/guides/stat/<br />
Regression/CategoricalPredictors/<br />
22. Apr 5. Topic: Multicollinearity and Variable Selection<br />
Read: Cohen, 10.5-10.7, Fox 13<br />
Lecture: /stat/Regression/Multicollinearity/<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression/Multicollinearity/Multicollinearity-1-lecture.<br />
pdf<br />
23. Apr 10. Points of Caution (even Skepticism!)<br />
Read: King, Gary. (1986). “How Not to Lie with Statistics: Avoiding Common Mistakes in Quantitative<br />
Political Science.” American Journal of Political Science, 30(3), 666-687.<br />
Lecture: /stat/Regression/StandardizedBeta/<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression/StandardizedBeta/Standardized-1-lecture.<br />
pdf<br />
24. Apr 12. Influence Diagnostics (The Hat Matrix)<br />
Read: Cohen, 10.1-10.5, Fox Ch. 11<br />
Lecture: /stat/Regression/RegressionDiagnostics/<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression/RegressionDiagnostics/RegDiagnostics-1-lecture.<br />
pdf<br />
25. Apr 17. Interactions<br />
6
Read: Cohen, 7<br />
Lecture: /stat/Regression-Nonlinear/Interaction-Categorical/ http://pj.freefaculty.<strong>org</strong>/guides/<br />
stat/Regression-Nonlinear/Interaction-Categorical/Interaction-Continuous-1-lecture.<br />
pdf<br />
Additional Reading: More on why Mean Centering does not help with Multicollinearity (<br />
Echambadi, R., & Hess, J. D. (2007). Mean-Centering Does Not Alleviate Collinearity Problems in<br />
Moderated Multiple Regression Models. Marketing Science, 26(3), 438-445.<br />
Kromrey, J. D., & Foster-<strong>Johnson</strong>, L. (1998). Mean Centering in Moderated Multiple Regression:<br />
Much Ado about Nothing. Educational and Psychological Measurement, 58(1), 42 -67.<br />
26. Apr 19. Interactions: Categorical with Continuous<br />
Read: Cohen, 9.3<br />
Lecture: Regression-Nonlinear/Interaction-Categorical<br />
http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression-Nonlinear/Interaction-Categorical/Interaction-Cate<br />
pdf<br />
27. Apr 24. Catch Up, Comments on “missing values” if time permits.<br />
28. Topic: Logit I<br />
Read: Verzani, Ch. 12; Cohen, 13.1-13.2<br />
This guide on Logit and Probit models was perfected over years and years http://pj.freefaculty.<br />
<strong>org</strong>/guides/stat/Regression-Categorical/LogitProbit/LogitProbit-1-guide.pdf. The lecture<br />
slideshow is not quite so well evolved...<br />
Lecture: /stat/Regression-Categorical/LogitProbit 1 http://pj.freefaculty.<strong>org</strong>/guides/stat/Regression-Categ<br />
LogitProbit/LogitProbit-1-lecture.pdf<br />
29. Logit II<br />
Read: Same<br />
Lecture: /stat/Regression-Categorical/LogitProbit-WorkedExample<br />
30. Last Day<br />
Final Exam: Friday, May 11, 1:30-4:00pm Please Doublecheck that: http://timetable.ku.edu/~registr/<br />
pdf/exams/spring_2012_final_exam_schedule.pdf<br />
7