convert_chisq_to_gamma {RARtrials} | R Documentation |
Convert parameters from a Normal-Inverse-Chi-Squared Distribution to a Normal-Inverse-Gamma Distribution
Description
Convert parameters from a Normal-Inverse-Chi-Squared distribution to a Normal-Inverse-Gamma distribution.
Usage
convert_chisq_to_gamma(cpar)
Arguments
cpar |
a list of parameters including mu, kappa, nu, sigsq from a Normal-Chi-Squared distribution. |
Details
This function convert parameters from a Normal-Inverse-Chi-Squared
((\mu,\sigma^2) \sim NIX(mean=\mu,effective sample size=\kappa,degrees of freedom=\nu,variance=\sigma^2/\kappa)
)
distribution to a Normal-Inverse-Gamma
((\mu,\sigma^2) \sim NIG(mean=m,variance=V \times \sigma^2,shape=a,rate=b)
)
distribution.
Value
a list of parameters including m, V, a, b from a Normal-Inverse-Gamma distribution.
References
Murphy K (2007). “Conjugate Bayesian analysis of the Gaussian distribution.” University of British Columbia. https://www.cs.ubc.ca/~murphyk/Papers/bayesGauss.pdf.
Examples
convert_chisq_to_gamma(list(mu=0.091,kappa=2,nu=1,sigsq=4e-05))