Hi,


I am trying to answer the see if density.km (response) is affected by Direction (continuous, integer), Layer (nominal with 12 levels) and direction (nominal with 8 levels). There is an interaction between Layer and Direction. Platform.field is a list of 9 different platforms and is being treated as a random effect.


I had previously ran this model without the correlation argument and checked the residuals in an acf plot which showed a high level of autocorrelation.


I am having issues applying the correlation argument into my model but keep getting an error message and am not sure what else to try. I should mention that Direction is being applied as the time covariate because each distance has an associated time stamp.


G2<-gamm(density.km~f.Layer+direction+s(Distance.A,by=f.Layer),
random=list(Platform.field=~1),corr=corAR1(form=~Distance.A|Platform.field/f.Layer),
family=poisson,data=fish1)


 Maximum number of PQL iterations:  20
iteration 1
Error in Initialize.corAR1(X[[2L]], ...) :
  covariate must have unique values within groups for "corAR1" objects?


Any help would be appreciated.


Thanks



	[[alternative HTML version deleted]]

