BVCfit: fit a Semi-parametric Bayesian variable selection In spinBayes: Semi-Parametric Gene-Environment Interaction via Bayesian Variable Selection

Description

fit a Bayesian semi-parametric model for both linear and non-linear G×E interactions. Users can also specify all the interactions as linear and fit a Bayesian LASSO type of model.

Usage

 1 2 3 BVCfit(X, Y, Z, E = NULL, clin = NULL, iterations = 10000, burn.in = NULL, sparse = TRUE, structural = TRUE, VC = TRUE, kn = 2, degree = 2, hyper = NULL, debugging = FALSE) 

Arguments

 X the matrix of predictors (genetic factors) without intercept. Each row should be an observation vector. A column of 1 will be added to the X matrix as the intercept. Y the response variable. The current version of BVCfit only supports continuous response. Z a vector of environmental factor for non-linear G×E interactions. E a vector of environmental factor for linear G×E interactions. clin a matrix of clinical variables. Clinical variables are not subject to penalty. iterations the number of MCMC iterations. burn.in the number of iterations for burn-in. sparse logical flag. If TRUE, spike-and-slab priors will be used to shrink coefficients of irrelevant covariates to zero exactly. 'sparse' has effect only when VC=TRUE. structural logical flag. If TRUE, the coefficient functions with varying effects and constant effects will be penalized separately. 'structural' has effect only when VC=TRUE. VC logical flag. If TRUE, varying coefficient functions will be used for modeling the interactions between Z and X. If FALSE, interactions between Z and X will be modeled as linear interactions. kn the number of interior knots for B-spline. degree the degree of B spline basis. hyper a named list of hyperparameters. debugging logical flag. If TRUE, progress will be output to the console and extra information will be returned.

Details

By default, varying coefficient functions are used for modeling the nonlinear interactions between Z and X. Assuming both E and clin are NULL, the model can be expressed as

Y = β_{0}(Z)+∑β_{j}(Z)X_{j} + ε

The basis expansion and changing of basis with B splines will be done automatically:

β_{j}(\cdot)\approx γ_{j1} + ∑_{k=2}^{q}{B}_{jk}(\cdot)γ_{jk}

where B_{jk}(\cdot) represents B spline basis. γ_{j1} and (γ_{j2}, …, γ_{jq})^\top correspond to the constant and varying parts of the coefficient functional, respectively. q=kn+degree+1 is the number of basis functions. By default, kn=degree=2. User can change the values of kn and degree to any other positive integers. If E is provided, the linear interactions between E and X will be added modeled as pairwise-products:

Y = β_{0}(Z)+∑β_{j}(Z)X_{j} + ζ_{0}E + ∑ ζ_{j}EX_{j} + ε

If clin is provided, clinical variables will be added to the model.

If VC=FALSE, all interactions are treated as linear and a Bayesian LASSO model will be used. With non-null values of E and clin, the full linear model is:

Y \sim Z + ZX + clin + E + EX

Please check the references for more details about the model.

Users can modify the hyper-parameters by providing a named list of hyper-parameters via the argument 'hyper'. The list can have the following named components

• a.c, a.v, a.e: shape parameters of the Gamma priors on λ_{c}, λ_{v} and λ_{e}, respectively.

• b.c, b.v, b.e: rate parameters of the Gamma priors on λ_{c}, λ_{v} and λ_{e}, respectively.

• r.c, r.v, r.e: shape parameters of the Beta priors (π^{r-1}(1-π)^{w-1}) on π_{c}, π_{v} and π_{e}, respectively.

• w.c, w.v, w.e: shape parameters of the Beta priors on π_{c}, π_{v} and π_{e}, respectively.

• s: shape parameters of the Inverse-gamma prior on σ^{2}.

• h: scale parameters of the Inverse-gamma prior on σ^{2}.

Please check the references for more details about the prior distributions.

Value

an object of class "BVCfit" is returned, which is a list with components:

 posterior posterior samples from the MCMC coefficients a list of posterior estimates of coefficients burn.in the number of iterations for burn-in iterations the number of MCMC iterations.

References

Ren, J., Zhou, F., Li, X., Chen, Q., Zhang, H., Ma, S., Jiang, Y., Wu, C. (2019) Semi-parametric Bayesian variable selection for gene-environment interactions. https://arxiv.org/abs/1906.01057

Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 data(gExp) ## default method spbayes=BVCfit(X, Y, Z, E, clin) spbayes ## non-structural structural=FALSE spbayes=BVCfit(X, Y, Z, E, clin, structural=structural) spbayes ## non-sparse sparse=FALSE spbayes=BVCfit(X, Y, Z, E, clin, sparse=sparse) spbayes 

spinBayes documentation built on June 6, 2019, 5:02 p.m.