In-class Exercise 4

In-class Exercise

Lesson 4: Fundamentals of Visual Analytics, in-class exercise.

Leslie Long Nu https://www.linkedin.com/in/leslielongnu/ (SMU, MITB)https://scis.smu.edu.sg/master-it-business
2022-05-07

Setting up R Packages

To start with, ggstatsplot and tidyverse package will be launched using library().

packages = c('ggstatsplot', 'tidyverse', 'PMCMRplus')
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

In the code chunk below, ggbetweenstats() is used to build a visual for Bayes factors test on English score by race.

set.seed(1234)

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