| plot_compare_mds_ssp | R Documentation |
Produces a base R plot comparing MDS and SSP sample sizes against the termination ratio.
plot_compare_mds_ssp(x, ...)
x |
Output from 'compare_mds_ssp()'. |
... |
Additional graphical arguments passed to 'plot()'. |
Since ASN equals sample size for both plans, the same plot also represents the ASN comparison.
Invisibly returns the supplied data frame.
# ----------------------------------------------------------
# Example 1: User-defined failure probabilities
# ----------------------------------------------------------
p <- c(0.05, 0.10, 0.15, 0.20)
a <- c(0.5, 1, 1.5, 2)
result <- compare_mds_ssp(
p = p,
a = a,
b = 1,
i = 3,
beta = 0.25,
c1 = 0,
c2 = 1
)
plot_compare_mds_ssp(result)
# ----------------------------------------------------------
# Example 2: Generalized Exponential distribution
# ----------------------------------------------------------
alpha <- 2
b <- 1
a <- c(0.5, 0.75, 1, 1.25, 1.5, 1.75, 2)
p <- (1- exp(-a / b))^alpha
result <- compare_mds_ssp(
p = p,
a = a,
b = 1,
i = 3,
beta = 0.25,
c1 = 0,
c2 = 1
)
plot_compare_mds_ssp(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.