plot.simss.RdGenerates a detailed plot showing the relationship between power and total sample size for each comparator and the overall combined comparators. The combined-comparator panel is omitted when only one comparator is present. The plot also includes confidence intervals for power estimates and highlights the target power with a dashed line for easy visual comparison.
# S3 method for class 'simss'
plot(x, target_power = 0.8, display = "all", all = TRUE, endpoint = NULL, ...)An object of class simss containing simulation results.
Target power shown as a horizontal reference line. The default is 0.80, unless the object stores a planning target, in which case that target is used when this argument is omitted. An explicit value always overrides the stored target.
Character vector of comparator panels to display. Use
"all" (the default) to display every comparator, or provide comparator
names such as "R_vs_T" to display selected panels.
Logical. If TRUE (the default), display only the aggregate
All comparators result without a comparator facet. If FALSE, display
the comparator panels selected by display.
Endpoint names to display. By default, "Total" is used
when all = TRUE, while all retained endpoints are used when all = FALSE.
Use "all" to show all retained endpoints explicitly.
Additional arguments to be passed to the plot.simss function for customization.
A ggplot object illustrating:
Power (y-axis) vs. Total Sample Size (x-axis) for individual endpoints and comparators.
Clearly visible vertical lines representing the 95% confidence interval of the power estimates.
A dashed horizontal line indicating the target power for comparison.
A larger outlined point at the selected sample size.
Faceted panels for each comparator, making it easy to compare results across different groups.
The plot dynamically adjusts to exclude unnecessary components, such as redundant endpoints or comparators with insufficient data, ensuring clarity and simplicity.
The ggplot2 framework is used for visualizations, allowing further customization if needed.