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

Christian Salas christian.salas at yale.edu
Wed Apr 8 17:17:43 CEST 2009

thanks Virgilio!
that is a solution which of course it does work. Maybe I should explain 
before that I am trying to include this withing a  larger analysis where 
the models (i.e., the fixed part of the model) will change, then in that 
setting being able to just keep the best model being selected (i.e. the 
lme() fitted object) and use  update() is easier than writing the model 

by the way, i like your book in spat-stat!!!
saludos de un chileno desde Yale :)

Christian Salas                     E-mail:christian.salas at yale.edu
PhD candidate                       http://environment.yale.edu/salas
School of Forestry and Environmental Studies
Yale University                     Tel: +1-(203)-432 5126
360 Prospect St                     Fax:+1-(203)-432 3809
New Haven, CT 06511-2189            Office: Room 35, Marsh Hall

Yale Biometrics Lab                  http://environment.yale.edu/biometrics

Virgilio Gomez Rubio wrote:
> 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:
>               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