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. – gung - Reinstate Monica Mar 20 '14 at 13:34glmer(N ~ x + (1|year), offset = log(Nminus1)). – fabians Mar 28 '14 at 13:15Nminus1means "Nin the previous period". Say disease kills most of the pop. in i=1 -- N_j2 wont depend on mu_j1 (i.e., a function of covariate x and the average level of the year), but on N_j1 (i.e., how many survived the disease in i=1). – fabians Mar 28 '14 at 13:23