[R] Step command failing for lm function

Uwe Ligges ligges at statistik.tu-dortmund.de
Mon Jan 10 10:19:15 CET 2011



On 10.01.2011 10:13, Joshua Wiley wrote:
> Hi Noah,
>
> Are you able to reproduce the example on a smaller dataset?  Do you have any strange variable names or   I created a 30000 x 100 matrix, fit a linear model and step has been running fine (other than bringing my poor netbook to it's knees).  It also might be helpful if you could post your session info per the posting guide.
>
> You could also try: debug(step). Then run step on your model so you can see what the function does before it exits.
>
> Cheers,
>
> Josh
>
> On Jan 9, 2011, at 23:57, Noah Silverman<noah at smartmediacorp.com>  wrote:
>
>> Hi,
>>
>> I have a fairly simple linear regression using the lm function.  There
>> are about 100 variables and 30,000 rows of data.  It runs fine and
>> produces a decent looking R2 value.  I'm interested in performing a
>> stepwise variable selection to see if things can be cleaned up a bit.
>>
>> Calling the step function returns ONE iteration (all the variables) and
>> then stops.  No errors are reported.


Can you show us both your code and the output as well as the summary of 
the whole model, please?

Uwe Ligges


>> Can someone suggest why this might not be working as expected.
>> (Normally this function steps through all the variables to find the
>> "best" combination.)
>>
>> Thanks!
>>
>> -N
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list