[R] residuals

Shawn Way sway at tanox.com
Thu Apr 15 16:41:48 CEST 2004


I'm trying to determine the lack of fit for regression on the following:

data <- data.frame(ref=c(0,50,100,0,50,100),
                             actual=c(.01,50.9,100.2,.02,49.9,100.1),
                             level=gl(3,1))
fit <- lm(actual~ref,data)
fit.aov <- aov(actual~ref+Error(level),data)

According to the information I have, the lack of fit for this regression is
the f-ratio between the residuals of the level contribution and the
residuals within.  I'm trying to get the information from the fit to make
this ratio of the residual mean squares.

Any thoughts?




More information about the R-help mailing list