getARL {CUSUMdesign} R Documentation

## compute average run length (ARL) for CUSUM charts

### Description

Compute average run lengths for CUSUM charts based on the Markov chain algorithm.

### Usage

```getARL(distr=NULL, K=NULL, H=NULL,
Mean=NULL, std=NULL, prob=NULL, Var=NULL, mu=NULL, lambda=NULL,
samp.size=NULL, is.upward=NULL, winsrl=NULL, winsru=NULL)
```

### Arguments

 `distr` Integer valued from 1 to 6: 1 refers to “normal mean", 2 refers to “normal variance", 3 refers to “Poisson", 4 refers to “binomial", 5 refers to “negative binomial", and 6 refers to “inverse Gaussian mean". `K` A reference value, which is given by `getH`. `H` A given decision interval, which is given by `getH`. `Mean` Mean value, which has to be provided when distr = 1 (normal mean), 3 (Poisson), and 5 (negative binomial). The value must be positive when distr = 3 or distr = 5. `std` Standard deviation, which has to be provided when distr = 1 (normal mean) and 2 (normal variance). The value must be positive. `prob` Success probability, which has to be provided when distr = 4 (binomial); 0 < prob <= 1. `Var` Variance, which has to be provided when distr = 5 (negative binomial). The value has to be larger than Mean when distr = 5. `mu` A positive value representing the mean of inverse Gaussian distribution. The argument 'mu' has to be provided when distr = 6 (inverse Gaussian mean). `lambda` A positive value representing the shape parameter for inverse Gaussian distribution. The argument 'lambda' has to be provided when distr = 6 (inverse Gaussian mean). `samp.size` Sample size, an integer which has to be provided when distr = 2 (normal variance) or distr = 4 (binomial). `is.upward` Logical value, whether to depict a upward or downward CUSUM. `winsrl` Lower Winsorizing constant. Use NULL or -999 if Winsorization is not needed. `winsru` Upper Winsorizing constant. Use NULL or 999 if Winsorization is not needed.

### Details

Computes ARL when the reference value and decision interval are given. For each case, the necessary parameters are listed as follows.

Normal mean (distr = 1): `Mean`, `std`, `K`, `H`.
Normal variance (distr = 2): `samp.size`, `std`, `K`, `H`.
Poisson (distr = 3): `Mean`, `K`, `H`.
Binomial (dist = 4): `samp.size`, `prob`, `K`, `H`.
Negative binomial (distr = 5): `Mean`, `Var`, `K`, `H`.
Inverse Gaussian mean (distr = 6): `mu`, `lambda`, `K`, `H`.

### Value

A list including three variables:

 `ARL_Z` The computed zero-start average run length for CUSUM. `ARL_F` The computed fast-initial-response (FIR) average run length for CUSUM. `ARL_S` The computed steady-state average run length for CUSUM.

### Author(s)

Douglas M. Hawkins, David H. Olwell, and Boxiang Wang
Maintainer: Boxiang Wang boxiang-wang@uiowa.edu

### References

Hawkins, D. M. and Olwell, D. H. (1998) “Cumulative Sum Charts and Charting for Quality Improvement (Information Science and Statistics)", Springer, New York.

`getH`

### Examples

```# normal mean
getARL(distr=1, K=11, H=5, Mean=10, std=2)

# normal variance
getARL(distr=2, K=3, H=1, std=2, samp.size=5, is.upward=TRUE)

# Poission
getARL(distr=3, K=3, H=1, std=2, Mean=5, is.upward=TRUE)

# Binomial
getARL(distr=4, K=0.8, H=1, prob=0.2, samp.size=100, is.upward=TRUE)

# Negative binomial
getARL(distr=5, K=3, H=6, Mean=2, Var=5, is.upward=TRUE)

# Inverse Gaussian mean
getARL(distr=6, K=2, H=4, mu=3, lambda=0.5, is.upward=TRUE)
```

[Package CUSUMdesign version 1.1.5 Index]