MBGLSS: Multivariate Bayesian Group Lasso with Spike and Slab prior

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/MBGLSS.R

Description

Run a gibbs sampler for a Multivariate Bayesian group lasso model with spike and slab prior. This function is designed for a regression model with multivariate response, where the design matrix has a group structure.

Usage

1
2
3
4
MBGLSS(Y, X, niter = 10000, burnin = 5000, group_size,
a = 1, b = 1, num_update = 100, niter.update = 100,
verbose = FALSE, pi_prior = TRUE, pi = 0.5,
d = 3, update_tau = TRUE, option.update = "global")

Arguments

Y

A numerical vector representing the univariate response variable.

X

A matrix respresenting the design matrix of the linear regression model.

niter

Number of iteration for the Gibbs sampler.

burnin

Number of burnin iteration

group_size

Integer vector representing the size of the groups of the design matrix X

a

First shape parameter of the conjugate beta prior for pi_0. Default is 1.

b

Second shape parameter of the conjugate beta prior for pi_0. Default is 1.

num_update

Number of update regarding the scaling of the shrinkage parameter lambda which is calibrated by a Monte Carlo EM algorithm

niter.update

Number of itertion regarding the scaling of the shrinkage parameter lambda which is calibrated by a Monte Carlo EM algorithm

verbose

Logical. If "TRUE" iterations are displayed.

pi_prior

Logical. If "TRUE" a beta prior is used for pi

pi

Initial value for pi_0 which will be updated if pi_prior="TRUE""

d

Degree of freedom of the inverse Wishart prior of the covariance matrix of the response variable. By default d is set to 3.

update_tau

Logical. If "TRUE" then a Monte Carlo EM algorithm is used to update lambda

option.update

Two options are proposed for updating lambda. A "Local" update or a "Global" update

Value

BSGSSS returns a list that contains the following components:

pos_mean

The posterior mean estimate of the regression coefficients

pos_median

The posterior mean estimate of the regression coefficients

coef

A matrix with the regression coefficients sampled at each iteration

Author(s)

Benoit Liquet and Matthew Sutton.

References

B. Liquet, K. Mengersen, A. Pettitt and M. Sutton. (2016). Bayesian Variable Selection Regression Of Multivariate Responses For Group Data. Submitted in Bayesian Analysis.

See Also

MBSGSSS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
## Simulation of datasets X and Y with group variables
data1 = gen_data_Multi(nsample = 120, ntrain = 80)
data1 = Mnormalize(data1)

true_model <- data1$true_model
X <- data1$X
Y<- data1$Y
train_idx <- data1$train_idx
gsize <- data1$gsize
niter <- 2000
burnin <- 1000

model <- MBGLSS(Y,X,niter,burnin,gsize,num_update = 100,
niter.update = 100)
model$pos_median[,1]!=0

## End(Not run)

MBSGS documentation built on May 2, 2019, 4:18 a.m.

Related to MBGLSS in MBSGS...