data{ int N; int y[N]; } parameters{ real lambda; } model{ target+=poisson_lpmf(y|lambda); target+=gamma_lpdf(lambda|4.57, 1.43); } generated quantities{ vector[N] log_lik; for(n in 1:N){ log_lik[n] = poisson_lpmf(y[n]|lambda); } }