Re: [R] the numimum number of fixed factors lme package can dealwith

From: Doran, Harold <HDoran_at_air.org>
Date: Wed 04 Apr 2007 - 13:06:51 GMT


As Doug noted yesterday, you may have a limit on the memory needed to create the model matrix for the fixed effects. But, aside from that, based on what I see below, it appears you have manually created a model matrix yourself. If that's true, you don't need to do that. You can create a single column and create a factor. R will then create a model matrix for you. Of course, this won't help with the memory issue, though.

We have no idea how much memory you have allocated to R, did you try increasing this as described in the FAQs?

> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Douglas Bates
> Sent: Wednesday, April 04, 2007 8:54 AM
> To: Fang, Yongxiang
> Cc: R-help
> Subject: Re: [R] the numimum number of fixed factors lme
> package can dealwith
>
> On 4/3/07, Fang, Yongxiang <y.fang@lancaster.ac.uk> wrote:
> > Dear Douglas,
> >
> > Thanks for your help.
> > the error message is:
> > 'Error in eval(expr, envir, enclos) : Object "dx.200" not found';
> >
> > In fact, dx is the design matrix and now in a data frame: dframe I
> > have checked if dx.200 in dframe. dframe$dx.200 does exist
> and in correct form.
> >
> > In addition, when the number of columns of dx is smaller
> than 200, the lme runs no prolem.
> >
> > Cheers
> >
> > Yongxiang
>
> Without a *reproducible* example we cannot be of any assistance.
>
> > -----Original Message-----
> > From: dmbates@gmail.com on behalf of Douglas Bates
> > Sent: Tue 4/3/2007 5:57 PM
> > To: Fang, Yongxiang
> > Cc: r-help@stat.math.ethz.ch
> > Subject: Re: [R] the numimum number of fixed factors lme
> package can
> > deal with
> >
> > On 4/3/07, Fang, Yongxiang <y.fang@lancaster.ac.uk> wrote:
> >
> > > In my study, mixed effects model is required and the
> number of fixed
> > > effects is very large. When lme package is employed, a
> model error
> > > is displayed once the number of fixed factors in the formula
> > > reaches 200. Is this the maximum number of fixed factors
> can be handled by lme package?
> > > If not, what is possible reason of the error message?
> >
> > What error message? You didn't tell use what you did and what
> > happened. Please read and follow the instructions in the posting
> > guide - otherwise we will only be able to guess at what the problem
> > may be.
> >
> > There is no specific limit of 200 fixed factors (perhaps
> you mean 200
> > columns in the model matrix for the fixed effects?) in lme.
> However
> > there will be limits on the amount of memory available to store the
> > model matrices and associated structures needed to fit the model.
> >
> > The first thing I would suggest is determining why you want
> to fit a
> > model with 200 (or possibly more if you really meant 200 fixed
> > factors) fixed effects. It is rare to want to examine such a large
> > number of coefficients. Frequently the number of
> coefficients gets to
> > this order because you have a factor with a large number of
> levels, in
> > which case why not model such a factor with random effects?
> >
> > You could also try using the lmer function from the lme4 package
> > instead of lme to fit a linear mixed model. It is generally more
> > efficient than lme in both time and storage.
> >
> > However, before we can help you much you will need to be much more
> > specific in your question and provide us with the recommended
> > background information.
> >
> >
>
> ______________________________________________
> R-help@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@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 Wed Apr 04 23:16:22 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 04 Apr 2007 - 14:30:57 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.