plotPower function

Plot results of power simulations

Plot results of power simulations

Plots the output from the mnetPowerSim function.

plotPower( x, by = "type", yvar = "default", yadd = NULL, hline = 0.8, xlab = "Number of cases", title = NULL, ... ) ## S3 method for class 'mnetPower' plot( x, by = "type", yvar = "default", yadd = NULL, hline = 0.8, xlab = "Number of cases", title = NULL, ... )

Arguments

  • x: mnetPowerSim output
  • by: In development. Currently only supports "type" for creating different facets for Pairwise and Interaction effects. "network" for creating facets based on different networks (e.g., temporal, contemporaneous). "p" for creating facets based on the number of nodes in the network.
  • yvar: The performance metrics to plot. Options include: "sensitivity", "specificity", "correlation", "precision", "MAE", "FDR","accuracy". The option "default" automatically sets this to sensitivity, specificity, and correlation.
  • yadd: Specify additional performance metrics to plot. The final performance metrics that end up being plotted are simply: c(yvar, yadd). Thus, this argument is only useful as a shortcut for keeping the default values of yvar, but adding more metrics to plot.
  • hline: Numeric value between 0 and 1 for where to plot a horizontal line of interest. Can set to FALSE to remove line.
  • xlab: Character string for the x-axis label.
  • title: Character string for the title of the plot.
  • ...: Additional arguments.

Returns

Plots the results of a power simulation according to a variety of performance metrics.

Details

The options of what performance metrics to plot include:

  • Sensitivity
  • Specificity
  • Correlation
  • MAE (Mean Absolute Error)
  • Precision
  • Accuracy
  • FDR (False Discovery Rate)

Examples

x <- mnetPowerSim(niter = 10, N = c(100, 200)) summary(x) plot(x)

See Also

mnetPowerSim

  • Maintainer: Trevor Swanson
  • License: GPL (>= 3)
  • Last published: 2021-10-01