# Poisson with an autoregressive term

I want to fit a fairly "standard" Poisson model, but with an autoregressive term.

$N_i \sim \mathrm{Pois}( \lambda_i E_i)$

with $\log \lambda_i = X_i \beta + \delta$

$\delta \sim AR(1)$

$X_i$ is a vector of covariates. $\beta$ are my coefficients. $\delta$ is an autoregressive term. $E_i$ is the size of population at time t.

The idea is that the count at time step $t$ is partially dependent on the count at time step $t-1$.

Ideally, I'd like to find some R package to fit this.

Any suggestions?

• It would be good to consider accepting answers to some of your previous questions, all of which have received multiple answers, thus giving you some choice. There is a check mark next to each answer that you can click on to indicate which one has been addressed your query. Feb 5 '12 at 19:06
• Can you give some more detail as to what kind of autoregressive structure you want to assume. It's a little ambiguous at the moment. Defining $E_i$ would also be helpful. Cheers. :) Feb 5 '12 at 19:07
• This is an epidemiological model. The dependent variable is the number of people with a disease at time t. I can fit it reasonably well with a "standard" poisson, but it was suggested that an autoregressive term might work well for this particular study.
– Noah
Feb 5 '12 at 19:18
• I guess I'm wondering what sort of autoregressive formulation you want. Are you thinking of something like $\log \lambda_i= X_i \beta + \alpha \log \lambda_{i-1} + \varepsilon_i$ where $\varepsilon_i$ is some additional randomness driving the evolution of the rate parameter? And, if this is an epidemiological model, is $N_i$ some number of, say, infected individuals? If so, then it would seem $\lambda_i \ll 1$, otherwise there is nonnegligible probability of more people than exist in the population becoming infected at time $i$. But, maybe I'm misunderstanding what you're aiming for. Feb 5 '12 at 19:44
• You understand perfectly. Nice summary. $N_i$ is the number of people with the disease and $\lambda$ is definitely less than 1.
– Noah
Feb 5 '12 at 19:50