[R] How to solve allocation problem in lme() analysis?
spencer.graves at pdf.com
Fri Dec 2 03:02:45 CET 2005
1. Since your example is incomplete, I can't easily replicate the
phenomenon. This limits me to general comments and brainstorming on
things I might try.
2. Have you tried "lmer" in library(lme4)? The syntax will be
different, but it's a different algorithm and can handle problems that
crash "lme". This may or may not apply to you. For documentation on
this, see Douglas Bates (2005) "Fitting linear mixed models in R. R
News, 5(1):27-30, available from www.r-project.org -> newsletter. See
also "Implementation.pdf" in the "doc" subdirectory under "lme4" in the
"library" folder of your R installation; if you are not using Windows,
I don't know if this is how you find this document.
3. What is "L" in your model? If it is a factor with many levels,
this might explain the warning you got: "Fewer observations than random
effects ... ."
4. Can you simplify the problem and still get the same error? For
example, do you get the same problem after deleting "F1+F2" from
"fixed"? If you can produce a simple example with a few lines of R code
that generates a pseudo-random data set and send that to this list (as
suggested in the posting guide! "www.R-project.org/posting-guide.html"),
you might get a more useful reply. Or you might just solve your problem
in the course of trying to construct such an example.
5. Have you consulted Pinheiro and Bates (2000) Mixed-Effects Models
in S and S-Plus (Springer)? I couldn't get started with "lme" until I
got that book and started reading it.
hope this helps.
Petar Milin wrote:
> I am running analysis on the data from 4 experiments, with approximately
> 4600 rows (cases). My working model is:
> fitA1 = lme(RT~F1+F2+L,random=~1|Experiment/Subject,data=data)
> Model works very fine, but if I try to check whether the effect of L
> depends on Experiments/Subjects with:
> fitA2 = lme(RT~F1+F2+L,random=~1+L|Experiment/Subject,data=data)
> [with the idea to make: anova(fitA1,fitA2)]
>>analysis crashes with the message:
>>Error: cannot allocate vector of size 2481574 Kb
>>In addition: Warning message:
>>Fewer observations than random effects in all level 2 groups in:
>>lme.formula(RT ~ F1 + F2 + L, random = ~1 + L | Experiment/Subject,
> Can anyone help me with this issue? Thanks in advance.
> Petar Milin
> Assistant Professor
> Department of Psychology
> University of Novi Sad
> Serbia and Montenegro
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA
spencer.graves at pdf.com
More information about the R-help