This manual walks students through the procedures for analysis in Stata and provides exercises that go hand-in-hand with online data sets. The manual complements the textbook Understanding Political Science Statistics: Observations and Expectations in Political Analysis, by Peter Galderisi, making it easy to use alongside the book in a course or as a stand-alone guide to using Stata. Seljan demonstrates how to run commands in Stata for different kinds of research questions and shows the results of the analyses, using lots of annotated screenshots from Stata version 12 (but compatible with all versions, including Stata Small). Students will be guided through standard processes replete with examples and exercises to ready them for future work in political science research.
The diverse group of data sets provided include subsamples of both the 2008 and 2012 American National Election Studies, a Eurobarometer survey, single year and longitudinal congressional district files, the 2012 Comparative Congressional Election Study, and a comparative, crossnational country file. Versions with reduced case numbers and variables are also included that are compatible with Stata Small.
This manual (and a parallel SPSS manual) are available as stand-alone products or packaged with the textbook Understanding Political Science Statistics.
Acknowledgments |
|
vii | |
|
|
1 | (14) |
|
1.1 Introduction to Using Stata for Data Analysis |
|
|
1 | (4) |
|
|
2 | (1) |
|
|
2 | (1) |
|
|
3 | (2) |
|
|
5 | (10) |
|
|
5 | (1) |
|
|
6 | (3) |
|
|
9 | (1) |
|
|
10 | (1) |
|
General Rules for Writing Code in Stata |
|
|
11 | (3) |
|
|
14 | (1) |
|
2 Setting Up Stata Data Files for Analysis |
|
|
15 | (5) |
|
|
15 | (2) |
|
2.2 Weighting Sampled Data |
|
|
17 | (3) |
|
3 Data Management and Operationalization |
|
|
20 | (27) |
|
3.1 Variable Recoding: The Recode Command |
|
|
20 | (12) |
|
|
29 | (3) |
|
3.2 Creating New Variables: The Generate Command |
|
|
32 | (6) |
|
|
36 | (2) |
|
3.3 Generating New Variables Using Logical Expressions: "If" Statements |
|
|
38 | (5) |
|
|
41 | (2) |
|
3.4 Useful Commands for Data Management |
|
|
43 | (4) |
|
|
43 | (1) |
|
|
44 | (1) |
|
|
44 | (2) |
|
|
46 | (1) |
|
4 Commonly Used Stata Commands for Data Analysis |
|
|
47 | |
|
|
47 | (13) |
|
Frequency Distribution Tables |
|
|
47 | (5) |
|
|
52 | (4) |
|
|
56 | (2) |
|
|
58 | (2) |
|
|
60 | (10) |
|
|
68 | (2) |
|
4.3 Comparison of Means Tests |
|
|
70 | (11) |
|
Form 1 One Sample, One Variable Tested against a Hypothesized Population Value |
|
|
70 | (4) |
|
Form 2 One Sample, Two Variables (Paired Samples---"Dependent" Test) |
|
|
74 | (3) |
|
Form 3 One Variable, Two Different Subsamples ("Independent Samples Test") |
|
|
77 | (2) |
|
|
79 | (2) |
|
|
81 | (12) |
|
|
90 | (3) |
|
|
93 | (14) |
|
|
98 | (5) |
|
|
103 | (4) |
|
Appendix A Editing Graphs |
|
|
107 | (2) |
|
Appendix B Data Codebooks |
|
|
109 | (58) |
|
|
110 | (14) |
|
|
124 | (14) |
|
B3 Congress 2008 Codebook |
|
|
138 | (3) |
|
B4 Congress 2008-2012 Codebook |
|
|
141 | (5) |
|
B5 Eurobarometer 69:2 Codebook |
|
|
146 | (7) |
|
|
153 | (10) |
|
|
163 | (4) |
|
Appendix C An Example of a Term-Wide Set of Computer Exercises---ANES2012A |
|
|
167 | |
Ellen C. Seljan is Assistant Professor of Political Science at Lewis & Clark College.
Peter Galderisi has taught political science methods and statistics for more than three decades, and is currently a lecturer and local internship director in the Political Science Department at the University of California, San Diego. Previously, Galderisi was a Professor or Visiting Professor at Utah State, UCLA, UC Santa Cruz, and Cal State Fullerton. He specializes in U.S. political parties, campaigns and elections, American political development, interest groups, and election law.