Supplies a list of arguments for use in mcmc_IMIFA
pertaining to the use of the multiplicative gamma process (MGP) shrinkage prior and adaptive Gibbs sampler (AGS) for use with the infinite factor models "IFA"
, "MIFA"
, "OMIFA"
, and "IMIFA"
.
mgpControl(alpha.d1 = 2.1,
alpha.d2 = 3.1,
phi.hyper = c(3, 2),
sigma.hyper = c(3, 2),
active.crit = c("BD", "SC"),
prop = switch(active.crit, BD=0.7, SC=0.99),
eps = 0.1,
adapt = TRUE,
forceQg = FALSE,
cluster.shrink = TRUE,
truncated = FALSE,
b0 = 0.1,
b1 = 5e-05,
beta.d1 = 1,
beta.d2 = 1,
start.AGS = 2L,
stop.AGS = Inf,
delta0g = FALSE,
...)
A named list in which the names are the names of the arguments related to the MGP and AGS and the values are the values supplied to the arguments.
Shape hyperparameter of the column shrinkage on the first column of the loadings according to the MGP shrinkage prior. Passed to MGP_check
to ensure validity. Defaults to 2.1
. For "MIFA"
models, see delta0g
.
Shape hyperparameter of the column shrinkage on the subsequent columns of the loadings according to the MGP shrinkage prior. Passed to MGP_check
to ensure validity. Defaults to 3.1
. For "MIFA"
models, see delta0g
.
A vector of length 2 giving the shape and rate hyperparameters for the gamma prior on the local shrinkage parameters. Passed to MGP_check
to ensure validity. Defaults to c(3, 2)
. It is suggested that the rate be <= shape minus 1 to induce local shrinkage, though the cumulative shrinkage property is unaffected by these hyperparameters. Excessively small values may lead to critical numerical issues and should thus be avoided; indeed it is suggested that the shape be >=1.
A vector of length 2 giving the shape and rate hyperparameters for the gamma prior on the cluster shrinkage parameters. Passed to MGP_check
to ensure validity. Defaults to c(3, 2)
. Again, it is suggested that the shape be >= 1. Only relevant for the "IMIFA"
, "OMIFA"
, and "MIFA"
methods when isTRUE(cluster.shrink)
. Additionally, for the "MIFA"
method when delta0g=TRUE
, sigma.hyper
can be supplied as a matrix with two rows and appropriate dimension or as a list of length length(range.G)
of vectors of length 2 or matrices with two rows and appropriate dimensions.
A character string indicating which criterion to use to determine the number of active factors during adaptive Gibbs sampling (i.e. only relevant when adapt=TRUE
). This is "BD"
by default, for the truncation criterion of Bhattacharya and Dunson (2011). The option "SC"
is provided for the criterion of Schiavon and Canale (2020) but is currently only available when method="IFA"
and is liable to be slightly slower (though more accurate).
Only relevant when adapt=TRUE
and both the meaning and default behaviour change according to the value of active.crit
:
active.crit="BD"
Proportion of loadings elements within the neighbourhood eps
of zero necessary to consider a loadings column redundant. Defaults to floor(0.7 * P)/P
, where P
is the number of variables in the data set. However, if the data set is univariate or bivariate, the default is 0.5
(see Note).
active.crit="SC"
Minimum proportion of variance which must be explained after truncating a loadings column. The smallest number of factors for which the proportion of variance explained exceeds prop
are retained at each iteration. Defaults to 0.99
, unless the data set is univariate or bivariate, in which case the default is 0.5
(see Note).
Only relevant when adapt=TRUE
and active.crit="BD"
. Neighbourhood epsilon of zero within which a loadings entry is considered negligible according to prop
. Defaults to 0.1
. Must be positive.
A logical value indicating whether adaptation of the number of cluster-specific factors is to take place when the MGP prior is employed. Defaults to TRUE
. Specifying FALSE
and supplying range.Q
within mcmc_IMIFA
provides a means to either approximate the infinite factor model with a fixed, high truncation level, or to use the MGP prior in a finite-factor context, however this is NOT recommended for the "OMIFA"
and "IMIFA"
methods. Note that users who specify adapt=FALSE
here can later recover the (cluster-specific) numbers of non-redundant factors by supplying adapt=TRUE
to get_IMIFA_results
provided the relevant parameters are stored via storeControl
(load.switch
for active.crit="BD"
; load.switch
and score.switch
for active.crit="SC"
), though this is not required. Generally, invoking adapt
during sampling will reduce the computational burden significantly.
A logical indicating whether the upper limit on the number of cluster-specific factors Q
is also cluster-specific. This upper limit is determined the number of observations in the given cluster. Defaults to FALSE
: when TRUE
, the number of factors in each cluster is kept below the number of observations in each cluster, in addition to the bound defined by range.Q
. Only relevant for the "IMIFA"
, "OMIFA"
, and "MIFA"
methods, and only invoked when adapt
is TRUE
. May be useful for low-dimensional data sets for which identifiable solutions are desired. It is also advisable that the number of latent factors not exceed the associated Ledermann
bound, or the stricter bound floor((P - 1)/2)
, but these restrictions are not enforced by forceQg
.
A logical value indicating whether to place the prior specified by sigma.hyper
on the cluster shrinkage parameters. Defaults to TRUE
. Specifying FALSE
is equivalent to fixing all cluster shrinkage parameters to 1
. Only relevant for the "IMIFA"
, "OMIFA"
, and "MIFA"
methods. If invoked, the posterior mean cluster shrinkage factors will be reported.
A logical value indicating whether the version of the MGP prior based on left-truncated gamma distributions is invoked (see Zhang et al. reference below and additional relevant documentation in ltrgamma
and MGP_check
). Defaults to FALSE
. Note that, when TRUE
, the expected shrinkage factors for the first loadings column are not affected and the conditions needed to pass MGP_check
for the parameters associated with subsequent columns are much less strict. Moreover, more desirable shrinkage properties are easily obtained, at the expense of slightly longer run times.
Intercept & slope parameters for the exponentially decaying adaptation probability:
p(iter) = 1/exp(b0 + b1 * (iter - start.AGS))
.
Defaults to 0.1
& 0.00005
, respectively. Must be non-negative and strictly positive, respectively, to ensure diminishing adaptation.
Rate hyperparameter of the column shrinkage on the first column of the loadings according to the MGP shrinkage prior. Passed to MGP_check
to ensure validity. Defaults to 1
. For "MIFA"
models, see delta0g
.
Rate hyperparameter of the column shrinkage on the subsequent columns of the loadings according to the MGP shrinkage prior. Passed to MGP_check
to ensure validity. Defaults to 1
. For "MIFA"
models, see delta0g
.
The iteration at which adaptation under the AGS is to begin. Defaults to burnin
for the "IFA"
and "MIFA"
methods, defaults to 2
for the "OMIFA"
and "IMIFA"
methods, and defaults to 2
for all methods if the data set is univariate or bivariate. Cannot exceed burnin
; thus defaults to the same value as burnin
if necessary.
The iteration at which adaptation under the AGS is to stop completely. Defaults to Inf
, such that the AGS is never explicitly forced to stop (thereby overriding the diminishing adaptation probability after stop.AGS
). Must be greater than start.AGS
. The diminishing adaptation probability prior to stop.AGS
is still governed by the arguments b0
and b1
.
Logical indicating whether the alpha.d1
, alpha.d2
, beta.d1
, beta.d2
, and sigma.hyper
hyperparameters can be cluster-specific (i.e., matrices of appropriate dimension for sigma.hyper
, vectors of appropriate length for the other hyperparameters, or a list of length length(range.G)
of such items). Defaults to FALSE
. Only relevant for the "MIFA"
method and only allowed when z.list
is supplied within mcmc_IMIFA
. See Examples below.
Catches unused arguments.
Keefe Murphy - <keefe.murphy@mu.ie>
Murphy, K., Viroli, C., and Gormley, I. C. (2020) Infinite mixtures of infinite factor analysers, Bayesian Analysis, 15(3): 937-963. <tools:::Rd_expr_doi("10.1214/19-BA1179")>.
Durante, D. (2017). A note on the multiplicative gamma process, Statistics & Probability Letters, 122: 198-204.
Bhattacharya, A. and Dunson, D. B. (2011) Sparse Bayesian infinite factor models, Biometrika, 98(2): 291-306.
Schiavon, L. and Canale, A. (2020) On the truncation criteria in infinite factor models, Stat, 9:e298.
Zhang, X., Dunson, D. B., and Carin, L. (2011) Tree-structured infinite sparse factor model. In Getoor, L. and Scheffer, T. (Eds.), Proceedings of the 28th International Conference on Machine Learning (ICML 2011), June 28-July 2, 2011, Bellevue, WA, USA, pp. 785-792. Madison, WI, USA: Omnipress.
mcmc_IMIFA
, Ledermann
, MGP_check
, ltrgamma
, mixfaControl
, bnpControl
, storeControl
, get_IMIFA_results
mgpctrl <- mgpControl(phi.hyper=c(2.5, 1), eps=1e-02, truncated=TRUE)
# data(olive)
# sim <- mcmc_IMIFA(olive, "IMIFA", n.iters=5000, MGP=mgpctrl)
# Alternatively specify these arguments directly
# sim <- mcmc_IMIFA(olive, "IMIFA", n.iters=5000,
# phi.hyper=c(2.5, 1), eps=1e-02, truncated=TRUE)
# Use delta0g for a MIFA model with supplied cluster labels
# sim2 <- mcmc_IMIFA(olive, n.iters=5000, method="MIFA", range.G=3,
# z.list=olive$area, delta0g=TRUE, alpha.d1=4:2, alpha.d2=5:3
# sigma.hyper=matrix(c(4:6, rep(2, 3)), nrow=2, byrow=TRUE))
Run the code above in your browser using DataLab