Assess how much of the error in prediction is due to lack of model fit.
pure_error_anova(model, ...)
lm
pure_error_anova
returns an object of class
"pure_error_anova"
. An object of class "pure_error_anova"
is a
list containing the following components:
Kutner, MH, Nachtscheim CJ, Neter J and Li W., 2004, Applied Linear Statistical Models (5th edition). Chicago, IL., McGraw Hill/Irwin.
model <- lm(mpg ~ disp, data = mtcars) pure_error_anova(model)#> Lack of Fit F Test #> ----------------- #> Response : mpg #> Predictor: disp #> #> Analysis of Variance Table #> ------------------------------------------------------------ #> DF Sum Sq Mean Sq F Value Pr(>F) #> ------------------------------------------------------------ #> disp 1 808.89 808.89 314.01 0.00 #> Residual 30 317.16 10.57 #> Lack of fit 25 304.28 12.17 4.72 0.05 #> Pure Error 5 12.88 2.58 #> ------------------------------------------------------------