A Stata® Companion to Political Analysis, Fifth Edition
Build a reproducible political analysis with Stata
Learn to analyze political data with Stata through guided commands, annotated screenshots, and exercises with real political data. Build a repeatable workflow with Do-files, interpret results, and produce clear tables and graphs for your own research. Prepare for your first lab or find support for teaching.
A clearer teaching sequence: 15 chapters give visualization, random assignment and research ethics, statistical inference, and regression diagnostics dedicated attention.
Updated political data: 2020 GSS and NES survey data, a debate experiment, and revised States and World datasets connect methods to substantive questions.
Practice with support: five printed exercises per chapter, tutorial videos, and adopter Do-files, solutions, and additional fillable exercises help instructors build course modules.
The authors prepared examples with Stata 14, 15, and 17. Companion datasets are saved in Stata 12 format for compatibility with earlier releases. Access to Stata is required.
Expand a section for its overview, outline, and supporting materials. Numbered chapters have five printed exercises; adopter Do-files, solutions, and additional fillable exercises are accessed through Sage.
Related-reading links here use Essentials, Seventh Edition; printed references in the Stata book use the sixth edition.
Section numbers in these outlines are provided as a reading guide to the chapter hierarchy.
Front Matter
Publication information and guidance for teaching and learning political analysis with Stata.
Copyright
List of Boxes
List of Figures
List of Tables
Preface
What's New in the Fifth Edition?
Stata Companion Datasets
Textbook Features
Different Releases of Stata
Accompanying Core Text
Acknowledgments
Getting Started with Stata
Locate and open the companion datasets, tour the Stata interface, and run describe and codebook to examine variables and their coding. Use the Command, Review, and Variables windows efficiently, and find chapter tutorials and resources before beginning the guided examples.
Defined terms: Command language, Comments, Datasets, General syntax, Graphical user interface
1. Using Stata for Data Analysis
Learn command syntax, options, and conditions, and use the graphical interface to discover commands. Write reusable Do-files, print and copy output, customize your display, create log files that preserve commands and results, and use Stata’s help system.
Choose descriptive statistics for nominal, ordinal, and interval-level measures. Read frequency tables, compare weighted and unweighted analysis, describe central tendency and dispersion, create bar charts and histograms, and obtain case-level information for political datasets.
A Closer Look: Weighted and Unweighted Analysis: What’s the Difference?
2.4 Bar Charts for Nominal and Ordinal Variables
2.5 Describing Interval Variables
A Closer Look: Stata’s Graph Editor
2.6 Histograms for Interval Variables
2.7 Obtaining Case-Level Information
Key Terms
Chapter 2 Exercises
Defined terms: Bar chart, Bins, Cumulative percent, Frequency distribution table, Histogram, Interquartile range, Interval, Kurtosis, Level of measurement, Median, Mode, Nominal, Ordinal, Range, Raw frequencies, Skewness, Standard deviation, Unweighted data, Variance, Weighted data
In the book: Learning objectives, 5 printed exercises.
Create dummy variables, apply mathematical operators, and manage variable descriptions and value labels using commands and the Variables Manager. Collapse categories, center or standardize numeric measures, and combine related variables into an additive index for later analysis.
Generate and interpret cross-tabulations and mean comparison tables, including weighted observations. Visualize comparisons with simple bar charts and box plots, format reported results, and group interval-level independent variables to examine political differences across categories.
Choose graphs for binary, nominal, ordinal, and interval-level dependent variables. Build bar charts, area charts, multiple line plots, box plots, and scatterplots, using markers, jitter, and other options to communicate relationships and distributional patterns clearly.
5.1.1 Simple Bar Charts with Nominal-Level Independent Variables
5.1.2 Area Chart with Ordinal-Level Independent Variables
5.1.3 Graphs with Interval-Level Independent Variables
5.2 Graphs for Nominal-Level Dependent Variables
5.2.1 Clustered Bar Charts with Nominal Independent Variables
5.2.2 Multiple Line Plots with Ordinal Independent Variables
5.2.3 Graphs with Interval-Level Independent Variables
5.3 Graphs for Ordinal-Level Dependent Variables
5.3.1 Using Bars to Represent Select Values
5.3.2 Stacked Bar Chart for an Ordinal–Ordinal Relationship
5.3.3 Graphs with Interval-Level Independent Variables
5.4 Graphs for Interval-Level Dependent Variables
5.4.1 Plotting Means with Bars or Lines
5.4.2 Box Plots
5.4.3 Scatterplots
Key Terms
Chapter 5 Exercises
Defined terms: Aggregated data, Area chart, Box plot, Clustered bar chart, Jitter, Markers, Multiple line chart, Scatterplot, Simple bar chart, Simple line chart, Stacked bar chart, Strip chart
In the book: Learning objectives, 5 printed exercises.
Create randomized groups, including groups of predetermined size, and assess assignment and treatment effects in an experiment. Draw samples with or without replacement, explore systematic and grouped sampling, select qualitative cases, and apply research ethics and replication Do-file practices.
6.1.3 Random Assignment to Predetermined Size Groups
6.2 Analyzing the Results of an Experiment
6.2.1 Assessing Random Assignment
6.2.2 Evaluating the Effect of Treatment
6.3 Random Sampling
6.3.1 Simple Random Samples with Replacement
6.3.2 Simple Random Samples without Replacement
6.3.3 Systematic Random Samples
6.3.4 Clustered and Stratified Random Samples
6.4 Selecting Cases for Qualitative Analysis
6.4.1 Most Similar Systems
6.4.2 Most Different Systems
6.5 Analyzing Data Ethically
6.5.1 Ethical Issues in Data Analysis
6.5.2 Ten Tips for Writing Replication Do-files
Key Terms
Chapter 6 Exercises
Defined terms: Binomial distribution, Clusters, Discrete distribution, Human subjects, Most different systems, Most similar systems, Period, Random assignment, Random seed value, Replacement, Replication, Robustness checks, Simple random sample, Starting value, Stratum, Systematic random sample
In the book: Learning objectives, 5 printed exercises.
Add control variables to cross-tabulations and mean comparisons using Stata’s grouping tools. Interpret spurious, additive, and interactive relationships, visualize controlled results for categorical and numeric outcomes, and use the if qualifier to examine selected observations.
Simulate samples to understand estimates of population proportions and means. Explore sampling distributions, the normal distribution, standard errors, and the empirical rule, then construct and interpret confidence intervals, margins of error, and Student’s t-based estimates.
8.1 Estimating Population Parameters with Simulations
A Closer Look: Using Probability Distributions to Simulate Raw Data
8.2 Expected Shape of Sampling Distributions
8.2.1 Central Limit Theorem and the Normal Distribution
8.2.2 Normal Distribution of Sample Proportions
8.2.3 Normal Distribution of Sample Means
8.2.4 The Standard Normal Distribution
8.2.5 The Empirical Rule (68-95-99 Rule)
8.3 Confidence Intervals and Margins of Error
8.3.1 Critical Values for Confidence Intervals
8.3.2 Reporting the Confidence Interval for a Sample Proportion
8.3.3 Reporting the Confidence Interval for a Sample Mean
8.4 Student’s t-Distribution: When You’re Not Completely Normal
8.4.1 The t-Distribution’s Role in Inferential Statistics
8.4.2 Critical Values of t-Distributions
Key Terms
Chapter 8 Exercises
Defined terms: Confidence intervals, Critical values, Cumulative density function, Degrees of freedom, Inferential statistics, Margin of error, Population, Population parameters, Point estimate, Probability density function, Sample, Sampling distributions, Sample statistics, Standard error, Standard error of a sample proportion, Standard error of a sample mean, Standard normal distribution, t-Distribution
In the book: Learning objectives, 5 printed exercises.
Translate research questions into null hypotheses and test claims about proportions and means. Compare one sample with a hypothesized value or compare two groups or variables, account for variance assumptions, and work with weighted observations where appropriate.
Test independence with chi-square, compare observed and expected frequencies, and interpret results with weighted data and control variables. Measure association with lambda, Somers’ d, and Cramer’s V, and use single-factor and two-factor ANOVA to compare group means.
A Closer Look: Other Applications of Chi-Square Tests
10.2 Measuring the Strength of Association between Categorical Variables
10.2.1 Lambda
10.2.2 Somers’ D
10.2.3 Cramer’s V
10.3 Chi-Square Test and Measures of Association in Controlled Comparisons
10.3.1 Analyzing an Ordinal-Level Relationship with a Control Variable
10.3.2 Analyzing a Nominal-Level Relationship with a Control Variable (and Weighted Observations)
10.4 Analysis of Variance
10.4.1 How ANOVA Works
10.4.2 Single-Factor ANOVA
10.4.3 Two-Factor ANOVA
10.4.4 Stata’s F-Distribution Functions
Key Terms
Chapter 10 Exercises
Defined terms: Analysis of variance, Chi-square distribution, Chi-square test statistic, Conditional distributions, Cramer’s V, Expected frequencies, F-distribution, F-statistic, Informed prediction errors, Lambda, Marginal distribution, Measures of association, Naïve prediction errors, Observed frequencies, Single-factor, Somers’ d, Sum of squares between groups, Sum of squares within groups, Total sum of squares, Two-factor
In the book: Learning objectives, 5 printed exercises.
Calculate correlations between two or more variables, estimate bivariate regressions, and interpret coefficients and model fit. Create scatterplots with prediction lines, analyze weighted observations, and use graphical layers and academic-style tables to present results clearly.
Estimate multiple regressions, interpret partial effects and beta coefficients, and visualize results with bubble plots. Work with weighted data, multiple dummy variables and reference categories, then create interaction terms and prediction lines to explain relationships that differ across groups.
Calculate predicted values and squared and standardized residuals, then examine model assumptions with histograms and diagnostic plots. Test normality and constant variance for bivariate and multiple regression models, consider other diagnostic tests, and address or disclose problems in the analysis.
13.1 Expected Values, Observed Values, and Regression Residuals
13.1.1 Example from Bivariate Regression Analysis
13.1.2 Residuals from Multiple Regression Analysis
13.2 Squared and Standardized Residuals
13.2.1 Squared Residuals
13.2.2 Standardized Residuals
13.3 Assumptions about Regression Residuals
13.4 Analyzing Graphs of Regression Residuals
13.4.1 Histogram of Regression Residuals
13.4.2 Residual Diagnostic Plots
13.5 Testing Regression Assumptions with Residuals
13.5.1 Testing the Assumption That Residuals Are Normally Distributed
13.5.2 Testing the Constant Variance Assumption
13.5.3 Regression Diagnostics for Multiple Regression Analysis
A Closer Look: Other Regression Diagnostic Tests
13.6 What If You Diagnose Problems with Residuals?
Key Terms
Chapter 13 Exercises
Defined terms: Assumptions of linear regression model, Breusch-Pagan test, Histogram of regression residuals, Jarque-Bera test, Limitations to analysis, Observed values, Q-Q plots, Regression residuals, Residuals vs. fitted plot, Squared residuals, Standardized residuals, Sum of squared errors, Table of residuals, Two components of regression model
In the book: Learning objectives, 5 printed exercises.
Connect binary outcomes with probabilities, odds, and logged odds. Estimate logistic models with one or several predictors, interpret odds ratios and model fit, use weighted observations, and graph predicted probabilities at representative values, predictor means, and combinations of categorical and numeric predictors.
Develop a feasible research project on political attitudes, elections, state policies, religion, or race. Open Stata datasets, import Excel or web-table data, enter new observations, and organize a research report from its question and previous research through analysis, limitations, and conclusions.
Look up the coding and descriptions of variables from the experiment on the televised 1960 presidential debate, including assignment, participant characteristics, candidate assessments, and perceived outcomes.
Table A-1: Variables in the Debate Experiment Dataset
Variables in alphabetical order
Appendix: GSS Dataset
Find variable names and coding information for the General Social Survey teaching dataset, including respondent characteristics, political attitudes, and social and policy preferences.
Table A-2: Variables in the GSS Dataset
Variables in alphabetical order
Appendix: NES Dataset
Find variable descriptions and coding for the National Election Study teaching dataset, including political knowledge, campaign and election attitudes, issue preferences, and respondent characteristics.
Table A-3: Variables in the NES Dataset
Variables in alphabetical order
Appendix: States Dataset
Explore state-level measures by topic, from demographics, elections, and the economy to courts, civic culture, health, and public policy. Consult coding descriptions and sources before comparing states.
Table A-4: Variables in the States Dataset
Index
Abortion Related
Civic Culture
Courts
Demographics
Education
Economy
Elections And Representation
Gay Rights
Geography
Gun Related
Health
Religion
Appendix: World Dataset
Explore country-level measures of government, conflict, economic conditions, health, education, and development. Use the topic groupings and variable descriptions to identify measures for comparative analysis.
Table A-5: Variables in the World Dataset
Identifiers
Conflict And Military
Democratization
Demographics
Economy
Education
Elections
Environment
Government And Politics
Health
History
International Relations
Internet And Media
Justice System
Migration
Religion
Social/Development
Women’s Rights
Glossary
The book ends with an alphabetical reference to the statistical concepts, Stata terminology, and research methods introduced throughout the chapters. Chapter-specific term lists appear above with each chapter's resources.