mgpControl: Control settings for the MGP prior and AGS for infinite...

View source: R/FullConditionals.R

mgpControlR Documentation

Control settings for the MGP prior and AGS for infinite factor models

Description

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".

Usage

mgpControl(alpha.d1 = 2.1,
           alpha.d2 = 3.1,
           phi.hyper = c(3, 2),
           sigma.hyper = c(3, 2),
           prop = 0.7,
           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,
           ...)

Arguments

alpha.d1

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.

alpha.d2

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.

phi.hyper

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.

sigma.hyper

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).

prop

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).

eps

Neighbourhood epsilon of zero within which a loadings entry is considered negligible according to prop. Defaults to 0.1. Must be positive.

adapt

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.

forceQg

A logical indicating whether the upper limit on the number of cluster-specific factors Q is also cluster-specific. 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.

cluster.shrink

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.

truncated

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.

b0, b1

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.

beta.d1

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.

beta.d2

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.

start.AGS

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.

stop.AGS

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.

delta0g

Logical indicating whether the alpha.d1 and alpha.d2 hyperparameters can be cluster-specific. Defaults to FALSE. Only relevant for the "MIFA" method and only allowed when z.list is supplied within mcmc_IMIFA.

...

Catches unused arguments.

Value

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.

Note

Certain supplied arguments will be subject to further checks by MGP_check to ensure the cumulative shrinkage property of the MGP prior holds according to the given parameterisation.

The adaptive Gibbs sampler (AGS) monitors the prop of loadings elements within the neighbourhood eps of 0 and discards columns or simulates new columns on this basis. However, if at any stage the number of group-specific latent factors reaches zero, the decision to add columns is instead based on a simple binary trial with probability 1-prop, as there are no loadings entries to monitor.

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>.

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.

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'11, Madison, WI, USA, pp. 785-792. Omnipress.

See Also

mcmc_IMIFA, MGP_check, ltrgamma, mixfaControl, bnpControl, storeControl

Examples

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)

IMIFA documentation built on Dec. 28, 2022, 1:58 a.m.