We also very strongly advise against those interval constrained
priors for both statistical and computational reasons.
You shouldn't need those 0.0001 lower bounds either.
You might want to make pred a local variable so it doesn't get saved
each iteration.
You have uniform distributions that don't match their constraints.
All parameters needs support (finite log density) on any values
that satisfy their constraints (that'd be sigma_sp, but I didn't
look for more).
It looks like you only have distribution on a_ind[i] if
(repind[i] == 1). The rest of the a_ind will just be uniform over
(-4, 4).
And you definitely want the non-centered parameterization for all the
parameters that don't get normal(0, 1) priors (what we used to
call the "Matt trick"). See the manual for an explanation. But the
basic idea is to replace
u ~ normal(mu_u, sigma_u);
with
u_raw ~ normal(0, 1);
u <- mu_u + sigma_u * u_raw;
You can either do that literally with local variables or implicitly
wherever you use u.
- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
stan-users+...@googlegroups.com.
> To post to this group, send email to
stan-...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
> <model.stan>