I have time-series count data $N_{i,j}$ (population sizes in site $i$ and year $j$) and I want to correlate year-to-year changes with the environmental conditions $x_{i,j}$. For this, I want to fit this model:
$$\begin{eqnarray} \mbox{log} ( \mu_{i,j+1} ) &=& \mbox{log} ( \mu_{i,j} ) + \alpha + \beta x_{i,j} + \gamma_j \\ \\ N_{i,j} &\sim& \mbox{Poiss} ( \mu_{i,j} ) \\ \gamma_{j} &\sim& \mbox{Norm} (0, \sigma ) \end{eqnarray} $$
So I'm interested in parameter $\beta$, the slope of the relationship. $\gamma_{j}$ is the random effect for year (as the residuals within single year were correlated).
This is an autoregressive model. How can I fit such a model? I tried to look at the PESTS project (PESTS R code here) but I am not able to find out if and how to fit my model using it.
(Note that I am trying to avoid Bayesian tools because of computation time - I have thousands of such models).
[r]
that remain on-topic here. $\endgroup$