Learn R Programming

perfectphyloR (version 0.2.1)

RandIndexTest: Rand Index Test

Description

This function performs Rand index test for association between two phylo objects.

Usage

RandIndexTest(dend1, dend2, k = 2, nperm)

Arguments

dend1

An object of type phylo.

dend2

A second object of type phylo.

k

An integer that specifies the number of clusters that the dendrogram should be cut into. The default is k = 2. Clusters are defined by starting from the root of the dendrogram and cutting across.

nperm

The number of times to permute tips of the dend2.

Value

A numeric value between 0 and 1 and permutation P value.

References

Rand, W.M. (1971) Objective criteria for the evaluation of clustering methods. Journal of the American Statistical Association 66: 846-850.

Examples

Run this code
# NOT RUN {
data(ex_hapMat_data)
d1 <- reconstructPP(ex_hapMat_data, focalSNV = 1, minWindow = 1)
d2 <- reconstructPP(ex_hapMat_data, focalSNV = 5, minWindow = 1)
RandIndexTest(dend1 = d1,  dend2 = d2, k = 5, nperm = 100)

# }

Run the code above in your browser using DataLab