Re: [R] Error when using step

2009-06-22 Thread Chris Friedl
David Winsemius wrote: > > > ... > > Perhaps: > > by(data2, data2$grp, function(x) step(lm(model, data=x))) > > > David Winsemius, MD > Heritage Laboratories > West Hartford, CT > > Perhaps ;) You know of course that this worked. It took a moment to understand the screen output bec

Re: [R] Error when using step

2009-06-22 Thread Chris Friedl
Dieter Menne wrote: > > ... > > Looks like an environment problem. I could not find a workaround quickly, > but you might have a look at > > http://finzi.psych.upenn.edu/R/Rhelp02a/archive/16599.html > > We call it "Ripley's Game" here, because variants of it can help you quite > often. >

Re: [R] Error when using step

2009-06-22 Thread David Winsemius
On Jun 22, 2009, at 4:08 AM, Dieter Menne wrote: Chris Friedl gmail.com> writes: I have two questions about the built-in function step. Ultimately I want to apply a lm fitting and subsequent step procedure to thousands of data sets groups by a factor defined as a unique ID. Q1. The code

Re: [R] Error when using step

2009-06-22 Thread Dieter Menne
Chris Friedl gmail.com> writes: > I have two questions about the built-in function step. Ultimately I want to > apply a lm fitting and subsequent step procedure to thousands of data sets > groups by a factor defined as a unique ID. > > Q1. The code below creates a data.frame comprising three mar