plotBootstrapClusterClass: Plot results of bootstrapClusterClass

Description Usage Arguments Details Author(s) See Also Examples

View source: R/bootstrapLatencyClustering.R

Description

Generates plots from a bootstrap clustering classification. The plots show the results of the classification on the original data, with additional information on the uncertainty in the classification derived from the bootstrapping.

Usage

1
plotBootstrapClusterClass(bootClass, bootBoundaryAlpha = 0.05, subjectID = NULL)

Arguments

bootClass

A list of bootstrap classification results from bootstrapClusterClass.

bootBoundaryAlpha

An alpha at which to plot the (two-sided) bootstrap confidence interval on the cluster boundary.

subjectID

Optional vector of subject IDs, used for making the bar plot. The vector should match the length and ordering order of latencies passed to bootstrapClusterClass. If IDs are not specified, the subjects are numbered in ascending order.

Details

Three plots are generated by this function, entitled respectively

  1. Initial clustering and bootstrap probability of stress resilience

    This scatter plot shows the results of the classification on the original data set. The cluster boundary is drawn as a solid line.

    The dashed lines indicate the range of values for the boundary over all bootstrap iterations. The default bootCurveAlpha of 0.05 results in the 2.5th and 97.5th percentile being plotted.

  2. Stress resilient cluster boundary over all bootstraps

    This histogram plots the classification threshold. The boundary is defined as halfway between the SL subject with the longest latency, and the LL subject with the shortest latency.

  3. Bootstrap stress-resilience probabilities

    This bar plot shows, for each subject, the LL probabilities derived from the bootstrap. The bootstrap probabilities are defined as the probability the subject will be classified as LL for a given bootstrap. Thus if a subject is LL in 900 out of 1000 bootstraps, its bootstrap probability is 0.9. The color of the bars indicate the initial classification on the original data.

Author(s)

Philip A Cook <cookpa@pennmedicine.upenn.edu>

See Also

bootstrapClusterClass

Examples

1
2
3
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

cookpa/socialdefeat documentation built on May 17, 2019, 10:12 p.m.