06.09.2021 Views

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

13 Comparing two means 379<br />

13.1 The one-sample z-test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379<br />

13.2 The one-sample t-test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385<br />

13.3 The independent samples t-test (Student test) . . . . . . . . . . . . . . . . . . . . . . . . 389<br />

13.4 The independent samples t-test (Welch test) . . . . . . . . . . . . . . . . . . . . . . . . . 398<br />

13.5 The paired-samples t-test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400<br />

13.6 One sided tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408<br />

13.7 Using the t.test() function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410<br />

13.8 Effect size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412<br />

13.9 Checking the normality of a sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416<br />

13.10 Testing non-normal data <strong>with</strong> Wilcoxon tests . . . . . . . . . . . . . . . . . . . . . . . . 420<br />

13.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422<br />

14 Comparing several means (one-way ANOVA) 425<br />

14.1 An illustrative data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425<br />

14.2 How ANOVA works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427<br />

14.3 Running an ANOVA in R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437<br />

14.4 Effect size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440<br />

14.5 Multiple comparisons <strong>and</strong> post hoc tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 441<br />

14.6 Assumptions of one-way ANOVA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446<br />

14.7 Checking the homogeneity of variance assumption . . . . . . . . . . . . . . . . . . . . . 447<br />

14.8 Removing the homogeneity of variance assumption . . . . . . . . . . . . . . . . . . . . . 449<br />

14.9 Checking the normality assumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450<br />

14.10 Removing the normality assumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450<br />

14.11 On the relationship between ANOVA <strong>and</strong> the Student t test . . . . . . . . . . . . . . . . 453<br />

14.12 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br />

15 Linear regression 457<br />

15.1 What is a linear regression model? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457<br />

15.2 Estimating a linear regression model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459<br />

15.3 Multiple linear regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461<br />

15.4 Quantifying the fit of the regression model . . . . . . . . . . . . . . . . . . . . . . . . . . 464<br />

15.5 Hypothesis tests <strong>for</strong> regression models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466<br />

15.6 Testing the significance of a correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . 470<br />

15.7 Regarding regression coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472<br />

15.8 Assumptions of regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474<br />

15.9 Model checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475<br />

15.10 Model selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490<br />

15.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495<br />

16 Factorial ANOVA 497<br />

16.1 Factorial ANOVA 1: balanced designs, no interactions . . . . . . . . . . . . . . . . . . . 497<br />

16.2 Factorial ANOVA 2: balanced designs, interactions allowed . . . . . . . . . . . . . . . . . 506<br />

16.3 Effect size, estimated means, <strong>and</strong> confidence intervals . . . . . . . . . . . . . . . . . . . . 513<br />

16.4 Assumption checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517<br />

16.5 The F test as a model comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518<br />

16.6 ANOVA as a linear model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521<br />

16.7 Different ways to specify contrasts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532<br />

16.8 Post hoc tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537<br />

16.9 The method of planned comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539<br />

16.10 Factorial ANOVA 3: unbalanced designs . . . . . . . . . . . . . . . . . . . . . . . . . . . 539<br />

16.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551<br />

viii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!