hddm-devs / hddm

HDDM is a python module that implements Hierarchical Bayesian parameter estimation of Drift Diffusion Models (via PyMC).
http://ski.clps.brown.edu/hddm_docs/
Other
263 stars 119 forks source link

How to get the HPD interval for the parameters? #53

Open JaqueLee opened 4 years ago

JaqueLee commented 4 years ago

I just start learning HDDM and wondering how to get the HPD interval for the parameters like 'a', 'v' and 't'? Really appreciate for the help.

madslupe commented 4 years ago

Hi,

Pymc has a function to calculate HPD/HDI. But to run that you need to get the traces from the posterior distribution. So you can do:

traces = model.get_traces()

and then:

import pymc pymc.utils.hpd(traces.a)

On Sun, Jan 5, 2020 at 9:29 AM JaqueLee notifications@github.com wrote:

I just start learning HDDM and wondering how to get the HPD interval for the parameters like 'a', 'v' and 't'? Really appreciate for the help.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hddm-devs/hddm/issues/53?email_source=notifications&email_token=AA2PQIMIHGMTZOJRSX67IFTQ4GK47A5CNFSM4KC2DZD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IEB7FUA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2PQIOJ34CG6RKUG4GVTB3Q4GK47ANCNFSM4KC2DZDQ .

-- Best, Mads