[R-sig-ME] Error when including the correlation structure in lme

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Thu Jul 23 13:52:15 CEST 2009


Dear Fir,

I presume you have a rather large dataset? I got similar problems with the spatial correlation structures on a large dataset. The background is that (at least the spatial correlation structures) require an n x n matrix. Which is huge with large n. Adding a grouping structure (like a random effect) fixes lots of entries of that matrix to zero. So that leads to a smaller sparse matrix. Therefore I would recommend to look for an extra variable that you can add as grouping factor, nested in Depth. 

The code would look like

update(lm.lme1, correlation = corARMA(p=2, form = ~t1| Depth/ExtraVariable))

HTH,

THierry

----------------------------------------------------------------------------
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] Namens FMH
Verzonden: donderdag 23 juli 2009 13:04
Aan: r-sig-mixed-models at r-project.org
Onderwerp: [R-sig-ME] Error when including the correlation structure in lme

Dear All,

I'm running the lme command in R and have a problem as i include the correlation structure with AR1 model.

At first, i run this command without including the correlation structure, and the program works fine. But, after including the correlation structure with AR1 model, my computer drastically takes almost two minutes to process on this command.


#################################################################
lm.lme1 <- lme(Temp ~ t1 + t2, tmp, random = ~t1 + t2| Depth, method = "REML")
lm.lme2 <- update(lm.lme1, correlation = corARMA(p=2, form = ~t1| Depth)) #################################################################
 
Eventually, it gives this output, which i guess related with the memory problem.
 
#################################################################
Error: cannot allocate vector of size 715.6 Mb In addition: Warning messages:
1: In corFactor.corARMA(object) :
  Reached total allocation of 958Mb: see help(memory.size)
2: In corFactor.corARMA(object) :
  Reached total allocation of 958Mb: see help(memory.size)
3: In corFactor.corARMA(object) :
  Reached total allocation of 958Mb: see help(memory.size)
4: In corFactor.corARMA(object) :
  Reached total allocation of 958Mb: see help(memory.size) ################################################################
 
Could someone advice me on how to sort out on this problem? 
 
Thank you.
 
Fir


      
	[[alternative HTML version deleted]]


Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.




More information about the R-sig-mixed-models mailing list