Fixes for JAGS 5.0.0. Reduce variance of diffuse normal priors.#4
Open
martynplummer wants to merge 1 commit intoAnGabrio:masterfrom
Open
Fixes for JAGS 5.0.0. Reduce variance of diffuse normal priors.#4martynplummer wants to merge 1 commit intoAnGabrio:masterfrom
martynplummer wants to merge 1 commit intoAnGabrio:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In preparation for the release of JAGS 5.0.0 I am going through the reverse dependencies of the rjags package to ensure they work with the new version.
Changes to the way that initial values are calculated mean that JAGS does not work well with the extremely diffuse priors found in the missingHE package. In JAGS 4.x.y, initial values were set to deterministic "typical" values. For the normal distribution, the typical value is the prior mean. This allows the use of extremely diffuse normal priors like dnorm(0, 0.0000001) with a guaranteed starting value of 0.
In JAGS 5.0.0, initial values depend on the prior distribution. Ideally, initial values are drawn from the prior distribution but this is not compatible with diffuse priors. As a compromise, JAGS 5.0.0 sets the initial value to be the mean of N draws from the prior where by default N=10000. This works for, e.g. dnorm(0, 0.001) where it generates intial values with mean 0 and variance 0.1. However, this compromise still does not work for the very diffuse priors used in the missingHE package as it leads to the error message about parameter values being incompatible with the data. My suggestion is that you increase the prior precision of mean parameters. I don't think this will make a material difference to your parameter estimates but allows stable initial values to be generated.