Re: [R] stats lm() function

2009-03-13 Thread bartjoosen
...@comcast.net To: Paul Hermes paul.her...@analytic-company.com Cc: r-help@r-project.org Sent: Thursday, March 12, 2009 3:42 PM Subject: Re: [R] stats lm() function I think you will find that many readers of this list would rather try to dissuade you from this misguided strategy. You

[R] stats lm() function

2009-03-12 Thread Paul Hermes
Hi, Im using the lm() function where the formula is quite big (300 arguments) and the data is a frame of 3000 values. This is running in a loop where in each step the formula is reduced by one argument, and the lm command is called again (to check which arguments are useful) . This takes

[R] stats lm() function

2009-03-12 Thread ph84
Hi, Im using the lm() function where the formula is quite big (300 arguments) and the data is a frame of 3000 values. This is running in a loop where in each step the formula is reduced by one argument, and the lm command is called again (to check which arguments are useful) . This takes 1-2

Re: [R] stats lm() function

2009-03-12 Thread Dimitris Rizopoulos
yes, indeed, you can certainly speed things up, by just changing the design matrix X and feeding it back to lm.fit(). In addition, if you just need the least squares estimates, then you gain a bit more by using constructs of the form: XtX - crossprod(X) Xty - crossprod(X, y) betas -

Re: [R] stats lm() function

2009-03-12 Thread Ravi Varadhan
and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: ph84 masterods...@gmx.de Date: Thursday, March 12, 2009 3:28 pm Subject: [R] stats lm() function To: r-help@r-project.org Hi, Im using the lm

Re: [R] stats lm() function

2009-03-12 Thread David Winsemius
I think you will find that many readers of this list would rather try to dissuade you from this misguided strategy. You are unlikely to get to a sensible solution in using step-down procedures with this sort of situation (large number of predictors with modest size of data). -- David

Re: [R] stats lm() function

2009-03-12 Thread Paul Hermes
call's in this loop tooks the most time and i want to reduce this. any ideas? - Original Message - From: David Winsemius dwinsem...@comcast.net To: Paul Hermes paul.her...@analytic-company.com Cc: r-help@r-project.org Sent: Thursday, March 12, 2009 3:42 PM Subject: Re: [R] stats lm