Learn R Programming

Ultimixt (version 2.0)

K.MixReparametrized: Sample from a Gaussian mixture posterior associated with a noninformative prior and obtained by Metropolis-within-Gibbs sampling

Description

This function returns a sample simulated from the posterior distribution of the parameters of a Gaussian mixture under a non-informative prior. This prior is derived from a mean-variance reparameterisation of the mixture distribution, as proposed by Kamary et al. (2015). The algorithm is a Metropolis-within-Gibbs scheme with an adaptive calibration of the proposal distribution scales. Adaptation is driven by the formally optimal acceptance rates of $0.44$ and $0.234$ in one and larger dimensions, respectively (Roberts et al.,1997). This algorithm monitors the convergence of the MCMC sequences via Gelman's and Rubin's (1992) criterion.

Usage

K.MixReparametrized(xobs, k, alpha0, alpha, Nsim)

Arguments

xobs
vector of the observations or dataset
k
number of components in the mixture model
alpha0
hyperparameter of Dirichlet prior distribution of the mixture model weights which is .5 by default
alpha
hyperparameter of beta prior distribution of the radial coordinate which is .5 by default
Nsim
number of MCMC iterations after calibration step of proposal scales

Value

The output of this function is a list of the following variables, where the dimension of the vectors is the number of simulations:
mean global
vector of simulated draws from the conditional posterior of the mixture model mean
sigma global
vector of simulated draws from the conditional posterior of the mixture model standard deviation
weights
matrix of simulated draws from the conditional posterior of the mixture model weights with a number of columns equal to the number of components $k$
angles xi
matrix of simulated draws from the conditional posterior of the angular coordinates of the component standard deviations with a number of columns equal to $k-1$
phi
vector of simulated draws from the conditional posterior of the radian coordinate
angles varpi
matrix of simulated draws from the conditional posterior of the angular coordinates of the component means with a number of columns equal to $k-2$
accept rat
vector of resulting acceptance rates of the proposal distributions without calibration step of the proposal scales
optimal para
vector of resulting proposal scales after optimisation obtained by adaptive MCMC
adapt rat
list of acceptance rates of batch of 50 iterations obtained when calibrating the proposal scales by adaptive MCMC. The number of columns depends on the number of proposal distributions.
adapt scale
list of proposal scales calibrated by adaptive MCMC for each batch of 50 iterations with respect to the optimal acceptance rate. The number of columns depends on the number of proposal distribution scales.
component means
matrix of MCMC samples of the component means of the mixture model with a number of columns equal to $k$
component sigmas
matrix of MCMC samples of the component standard deviations of the mixture model with a number of columns equal to $k$

Details

The output of this function contains a simulated sample for each parameter of the mixture distribution, the evolution of the proposal scales and acceptance rates over the number of iterations during the calibration stage, and their final values after calibration.

References

Kamary, K., Lee, J.Y., and Robert, C.P. (2015) Non-informative reparameterisation of location-scale mixtures. arXiv.

Robert, C. and Casella, G. (2009). Introducing Monte Carlo Methods with R. Springer-Verlag.

Roberts, G. O., Gelman, A. and Gilks, W. R. (1997). Weak convergence and optimal scaling of random walk Metropolis algorithms. Ann. Applied Probability, 7, 110--120.

Gelman, A. and Rubin, D. (1992). Inference from iterative simulation using multiple sequences (with discussion). Statistical Science, 457--472.

See Also

Ultimixt

Examples

Run this code
data(faithful)
xobs=faithful[50:100,1]
#estimate=K.MixReparametrized(xobs, k=2, alpha0=.5, alpha=.5, Nsim=1e4)

Run the code above in your browser using DataLab