Re: [R] stepAIC on lm() where response is a matrix..

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Wed, 27 Jun 2007 19:09:09 -0700

      I see several options for you:

  1. Write a function 'dropterm.mlm', copying 'dropterm.lm' and modifying it as you think appropriate. The function 'dropterm.lm' is hidden in a namespace, which you can see from 'methods(dropterm)'. To get it, either use getAnywhere("dropterm.lm") or "MASS:::dropterm.lm".
  2. Use 'stepAIC' in the univariate mode. If they both select the same model, it would strongly suggest that you would get the same answer from a multivariate version. Fit that multivariate version and be happy.
  3. If univariate analyses produce different models and you want a common one, take the models you get, and interpolate manually a list of alternative plausible models between the two best univariate models. Then fit those manually and select the one with the smallest AIC.
      Hope this helps. 
      Spencer Graves

vinod gullu wrote:
> dear R users,
>
> I have fit the lm() on a mtrix of responses.
> i.e M1 = lm(cbind(R1,R2)~ X+Y+0). When i use
> summary(M1), it shows details for R1 and R2
> separately. Now i want to use stepAIC on these models.
> But when i use stepAIC(M1) an error message comes
> saying that dropterm.mlm is not implemented. What is
> the way out to use stepAIC in such cases.
>
> regards,
>
>
>
> ____________________________________________________________________________________
> The fish are biting.
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch 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_stat.math.ethz.ch 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. Received on Thu 28 Jun 2007 - 02:23:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 28 Jun 2007 - 06:32:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.