Last data update: 2014.03.03

R: An image plot visualization tool
imageplot.iterate.bma.survR Documentation

An image plot visualization tool

Description

Create a visualization of the models and variables selected by the iterative BMA algorithm.

Usage

imageplot.iterate.bma.surv (bicreg.out, color="default", ...)

Arguments

bicreg.out

An object of type 'bicreg', 'bic.glm' or 'bic.surv'

color

The color of the plot. The value 'default' uses the current default R color scheme for image. The value 'blackandwhite' produces a black and white image.

...

Other parameters to be passed to the image and axis functions.

Details

This function is a modification of the imageplot.bma function from the BMA package. The difference is that variables (genes) with probne0 equal to 0 are removed before plotting. The arguments of this function are identical to those in imageplot.bma.

Value

An heatmap-style image, with the BMA selected variables on the vertical axis, and the BMA selected models on the horizontal axis. The variables (genes) are sorted in descreasing order of the posterior probability that the variable is not equal to 0 (probne0) from top to bottom. The models are sorted in descreasing order of the model posterior probability (postprob) from left to right.

Note

The BMA package is required.

References

Annest, A., Yeung, K.Y., Bumgarner, R.E., and Raftery, A.E. (2008). Iterative Bayesian Model Averaging for Survival Analysis. Manuscript in Progress.

Clyde, M. (1999) Bayesian Model Averaging and Model Search Strategies (with discussion). In Bayesian Statistics 6. J.M. Bernardo, A.P. Dawid, J.O. Berger, and A.F.M. Smith eds. Oxford University Press, pages 157-185.

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

See Also

iterateBMAsurv.train.wrapper, iterateBMAsurv.train.predict.assess, trainData, trainSurv, trainCens

Examples

library (BMA)
library (iterativeBMAsurv)
data(trainData)
data(trainSurv)
data(trainCens)

## Training phase: select relevant genes
## Assumes the training data is in sorted order with the desired number of genes
ret.bic.surv <- iterateBMAsurv.train.wrapper (x=trainData, surv.time=trainSurv, cens.vec=trainCens)

## Produce an image plot to visualize the selected genes and models
imageplot.iterate.bma.surv (ret.bic.surv$obj)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(iterativeBMAsurv)
Loading required package: BMA
Loading required package: survival
Loading required package: leaps
Loading required package: robustbase

Attaching package: 'robustbase'

The following object is masked from 'package:survival':

    heart

Loading required package: inline
Loading required package: rrcov
Scalable Robust Estimators with High Breakdown Point (version 1.3-11)

Loading required package: splines
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/iterativeBMAsurv/imageplot.iterate.bma.surv.Rd_%03d_medium.png", width=480, height=480)
> ### Name: imageplot.iterate.bma.surv
> ### Title: An image plot visualization tool
> ### Aliases: imageplot.iterate.bma.surv
> ### Keywords: survival
> 
> ### ** Examples
> 
> library (BMA)
> library (iterativeBMAsurv)
> data(trainData)
> data(trainSurv)
> data(trainCens)
> 
> ## Training phase: select relevant genes
> ## Assumes the training data is in sorted order with the desired number of genes
> ret.bic.surv <- iterateBMAsurv.train.wrapper (x=trainData, surv.time=trainSurv, cens.vec=trainCens)
21: Explored up to variable # 100
Iterate bic.surv is done!
Selected genes:
 [1] "X33706" "X31968" "X30209" "X33558" "X31687" "X16948" "X28531" "X16817"
 [9] "X31787" "X17154" "X19241" "X17241" "X26586" "X29650" "X27332" "X26146"
[17] "X31242" "X22086" "X31453" "X32904" "X34574" "X30258" "X25054" "X33013"
[25] "X31471"
Posterior probabilities of selected genes:
 [1]  21.2  98.3  19.9   3.8 100.0   0.0  10.7   4.1  12.9  25.7  99.6  89.3
[13]  25.4   3.7   0.0   8.1  47.9  31.6   1.2 100.0  45.2   5.0  99.5   0.8
[25]  34.3
> 
> ## Produce an image plot to visualize the selected genes and models
> imageplot.iterate.bma.surv (ret.bic.surv$obj)
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>