Skip to content
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

[Question] Bayesian HDIs #202

Open
amisepa opened this issue Jun 6, 2024 · 3 comments
Open

[Question] Bayesian HDIs #202

amisepa opened this issue Jun 6, 2024 · 3 comments
Labels

Comments

@amisepa
Copy link

amisepa commented Jun 6, 2024

Hi Cyril,
Wouldn't it more "correct" to use gamma distribution and normalization to sum 1 for HDIs to implement the Dirichlet distribution? instead of the current exponential distribution? I believe it is almost the same, but was wondering.

    theta    = gamrnd(ones(n,1),1); % Generate weights from a Gamma distribution
    weights  = theta / sum(theta); % Normalize to sum to 1

instead of currently:

    theta    = exprnd(1,[n,1]);
    weigths  = theta ./ repmat(sum(theta,1),n,1);

And curious to hear your thoughts on this recent paper?
https://psycnet.apa.org/doiLanding?doi=10.1037%2Fmet0000660

@CPernet
Copy link
Contributor

CPernet commented Jun 8, 2024

Hi Cedric

Does making those changes implement the quantile interval they propose? I have only checked the abstract .. since we want to use HDI to make the type of decision they discuss that seems the right thing to do ... could you please

  • fork master
  • comment the current code and add the proposed changes
  • include ref to the paper in the function header
  • and finally, pull request

thx 🙏

@amisepa
Copy link
Author

amisepa commented Jun 17, 2024

Sorry for the confusion, these were two different things. The code I sent above was for the weights.

The new paper suggest this for the quantile interval:
Screenshot 2024-06-17 120011

I'll try to convert to Matlab and add it where it should soon!

@amisepa
Copy link
Author

amisepa commented Jun 17, 2024

ok done, I submitted the pull request. You probably would have to rename HDIs with QI, if you keep these changes.
I add some descriptions and references.
For the gamma distribution, you can add this one ref (I forgot):
https://stat.columbia.edu/~gelman/book/BDA3.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants