# cusumArl: Cumulative Sum Control Charts Average Run Length In mistat: Data Sets, Functions and Examples from the Book: "Modern Industrial Statistics" by Kenett, Zacks and Amberti

## Description

Computes the ARL function by simulation

## Usage

 ```1 2 3``` ```cusumArl(..., randFunc = rnorm, N = 100, limit = 10000, seed = NA, kp = 1, km = -1, hp = 3, hm = -3, side = "both", printSummary = TRUE) ```

## Arguments

 `...` arguments such as mean, lambda or sd to be passed to the appropriate random genneration function `randFunc` a random generation function `N` the number of replicates `limit` safety parameter, stop rule for procedures with very long ARL `seed` a single value, interpreted as an integer. If specified make the simulation replicable. `kp` K^+ parameter of the control scheme `km` K^- parameter of the control scheme `hp` h^+ parameter of the control scheme `hm` h^- parameter of the control scheme `side` a character string specifying the side of the control scheme, must be one of "both" (default), "upper" or "lower" `printSummary` logical, if `TRUE` print a summary of the cusum ARL

## Value

a list with elements:

 `rls ` a numeric vector representing the Run Length of the simulation `statistics ` a numeric vector with summary statistics `run` a list of length `N` elements each of which has single numeric elements `violationLower`, `violationUpper` and `rl`

Daniele Amberti

## References

Kenett, R., Zacks, S. with contributions by Amberti, D. Modern Industrial Statistics: with applications in R, MINITAB and JMP. Wiley.

## Examples

 ```1 2 3 4 5 6 7``` ```cusumArl(mean=1, seed=123, N=100, limit=1000) cusumArl(size=100, prob=0.05, kp=5.95, km=3.92, hp=12.87, hm=-8.66, randFunc=rbinom, seed=123, N=100, limit=2000) cusumArl(lambda=10, kp=12.33, km=8.41, hp=11.36, hm=-12.91, randFunc=rpois, seed=123, N=100, limit=2000) ```

### Example output

```       ARL Std. Error
18.190000   2.313439
ARL Std. Error
347.6700    47.0467
ARL Std. Error
300.92000   40.54301
```

mistat documentation built on April 18, 2021, 5:07 p.m.