plot_mds_n: Plot MDS Sample Size Against Termination Ratio

View source: R/rMDSPTT.R

plot_mds_nR Documentation

Plot MDS Sample Size Against Termination Ratio

Description

Produces a base R plot of the minimum sample size against the termination ratio 'a'.

Usage

plot_mds_n(x, ...)

Arguments

x

Output from 'mds_asip()'.

...

Additional graphical arguments passed to 'plot()'.

Details

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.

Value

Invisibly returns the supplied data frame.

Examples


# ----------------------------------------------------------
# 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)


rMDSPTT documentation built on Oct. 2, 2026, 5:09 p.m.

Related to plot_mds_n in rMDSPTT...