On Jun 27, 2012, at 13:15 , Uwe Ligges wrote: > > 1 - crossprod(residuals(model)) / crossprod(y - mean(y))
And the reason why that is not used in R: > y<- rnorm(100,10,1) > x <- 1:100 > model <- lm(y~x-1) > > 1 - crossprod(residuals(model)) / crossprod(y - mean(y)) [,1] [1,] -27.60012 -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd....@cbs.dk Priv: pda...@gmail.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.