I am working on creating GLMMs to determine the effect of in-air noise on harbor seals (specifically the number present). I have a couple other fixed predictor variables (current velocity and time) and some random effects. As I am fresh out of undergrad, I have taken only one basic stats/R class and am thus very new to modeling. I am struggling to format my random effect variables in my models. I have used ChatGPT and Google to try and figure out how best to format them but am still not confident I am doing it correctly.
To further complicate things, I believe I need to account for temporal autocorrelation as I measured the same seals (presumably) over the year of data collection. Our sampling was not at a fixed interval so sometimes days to weeks would pass between sample dates. This has made it so I cannot use an ACF plot to actually test for autocorrelation, instead I am just assuming it is there.
In my glmmTMB models I have been using the ar1() covariance structure to try and account for my autocorrelation, but I recently learned that my lack of continuous data collection means that ar1() is not the appropriate structure (found that out here: Temporal autoregression in glmmTMB: why does it require time as a factor?). Instead, I should be using ou(). Will using ou() still account for any autocorrelation that may be present in my data, like ar1() would have?
If ou() does not do what I want I could aggregate and interpolate my data set so that it is continuous. I believe that would allow me to still use ar1(), but I would prefer not to do this as it would shrink my dataset to a third of its size.
I have posted a related question here: How to format a random effect (i.e., + 0 vs. + 1) in my glmmTMB models.
Jasper McCutcheon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.