Learn R Programming

IMIFA (version 2.1.5)

MGP_check: Check the validity of Multiplicative Gamma Process (MGP) hyperparameters

Description

Checks the hyperparameters for the multiplicative gamma process (MGP) shrinkage prior in order to ensure that the property of cumulative shrinkage (in expectation) holds, i.e. checks whether growing mass is assigned to small neighbourhoods of zero as the column index increases.

Usage

MGP_check(ad1,
          ad2,
          Q = 3L,
          phi.shape = NULL,
          phi.rate = NULL,
          sigma.shape = NULL,
          sigma.rate = NULL,
          bd1 = 1,
          bd2 = 1,
          inverse = TRUE)

Arguments

ad1, ad2

Shape hyperparameters for \(\delta_1\) and \(\delta_2\), respectively.

Q

Number of latent factors. Defaults to 3, which is enough to check if the cumulative shrinkage property holds. Supply Q if the actual a priori expected shrinkage factors are of interest.

phi.shape, phi.rate

The shape and rate hyperparameters for the gamma prior on the local shrinkage parameters. Not necessary for checking if the cumulative shrinkage property holds, but worth supplying both if the actual a priori expected shrinkage factors are of interest. The default value(s) depends on the value of inverse, but are chosen in such a way that the local shrinkage has no effect on the expectation unless both are supplied. Cannot be incorporated into the expectation if phi.shape < 1 and isTRUE(inverse).

sigma.shape, sigma.rate

The shape and rate hyperparameters for the gamma prior on the cluster shrinkage parameters. Not necessary for checking if the cumulative shrinkage property holds, but worth supplying both if the actual a priori expected shrinkage factors are of interest. The default value(s) depends on the value of inverse, but are chosen in such a way that the cluster shrinkage has no effect on the expectation unless both are supplied. Cannot be incorporated into the expectation if sigma.shape < 1 and isTRUE(inverse).

bd1, bd2

Rate hyperparameters for \(\delta_1\) and \(\delta_2\), respectively. Both default to 1.

inverse

Logical indicator for whether the cumulative shrinkage property is assessed against the induced Inverse Gamma prior, the default, or in terms of the Gamma prior (which is incorrect). This is always TRUE when used inside mcmc_IMIFA: the FALSE option exists only for demonstration purposes.

Value

A list of length 2 containing the following objects:

  • expectation - The vector (or list of vectors) of actual expected a priori shrinkage factors.

  • valid - A logical (or vector of logicals) indicating whether the cumulative shrinkage property holds (in expectation).

Details

This is called inside mcmc_IMIFA for the "IFA", "MIFA", "OMIFA" and "IMIFA" methods. This function is vectorised with respect to the arguments ad1, ad2, phi.shape, phi.rate, sigma.shape, sigma.rate, bd1 and bd2.

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.

See Also

mcmc_IMIFA

Examples

Run this code
# NOT RUN {
# Check if expected shrinkage under the MGP increases with the column index (WRONG approach!).
MGP_check(ad1=1.5, ad2=1.8, Q=10, phi.shape=3, inverse=FALSE)$valid      #TRUE

# Check if the induced IG prior on the MGP column shrinkage parameters
# is stochastically increasing, thereby inducing cumulative shrinkage     (CORRECT approach!).
MGP_check(ad1=1.5, ad2=1.8, Q=10, phi.shape=3, inverse=TRUE)$valid       #FALSE

# Check again with a parameterisation that IS valid and examine the expected shrinkage values.
(shrink <- MGP_check(ad1=1.5, ad2=2.8, Q=10, phi.shape=2, phi.rate=0.5, inverse=TRUE))
# }

Run the code above in your browser using DataLab