Re: [R] stats lm() function

2009-03-13 Thread bartjoosen
call's in this loop tooks the most time and i > want to reduce this. > any ideas? > > - Original Message ----- > From: "David Winsemius" > To: "Paul Hermes" > Cc: > Sent: Thursday, March 12, 2009 3:42 PM > Subject: Re: [R] stats lm() func

Re: [R] stats lm() function

2009-03-12 Thread Paul Hermes
fugured that the lm call's in this loop tooks the most time and i want to reduce this. any ideas? - Original Message - From: "David Winsemius" To: "Paul Hermes" Cc: Sent: Thursday, March 12, 2009 3:42 PM Subject: Re: [R] stats lm() function I think you will fin

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 Winsem

Re: [R] stats lm() function

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

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 <- solve(

[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 mi

[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 1