Description Usage Arguments Details Value References See Also
This function corrects for the issue of label switching when fitting mixture models in a Bayesian setting.
1 2 | labelswitch(mu, sigma2, lambda, tau, K, G, d, perms, muMAP, iter, uphill,
burnin, thin, s, x.mix)
|
mu |
A G x d matrix of mean latent locations. |
sigma2 |
A vector of length G containing the covariance of the latent locations within each cluster. |
lambda |
An n x G matrix of mixing proportions. |
tau |
A matrix of logistic regression coefficients, with G rows and number of columns equal to the number of covariates in the mixing proportions model plus 1, for the intercept. |
K |
Vector of length n detailing the number of the cluster to which each node belongs. |
G |
The number of clusters in the model being fitted. |
d |
The dimension of the latent space. |
perms |
A G! x G matrix of all possible permutations of 1:G (output by permutations(G), say). |
muMAP |
A G x d matrix of maximum a posteriori latent location means, obtained at the end of the uphill only section of the MCMC chain. Used as the template to correct for label switching. |
iter |
Iteration number. |
uphill |
Number of iterations for which uphill only steps in the MCMC chain should be run. |
burnin |
Number of iterations of the MCMC chain which should not be included in a posteriori summaries. |
thin |
Thinning frequency of the MCMC chain to ensure independent samples. |
s |
Number of columns in the reformatted covariates matrix for the mixing proportions model, output by |
x.mix |
The reformatted covariates matrix for the mixing proportions model, output by |
The muMAP matrix is used as the reference to which each new estimate the cluster means is matched to correct for any label switching which may have occurred during sampling. A sum of squares function is employed as the loss function.
A list containing:list(mu, sigma2, lambda, tau, K)
The label-corrected matrix of cluster means.
The label-corrected vector of cluster covariances.
The label-corrected matrix of mixing proportions.
The label-corrected matrix of logistic regression coefficients for the mixing proportions model.
The label-corrected vector of length n detailing the number of the cluster to which each node belongs.
Isobel Claire Gormley and Thomas Brendan Murphy. (2010) A Mixture of Experts Latent Position Cluster Model for Social Network Data. Statistical Methodology, 7 (3), pp.385-405.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.