[R-sig-ME] glmmTMB: temporal autocorrelation and perfect fit
François DUCHENNE
|r@nco|@@duchenne @end|ng |rom mnhn@|r
Fri Jul 24 14:59:56 CEST 2020
Dear all,
I am a PhD student curerntly working with time series in Ecology.
I have a question about temporal autocorrelation and the way to implement it in glmmTMB.
Here ( [ https://cran.r-project.org/web/packages/glmmTMB/vignettes/covstruct.html | https://cran.r-project.org/web/packages/glmmTMB/vignettes/covstruct.html ] ), with an autoregressive process (AR1), they fit time series with one point by time step.
However, when I am doing that I get surprisingly high r squared (r²>0.7), with simulated data and with empirical data, see for example the reproductible example attached with this email, which is from [ https://cran.r-project.org/web/packages/glmmTMB/vignettes/covstruct.html | https://cran.r-project.org/web/packages/glmmTMB/vignettes/covstruct.html ] .
When I add some fixed explanatory variable I often get R²~1, I am wondering about the meaning of fitting such model? Is it normal that including the temporal autocorrelation process gives such R² and almost a perfect fit ? (largely due to the random part, fixed part often explains 10% of the variance in my data). Is the model still interpretable ?
Thanks very much for taking time to read this,
Best regards,
François Duchenne
More information about the R-sig-mixed-models
mailing list