Re: [R] Step and stepAIC

2009-05-07 Thread Dieter Menne
Jun Shen gmail.com> writes: > >lme(biomarker~Cmax+AGE,data=cov,method='ML',random=~1+AGE|ID,keep.data=T) > Warning message: > In lme.formula(biomarker ~ Cmax + AGE, data = cov, method = "ML", : > Fewer observations than random effects in all level 1 groups That's why the posting guide says:

Re: [R] Step and stepAIC

2009-05-07 Thread Jun Shen
Hi, Dieter, > sessionInfo() R version 2.9.0 (2009-04-17) i386-pc-mingw32 > str(cov) 'data.frame': 40 obs. of 13 variables: $ ID : int 2 3 4 5 6 7 8 9 10 11 ... $ AMT : num 50 50 50 50 50 50 50 50 25 25 ... $ Cmax : num [1:40(1d)] 8901 5574 10496 10882 8130 ... ..- attr(*,

Re: [R] Step and stepAIC

2009-05-07 Thread Dieter Menne
Jun Shen gmail.com> writes: > I changed the "method" to ML for my lme call. Now I get a different error > when running the stepAIC > > Error in terms.formula(formula, data = data) : > 'data' argument is of the wrong type > > What does that mean? > The same dataset was used for an lm call and

Re: [R] Step and stepAIC

2009-05-07 Thread Jun Shen
Thanks a lot, Dieter, I changed the "method" to ML for my lme call. Now I get a different error when running the stepAIC Error in terms.formula(formula, data = data) : 'data' argument is of the wrong type What does that mean? The same dataset was used for an lm call and everything is fine to r

Re: [R] Step and stepAIC

2009-05-07 Thread Dieter Menne
Jun Shen gmail.com> writes: > > I also wonder if stepAIC can work with an lme model. I tried. it doesn't for > now. Appreciate any comment. > It can do it, and it displays a nice error message, as I remember, why it won't do it in the default setting. Check parameter method of your lme call.

Re: [R] Step and stepAIC

2009-05-07 Thread Dieter Menne
Jun Shen gmail.com> writes: > > I also wonder if stepAIC can work with an lme model. I tried. it doesn't for > now. Appreciate any comment. > It can, and it displays a nice error message telling you exactly why it did not work if you try out of the box. Check parameter "method" in your lme cal

Re: [R] Step and stepAIC

2009-05-07 Thread Jun Shen
I also wonder if stepAIC can work with an lme model. I tried. it doesn't for now. Appreciate any comment. Jun On Thu, May 7, 2009 at 9:15 AM, Dieter Menne wrote: > Peter-Heinz Fox yahoo.de> writes: > > > I’m using "step" and "stepAIC" for stepwise regression. After each > step, > > I would li

Re: [R] Step and stepAIC

2009-05-07 Thread Dieter Menne
Peter-Heinz Fox yahoo.de> writes: > I’m using "step" and "stepAIC" for stepwise regression. After each step, > I would like to make an additional calculation based on the independent > variables that have been selected until this step and > their corresponding weights. Where do I have to add t

[R] Step and stepAIC

2009-05-07 Thread Peter-Heinz Fox
Hi all,   I’m using "step" and "stepAIC" for stepwise regression. After each step, I would like to make an additional calculation based on the independent variables that have been selected until this step and their corresponding weights. Where do I have to add this calculation?   And a secon

Re: [R] step() and stepAIC()

2008-10-12 Thread Murray Jorgensen
Prof Brian Ripley wrote: On Sun, 12 Oct 2008, Murray Jorgensen wrote: The birth weight example from ?stepAIC in package MASS runs well as indeed it should. However when I change stepAIC() calls to step() calls I get warning messages that I don't understand, although the output is similar.

Re: [R] step() and stepAIC()

2008-10-11 Thread Prof Brian Ripley
On Sun, 12 Oct 2008, Murray Jorgensen wrote: The birth weight example from ?stepAIC in package MASS runs well as indeed it should. However when I change stepAIC() calls to step() calls I get warning messages that I don't understand, although the output is similar. Why would you do this? War

[R] step() and stepAIC()

2008-10-11 Thread Murray Jorgensen
The birth weight example from ?stepAIC in package MASS runs well as indeed it should. However when I change stepAIC() calls to step() calls I get warning messages that I don't understand, although the output is similar. Warning messages: 1: In model.response(m, "numeric") : using type="numeric