Acknowledgments |
|
x | |
0 Preface: Approach and How to Use This Book |
|
xii | |
|
|
xii | |
|
|
xiii | |
|
|
xiv | |
|
0.4 R Packages Required for This Book |
|
|
xv | |
|
0.5 What This Book Is Not |
|
|
xv | |
|
|
xv | |
|
0.7 Information for Teachers |
|
|
xvi | |
1 Introduction to R |
|
1 | (26) |
|
|
1 | (1) |
|
1.2 Baby Steps: Simple Math with R |
|
|
2 | (2) |
|
|
4 | (1) |
|
|
5 | (2) |
|
|
7 | (2) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
13 | (3) |
|
|
16 | (3) |
|
|
19 | (1) |
|
1.13 Installing Loading and Citing Packages |
|
|
20 | (1) |
|
|
21 | (1) |
|
1.15 A Note on Keyboard Shortcuts |
|
|
22 | (1) |
|
1.16 Your R Journey: The Road Ahead |
|
|
23 | (4) |
2 The Tidyverse and Reproducible R Workflows |
|
27 | (26) |
|
|
27 | (1) |
|
|
28 | (2) |
|
|
30 | (4) |
|
|
34 | (2) |
|
|
36 | (1) |
|
2.6 A More Extensive Example: Iconicity and the Senses |
|
|
37 | (7) |
|
|
44 | (1) |
|
2.8 Folder Structure for Analysis Projects |
|
|
45 | (1) |
|
2.9 Readme Files and More Markdown |
|
|
46 | (1) |
|
2.10 Open and Reproducible Research |
|
|
47 | (6) |
3 Descriptive Statistics, Models, and Distributions |
|
53 | (16) |
|
|
53 | (1) |
|
|
53 | (1) |
|
3.3 The Normal Distribution |
|
|
54 | (3) |
|
3.4 Thinking of the Mean as a Model |
|
|
57 | (1) |
|
3.5 Other Summary Statistics: Median and Range |
|
|
58 | (1) |
|
3.6 Boxplots and the Interquartile Range |
|
|
59 | (1) |
|
3.7 Summary Statistics in R |
|
|
60 | (4) |
|
3.8 Exploring the Emotional Valence Ratings |
|
|
64 | (3) |
|
|
67 | (2) |
4 Introduction to the Linear Model: Simple Linear Regression |
|
69 | (17) |
|
4.1 Word Frequency Effects |
|
|
69 | (2) |
|
4.2 Intercepts and Slopes |
|
|
71 | (1) |
|
4.3 Fitted Values and Residuals |
|
|
72 | (2) |
|
4.4 Assumptions: Normality and Constant Variance |
|
|
74 | (1) |
|
4.5 Measuring Model Fit with R2 |
|
|
74 | (3) |
|
4.6 A Simple Linear Model in R |
|
|
77 | (5) |
|
4.7 Linear Models with Tidyverse Functions |
|
|
82 | (1) |
|
4.8 Model Formula Notation: Intercept Placeholders |
|
|
83 | (1) |
|
|
84 | (2) |
5 Correlation, Linear, and Nonlinear Transformations |
|
86 | (17) |
|
|
86 | (1) |
|
|
87 | (2) |
|
|
89 | (1) |
|
5.4 Using Logarithms to Describe Magnitudes |
|
|
90 | (4) |
|
5.5 Example: Response Durations and Word Frequency |
|
|
94 | (4) |
|
5.6 Centering and Standardization in R |
|
|
98 | (3) |
|
5.7 Terminological Note on the Term 'Normalizing' |
|
|
101 | (1) |
|
|
101 | (2) |
6 Multiple Regression |
|
103 | (14) |
|
6.1 Regression with More Than One Predictor |
|
|
103 | (2) |
|
6.2 Multiple Regression with Standardized Coefficients |
|
|
105 | (4) |
|
6.3 Assessing Assumptions |
|
|
109 | (3) |
|
|
112 | (3) |
|
|
115 | (1) |
|
|
116 | (1) |
7 Categorical Predictors |
|
117 | (16) |
|
|
117 | (1) |
|
7.2 Modeling the Emotional Valence of Taste and Smell Words |
|
|
117 | (2) |
|
7.3 Processing the Taste and Smell Data |
|
|
119 | (3) |
|
7.4 Treatment Coding in R |
|
|
122 | (1) |
|
7.5 Doing Dummy Coding By Hand |
|
|
123 | (1) |
|
7.6 Changing the Reference Level |
|
|
124 | (1) |
|
|
125 | (2) |
|
7.8 Categorical Predictors with More Than Two Levels |
|
|
127 | (2) |
|
|
129 | (1) |
|
7.10 Other Coding Schemes |
|
|
130 | (1) |
|
|
131 | (2) |
8 Interactions and Nonlinear Effects |
|
|
|
133 | (1) |
|
8.2 Categorical * Continuous Interactions |
|
|
134 | (5) |
|
8.3 Categorical * Categorical Interactions |
|
|
139 | (7) |
|
8.4 Continuous * Continuous Interactions |
|
|
146 | (4) |
|
|
150 | (5) |
|
8.6 Higher-Order Interactions |
|
|
155 | (1) |
|
|
156 | (1) |
9 Inferential Statistics 1: Significance Testing |
|
157 | (14) |
|
|
157 | (2) |
|
|
159 | (2) |
|
|
161 | (1) |
|
9.4 Standard Errors and Confidence Intervals |
|
|
162 | (3) |
|
|
165 | (1) |
|
9.6 Using t to Measure the Incompatibility with the Null Hypothesis |
|
|
166 | (1) |
|
9.7 Using the t-Distribution to Compute p-Values |
|
|
167 | (2) |
|
|
169 | (2) |
10 Inferential Statistics 2: Issues in Significance Testing |
|
171 | (9) |
|
10.1 Common Misinterpretations of p-Values |
|
|
171 | (1) |
|
10.2 Statistical Power and Type I, II, M, and S Errors |
|
|
171 | (4) |
|
|
175 | (2) |
|
|
177 | (1) |
|
|
178 | (2) |
11 Inferential Statistics 3: Significance Testing in a Regression Context |
|
180 | (18) |
|
|
180 | (1) |
|
11.2 Standard Errors and Confidence Intervals for Regression Coefficients |
|
|
180 | (4) |
|
11.3 Significance Tests with Multilevel Categorical Predictors |
|
|
184 | (4) |
|
11.4 Another Example: The Absolute Valence of Taste and Smell Words |
|
|
188 | (2) |
|
11.5 Communicating Uncertainty for Categorical Predictors |
|
|
190 | (4) |
|
11.6 Communicating Uncertainty for Continuous Predictors |
|
|
194 | (3) |
|
|
197 | (1) |
12 Generalized Linear Models 1: Logistic Regression |
|
198 | (20) |
|
12.1 Motivating Generalized Linear Models |
|
|
198 | (1) |
|
12.2 Theoretical Background: Data-Generating Processes |
|
|
198 | (4) |
|
12.3 The Log Odds Function and Interpreting Logits |
|
|
202 | (2) |
|
12.4 Speech Errors and Blood Alcohol Concentration |
|
|
204 | (3) |
|
12.5 Predicting the Dative Alternation |
|
|
207 | (3) |
|
12.6 Analyzing Gesture Perception |
|
|
210 | (6) |
|
|
216 | (2) |
13 Generalized Linear Models 2: Poisson Regression |
|
218 | (14) |
|
13.1 Motivating Poisson Regression |
|
|
218 | (1) |
|
13.2 The Poisson Distribution |
|
|
218 | (2) |
|
13.3 Analyzing Linguistic Diversity Using Poisson Regression |
|
|
220 | (5) |
|
13.4 Adding Exposure Variables |
|
|
225 | (2) |
|
13.5 Negative Binomial Regression for Overdispersed Count Data |
|
|
227 | (2) |
|
13.6 Overview and Summary of the Generalized Linear Model Framework |
|
|
229 | (1) |
|
|
230 | (2) |
14 Mixed Models 1: Conceptual Introduction |
|
232 | (13) |
|
|
232 | (1) |
|
14.2 The Independence Assumption |
|
|
232 | (1) |
|
14.3 Dealing with Non-independence via Experimental Design and Averaging |
|
|
233 | (1) |
|
14.4 Mixed Models: Varying Intercepts and Varying Slopes |
|
|
234 | (3) |
|
14.5 More on Varying Intercepts and Varying Slopes |
|
|
237 | (1) |
|
14.6 Interpreting Random Effects and Random Effect Correlations |
|
|
238 | (2) |
|
14.7 Specifying Mixed Effects Models: lme4 syntax |
|
|
240 | (1) |
|
14.8 Reasoning About Your Mixed Model: The Importance of Varying Slopes |
|
|
241 | (3) |
|
|
244 | (1) |
15 Mixed Models 2: Extended Example, Significance Testing, Convergence Issues |
|
245 | (29) |
|
|
245 | (1) |
|
15.2 Simulating Vowel Durations for a Mixed Model Analysis |
|
|
245 | (8) |
|
15.3 Analyzing the Simulated Vowel Durations with Mixed Models |
|
|
253 | (2) |
|
15.4 Extracting Information out of lme4 Objects |
|
|
255 | (2) |
|
15.5 Messing up the Model |
|
|
257 | (3) |
|
15.6 Likelihood Ratio Tests |
|
|
260 | (4) |
|
|
264 | (3) |
|
15.8 Mixed Logistic Regression: Ugly Selfies |
|
|
267 | (4) |
|
15.9 Shrinkage and Individual Differences |
|
|
271 | (1) |
|
|
272 | (2) |
16 Outlook and Strategies for Model Building |
|
274 | (7) |
|
16.1 What You Have Learned So Far |
|
|
274 | (1) |
|
|
275 | (1) |
|
16.3 The Cookbook Approach |
|
|
275 | (1) |
|
|
276 | (1) |
|
16.5 A Plea for Subjective and Theory-Driven Statistical Modeling |
|
|
277 | (2) |
|
16.6 Reproducible Research |
|
|
279 | (1) |
|
|
280 | (1) |
References |
|
281 | (9) |
Appendix A. Correspondences Between Significance Tests and Linear Models |
|
290 | (11) |
|
|
290 | (5) |
|
A2 Tests for Categorical Data |
|
|
295 | (4) |
|
|
299 | (2) |
Appendix B. Reading Recommendations |
|
301 | (3) |
|
|
301 | (1) |
|
B2 Article Recommendations |
|
|
302 | (1) |
|
|
303 | (1) |
Index |
|
304 | (4) |
Index of R Functions |
|
308 | |