LIMO-EEG-Toolbox / limo_tools

Hierarchical Linear Modelling for MEEG data
https://limo-eeg-toolbox.github.io/limo_meeg/
Other
59 stars 27 forks source link

[Question] Bayesian HDIs #202

Open amisepa opened 6 months ago

amisepa commented 6 months ago

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 commented 5 months ago

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

thx 🙏

amisepa commented 5 months ago

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 commented 5 months ago

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