[R-sig-ME] error when including correlation=corAR1 in a gamm model

David Villegas Ríos chirleu at gmail.com
Thu Jun 4 16:34:55 CEST 2015


Dear all.

I'm running a gamm model. From previous tests in lme, I know that a
correlation structure is needed, in this case I'm trying to use a corAR1
(the one I used in my tests in lme).

My model is as follows:

gamm1=gamm(hdb~year+area+s(week2,bs="cc",k=4),random=list(fish=~1),correlation=corAR1(form=~tim),
weights=varIdent(form=~1|year),data=horiw3, method="REML")

And I get this error:

Error in chol.default(V$V[[i]]) :
  the leading minor of order 11 is not positive definite

When I remove the correlation term, the model runs ok. In lme (in which
week2 is passed as a polynom of order 3), the model runs ok as well.

I have left the data in this link in case you want to test it by yourselves:

https://www.dropbox.com/s/ifpcfmlq09i2z3w/data.csv?dl=0

Thank you

David

	[[alternative HTML version deleted]]



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