search for: ricilulously

Displaying 1 result from an estimated 1 matches for "ricilulously".

2011 Mar 30
1
wrong calculation of R-squared in summary.lm
Dear all, I just stumbled upon the fact, that when I perform a regression on multivariate responses, that are not centred, I get a ricilulously high R-squared value. After reading the code of summary.lm, I found a bug in the function summary.lm: mss is calculated by: mss <-sum((f - mean(f))^2) - where f are the fitted values. This works only for a single response variable, because otherwise the matrix containing the fitted value...