R Tutorial - #9 - t-tests and one-way independent ANOVA
Channel: Statistics for Doctors
Date: 2020-12-16

Sections:
0:00 Introduction
0:53 Description of the data set (Alcohol and Self-control Study)
2:08 Import the data set and create a data frame
2:34 Transform the predictors into factored variables
3:39 Descriptive statistics
4:55 Make a 'jittered' scatterplot using ggplot
8:53 Difference between the Student's vs. Welch's t-test
9:47 Student's t-test
11:48 Welch's t-test
12:12 Paired-sample t-test
13:23 One-way independent ANOVA using the afex package
30:16 Plot different data frames in one ggplot
37:08 Extract the residuals/predicted values
40:04 Testing parametric test assumptions
42:34 One-way independent ANOVA using the lm() function
47:05 Extract the residuals/predicted values
47:30 Testing parametric test assumptions

I begin by describing a new data set we will be analyzing over the next few tutorials (Alcohol and Self-control Study). After factoring the predictors and getting some descriptive statistics of the outcome measure, I show you how to make a helpful scatter plot with 'jittered' dots. I then show you how to do the different types of t-tests in R. The rest of the tutorial is divided into two parts. First, I explain how to run a one-way independent ANOVA using the aov_4() function from the afex package. Second, I explain how to do the same analysis using the lm() function.

To freely download the R code and data sets used in this tutorial series, visit http://github.com/Statistics4Doctors. This tutorial analyzes a data set modified from data built by Dr. Andy Field (https://www.youtube.com/user/ProfAndyField) for his textbooks on statistics: Discovering Statistics using R (https://tinyurl.com/y6r6wsot) and SPSS (https://edge.sagepub.com/field5e).