Allows one to plot results from the resample function based on a few different options.
## S3 method for class 'resample'plot(x, what ="network",...)
Arguments
x: Output from the resample function.
what: Can be one of three options for all resample
outputs: what = "network" will plot the final network model selected from resampling. what = "bootstrap" will run bootNet
based on the final model to create bootstrapped estimates of confidence bands around each edge estimate. what = "coefs" will plot the confidence intervals based on the model parameters in the final network. Additionally, if the object was fit with sampMethod = "stability", a stability plot can be created with the "stability" option. Otherwise, if sampMethod = "bootstrap" or sampMethod = "split", a plot of the empirical distribution function of p-values can be displayed with the "pvals" option.
...: Additional arguments.
Returns
Plots various aspects of output from the resample
function.
Details
For the what argument, the options correspond with calls to the following functions:
"network": plotNet
"bootstrap": plotBoot
"coefs": plotCoefs
"stability": plotStability
"pvals": plotPvals
"bootstrap" and "pvals" only available for bootstrapped and multi-sample split resampling. "stability" only available for stability selection.
Examples
fit1 <- resample(ggmDat, m ='M', niter =10)net(fit1)netInts(fit1)plot(fit1)plot(fit1, what ='coefs')plot(fit1, what ='bootstrap', multi =TRUE)plot(fit1, what ='pvals', outcome =2, predictor =4)fit2 <- resample(gvarDat, m ='M', niter =10, lags =1, sampMethod ='stability')plot(fit2, what ='stability', outcome =3)