bootstrap: bootstrap

Description Usage Arguments Value References See Also Examples

View source: R/bootstrap-functions.R

Description

This function provides bootstrapping for hierarchical clustering (hclust objects).

Usage

1
2
  bootstrap(x, fun, n = 1000L,
    mc.cores = getOption("mc.cores", 2L))

Arguments

x

matrix, rows: individuals, columns: observations

fun

function which creates the individual hclust object

n

integer, number of bootstrap replicates

mc.cores

integer, number of processes to run in parallel

Value

numeric vector with frequencies of each node

References

Felsenstein, Joseph. Confidence limits on phylogenies: an approach using the bootstrap. Evolution (1985): 783-791.

Efron, Bradley, Elizabeth Halloran, and Susan Holmes. Bootstrap confidence levels for phylogenetic trees. Proceedings of the National Academy of Sciences 93.23 (1996): 13429-13429.

See Also

dist, link{hclust}

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## hclust example
createHclustObject <- function(x)hclust(dist(x), "ave")

## bootstrap
b <- bootstrap(USArrests, fun=createHclustObject, n=100L)

## plot
hc <- createHclustObject(USArrests)
plot(hc)

## draw bootstrap values to corresponding node
bootlabels.hclust(hc, b, col="blue")

sgibb/bootstrap documentation built on May 26, 2017, 6:55 a.m.