Default prior on the negative binomial is very informative
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 401
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
Summary:
The default prior for the over-dispersion parameter of the negative binomial likelihood puts a lot of prior mass on large amounts of over-dispersion
Description:
This is found in src/stan_files/count.stan. The likelihood is invoked on lines 99-100 and the prior on the variable aux is set on lines 108-117.
The variance of the neg_binomial2 is given by
variance = mean(1 + mean / aux)
where aux has a half-normal, half-t, or exponential prior. This means that most of the prior mass is on aux<1 which can lead to a great deal of over-dispersion.
The fix is to put the same prior on 1/aux or, even better, 1/sqrt(aux). The inverse square root comes from noting that you can specify a negative binomial as a poisson with a random mean with a Gamma(aux,aux) distribution. This has mean 1 and variance 1/aux. This suggests that 1/sqrt(aux) is somewhat like a standard deviation.
An outline of a different, more mathematical approach based on PC priors and Kullback-Leibler divergences is given in the second last section (Can't help lovin that man) of this blog post: http://andrewgelman.com/2018/04/03/justify-my-love/
Reproducible Steps:
Not applicable
RStanARM Version:
Not applicable. This is true on the current master branch https://github.com/stan-dev/rstanarm/commit/f11d6bf92b6c78ce64896caf78c2237ebd015abb
R Version:
Not applicable
Operating System:
Not applicable
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/stan_files/count.stan, especially the negative-binomial likelihood on lines 99-100 and the aux prior on lines 108-117. Review the discussion and the proposed parameterizations before choosing the intended default; done means the prior is changed consistently and the resulting over-dispersion behavior is validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100