In-class Excersice 04

A new article created using the Distill format.

Bomin Kim https://example.com/norajones (Spacely Sprockets)https://example.com/spacelysprokets
2022-05-07

Getting Started

Setting up R packages

To start with, [ggstatsplot]{https://indrajeetpatil.github.io/ggstatsplot/} and tidyverse packages will be launch using library().

packages = c('ggstatsplot', 'tidyverse')
for (p in packages){
  if(!require(p, character.only = T)){
    install.packages(p)
  }
}

Importing data

exam <- read_csv("data/Exam_data.csv")

Working with ggstatsplot

ANOVA test

ggbetweenstats(
  data = exam,
  x = RACE, 
  y = ENGLISH,
  type = "p",
  mean.ci = TRUE, 
  pairwise.comparisons = TRUE, 
  pairwise.display = "s",
  p.adjust.method = "fdr",
  messages = FALSE
)

ggbetweenstats(
  data = exam,
  x = RACE, 
  y = ENGLISH,
  type = "np"
)

ggbetweenstats(
  data = exam,
  x = RACE, 
  y = ENGLISH,
  type = "robust"
)

set.seed(1234)

ggbetweenstats(
  data = exam,
  x = RACE, 
  y = ENGLISH,
  type = "bayes"
)