[R] using lme on multiple datasets in one shot

Douglas Bates bates at stat.wisc.edu
Fri Jun 22 13:45:26 CEST 2007


On 6/21/07, maitra at iastate.edu <maitra at iastate.edu> wrote:
> Dear list,

> I would like to do a huge number of lme's using the same design matrix
> (and fixed and random effects). Is it possible to do this efficiently?
> Doing otherwise is not an option for my example.

> Basically, I am wanting to do the following which is possible using lm:

> X <- matrix(rnorm(50),10,5)
> Y <- matrix(rnorm(50),10,5)
> lm(Y~X)

> with lme. Any suggestions?

It would not be easy to do this.  Neither lme nor lmer were designed
to make this easy to do.  There is a better chance of accomplishing
this by creating a custom function based on the current lmer but the
modifications required are non-trivial.

This is a reasonable thing to want to accomplish and I will add it to
the "To Do" list for lmer.  However it is not something I will be able
to get to soon.



More information about the R-help mailing list