Dear stan community. I want to apply weights in my stan model using the brms approach explained here:
but when I do the same in my stan model I am getting the error:
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
error in ‘model163045c662ad_m’ at line 31, column 10
29: alpha_3 ~ normal(0, 5); 30: // likelihood 31: ncases ~ weights*binomial(nn, pp_hat); ^ 32: }
PARSER EXPECTED:
Error in stanc(file = file, model_code = model_code, model_name = model_name, :
failed to parse Stan model ‘m’ due to the above error.
##model
model {
// priors
alpha_0 ~ normal(0, 5);
alpha_1 ~ normal(0, 5);
alpha_2 ~ normal(0, 5);
alpha_3 ~ normal(0, 5);
// Likelihood
ncases ~ binomial(nn, pp_hat);
}
Thank you in advance for any help.