Solved – How to account for temporal autocorrelation in mixed effects logistic regression

autocorrelationlme4-nlmelogisticmixed modeltime series

Apologies if this has been asked before-I've looked around but haven't found any questions regarding my exact situation. I am conducting a study aimed at determining the climate sensitivity of a bird species to increasing breeding season temperatures. My ultimate goal is to determine the threshold temperature at which nesting adults begin displaying thermoregulatory behavior (panting). To address this, I set up game cameras at 10 different nest sites (incubation is biparental, so in total 20 individual adults were observed). The cameras took a time lapse photo every 5 minutes. At the same time photos were taken, weather data were also recorded (ambient temperature, humidity, wind speed, precipitation, etc.). For each photo, I classified the bird's behavior in a binary method (panting/not panting).

In total, my dataset is around 40,000 observations. I initially set up my analysis using the lme4 package, with presence/absence of panting behavior as the response, nest site as a random predictor, and temperature as a fixed predictor (I also made competing models that incorporated other weather variables as fixed predictors). It has been brought to my attention that I will also need to account for temporal autocorrelation between the observations. Is it possible to do that in a mixed-effects logistic regression using lme4? Or should I be doing a different test entirely? I'm a novice when it comes to statistics, so any help or suggestions are greatly appreciated!

Best Answer

If you would include the time variable in the specification of the random-effects structure of the model you would account for temporal auto-correlations. You could further evaluate using likelihood ratio tests whether a more complex temporal structure is required by including nonlinear time effects in the random effects via polynomials or splines.

Related Question