plotBootstrapEM_Class: Plot results of bootstrapEM_Class

Description Usage Arguments Details Author(s) See Also Examples

View source: R/bootstrapLatencyClustering.R

Description

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

Usage

1
plotBootstrapEM_Class(bootClass, bootCurveAlpha = 0.05, subjectID = NULL)

Arguments

bootClass

A list of bootstrap EM classification results from bootstrapEM_Class.

bootCurveAlpha

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

subjectID

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

Details

Three plots are generated by this function, entitled respectively

  1. Defeat latency and probability of classification as stress resilient

    This scatter plot shows the results of the Mclust EM classification on the original data set. The latency data points are plotted as circles, and the probability of LL classification as a continuous function of latency is plotted as a solid line.

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

  2. Stress resilience classification threshold over all bootstraps

    This histogram plots the EM classification threshold. The threshold is defined as the smallest latency (in the range 1:900) with an LL probability greater than 0.5.

    This plot is unreliable if the mixture models have unequal variance, because the probability of LL might not be monotonically increasing with latency and thus the wrong threshold may be chosen.

  3. Stress-resilience classification probabilities

    This bar plot shows, for each subject, the LL probabilities from the EM model fit to the original data, and from the results of 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.

Author(s)

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

See Also

bootstrapEM_Class

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.