[R] Memory shortage running Repeated Measures (nlme)

Evandro do Nascimento Silva evandro at uefs.br
Wed Dec 14 04:22:49 CET 2005


Dear group,

I tried to run a Repeated Mesures Anova for Mixed effects model and I got
a warnning after entering the model specification saying: "Reached total
allocation of 254Mb: see help(memory.size)".

here is part of the log:

***********************************************************
> aphids<-read.table("aphid.txt",header=T)
> attach(aphids)
> names(aphids)
[1] "site"   "time"   "shade"  "treatp" "aphid"
> library(nlme)
> aphids<-groupedData(aphid~time|site/shade/treatp,data=aphids,outer=~shade*treatp)
> model<-lme(aphid~shade*treatp,random=~time|site)
Error in logLik.lmeStructInt(lmeSt, lmePars) :
        Calloc could not allocate (89359209 of 8) memory
In addition: Warning message:
Reached total allocation of 254Mb: see help(memory.size)

***********************************************************

My response variable is number of aphids/colony on shaded cocoa trees,
measured over 15 days (which I treat as a random factor) in four sites
(random factor), two levels of shade (fixed) within each site, and three
aphid predation treatmens (fixed) within each shade level. My total N =
2,256 observations (actually counts).

The comand lines were the same as in the example in:

Crawley, M. J. 2002. Statistical Computing: an intro to data analysis
using S-Plus. Wiley. pages: 702-704.

My questions are:

1-Did I use the appropriate analysis to my data?
2-Is the lack of memory caused by my large N and many factor interactions?
3-Since I have counts, should I specify (family=poisson) in the model? If
so, where in the command line this term must be located?

I am a complete beginner with R, so any help will be wellcome.

Evandro Silva
Assistant Professor
Universidade Estadual de Feira de Santana
Laboratory of Insect Ecology
Feira de Santana, BA, Brazil




More information about the R-help mailing list