Description Usage Arguments Value See Also Examples
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.
1 | imp(x)
|
x |
A |
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 |
labels |
The vector of variable labels extracted from the |
order |
The order of |
bclust.
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
|
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.