# ferdo R Lab | Lesson 6 | Independent TODO analysis template # Synthetic data. The original CSV must stay unchanged. stopifnot(file.exists("data/class_synthetic.csv")) d <- read.csv("data/class_synthetic.csv",na.strings=c("","NA"), stringsAsFactors=FALSE) d$group <- factor(d$group,levels=c("A","B")) # TODO 1: Check dimensions, column types and missing scores/hours. # Explain why 0 differs from NA. # TODO 2: Count complete study_hours / quiz_score pairs. # TODO 3: Safely filter quiz_score >= 70, excluding missing score rows. # TODO 4: Construct a 3-column summary data.frame: # group, valid_n, mean_score. Explain valid_n vs total group size. # TODO 5: Labelled boxplot comparing quiz_score across groups. # TODO 6: Labelled scatterplot (study_hours, quiz_score). # Use a single common complete.cases mask for both axes. # OPTIONAL if your UCL module requires correlation: # TODO 7: cor() and/or lm(), with a noncausal interpretation. # TODO 8: Explain two results and two limitations in the report template.