View source: R/plot_sample_size_EGA_montecarlo.R
| plot_sample_size_EGA_montecarlo | R Documentation |
Creates a visual summary of the output from
sample_size_EGA_montecarlo(). The plot shows selected performance
metrics across candidate sample sizes, target criteria, and the recommended
sample size when one is available. Optionally adds 95 percent Monte Carlo
uncertainty ribbons for ARI and edge correlation.
plot_sample_size_EGA_montecarlo(
x,
metrics = c("p_dimensions", "median_ari", "median_edge_correlation",
"median_sensitivity", "median_specificity", "median_precision", "median_fdr"),
show_criteria = TRUE,
show_recommended = TRUE,
show_uncertainty = TRUE,
point_size = 2.4,
line_width = 0.8,
...
)
x |
Object returned by |
metrics |
Character vector with summary metrics to plot. Defaults to the main recovery metrics bounded between 0 and 1. |
show_criteria |
Logical; draw horizontal target lines when criteria are available. |
show_recommended |
Logical; draw a vertical line at the recommended sample size when available. |
show_uncertainty |
Logical; draw 95 percent Monte Carlo bands when the
relevant quantile columns are present in |
point_size |
Numeric point size. |
line_width |
Numeric line width. |
... |
Ignored. Included for compatibility with |
A ggplot object.
res <- sample_size_EGA_montecarlo(
community_sizes = c(4, 4), within_edge = 0.20,
sample_sizes = c(100, 200, 400), n_rep = 10,
data_type = "continuous", seed = 1, verbose = FALSE,
control = list(boots = 100, corr = "pearson", algorithm = "walktrap")
)
plot_sample_size_EGA_montecarlo(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.