compare.chains: Compare Chains to Test Algorithm Coverage

View source: R/concordmap.R

compare.chainsR Documentation

Compare Chains to Test Algorithm Coverage

Description

Suppose say 4 chains are run, then the first two and the last two are combined and a concord map of each is calculated, for each pair of genes in the concord map the proportion of times these genes are in the same cluster are calculated for each set of chains.

Usage

compare.chains(supcluster.list,chains1,chains2)

Arguments

supcluster.list

The output of supcluster

chains1

The first vector of the chains to be compared

chains2

The second vector of chains to be compared

Value

A N(N-1)/2 by 4 matrix is returned. The first two columns are each pair of genes and the next two are the proportion of times that each where in the same cluster in group of chains indicted by chain1 and chain2

Author(s)

David A. Schoenfeld, Jessie Hsu

See Also

supcluster,compare.chains, beta.by.gene

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.
#NOTE: only a small number of MCMC iterations are done due to time constraints

dat=generate.cluster.data(.2,npats=40,clusts=c(12,8,5),
                sig=1,gamma=1,beta=c(-5,0,6))[[1]]
us=supcluster(dat,outcome="outcome",features=1:25,maxclusters=4,nstart=20,n=40,nchains=2) 
ts1=compare.chains(us,chains1=1,chains2=2)
#plot of one chain verses another
plot(ts1[,3],ts1[,4])


supcluster documentation built on May 20, 2022, 1:07 a.m.