bvs: Bayesian Variable Selection

Description Usage Arguments

View source: R/bvs.R

Description

Bayesian Variable Selection

Usage

1
2
3
4
5
bvs(y, x, forced = NULL, intercept = TRUE, family = c("gaussian",
  "binomial"), method = c("sample", "enumerate"), prior_model = list(alpha =
  1, beta = p), prior_coef = list("none"), rare = FALSE, regions = NULL,
  prior_cov = NULL, a1 = 0, hap = FALSE, iter = 10000, maxk = 3,
  parallel = FALSE, control = list())

Arguments

y

outcome variable

x

predictor design matrix

forced

(optional) n x c matrix of c confounding variables that one wishes to adjust the analysis for and that will be forced into every model.

intercept

indicates whether models should include an intercept. Default = TRUE.

family

specifies error distribution for outcome variable, options include

  • "gaussian" (default)

  • "binomial"

method

specifies how to search the model space, options include

  • "sample" (default) : performs basic Metropolis-Hastings algorithm to sample models from model space. For informative marginal inclusion probabilities, the algorithm also performs basic MCMC algorithm to sample the effects of predictor-level covariates (alpha).

  • "enumerate": computes and summarizes all possible models in model space. Not recommended for problems where p > 20.

prior_model

specifies parameters for beta-binomial prior on model size. To specify, pass a list with the following elements

  • alpha = numeric value for first shape parameter (default = 1)

  • beta = numeric value for second shape parameter (default = p)

Example: list(alpha = 1, beta = 2)

prior_coef

specifies prior for regression coefficients (only for use when family = "gaussian"), options include

  • "none" (default)

  • "gprior": To specify the parameters for the g-prior, pass a list object with the following elements

    • "gprior"

    • g = numeric value for sparsity parameter, recommended default = max(n, p^2)

    • alpha = numeric value that specifies variance in g-prior, recommended default = 0.01

    • beta = numeric value that specifies variance in g-prior, recommended default = 0.01

    To use the default values, pass the string "default" for any parameter.

    Example: list("gprior", "default", 0.02, 0.02)

rare

if rare = TRUE, corresponds to the Bayesian Risk Index (BRI) algorithm of Quintana and Conti (2011) that constructs a risk index based on the multiple rare variants within each model. The marginal likelihood of each model is then calculated based on the corresponding risk index.

regions

(optional) p x 1 character or factor vector that identifies a user-defined region for each variant. If rare = TRUE, then multiple region-specific risk indices are computed for each model.

prior_cov

(optional) if method = "sample", a p x q matrix of q predictor-level covariates that the user wishes to incorporate into the estimation of the marginal inclusion probabilities using the iBMU algorithm.

a1

(optional) if method = "enumerate", a q x 1 vector of specified effects of each predictor-level covariate.

hap

(not yet implemented) if hap = TRUE, esimtate a set of haplotypes from the multiple variants within each moel and the marginal likelihood of each model is calculated based on the set of haplotypes.

iter

if method = "sample", the number of iterations to run the algorithm. Default = 1000.

maxk

if method = "enumerate", the maximum model size (k) to consider when enumerating all possible models. Default = 3.

control

specifies 'bvs' control object.


USCbiostats/bvs documentation built on April 30, 2021, 12:29 a.m.