I am running a non-linear mixed effect model with back-calcualted length at
age data.  In a nutshell, you can determine the length of the fish at each
annuli if you know the length of the fish when it was culled and the
distance between each annuli of the fish's otolith.  I need to use a mixed
model because I have both fixed and random effects.  Fixed effects
correspond to population level estimate of parameters, while random effects
correspond to variability of parameters among individuals relative to the
population.  Thus, mixed-effects models generate estimates of model
parameters at both the individual and population level.   

 

I got the model running.  Here is my code:  


LVB=function(x,t0,Lmax,K){y=Lmax*(1-exp(-K*(x-t0)))y}            #this is my
growth model
datagr=groupedData(L~Age|id,data=back)
#this groups my data so I can have estimates for individual fish (random
effect)

#Now I run the NLME model: 


LVB.nlme=nlme(L~LVB(Age,t0,Lmax,K), data=datagr,       
fixed=list(t0~1,Lmax~1,K~1),                         
random=t0+Lmax+K~1,                                  
start=list(fixed=c(t0=-1, Lmax=700,
K=0.2)),control=nlmeControl(maxIter=100),verbose=T)         



I want to diagnose the model fit.  I discovered that I can type
plot(LVB.nlme) to get a plot of the residuals.  However, I would like to
attain the residual values so I can plot them in a different program.  Can
somebody tell me how I can R to output the residual values from my model
fit?  

 

Any help would be greatly appreciated.  

 

Mike


	[[alternative HTML version deleted]]


