I am trying to create a hurdle model with simulated matrix data. I am using this site as a basis for setting up my hurdle model: 5.6 Zero-Inflated and Hurdle Models | Stan User’s Guide but I am running into an error that says:
"SYNTAX ERROR, MESSAGE(S) FROM PARSER: No matches for: poisson_lpmf(vector, vector) "
Is there another way to run the poissonlmpf with two vectors? Below is my model code.
Pop <- matrix(rpois(c(100*200), matrix.1), nrow= 200) // simulated matrix of 100 by 200
lambda // data matrix that is 100 by 200
// simulated portion of model
model{
target += poisson_lpmf(pop[,j] | lambda[,j]) - log1m_exp(-lambda[,j]);
}