New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Incorrect Posterior Probability with dnUniformInteger and mvRandomIntegerWalk #435
Comments
Note that the Posterior and Likelihood are constant. So they aren't getting updated when p_int changes. This is the underlying source of the problem. I tweaked the script to replace the collection of Bernoulli observations with a single Binomial observation, and the problem doesn't go away. So this could possibly be a problem with mvRandomIntegerWalk( )... but I'm not sure how the move can prevent the likelihood and prior from changing. |
This seems tied to the
Overall, there seems to be something weird going on with understanding the graph, tied to (I assume) deterministic nodes and/or integer parameters |
Interestingly, it looks like this problem seems not to happen if the integer distribution is |
Describe the bug
When using
dnUniformInteger
andmvRandomIntegerWalk
, it is not possible to obtain the correct posterior probability.To Reproduce$y_i, i=1,...,1000$ ) from a Bernoulli distribution with $p=0.1$ and conducted inference on $p$ .
$$y_i \sim \text{Bernoulli}(p)$$
I generated 1000 samples (
However, the inferred posterior distribution of$p_\text{int}$ is almost the same as the prior, uniformly distributed between $0$ and $10$ , rather than being mostly $1$ .
When inferring directly using a uniform distribution, there is no problem with the inference.
$$y_i \sim \text{Bernoulli}(p)$$
The scripts used and the output are in this file.
UniInt_bug.zip
Expected behavior$p_\text{int}$ is $1$ .
When inferring using a UniformInteger distribution, the inferred
Computer info
I am using a Mac, and the version of RevBayes I am using is development (rapture-2388-ge4baa8).
The text was updated successfully, but these errors were encountered: