gigg {gigg}R Documentation

GIGG regression

Description

Perform GIGG (Group Inverse-Gamma Gamma) regression. This package implements a Gibbs sampler corresponding to a Group Inverse-Gamma Gamma (GIGG) regression model with adjustment covariates. Hyperparameters in the GIGG prior specification can either be fixed by the user or can be estimated via Marginal Maximum Likelihood Estimation.

Usage

gigg(
  X,
  C,
  Y,
  method = "mmle",
  grp_idx,
  alpha_inits = rep(0, ncol(C)),
  beta_inits = rep(0, ncol(X)),
  a = rep(0.5, length(unique(grp_idx))),
  b = rep(0.5, length(unique(grp_idx))),
  sigma_sq_init = 1,
  tau_sq_init = 1,
  n_burn_in = 500,
  n_samples = 1000,
  n_thin = 1,
  verbose = TRUE,
  btrick = FALSE,
  stable_solve = TRUE
)

Arguments

X

A (n x p) matrix of covariates that to apply GIGG shrinkage on.

C

A (n x k) matrix of covariates that to apply no shrinkage on (typically intercept + adjustment covariates).

Y

A length n vector of responses.

method

Either fixed for GIGG regression with fixed hyperparameters or mmle for GIGG regression with MMLE. Defaults to method = "mmle".

grp_idx

A length p integer vector indicating which group of the G groups the p covariates in X belong to. The grp_idx vector must be a sequence from 1 to G with no skips. A valid example is 1,1,1,2,2,3,3,3,4,5,5.

alpha_inits

A length k vector containing initial values for the regression coefficients corresponding to C.

beta_inits

A length p vector containing initial values for the regression coefficients corresponding to X.

a

A length G vector of shape parameters for the prior on the group shrinkage parameters. The a parameter is only used if the user selects method = 'fixed'. If method = 'mmle', then a = rep(1/n, length(unique(grp_idx))).

b

A length G vector of shape parameters for the prior on the individual shrinkage parameters. If method = 'mmle', then the b is used as an inital value for the MMLE procedure.

sigma_sq_init

Initial value for the residual error variance (double).

tau_sq_init

Initial value for the global shrinkage parameter (double).

n_burn_in

The number of burn-in samples (integer).

n_samples

The number of posterior draws (integer).

n_thin

The thinning interval (integer).

verbose

Boolean value which indicates whether or not to print the progress of the Gibbs sampler.

btrick

Boolean value which indicates whether or not to use the computational trick in Bhattacharya et al. (2016). Only recommended if number of covariates is much larger than the number of observations.

stable_solve

Boolean value which indicates whether or not to use Cholesky decomposition during the update of the regression coefficients corresponding to X. In our experience, stable_solve = TRUE is slightly slower, but more stable.

Value

A list containing

References

Boss, J., Datta, J., Wang, X., Park, S.K., Kang, J., & Mukherjee, B. (2021). Group Inverse-Gamma Gamma Shrinkage for Sparse Regression with Block-Correlated Predictors. arXiv

Examples

X = concentrated$X
C = concentrated$C
Y = as.vector(concentrated$Y)
grp_idx = concentrated$grps
alpha_inits = concentrated$alpha
beta_inits = concentrated$beta

gf = gigg(X, C, Y, method = "fixed", grp_idx, alpha_inits, beta_inits,
          n_burn_in = 200, n_samples = 500, n_thin = 1,  
          verbose = TRUE, btrick = FALSE, stable_solve = FALSE)

gf_mmle = gigg(X, C, Y, method = "mmle", grp_idx, alpha_inits, beta_inits,
                n_burn_in = 200, n_samples = 500, n_thin = 1, 
                verbose = TRUE, btrick = FALSE, 
                stable_solve = FALSE)



[Package gigg version 0.2.1 Index]