Tables and Figures
Preface
Getting Started
Copying the Data Files to Floppy Disk or Other Portable Media
How to Handle the Datasets
Contents of the Datasets
Notes
1. Introduction to Stata
Commands Covered: describe, codebook, set more off, search, help
Changing General Preferences
Obtaining Information about a Dataset
Obtaining Information about Variables
Creating and Viewing a Log File
A Closer Look: Obtaining Specific Variable Information with Define Notes
Printing Results
Getting Help
Exercises
Notes
2. Descriptive Statistics
Commands Covered: tab1, summarize, sktest, histogram, Submit button
Interpreting Measures of Central Tendency and Variation
Describing Nominal Variables
Describing Ordinal Variables
Describing Interval-level Variables
Obtaining Bar Charts and Histograms
Creating Bar Charts
Creating Histograms
A Closer Look: The Submit Button and the OK Button: What's the Difference?
Exercises
Notes
3. Transforming Variables
Commands Covered: recode, generate; generate, recode; xtile,
nquantiles; generate; tabulate, generate; label
variable; label define; label values; drop;
aorder
Transforming Categorical Variables
Transforming Interval-level Variables
A Closer Look: The xtile Command
The label define and label values Commands
Creating an Additive Index
Creating Indicator Variables
Exercises
Notes
4. Making Comparisons
Commands covered: tabulate, column; tabulate, summarize;
graph bar; format; replace
Cross-tabulation Analysis
Mean Comparison Analysis
A Closer Look: The format Command
Visualizing Relationships with Bar Charts
Graphing an Interval-level Dependent Variable
Graphing a Categorical Dependent Variable
A Closer Look: The replace Command
Exercises
Notes
5. Making Controlled Comparisons
Commands Covered: (prefix) bysort:, tabulate, col; tabulate,
summarize; graph bar; if
Cross-tabulation Analysis with a Control Variable
A Closer Look: The if Qualifier
Bar Charts for Controlled Comparisons with a Categorical Dependent
Variable
Mean Comparison Analysis with a Control Variable
Bar Charts for Controlled Comparisons with an Interval-level
Dependent Variable
Exercises
Notes
6. Making Inferences about Sample Means
Commands Covered: ttest; ttest, by; robvar, by
Describing a Sample Mean
Testing the Difference between Two Sample Means
Exercises
Notes
7. Chi-square and Measures of Association
Commands Covered: (tabulate option) chi2; (tabulate option) taub;
(tabulate option) V; somersd; lambda; which; ssc install
Installing lambda and somersd
Analyzing Ordinal-level Relationships
Analyzing Nominal-level Relationships
A Problem with Lambda
Exercises
Notes
8. Correlation and Linear Regression
Commands Covered: correlate; regress; graph twoway (scatter); graph
twoway (scatter)(lfit)
The correlate Command and the regress Command
Creating a Scatterplot
A Closer Look: R-squared and Adjusted R-squared: What's the difference?
Exploring Multivariate Relationships with Regression
Exercises
Notes
9. Dummy Variables and Interaction Effects
Commands Covered: xi: regress; char [omit]; test
Regression with Dummy Variables
A Closer Look: The test Command
Interaction Effects in Multiple Regression
Graphing Linear Prediction lines for Interaction Relationships
Exercises
Notes
10. Logistic Regression
Commands Covered: logit; logistic; estimates store; lrtest, force;
predict; adjust; by pr gen; quietly:; tabstat,
by
The logit Command and the logistic Command
Logistic Regression with Multiple Independent Variables
A Closer Look: The estimates Command and the lrtest Command
Working with Predicted Probabilities: Models with One Independent Variable
Working with Predicted Probabilities: Models with Multiple Independent Variables
Exercises
Notes
11. Doing Your Own Political Analysis
Command Covered: insheet
Five Doable Ideas
Political Knowledge
Economic Performance and Election Outcomes
State Courts and Criminal Procedure
Electoral Turnout in Comparative Perspective
Congress
Doing Research on the U.S. Senate
Finding Raw Data
How to Code Raw Data
A Closer Look: The Stata Data Editor
Two Possible Coding Shortcuts
Importing Text Data
Writing It Up
The Research Question
Previous Research
Data, Hypotheses, and Analysis
Conclusions and Implications
Notes