| plot_mds_n | R Documentation |
Produces a base R plot of the minimum sample size against the termination ratio 'a'.
plot_mds_n(x, ...)
x |
Output from 'mds_asip()'. |
... |
Additional graphical arguments passed to 'plot()'. |
For the MDS plan considered here, ASN is exactly equal to the sample size 'n'. Therefore, the plot can also be interpreted as ASN against the termination ratio.
Invisibly returns the supplied data frame.
# ----------------------------------------------------------
# Example 1: User-defined failure probabilities
# ----------------------------------------------------------
a <- c(0.5, 1, 1.5, 2)
p <- c(0.05, 0.10, 0.15, 0.20)
result <- mds_asip(
p = p,
a = a,
b = 1,
i = 3,
beta = 0.25,
c1 = 0,
c2 = 1
)
plot_mds_n(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 <- mds_asip(
p = p,
a = a,
b = 1,
i = 3,
beta = 0.25,
c1 = 0,
c2 = 1
)
plot_mds_n(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.