[R] lm methods inconsistency?
tom at ait-tech.com
Mon Jan 10 17:19:54 CET 2000
I'm very new to R so maybe i'm doing something wrong so
please let me know it that is that case.
Here is an example where the summary() and residuals()
applied to lm object produce different results
(I think the residuals() results is correct since SAS produces
those numbers - the second residual corresponding to observation
with weight 4 is wrong in summary()).
x <- c( 10, 20, 30, 40 )
y <- c( 33.8, 62.2, 92.0, 122.4 )
w <- c( 1, 4, 1, 1 )
lm.obj <- lm( y ~ x, weights=w )
print( summary( lm.obj ) )
print( residuals( lm.obj ) )
PS. my version or R is 0.64.2 on Linux.
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help