Course Outline

list Items Test Book

Book
  • Items Test Book

ckcode ⌲ chapter-c2-model-comparison

require(coursekata) # import game_data students_per_game <- 35 game_data <- data.frame( outcome = c(16,8,9,9,7,14,5,7,11,15,11,9,13,14,11,11,12,14,11,6,13,13,9,12,8,6,15,10,10,8,7,1,16,18,8,11,13,9,8,14,11,9,13,10,18,12,12,13,16,16,13,13,9,14,16,12,16,11,10,16,14,13,14,15,12,14,8,12,10,13,17,20,14,13,15,17,14,15,14,12,13,12,17,12,12,9,11,19,10,15,14,10,10,21,13,13,13,13,17,14,14,14,16,12,19), game = c(rep("A", students_per_game), rep("B", students_per_game), rep("C", students_per_game)) ) # this code fits the game model and saves it as game_model game_model <- lm(outcome ~ game, data = game_data) # Run pairwise comparisons with no corrections pairwise( ) # Run pairwise comparisons with Tukey corrections pairwise( ) # this code fits the game model and saves it as game_model game_model <- lm(outcome ~ game, data = game_data) # modify this code to generate pairwise plots pairwise(game_model, correction = "none") # Run pairwise comparisons with Tukey corrections pairwise(game_model) ex() %>% { check_function(., "pairwise", index = 1) %>% check_result() %>% check_equal() check_function(., "pairwise", index = 2) %>% check_result() %>% check_equal() }
CK Code: ch10-08-01-code

Responses