mixfaControl {IMIFA} | R Documentation |
Control settings for the IMIFA family of factor analytic mixtures
Description
Supplies a list of arguments for use in mcmc_IMIFA
pertaining to ALL methods in the IMIFA
family: e.g. MCMC settings, cluster initialisation, generic hyperparameters for factor-analytic mixtures, etc.
Usage
mixfaControl(n.iters = 25000L,
burnin = n.iters/5L,
thinning = 2L,
centering = TRUE,
scaling = c("unit", "pareto", "none"),
uni.type = c("unconstrained", "isotropic",
"constrained", "single"),
psi.alpha = 2.5,
psi.beta = NULL,
mu.zero = NULL,
sigma.mu = 1L,
prec.mu = 0.01,
sigma.l = 1L,
z.init = c("hc", "kmeans", "list", "mclust", "priors"),
z.list = NULL,
equal.pro = FALSE,
uni.prior = c("unconstrained", "isotropic"),
mu0g = FALSE,
psi0g = FALSE,
drop0sd = TRUE,
verbose = interactive(),
...)
Arguments
n.iters |
The number of iterations to run the sampler for. Defaults to 25000. |
burnin |
The number of burn-in iterations for the sampler. Defaults to |
thinning |
The thinning interval used in the simulation. Defaults to 2. No thinning corresponds to 1. Note that chains can also be thinned later, using |
centering |
A logical value indicating whether mean centering should be applied to the data, defaulting to |
scaling |
The scaling to be applied - one of |
uni.type |
This argument specifies the type of constraint, if any, to be placed on the uniquenesses/idiosyncratic variances, i.e. whether a general diagonal matrix or isotropic diagonal matrix is to be assumed, and in turn whether these matrices are constrained to be equal across clusters. The default Constraints may be particularly useful when
The first letter U here corresponds to constraints on loadings (not yet implemented), the second letter corresponds to uniquenesses constrained/unconstrained across clusters, and the third letter corresponds to the isotropic constraint on the uniquenesses. Of course, only the third letter is of relevance for the single-cluster |
psi.alpha |
The shape of the inverse gamma prior on the uniquenesses. Defaults to 2.5. Must be greater than 1 if |
psi.beta |
The scale of the inverse gamma prior on the uniquenesses. Can be either a single scalar parameter, a vector of variable specific scales, or (if Note that optional arguments to |
mu.zero |
The mean of the prior distribution for the mean parameter. Either a scalar, a vector of appropriate dimension, or (if |
sigma.mu |
The covariance of the prior distribution for the cluster mean parameters. Always assumed to be a diagonal matrix, and set to the identity matrix by default. Can also be a scalar by which the identity is multiplied, a vector of appropriate dimension; if supplied as a matrix, only the diagonal elements will be extracted. Specifying |
prec.mu |
A scalar controlling the degree of flatness of the prior for the cluster means by scaling |
sigma.l |
A scalar controlling the diagonal covariance of the prior distribution for the loadings. Defaults to |
z.init |
The method used to initialise the cluster labels. Defaults to model-based agglomerative hierarchical clustering via In any case, unless |
z.list |
A user supplied list of cluster labels. Only relevant if |
equal.pro |
Logical variable indicating whether or not the mixing mixing proportions are to be equal across clusters in the model (default = |
uni.prior |
A switch indicating whether uniquenesses scale hyperparameters are to be |
mu0g |
Logical indicating whether the |
psi0g |
Logical indicating whether the |
drop0sd |
Logical indicating whether to drop variables with no standard deviation (defaults to |
verbose |
Logical indicating whether to print output (e.g. run times) and a progress bar to the screen while the sampler runs. By default is |
... |
Also catches unused arguments. A number of optional arguments can be also supplied here:
|
Value
A named list in which the names are the names of the arguments and the values are the values of the arguments.
Note
Users should be careful to note that data are mean-centered (centering=TRUE
) and unit-scaled (scaling="unit"
) by default when supplying other parameters among the list above, especially those related in any way to psi.hyper
, or to the other control functions mgpControl
and bnpControl
.
Author(s)
Keefe Murphy - <keefe.murphy@mu.ie>
References
Murphy, K., Viroli, C., and Gormley, I. C. (2020) Infinite mixtures of infinite factor analysers, Bayesian Analysis, 15(3): 937-963. <doi:10.1214/19-BA1179>.
McNicholas, P. D. and Murphy, T. B. (2008) Parsimonious Gaussian mixture models, Statistics and Computing, 18(3): 285-296.
See Also
mcmc_IMIFA
, psi_hyper
, hc
, kmeans
, Mclust
, mgpControl
, bnpControl
, storeControl
Examples
mfctrl <- mixfaControl(n.iters=200, prec.mu=1E-03, sigma.mu=NULL,
beta0=1, uni.type="constrained")
# data(olive)
# sim <- mcmc_IMIFA(olive, "IMIFA", mixFA=mfctrl)
# Alternatively specify these arguments directly
# sim <- mcmc_IMIFA(olive, "IMIFA", n.iters=200, prec.mu=1E-03,
# sigma.mu=NULL, beta0=1, uni.type="constrained")
# Use mu0g and psi0g for MIFA models with supplied cluster labels
# oliveScaled <- as.data.frame(scale(olive[,-(1:2)]))
# sim2 <- mcmc_IMIFA(olive, "MIFA", n.iters=200, range.G=c(3, 9),
# z.list=list(olive$area, olive$region), mu0g=TRUE, psi0g=TRUE,
# mu.zero=list(do.call(cbind, tapply(oliveScaled, olive$area, colMeans)),
# do.call(cbind, tapply(oliveScaled, olive$region, colMeans))))