Copyright
Preface
Acknowledgments
Requirements
1
Introduction to R, RStudio, and R Markdown
1.1
Introduction to R, the language
1.1.1
Benefits of R
1.1.2
Packages
1.2
RSudio
1.2.1
Navigating RStudio
1.3
R Markdown
2
Basics of R
2.1
R, as a Calculator
2.1.1
Order of Operations
2.2
Objects
2.3
Functions
2.3.1
Object Types
2.4
Packages
2.4.1
Installing Packages
2.4.2
Loading Packages
2.4.3
Updating Packages
2.5
R Help
2.6
Setting a Working Directory
2.7
Importing Your Data
3
Formatting, Describing, and Visualizing Data
3.1
Factoring
3.1.1
Coerce Factoring
3.2
Recoding
3.2.1
Factoring and Recoding
3.2.2
Creating a Dummy Variable
3.3
Part III: Building and Sorting Your Data
3.3.1
The Tidyverse
3.3.2
Other Methods of Exploring Your Data
3.4
Working with Nominal Data
3.4.1
Finding the Mode
3.4.2
Visualizing Nominal Data
3.5
Working with Ordinal Data
3.6
Working with Interval Data
4
Visualizing Data, Probability, the Normal Distribution, and Z Scores
4.1
Histograms and Density
4.1.1
Normal Distribution and Histograms
4.2
Probability and Distributions
4.3
Visualizing Normality
4.4
Z-Scores
5
Foundations for Inference
5.1
Testing for Normality
5.1.1
Shapiro-Wilk Test
5.1.2
Testing Normality
5.2
Standard Errors
5.3
Confidence Intervals
5.4
More on Single Sample T-tests
6
Inference for Two Populations
6.1
Proportions
6.1.1
Two Populations
6.2
Cross Tabulations
6.2.1
Other Coefficients
6.3
Independent t-tests
6.3.1
Other Independent Sample Tests
6.4
Paired t-test
6.5
Visualizing Differences in Means
7
Covariance and Correlation
7.1
Covariance
7.1.1
Covariance by Hand
7.1.2
Covariance in R
7.1.3
Covariance in Class Data Set
7.2
Correlation
7.2.1
Correlation by Hand
7.2.2
Correlation Tests
7.2.3
Correlation Across Groups
7.3
Visualizing Correlation
7.3.1
Another Example: Political Party
7.3.2
One More Visualization
8
Bivariate Linear Regression
8.1
Bivariate Linear Regression by Hand
8.1.1
Calculating Goodness of Fit
8.1.2
Checking Our Work
8.2
Bivariate Regression in R
8.3
The Residuals
8.4
Comparing Models
8.4.1
Visualizing Multiple Models
8.5
Hypothesis Testing
9
Multivariable Linear Regression
9.1
Calculating Least-Squared Estimates
9.1.1
Matrix Algebra
9.1.2
Representing System of Linear Equations as Matrices
9.1.3
OLS Regression and Matrices
9.2
Multiple Regression in R
9.3
Hypothesis Testing with Multivariable Regression
9.3.1
Visualizing Multivariable Linear Regression
9.4
Predicting with OLS Regression
10
Categorical Explanatory Variables, Dummy Variables, and Interactions
10.1
Dummy Variables
10.1.1
Multiple Dummy Variables
10.2
Interactions
10.2.1
Interactions with Two Non-binary Variables
10.3
Releveling Variables
10.4
Interaction Plots
11
Non-linearity, Non-normality, and Multicollinearity
11.1
Non-linearity
11.1.1
Exploring Non-linearity
11.2
Non-normality
11.3
Multicollinearity
11.4
Standardizing Coefficients
12
Diagnosing and Addressing Problems in Linear Regression
12.1
Introduction to the Data
12.2
Outliers
12.3
Heteroscedasticity
12.4
Revisiting Linearity
12.4.1
Normality
13
Logistic Regression
13.1
Logistic Regression with a Binary DV
13.1.1
Goodness of Fit, Logit Regression
13.1.2
Percent Correctly Predicted
13.1.3
Logit Regression with Groups
13.2
Ordered Logit and Creating an Index
14
Statistical Simulations
14.1
The Basics
14.1.1
Plotting Predictions with Zelig
14.2
Other Models
14.2.1
Ordered Logit
14.2.2
Another Example
14.3
Zelig with non-Zelig Models:
15
Appendix: Guide to Data Visualization
15.1
Deciding Which Visualization to Use
For Exploring a Single Variable
For Displaying Two (or more) Variables
15.2
Adding Labels
15.3
Scale and Limits
15.4
Visualizing Error
Confidence Intervals
Error Bars
15.5
Adding Color
15.6
Position Adjustments
15.7
Using Themes
15.8
Putting it All Together
Lab Guide to Quantitative Research Methods in Political Science, Public Policy & Public Administration
Lab Guide to Quantitative Research Methods in Political Science, Public Policy & Public Administration
Joseph Ripberger, Cody Adams, Alex Davis, and Josie Davis
Copyright