The bird auditory surveys consist of >100 roadside survey routes across Ontario. Bird call count was conducted at 10-20 stations along each survey routes for >10 years. For each station, there is data on the amount of forest harvested within the last 5 years. An objective is to assess how bird abundance is affected by forest harvesting.
My problem is to how to deal with spatial and temporal autocorrelation and the violation of independence of data. That is, the response variable (abundance of birds) is likely to be spatially and temporally autocorrelated. And, the bird abundance at each station is likely correlated with that at other stations within a route. My approach is to incorporate routes and year as random effects in generalized mixed effects models as shown below (using lme4
package). But, I am not sure how well autocorrelation is modeled adequately in this way.
glmer(Abundance ~ Area_harvested + (1 | route) + (1 | Year),
data = mydata, family = poisson)
Although I specified Poisson above, negative binomial or zero-inflated models (because there are many zeros; abundance = 0) may be more appropriate.
Could anyone please suggest a proper way to analyze my data? Also, could you please suggest better or proper way to specify random effects given my data?
Best Answer
This is a pretty broad question, but ...
deviance()
of the model should be approximately equal to itsdf.residual()
; you can check here for a function to test thisMaking sure you are dealing appropriately with any residual spatial/temporal autocorrelation is harder.
nlme::gls
with a trivial model (i.e. something likedd <- broom::augment(fitted_model); g <- gls(.resid~1,data=dd)
), you can get it to compute and plot temporal autocorrelations (something likeplot(ACF(g,form=~Year|route))
), or fit a spatial autocorrelation model (again usinggls
) to the residuals and hope that there's not much happeningMASS::glmmPQL
(the former is more complicated to get working but will almost definitely work better if you can make it go)PS: make sure you plot your data, and the predictions of your model, and look at the standard diagnostic plots (e.g. see
?plot.merMod
,?ranef.merMod
, http://bbolker.github.io/mixedmodels-misc/ecostats_chap.html ...)