# getAve_Poisson: Compute ATSs and Other Informations on (Zero-Inflated)... In attrCUSUM: Tools for Attribute VSI CUSUM Control Chart

## Description

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

## Usage

 ```1 2 3 4 5``` ```getAve_pois(lambda, refv, contl, c.zero = 0, warnl = 0, ds = 1, dl = NULL, di = NULL, maxndec = 7L, maxnumsubI = 6000L) getAve_zipois(rho, lambda, 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). `lambda` A length-one positive numeric vector of mean. `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_pois` and `getAve_zipois` are wrapper functions of `getAve` for (zero-inflated) Poisson CUSUM chart.

## Value

A list from `getAve`. See `getAve` for more information.

## References

White et al. (1997). POISSON CUSUM VERSUS c CHART FOR DEFECT DATA, Quality Engineering, 9:4, 673-679.

`getAve`, getAve_binomial.
 ``` 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 30 31 32 33 34 35``` ```# Example 1: Reproduction of results from White et al. (1997) tbl <- list() arglist <- list(list(mu.a = 1, k = 2, h = 2), list(mu.a = 4, k = 5, h = 8), list(mu.a = 8, k = 10, h = 10), list(mu.a = 12, k = 15, h = 11)) deltas <- seq(0, 2.5, 0.5) for(i in seq_along(arglist)) { argument <- arglist[[i]] arl <- numeric(length(deltas)) for(j in seq_along(deltas)) { std.a <- sqrt(argument\$mu.a) arl[j] <- getAve_pois(lambda = argument\$mu.a + (std.a * deltas[j]), refv = argument\$k, contl = argument\$h)\$ANSS } tbl[[i]] <- round(arl, 2) } tbl <- data.frame(tbl) colnames(tbl) <- c("CUSUM(2,2)", "CUSUM(5,8)", "CUSUM(10,10)", "CUSUM(15,11)") rownames(tbl) <- as.character(deltas) cat("colnames stand for CUSUM(k,h)\n", "rownames stand for delta\n", sep = "") tbl # Example 2: ANSS profiles (h in seq(20L)) mu.a <- 4 k <- 5 h <- seq(20) ANSSs <- numeric(20) for(i in seq(ANSSs)) { ANSSs[i] <- getAve_pois(lambda = mu.a, refv = k, contl = h[i], c.zero = 0, warnl = 1, ds = 1)\$ANSS } ANSSs ```