Calculates Average Sample Numbers (ASN), Average Run Length (ARL1) and value of k1 and k2 for attributes control charts under repetitive sampling as given in Aslam et al.(2014)

npcrs2(.n, .p0, .f, .ssize = NULL, .k1 = NULL, .k2 = NULL,
  .k1r = NULL, .k2r = NULL)

# S3 method for default
npcrs2(.n, .p0, .f, .ssize = NULL, .k1 = NULL,
  .k2 = NULL, .k1r = NULL, .k2r = NULL)

Arguments

.n

Sample Size

.p0

probability that process is in control

.f

Size of the Shift

.ssize

Number of samples with replacement at each iteration

.k1

Fixed positive constant

.k2

Fixed positive constant

.k1r

Random postive constant

.k2r

Random postive constant

Value

ASN, ARL, K1 and K2

References

Aslam, M., Azam, M. and Jun, C. (2014). New Attributes and Variables Control Charts under Repetitive Sampling. Industrial Engineering & Management Systems. 13(1):101-106.

Examples

library(magrittr) npcrs2( .n = 40 , .p0 = 0.10 , .f = 0.1 , .ssize = 1000 , .k1r = 4 , .k2r = .95 )
#> Warning: numerical expression has 910 elements: only the first used
#> Warning: numerical expression has 910 elements: only the first used
#> Warning: numerical expression has 910 elements: only the first used
#> Warning: numerical expression has 910 elements: only the first used
#> Warning: numerical expression has 910 elements: only the first used
#> Warning: numerical expression has 910 elements: only the first used
#> Warning: numerical expression has 910 elements: only the first used
#> Warning: numerical expression has 910 elements: only the first used
#> Warning: numerical expression has 910 elements: only the first used
#> Warning: numerical expression has 910 elements: only the first used
#> Warning: numerical expression has 910 elements: only the first used
#> Warning: numerical expression has 910 elements: only the first used
#> # A tibble: 910 x 5 #> .k1 .k2 .f ASN1 ARL1 #> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 3.08 0.906 0.1 70.5 57.8 #> 2 3.02 0.711 0.1 70.5 57.8 #> 3 3.15 0.769 0.1 70.5 57.8 #> 4 3.09 0.763 0.1 70.5 57.8 #> 5 3.06 0.797 0.1 70.5 57.8 #> 6 3.01 0.766 0.1 70.5 57.8 #> 7 3.01 0.672 0.1 70.5 57.8 #> 8 3.08 0.830 0.1 70.5 57.8 #> 9 3.11 0.693 0.1 70.5 57.8 #> 10 3.06 0.679 0.1 70.5 57.8 #> # … with 900 more rows
npcrs2( .n = 40 , .p0 = 0.10 , .f = 0.1 , .k1 = 3.13 , .k2 = .731 )
#> # A tibble: 1 x 3 #> .f ASN1 ARL1 #> <dbl> <dbl> <dbl> #> 1 0.1 70.5 57.8