Evaluating the NYC SAT Scores Factorial Model
We've built our model, so we know what's next: model checking! We need to examine both if our outcome and our model residuals are normally distributed. We'll check the normality assumption using shapiro.test()
. A low p-value means we can reject the null hypothesis that the sample came from a normally distributed population.
Let's carry out the requisite model checks for our 2^k factorial model, nyc_scores_factorial
, which has been loaded for you.
Diese Übung ist Teil des Kurses
Experimental Design in R
Anleitung zur Übung
- Test the outcome
Average_Score_SAT_Math
fromnyc_scores
for normality usingshapiro.test()
. - Set up a 2 by 2 grid for plots and plot the
nyc_scores_factorial
model object to create the residual plots.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Use shapiro.test() to test the outcome
___
# Plot nyc_scores_factorial to examine residuals
par(mfrow = c(2,2))
___