[Rd] lm() appears to fail with large number of variables (PR#
Thu, 23 Nov 2000 06:53:43 +1000
This is not a bug, only evidence that the least squares fitting procedure is
more numerically robust than I had expected.
With 11 observations you can only estimate 11 linearly independent
regression coefficients (at best). That's what you got (intercept + first
10 variables). How many did you expect to get estimates for?
In summary: no bug, lm is working as advertised.
> -----Original Message-----
> From: firstname.lastname@example.org [mailto:email@example.com]
> Sent: Thursday, 23 November 2000 6:29
> To: firstname.lastname@example.org
> Cc: Remail@example.com
> Subject: [Rd] lm() appears to fail with large number of variables
> Full_Name: Mark Smucker
> Version: 1.1.1
> OS: Windows NT
> Submission from: (NULL) (188.8.131.52)
> I have a data frame with 11 observations and 603 variables.
> When I call,
> willRaw.fit <- lm( performance ~ ., data=willRaw )
> lm() runs without problems, but computes coefficients for
> only the first 10 variables. The remaining variables
> get a coefficient of NA.
> There are no NA values in the data frame. performance
> is one of the columns of the data frame. I'd be happy
> to email the data file (gzip'd or zip'd).
> My apologies if I've done some stupid (yes, I know it's
> not wise to fit a model to 603 variables, but I was
> just playing around).
> r-devel mailing list -- Read
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To:
r-devel 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: firstname.lastname@example.org