plotPower {modnets}R Documentation

Plot results of power simulations

Description

Plots the output from the mnetPowerSim function.

Usage

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.

Details

The options of what performance metrics to plot include:

Value

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

See Also

mnetPowerSim

Examples


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


[Package modnets version 0.9.0 Index]