Skip to content

intermediate iterations of stepwise regression

4 messages · utkarshsinghal, Gabor Grothendieck

#
Hi all,

I am performing a stepwise regression by running the "step" function on 
an "lm" object. Now I want to save the intermediate iterations. I know 
the argument trace=T will print it on the console, but I rather want to 
assign it to some R object or may be output it in a CSV or text file.

Any help will be appreciated.

Regards
Utkarsh
#
Try this:

out <- capture.output(example(step))


On Mon, May 18, 2009 at 9:11 AM, utkarshsinghal
<utkarsh.singhal at global-analytics.com> wrote:
#
Don't use = to mean assign.  Replace all your equal signs
(except the ones intended to refer to argument names)
with <- .

On Mon, May 18, 2009 at 10:10 AM, utkarshsinghal
<utkarsh.singhal at global-analytics.com> wrote: