| Title: | Single Acceptance Sampling Plans for Time-Truncated Life Test |
|---|---|
| Description: | Designing single acceptance sampling inspection plans under time-truncated life tests and calculates the minimum required sample size subject to a consumer's risk constraint on the probability of acceptance. Failure probabilities can be supplied from any lifetime distribution, allowing the methodology to be applied without restricting the analysis to a particular probability model. The package also provides plot of the required sample size against the termination ratio. Tripathi et al. (2023) <doi:10.1007/s41872-023-00221-x>; Hu and Gui (2018) <doi:10.1080/09720510.2017.1413044>. |
| Authors: | Harsh Tripathi [aut, cre] |
| Maintainer: | Harsh Tripathi <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-09-15 10:02:35 UTC |
| Source: | https://github.com/cran/rSSP |
Calculates the minimum sample size for different termination ratios and plots the resulting sample size against the termination ratio.
plot_single_asip(p, a, b = 1, be = 0.25, c = 0, ylim = c(0, 50))plot_single_asip(p, a, b = 1, be = 0.25, c = 0, ylim = c(0, 50))
p |
User-defined probability of failure corresponding to each termination ratio. |
a |
Numeric vector of termination ratios. |
b |
Quality ratio. It may be a single value or a vector having the same length as a. |
be |
Producer's risk. |
c |
Acceptance number. |
ylim |
Numeric vector of length two specifying the limits of the y-axis. Default is c(0, 50). |
The user supplies the corresponding values of p calculated from their own lifetime distribution.
A data frame containing a, b, p and the required sample size n.
# Example 1: User-defined failure probabilities p <- c(0.05, 0.10, 0.15, 0.20) plot_single_asip( p = p, a = c(0.5, 1, 1.5, 2), b = 1, be = 0.25, c = 0, ylim=c(0,50) ) # Example 2: Failure probabilities obtained from # a Burr Type X lifetime distribution al <- 0.5 b <- 1 a <- c(0.4, 0.6, 0.8, 1, 1.5, 2, 2.5, 3) h <- sqrt( -log( 1 - (1/2)^(1/al) ) ) p <- (1 - exp(-(a * h / b)^2))^al plot_single_asip( p = p, a = a, b = b, be = 0.25, c = 6, ylim = c(0, 50) )# Example 1: User-defined failure probabilities p <- c(0.05, 0.10, 0.15, 0.20) plot_single_asip( p = p, a = c(0.5, 1, 1.5, 2), b = 1, be = 0.25, c = 0, ylim=c(0,50) ) # Example 2: Failure probabilities obtained from # a Burr Type X lifetime distribution al <- 0.5 b <- 1 a <- c(0.4, 0.6, 0.8, 1, 1.5, 2, 2.5, 3) h <- sqrt( -log( 1 - (1/2)^(1/al) ) ) p <- (1 - exp(-(a * h / b)^2))^al plot_single_asip( p = p, a = a, b = b, be = 0.25, c = 6, ylim = c(0, 50) )
Calculates the minimum required sample size for a single acceptance sampling inspection plan under a time-truncated life test using the producer's risk condition Pa <= be.
single_asip(p, a, b, be = 0.25, c = 0)single_asip(p, a, b, be = 0.25, c = 0)
p |
User-defined probability of failure before the termination time. It must lie between 0 and 1. |
a |
Termination ratio, defined as a = t/theta0. It must be a positive numeric value. |
b |
Quality ratio, defined as b = theta/theta0. It must be a positive numeric value. |
be |
Producer's risk. It must be a value between 0 and 1. |
c |
Acceptance number. It must be a non-negative integer. |
The probability p is user-defined. Therefore, no particular lifetime distribution is embedded in this function.
A data frame containing a, b, p, be, c, required sample size n, and probability of acceptance Pa.
# Example 1: User-defined failure probabilities p <- c(0.05, 0.10, 0.15, 0.20) single_asip( p = p, a = c(0.5, 1, 1.5, 2), b = 1, be = 0.25, c = 0 ) # Example 2: Failure probabilities obtained from # a Burr Type X lifetime distribution al <- 0.5 b <- 1 a <- c(0.4, 0.6, 0.8, 1, 1.5, 2, 2.5, 3) h <- sqrt( -log( 1 - (1/2)^(1/al) ) ) p <- (1 - exp(-(a * h / b)^2))^al single_asip( p = p, a = a, b = b, be = 0.25, c = 6 )# Example 1: User-defined failure probabilities p <- c(0.05, 0.10, 0.15, 0.20) single_asip( p = p, a = c(0.5, 1, 1.5, 2), b = 1, be = 0.25, c = 0 ) # Example 2: Failure probabilities obtained from # a Burr Type X lifetime distribution al <- 0.5 b <- 1 a <- c(0.4, 0.6, 0.8, 1, 1.5, 2, 2.5, 3) h <- sqrt( -log( 1 - (1/2)^(1/al) ) ) p <- (1 - exp(-(a * h / b)^2))^al single_asip( p = p, a = a, b = b, be = 0.25, c = 6 )