
I am new to mixed modeling so please bear with me.  My goal is to estimate growth parameters for back-calculated data.  I have predicted lengths for each age of the fish.  I ran my data in SAS and found the First Order Autoregressive covariance pattern to be the best fit.  Now I want to incorporate this covariance pattern into my R-code that is running a mixed model.  My internet search on how to do this just confused me even more.  I believe I need to include the R-code of "corStruct" but I am not sure where to add it.  
 
Here is my current code that does not have the defined covariance structure:  
 LVB=function(x,t0,Lmax,K){y=Lmax*(1-exp(-K*(x-t0)))y}datagr=groupedData(L~Age|id,data=back)plot(datagr)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.0, Lmax=700, K=0.25)),control=nlmeControl(maxIter=10000, tolerance=1e-2,  msVerbose=TRUE)) I tried adding the corStruct function into the control code but did not have any luck.  Any advice would be greatly appreciated.   		 	   		  
	[[alternative HTML version deleted]]


