Learn R Programming

IMIFA (version 1.3.1)

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 holds. This is called inside mcmc_IMIFA for the "IFA", "MIFA", "OMIFA" and "IMIFA" methods. The arguments ad1, ad2, nu, bd1 and bd2 are vectorised.

Usage

MGP_check(ad1, ad2, Q, nu, bd1 = 1L, bd2 = 1L, plus1 = TRUE,
  inverse = TRUE)

Arguments

ad1

Shape hyperparameter for delta_1.

ad2

Shape hyperparameter for delta_2.

Q

Number of latent factors.

nu

Hyperparameter for the local shrinkage parameters.

bd1

Rate hyperparameter for delta_1. Defaults to 1.

bd2

Rate hyperparameter for delta_2. Defaults to 1.

plus1

Logical indicator for whether the Gamma prior on the local shrinkage parameters is of the form Ga(nu + 1, nu), the default, or Ga(nu, nu).

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 of actual expected shrinkage factors, i.e. the inverse of the global shrinkage parameters.

valid

A logical indicating whether the cumulative shrinkage property holds.

References

Bhattacharya, A. and Dunson, D. B. (2011). Sparse Bayesian infinite factor models, Biometrika, 98(2): 291-306.

Durante, D. (2017). A note on the multiplicative gamma process, Statistics & Probability Letters, 122: 198-204.

See Also

mcmc_IMIFA

Examples

Run this code
# NOT RUN {
# Check if expected shrinkage under the MGP increases with the column index (WRONG!).
MGP_check(ad1=1.5, ad2=1.8, Q=10, nu=2, inverse=FALSE)[[1]]$valid

# Check if the induced IG prior on the MGP global shrinkage parameters
# is stochastically increasing, thereby inducing cumulative shrinkage (CORRECT!).
MGP_check(ad1=1.5, ad2=1.8, Q=10, nu=2, inverse=TRUE)[[1]]$valid

# 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, nu=2, inverse=TRUE)[[1]]
shrink$valid
shrink$expectation
# }

Run the code above in your browser using DataLab