It helps to know what's data and what's parameters to figure out
how a JAGS model translates to Stan.
Stan doesn't have integer parameters, so you can't implement missing
w directly.
There is an if_else() in Stan, but also full conditional statements,
which are usually easier to read. And local variables. If you see
step() being used in a Stan model, it's usually just a straight translation
from BUGS/JAGS that can be improved.
Stan gives you a logit-scaled Bernoulli. So rather than writing
for (i in 1:N)
y[i] ~ bernoulli(inv_logit(theta[i]));
you can write
for (i in 1:N)
y[i] ~ bernoulli_logit(theta[i]);
and then once you've done that you can vectorize to
y ~ bernoulli_logit(theta);
Unless you expect parameters on the scale of 100, use tighter
priors than precision=1e-3 (sd=100). For comparison, Stan's
normal uses the standard deviation/scale parameterization, not
precision or variance (both precision and covariance matrices
available for multinormals).
- 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.
> For more options, visit
https://groups.google.com/d/optout.