[R-sig-ME] error when update() a LME-with correlated errors object

Virgilio Gomez Rubio Virgilio.Gomez at uclm.es
Wed Apr 8 17:12:23 CEST 2009


Dear Christian,


> #the problem------------
> #I want to fit the same mixed-effect model with correlated structure
> # for a different havin n-i observations and of course the same columns
> dbnew=dbase[-1,]
> nrow(dbnew) #one less observation than before
> 
> #here is the error, or bug?
> update(spmodel, data=dbnew) #here is the error!!!!!, why?
> #after running this, appear a large message, summarized here
> #
> #*** glibc detected *** /usr/lib/R/bin/exec/R: free(): invalid next size 
> (normal): 0x0950f090 ***

My guess is that when you call update() R still thinks that you have 281
observations instead of 280. Why do not you try the following:

spmodel2<-lme(Z~PEXPOSURE+PCTAGE65P+PCTOWNHOME,
              random=~1|AREAKEY,
              data=dbnew, correlation=scor, method="ML")

I believe that this should work.

Best,

Virgilio




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