Learn R Programming

skipTrack (version 0.1.0)

skipTrack.visualize: Visualize Results from skipTrack.fit

Description

This function takes results from skipTrack.fit and produces several helpful visualizations.

Usage

skipTrack.visualize(stFit)

Value

A list of three ggplot2 objects:

  • cijOverLength - Scatter plot of estimated Cij values against reported cycle length.

  • cijOverTaus - Scatter plot of estimated Cij values against estimated individual precisions, colored by cycle length.

  • cijDens - Density plot of Y values overlayed with a density plot of Y values separated by estimated cij value.

Arguments

stFit

A list containing MCMC results obtained from skipTrack.fit.

See Also

skipTrack.fit for generating MCMC results.

Examples

Run this code
#Simulated data
simDat <- skipTrack.simulate(n = 100, skipProb = c(.7, .2, .1))

#Run model fit (should typically run with much more than 50 reps)
modFit <- skipTrack.fit(Y = simDat$Y, cluster = simDat$cluster, chains = 2, reps = 50)

#Visualize results
skipTrack.visualize(modFit)

Run the code above in your browser using DataLab