brian-j-smith / Mamba.jl

Markov chain Monte Carlo (MCMC) for Bayesian analysis in julia
Other
253 stars 52 forks source link

How to learn location and variance of a Gaussian distribution in Mamba where the prior of the location involves the prior of the variance? #161

Open HarrisonWilde opened 4 years ago

HarrisonWilde commented 4 years ago

I want to specify a Normal model with sig2 ~ InverseGamma(a, b) and mu ~ Normal(mup, sig2), is this possible? I can achieve the sig2 fine by passing :sig2 => InverseGamma(2,2) for example in my inits but don't know how to achieve mu as I would like.

bdeonovic commented 4 years ago

Maybe I misunderstand but this seems quite simple. Have you looked at the examples? All of them incorporate ideas like this. See for example: https://mambajl.readthedocs.io/en/latest/examples/rats.html