The mixture model you wrote for 0/1 inflation is here:
if (y[n] == 0)
increment_log_prob(bernoulli_log(1, p0));
else if (y[n] == 1)
increment_log_prob(bernoulli_log(1, p1));
else
increment_log_prob(beta_log(y[n], alpha, beta) + bernoulli_log(1, p2));
I find this a very confusing way to write a mixture of a bernoulli
and beta, when you could just write it out more directly using
phi as the mixing ratio as
if (y[n] == 0 || y[n] == 1)
increment_log_prob(bernoulli_log(y[n] | p) + bernoulli_log(1,phi))
else
increment_log_prob(beta_log(y[n], alpha, beta) + bernoulli_log(0,phi));
I think we should add (real / vector); a better hack for real x divided
by vector v is:
rep_vector(x,size(v)) ./ v
To answer your question, the amount of variation from the expected values
depend both on the amount of data and whether the model you wrote down
actually identifies the parameters. I'd worry about there being too
many degrees of freedom in your encoding with both tau and nu.
But as always, I'd suggest working up from a simple model. In this case
it might be one where there's only an intercept, say, or not even a regression,
just a simple mixture estimating alpha, beta and phi above.
- 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.
> <Example - ZeroOne-Inflated Beta Regression GAMLSS.R><ZeroOne Inflated Beta Regression.stan>