# Tag Info

## New answers tagged stan

1

The model has several issues. The first is that your priors for alpha and beta are far far too wide. The alpha and beta priors you have specified lead to a lambda which is concentrated at 0 and often goes as large as 15,000. Try generating draws from your prior and see for yourself. Second, the model you have written is not the model you are estimating. In ...

0

posterior_predict gives you a matrix which is ndraws by nobservations. Taking the mean of the columns will give you the expected prediction. library(rstanarm) library(lme4) fit = stan_lmer(Reaction ~ Days + (Days+1|Subject), data = sleepstudy) ppred = posterior_predict(fit) sleepstudy$pred = colMeans(ppred) plot(sleepstudy$Reaction, sleepstudy\$pred - ...

Top 50 recent answers are included