|
1 Obtaining R and Downloading Packages |
|
|
1 | (12) |
|
1.1 Background and Installation |
|
|
1 | (2) |
|
|
2 | (1) |
|
1.2 Getting Started: A First Session in R |
|
|
3 | (4) |
|
1.3 Saving Input and Output |
|
|
7 | (2) |
|
1.4 Work Session Management |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (2) |
|
2 Loading and Manipulating Data |
|
|
13 | (20) |
|
|
14 | (5) |
|
2.1.1 Reading Data from Other Programs |
|
|
17 | (1) |
|
|
17 | (1) |
|
|
18 | (1) |
|
2.2 Viewing Attributes of the Data |
|
|
19 | (1) |
|
2.3 Logical Statements and Variable Generation |
|
|
20 | (2) |
|
|
22 | (4) |
|
|
23 | (1) |
|
|
24 | (2) |
|
2.5 Merging and Reshaping Data |
|
|
26 | (5) |
|
|
31 | (2) |
|
|
33 | (20) |
|
3.1 Univariate Graphs in the base Package |
|
|
35 | (5) |
|
|
38 | (2) |
|
|
40 | (7) |
|
3.2.1 Line Graphs with plot |
|
|
43 | (2) |
|
3.2.2 Figure Construction with plot: Additional Details |
|
|
45 | (1) |
|
|
46 | (1) |
|
3.3 Using lattice Graphics in R |
|
|
47 | (2) |
|
|
49 | (1) |
|
|
50 | (3) |
|
|
53 | (10) |
|
4.1 Measures of Central Tendency |
|
|
54 | (6) |
|
|
57 | (3) |
|
4.2 Measures of Dispersion |
|
|
60 | (2) |
|
4.2.1 Quantiles and Percentiles |
|
|
61 | (1) |
|
|
62 | (1) |
|
5 Basic Inferences and Bivariate Association |
|
|
63 | (16) |
|
5.1 Significance Tests for Means |
|
|
64 | (7) |
|
5.1.1 Two-Sample Difference of Means Test, Independent Samples |
|
|
66 | (3) |
|
5.1.2 Comparing Means with Dependent Samples |
|
|
69 | (2) |
|
|
71 | (3) |
|
5.3 Correlation Coefficients |
|
|
74 | (2) |
|
|
76 | (3) |
|
6 Linear Models and Regression Diagnostics |
|
|
79 | (20) |
|
6.1 Estimation with Ordinary Least Squares |
|
|
80 | (4) |
|
6.2 Regression Diagnostics |
|
|
84 | (12) |
|
|
85 | (4) |
|
|
89 | (1) |
|
|
90 | (3) |
|
|
93 | (1) |
|
6.2.5 Outliers, Leverage, and Influential Data Points |
|
|
94 | (2) |
|
|
96 | (3) |
|
7 Generalized Linear Models |
|
|
99 | (28) |
|
|
100 | (10) |
|
|
101 | (3) |
|
|
104 | (1) |
|
7.1.3 Interpreting Logit and Probit Results |
|
|
105 | (5) |
|
|
110 | (6) |
|
|
116 | (7) |
|
|
117 | (2) |
|
7.3.2 Negative Binomial Regression |
|
|
119 | (2) |
|
7.3.3 Plotting Predicted Counts |
|
|
121 | (2) |
|
|
123 | (4) |
|
8 Using Packages to Apply Advanced Models |
|
|
127 | (30) |
|
8.1 Multilevel Models with lme4 |
|
|
128 | (6) |
|
8.1.1 Multilevel Linear Regression |
|
|
128 | (3) |
|
8.1.2 Multilevel Logistic Regression |
|
|
131 | (3) |
|
8.2 Bayesian Methods Using MCMCpack |
|
|
134 | (6) |
|
8.2.1 Bayesian Linear Regression |
|
|
134 | (4) |
|
8.2.2 Bayesian Logistic Regression |
|
|
138 | (2) |
|
8.3 Causal Inference with cem |
|
|
140 | (7) |
|
8.3.1 Covariate Imbalance, Implementing CEM, and the ATT |
|
|
141 | (4) |
|
8.3.2 Exploring Different CEM Solutions |
|
|
145 | (2) |
|
8.4 Legislative Roll Call Analysis with wnominate |
|
|
147 | (6) |
|
|
153 | (4) |
|
|
157 | (30) |
|
9.1 The Box-Jenkins Method |
|
|
158 | (9) |
|
9.1.1 Transfer Functions Versus Static Models |
|
|
163 | (4) |
|
9.2 Extensions to Least Squares Linear Regression Models |
|
|
167 | (8) |
|
9.3 Vector Autoregression |
|
|
175 | (6) |
|
9.4 Further Reading About Time Series Analysis |
|
|
181 | (2) |
|
9.5 Alternative Time Series Code |
|
|
183 | (2) |
|
|
185 | (2) |
|
10 Linear Algebra with Programming Applications |
|
|
187 | (18) |
|
10.1 Creating Vectors and Matrices |
|
|
188 | (6) |
|
|
189 | (3) |
|
10.1.2 Converting Matrices and Data Frames |
|
|
192 | (1) |
|
|
193 | (1) |
|
10.2 Vector and Matrix Commands |
|
|
194 | (4) |
|
|
195 | (3) |
|
10.3 Applied Example: Programming OLS Regression |
|
|
198 | (4) |
|
10.3.1 Calculating OLS by Hand |
|
|
198 | (3) |
|
10.3.2 Writing An OLS Estimator in R |
|
|
201 | (1) |
|
10.3.3 Other Applications |
|
|
202 | (1) |
|
|
202 | (3) |
|
11 Additional Programming Tools |
|
|
205 | (28) |
|
11.1 Probability Distributions |
|
|
206 | (1) |
|
|
207 | (3) |
|
|
210 | (2) |
|
|
212 | (3) |
|
11.5 Optimization and Maximum Likelihood Estimation |
|
|
215 | (2) |
|
11.6 Object-Oriented Programming |
|
|
217 | (6) |
|
|
219 | (4) |
|
11.7 Monte Carlo Analysis: An Applied Example |
|
|
223 | (7) |
|
11.7.1 Strategic Deterrence Log-Likelihood Function |
|
|
225 | (2) |
|
11.7.2 Evaluating the Estimator |
|
|
227 | (3) |
|
|
230 | (3) |
References |
|
233 | (4) |
Index |
|
237 | |