iterateBMAlm: Iterative BMA for linear modeling with prior variable...

Description Usage Arguments Details Value References See Also Examples

View source: R/iterateBMAlm.R

Description

An iterative version of Bayesian Model Averaging (BMA) for linear models with many variables. Incorporates prior probabilities for inclusion of variables in models.

Usage

1
2
iterateBMAlm( x, y, prior.prob = NULL, control = iBMAcontrolLM(), 
             verbose = FALSE)

Arguments

x

A matrix of real-valued predictor variables. Rows correspond to observations and columns to variables.

y

A real-valued response vector.

prior.prob

An optional vector of prior probabilities for each predictor variable belonging to a linear model for the data. If not specified, predictor variables are assumed to have equal prior probability.

control

A list of values controling the underlying algorithm. The default is given by iBMAcontrolLM().

verbose

A logical variable indicating whether or not the details of the method's progress shoul be printed during computation. The default value is FALSE.

Details

iterateBMAlm is intended for datasets that have more variables (e.g. gene expression values) than observations (e.g. subjects). There is currently no mechanism for handling factor variables in iterateBMAlm, as there is in the underlying function bicreg in the BMA package. However factors can be encoded by users and included with other variables as input.

Value

A list with the following components, similar to the output of function bicreg in the BMA package:

bic

values of BIC for the models

postprob

the posterior probabilities of the models selected

priorprob

the prior probabilities of the variables in the models

namesx

the names of the variables

label

labels identifying the models selected

r2

R2 values for the models

size

the number of independent variables in each of the models

which

a logical matrix with one row per model and one column per variable indicating whether that variable is in the model

probne0

the posterior probability that each variable is non-zero (in percent)

postmean

the posterior mean of each coefficient (from model averaging)

condpostmean

the posterior mean of each coefficient conditional on the variable being included in the model

condpostsd

the posterior standard deviation of each coefficient conditional on the variable being included in the model

ols

matrix with one row per model and one column per variable giving the OLS estimate of each coefficient for each model

mle

the same as ols

n.models

the number of models

n.vars

the number of variables

References

K. Y. Yeung, R. E. Bumgarner and A. E. Raftery (2005), Bayesian model averaging: development of an improved multi-class, gene selection and classification tool for microarray data, Bioinformatics 21(10) 2394-2402.

K. Lo, A. E. Raftery, K. M. Dombek, J. Zhu, E. E. Schadt, R. E. Bumgarner and K. Y. Yeung (2012), Integrating External Biological Knowledge in the Construction of Regulatory Networks from Time-series Expression Data, BMC Systems Biology, 6:101.

K. Y. Yeung, K. M. Dombek, K. Lo, J. E. Mittler, J. Zhu, E. E. Schadt, R. E. Bumgarner and A. E. Raftery (2011), Construction of regulatory networks using expression time-series data of a genotyped population, Proceedings of the National Academy of Sciences, 108(48):19436-41.

See Also

iBMAcontrolLM, varord, bicreg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(dream4)

network <- 1

Time <- as.numeric(dream4ts100[[network]]$time)

xIndex <- which(Time != max(Time))
yIndex <- which(Time != min(Time))

gene <- "G1"

x <- dream4ts100[[network]][xIndex,-(1:2)]
y <- dream4ts100[[network]][yIndex,gene]

nvar <- 50
ord <- varord( x, y, ordering = "bic1")[1:nvar]

result <- iterateBMAlm( x = x[,ord], y = y)

networkBMA documentation built on Jan. 28, 2021, 2:02 a.m.