Title: | Group Inverse-Gamma Gamma Shrinkage for Sparse Regression with Grouping Structure |
---|---|
Description: | 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. Jonathan Boss, Jyotishka Datta, Xin Wang, Sung Kyun Park, Jian Kang, Bhramar Mukherjee (2021) <arXiv:2102.10670>. |
Authors: | Jon Boss [aut], Bhramar Mukherjee [aut], Michael Kleinsasser [cre] |
Maintainer: | Michael Kleinsasser <[email protected]> |
License: | GPL-2 |
Version: | 0.2.1 |
Built: | 2024-10-27 03:48:45 UTC |
Source: | https://github.com/umich-cphds/gigg |
Contains a list with data and parameters to run the package examples.
Please see ?gigg_fixed
and ?grouped_igg_mmle
pages for use.
concentrated
concentrated
An object of class list
of length 15.
concentrated names(concentrated)
concentrated names(concentrated)
Evaluate the inverse digamma function.
digamma_inv(y, precision = 1e-08)
digamma_inv(y, precision = 1e-08)
y |
value to evaluate the inverse digamma function at. |
precision |
default = 1e-08. |
Numeric inverse digamma value.
Contains a list with data and parameters to run the package examples.
Please see ?gigg_fixed
and ?grouped_igg_mmle
pages for use.
distributed
distributed
An object of class list
of length 15.
distributed names(distributed)
distributed names(distributed)
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.
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 )
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 )
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 |
grp_idx |
A length p integer vector indicating which group of the G groups the p covariates in X belong to.
The |
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 |
b |
A length G vector of shape parameters for the prior on the individual shrinkage parameters. If |
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, |
A list containing
"draws" - A list containing the posterior draws of
(1) the regression coefficients (alphas and betas)
(2) the individual shrinkage parameters (lambda_sqs)
(3) the group shrinkage parameters (gamma_sqs)
(4) the global shrinkage parameter (tau_sqs) and
(5) the residual error variance (sigma_sqs).
The list also contains details
regarding the dataset (X, C, Y, grp_idx) and Gibbs sampler details
(n_burn_in, n_samples, and n_thin).
"beta.hat" - Posterior mean of betas
"beta.lcl.95" - 95% credible interval lower bound of betas
"beta.ucl.95" - 95% credible interval upper bound of betas
"alpha.hat" - Posterior mean of alpha
"alpha.lcl.95" - 95% credible interval lower bound of alphas
"alpha.ucl.95" - 95% credible interval upper bound of alphas
"sigma_sq.hat" - Posterior mean of sigma squared
"sigma_sq.lcl.95" - 95% credible interval lower bound of sigma sq.
"sigma_sq.ucl.95" - 95% credible interval upper bound of sigma sq.
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
X = concentrated$X C = concentrated$C Y = as.vector(concentrated$Y) grp_idx = concentrated$grps gf = gigg(X, C, Y, method = "fixed", grp_idx, 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, n_burn_in = 200, n_samples = 500, n_thin = 1, verbose = TRUE, btrick = FALSE, stable_solve = FALSE)
X = concentrated$X C = concentrated$C Y = as.vector(concentrated$Y) grp_idx = concentrated$grps gf = gigg(X, C, Y, method = "fixed", grp_idx, 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, n_burn_in = 200, n_samples = 500, n_thin = 1, verbose = TRUE, btrick = FALSE, stable_solve = FALSE)