getAve_binomial: Compute ATSs and Other Informations on (Zero-Inflated)...

Description Usage Arguments Details Value References See Also Examples

View source: R/attrCUSUM_getxxx_binom.R

Description

Computation of ANSSs, ATSs and other related informations on (zero-inflated) binomial CUSUM chart.

Usage

1
2
3
4
5
getAve_binom(size, prob, refv, contl, c.zero = 0, warnl = 0, ds = 1,
  dl = NULL, di = NULL, maxndec = 7L, maxnumsubI = 6000L)

getAve_zibinom(rho, size, prob, refv, contl, c.zero = 0, warnl = 0,
  ds = 1, dl = NULL, di = NULL, maxndec = 7L, maxnumsubI = 6000L)

Arguments

rho

A length-one numeric vector of zero-inflated parameter in [0,1).

size

A length-one non-negative integer-valued vector of number of trials.

prob

A length-one numeric vector of probability of success in [0,1].

refv

A reference value of CUSUM statistic.

contl

A control limit in CUSUM control scheme.

c.zero

An initial state of CUSUM statistic (default is 0).

warnl

A warning limit in VSI control scheme (default is 0).

ds

The shorter sampling interval in VSI CUSUM control scheme (default is 1).

dl

The longer sampling interval in VSI CUSUM control scheme.

di

The sampling interval at initial state in VSI CUSUM control scheme.

maxndec

The maximum number of decimal places of refv ( 7L).

maxnumsubI

The maximum number of sub-intervals in [100,6000] to be used in applying the Markov chain approach.

Details

getAve_binom and getAve_zibinom are wrapper functions of getAve for (zero-inflated) binomial CUSUM chart.

Value

A list from getAve. See getAve for more information.

References

Rakitzis et al. (2016). CUSUM Control Charts for the Monitoring of Zero-inflated Binomial Processes, Quality and Reliability Engineering International, 32, 465-483.

See Also

getAve, getAve_Poisson.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Example 1: Reproduction of results from Rakitzis et al. (2016)
rho <- 0.9
size <- 100
prob0 <- 0.01
refv <- 0.26
contl <- 3.86
deltas <- seq(1, 2, 0.1)
ANSSs <- numeric(length(deltas))
for(i in seq(deltas)) {
  prob1 <- deltas[i] * prob0
  ANSSs[i] <- getAve_zibinom(rho = rho, size = size, prob = prob1,
                             refv = refv, contl = contl)$ANSS
}
names(ANSSs) <- deltas
ANSSs <- round(ANSSs, 2)
ANSSs

# Example 2: ANSS profiles (h in seq(10L))
rho <- 0.9
size <- 100
prob0 <- 0.01
refv <- 0.26
h <- seq(10L)
ANSSs <- numeric(10)
for(i in seq(ANSSs)) {
  ANSSs[i] <- getAve_zibinom(rho = rho, size = size, prob = prob0,
                             refv = refv, contl = h[i], ds = 1)$ANSS
}
ANSSs

attrCUSUM documentation built on May 2, 2019, 9:25 a.m.