mixedBayes {mixedBayes}R Documentation

fit a Bayesian regularized quantile mixed model for G - E interactions

Description

fit a Bayesian regularized quantile mixed model for G - E interactions

Usage

mixedBayes(
  y,
  e,
  X,
  g,
  w,
  k,
  iterations = 10000,
  burn.in = NULL,
  slope = TRUE,
  robust = TRUE,
  quant = 0.5,
  sparse = TRUE,
  structure = c("group", "individual")
)

Arguments

y

the matrix of response variable. The current version of mixedBayes only supports continuous response.

e

the matrix of a group of dummy environmental factors variables.

X

the matrix of the intercept and time effects (time effects are optional).

g

the matrix of predictors (genetic factors) without intercept. Each row should be an observation vector.

w

the matrix of interactions between genetic factors and environmental factors.

k

the total number of time points.

iterations

the number of MCMC iterations.

burn.in

the number of iterations for burn-in.

slope

logical flag. If TRUE, random intercept and slope model will be used.

robust

logical flag. If TRUE, robust methods will be used.

quant

specify different quantiles when applying robust methods.

sparse

logical flag. If TRUE, spike-and-slab priors will be used to shrink coefficients of irrelevant covariates to zero exactly.

structure

structure for interaction effects, two choices are available. "group" for selection on group-level only. "individual" for selection on individual-level only.

Details

Consider the data model described in "data":

Y_{ij} = X_{ij}^{T}\gamma_{0}+E_{ij}^{T}\gamma_{1}+\sum_{l=1}^{p}G_{ijl}\gamma_{2l}+\sum_{l=1}^{p}W_{ijl}^{T}\gamma_{3l}+Z_{ij}^{T}\alpha_{i}+\epsilon_{ij}.

where \gamma_{2l} is the main effect of the lth genetic variant. The interaction effects is corresponding to the coefficient vector \gamma_{3l}=(\gamma_{3l1}, \gamma_{3l2},\ldots,\gamma_{3lm})^\top.

When structure="group", group-level selection will be conducted on ||\gamma_{3l}||_{2}. If structure="individual", individual-level selection will be conducted on each \gamma_{3lq}, (q=1,\ldots,m).

When slope=TRUE (default), random intercept and slope model will be used as the mixed effects model.

When sparse=TRUE (default), spike–and–slab priors are imposed on individual and/or group levels to identify important main and interaction effects. Otherwise, Laplacian shrinkage will be used.

When robust=TRUE (default), the distribution of \epsilon_{ij} is defined as a Laplace distribution with density.

f(\epsilon_{ij}|\theta,\tau) = \theta(1-\theta)\exp\left\{-\tau\rho_{\theta}(\epsilon_{ij})\right\} , (i=1,\dots,n,j=1,\dots,k ), which leads to a Bayesian formulation of quantile regression. If robust=FALSE, \epsilon_{ij} follows a normal distribution.

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

Value

an object of class ‘mixedBayes’ is returned, which is a list with component:

posterior

the posteriors of coefficients.

coefficient

the estimated coefficients.

burn.in

the total number of burn-ins.

iterations

the total number of iterations.

See Also

data

Examples

data(data)

## default method
fit = mixedBayes(y,e,X,g,w,k,structure=c("group"))
fit$coefficient

## Compute TP and FP
b = selection(fit,sparse=TRUE)
index = which(coeff!=0)
pos = which(b != 0)
tp = length(intersect(index, pos))
fp = length(pos) - tp
list(tp=tp, fp=fp)

## alternative: robust individual selection
fit = mixedBayes(y,e,X,g,w,k,structure=c("individual"))
fit$coefficient

## alternative: non-robust group selection
fit = mixedBayes(y,e,X,g,w,k,robust=FALSE, structure=c("group"))
fit$coefficient

## alternative: robust group selection under random intercept model
fit = mixedBayes(y,e,X,g,w,k,slope=FALSE, structure=c("group"))
fit$coefficient




[Package mixedBayes version 0.1.2 Index]