AM_mix_hyperparams_uninorm {AntMAN} | R Documentation |
univariate Normal mixture hyperparameters
Description
Generate a configuration object that specifies a univariate Normal mixture kernel, where users can specify the hyperparameters of the Normal-InverseGamma conjugate prior.
As such, the kernel is a Gaussian distribution with mean \mu
and variance \sigma^2
. The prior on (\mu,\sigma^2)
the Normal-InverseGamma:
\pi(\mu,\sigma^2\mid m_0,\kappa_0,\nu_0,\sigma^2_0) = \pi_{\mu}(\mu|\sigma^2,m_0,\kappa_0)\pi_{\sigma^2}(\sigma^2\mid \nu_0,\sigma^2_0),
\pi_{\mu}(\mu|\sigma^2,m_0,\kappa_0) =\frac{\sqrt{\kappa_0}}{\sqrt{2\pi\sigma^2},}
\exp^{-\frac{\kappa_0}{2\sigma^2}(\mu-m_0)^2 }, \qquad \mu\in\mathcal{R},
\pi_{\sigma^2}(\sigma^2\mid \nu_0,\sigma^2_0)= {\frac {\sigma_0^{2^{\nu_0 }}}{\Gamma (\nu_0 )}}(1/\sigma^2)^{\nu_0 +1}\exp \left(-\frac{\sigma_0^2}{\sigma^2}\right), \qquad \sigma^2>0.
Usage
AM_mix_hyperparams_uninorm(m0, k0, nu0, sig02)
Arguments
m0 |
The |
k0 |
The |
nu0 |
The |
sig02 |
The |
Details
m_0
corresponds m0
,
\kappa_0
corresponds k0
,
\nu_0
corresponds nu0
, and
\sigma^2_0
corresponds sig02
.
If hyperparameters are not specified, the default is m0=0
, k0=1
, nu0=3
, sig02=1
.
Value
An AM_mix_hyperparams
object. This is a configuration list to be used as mix_kernel_hyperparams
argument for AM_mcmc_fit
.
Examples
#### This example ...
data(galaxy)
y_uvn = galaxy
mixture_uvn_params = AM_mix_hyperparams_uninorm (m0=20.83146, k0=0.3333333,
nu0=4.222222, sig02=3.661027)
mcmc_params = AM_mcmc_parameters(niter=2000, burnin=500, thin=10, verbose=0)
components_prior = AM_mix_components_prior_pois (init=3, a=1, b=1)
weights_prior = AM_mix_weights_prior_gamma(init=2, a=1, b=1)
fit <- AM_mcmc_fit(
y = y_uvn,
mix_kernel_hyperparams = mixture_uvn_params,
mix_components_prior =components_prior,
mix_weight_prior = weights_prior,
mcmc_parameters = mcmc_params)
summary (fit)
plot (fit)