Hi everyone,

I was hoping to include a Poisson variable as intermediate parameter in my model, though I know Stan doesn’t allow integer parameters. I was wondering if log_sum_exp or similar functions can be applied on Poisson…

The math expression of this part of model is:

\lambda_t \sim \Gamma(\alpha, 1);

N_t |\lambda_t \sim Poisson(\lambda_t\frac{1-\rho}{\rho});

\zeta_t|N_t \sim \Gamma(N_t, \beta/\rho)

This is a time series model, with X_t be observations and model as X_t = \rho X_{t-1} + \zeta_t. If the integer parameter is supported, I was hoping some model looks like:

```
data{
int<lower=1> T;
int<lower=0> x[T];
real<lower=0> rho;
real<lower=0> alpha;
real<lower=0> beta;
}
parameters{
real<lower=0> lambda[T-1];
int<lower=0> N[T-1];
}
transformed data{
real<lower=0> zeta[T-1];
for (t in 2:T){
zeta[t-1] = x[t] - rho * x[t-1]
}
}
model {
lambda ~ gamma(alpha, 1);
N ~ poisson(lambda);
zeta ~ gamma(N, beta)
}
```

Will log_sum_exp work on Poisson?

Thanks for any reply!