x(t) = x(t-1) with probability theta
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to stan-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
Hey Daniel -If r(t) in the first state is equal to 0, then isn't that a Dirac delta function (ie. has a density of +infty, not 1?).
Or perhaps I'm not understanding something.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+unsubscribe@googlegroups.com.
}
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+unsubscribe@googlegroups.com.
To post to this group, send email to stan-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
Ah... so Michael's model is different than the one I described. And that's cause I'm not sure what Jim has described.Mike's missed a couple of close paren to make that parse... this should be clearer:target += log_sum_mix(theta, normal_lpdf(x[t] | mu_1, sigma_meas), normal_lpdf(x[t] | mu_2, sigma_meas));So Mike is thinking of there being sigma_meas contributing to both terms. This might be much more natural than what I described. This will probably describe your model better.DanielOn Mon, Sep 26, 2016 at 10:40 AM, Michael Betancourt <betan...@gmail.com> wrote:Think more generatively — r[t] is always there, it’s just doesn’t alwaysaffect x. For example,for(t in 2:T) {real mu_1;real mu_2;r[t] ~ normal(0, sigma); // r[t] are parameters declared to be positivemu_1 = x[t - 1];mu_2 = x[t - 1] + r[t];target += log_sum_mix(theta, normal_lpdf(x[t] | mu_1, sigma_meas, normal_lpdf(x[t] | mu_2, sigma_meas);}
Mike - you little ripper.
Works a treat (after fixing parentheses). Also, isn't it log_mix()?