# imp: calculates variable and variable-cluster importances In bclust: Bayesian Hierarchical Clustering Using Spike and Slab Models

## Description

The function computes the log Bayes factors for the hypothesis H0: the variable or the variable-cluster combination is useful for clustering against H1: the variable or the variable-cluster combination is useless. The Bayes factors are computed for the optimal allocation found by the `bclust` function.

## Usage

 `1` ```imp(x) ```

## Arguments

 `x` A `bclustvs` object.

## Value

 `var` A vector being the log Bayes factor of d_{v}=1 against d_{v}=0, see bclust for details. `varclust` A vector being the log Bayes factor of g_{vc}=1 against g_{vc}=0, see bclust for details. `repno` The number of replicates producing each row of `varclust`. `labels` The vector of variable labels extracted from the `bclustvs` object. `order` The order of `var` useful to sort `var`, `varclust`, and `labels`.

bclust.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28``` ```data(gaelle) gaelle.id<-rep(1:14,c(3,rep(4,13))) # first 3 rows replication of ColWT, 4 for the rest gaelle.bclust<-bclust(gaelle,rep.id=gaelle.id, transformed.par=c(-1.84,-0.99,1.63,0.08,-0.16,-1.68), var.select=TRUE) gaelle.imp<-imp(gaelle.bclust) #plot the variable importances par(mfrow=c(1,1)) #retreive graphic defaults mycolor<-gaelle.imp\$var mycolor<-c() mycolor[gaelle.imp\$var>0]<-"black" mycolor[gaelle.imp\$var<=0]<-"white" viplot(var=gaelle.imp\$var,xlab=gaelle.imp\$labels,col=mycolor) #plot important variables with balck viplot(var=gaelle.imp\$var,xlab=gaelle.imp\$labels, sort=TRUE,col=heat.colors(length(gaelle.imp\$var)), xlab.mar=10,ylab.mar=4) mtext(1, text = "Metabolite", line = 7,cex=1.5)# add x axis label mtext(2, text = "Log Bayes Factor", line = 3,cex=1.2)# add y axis labels #sort importnaces and use heat colors add some labels to the x and y axes ```

### Example output

```2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14
```

bclust documentation built on May 31, 2017, 2:51 a.m.