getH: compute decision interval (H) for CUSUM charts

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/getH.R

Description

Compute decision intervals for CUSUM charts.

Usage

1
2
3
4
5
getH(distr=NULL, ARL=NULL, ICmean=NULL, ICsd=NULL, 
    OOCmean=NULL, OOCsd=NULL, ICprob=NULL, OOCprob=NULL, 
    ICvar=NULL, IClambda=NULL, samp.size=NULL, 
    ref=NULL, winsrl=NULL, winsru=NULL, 
    type=c("fast initial response", "zero start", "steady state"))

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", 6 refers to “inverse Gaussian mean".

ARL

An integer for in control average run length.

ICmean

In-control mean, which has to be provided when distr = 1 (normal mean), 3 (Poisson), 5 (negative binomial), and 6 (inverse Gaussian mean). The value has to be positive when distr = 3, distr = 5, or distr = 6.

ICsd

In-control standard deviation, which has to be provided when distr = 1 (normal mean) and 2 (normal variance). The value has to be positive.

OOCmean

Out-of-control mean, which has to be provided when distr = 1 (normal mean), 3 (Poisson), 5 (negative binomial), and 6 (Inverse Gaussian mean). When distr = 3, 5, or 6, the value has to be positive.

OOCsd

Out-of-control standard deviation, which has to be provided when distr = 2 (normal variance). The value has to be positive.

ICprob

In-control success probability, which has to be provided when distr = 4 (binomial); 0 < prob <= 1.

OOCprob

Out-of-control success probability, which has to be provided when distr = 4 (binomial); 0 < prob <= 1.

ICvar

In-control variance, which has to be provided when distr = 5 (negative binomial). The value has to be larger than the in-control mean 'ICmean'.

IClambda

In-control shape parameter for inverse Gaussian distribution. The argument 'IClambda' 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).

ref

Optional reference value.

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.

type

A string for CUSUM type: "F" for fast-initial-response CUSUM, "Z" for zero-start CUSUM, and "S" for steady-state CUSUM. Default is "F".

Details

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

Normal mean (distr = 1): ICmean, ICsd, OOCmean.
Normal variance (distr = 2): samp.size, ICsd, OOCsd
Poisson (distr = 3): ICmean, OOCmean.
Binomial (dist = 4): samp.size, ICprob, OOCprob.
Negative binomial (distr = 5): ICmean, Icvar, OOCmean.
Inverse Gaussian mean (distr = 6): ICmean, IClambda, OOCmean.

Value

A list including three variables:

DI

Decision interval.

IC_ARL

In-control average run length.

OOCARL_Z

Out-of-control average run length for the zero-start CUSUM.

OOCARL_F

Out-of-control average run length for the fast-initial-response (FIR) CUSUM.

OOCARL_S

Out-of-control average run length for the steady-state 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.

See Also

getARL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# normal mean
getH(distr=1, ICmean=10, ICsd=2, OOCmean=15, ARL=1000, type="F")

# normal variance
getH(distr=2, ICsd=2, OOCsd=4, samp.size=5, ARL=1000, type="F")

# Poission
getH(distr=3, ICmean=2, OOCmean=3, ARL=100, type="F")

# Binomial
getH(distr=4, ICprob=0.2, OOCprob=0.6, samp.size=100, ARL=1000, type="F")

# Negative binomial
getH(distr=5, ICmean=1, ICvar=3, OOCmean=2, ARL=100, type="F")

# Inverse Gaussian mean
getH(distr=6, ICmean=1, IClambda=0.5, OOCmean=2, ARL=1000, type="F")

Example output

The reference value is       12.500 
DI       4.222 IC ARL    1000.0  OOC ARL Zero start     2.4
      FIR     1.6 SS     1.0 
$DI
[1] 4.222265

$ref
[1] 12.5

$IC_ARL
[1] 999.9994

$OOCARL_Z
[1] 2.392417

$OOCARL_F
[1] 1.622589

$OOCARL_S
[1] 0.9661677

The reference value is        7.394 
DI      12.621 IC ARL    1000.0  OOC ARL Zero start     2.6
      FIR     2.0 SS     1.3 
$DI
[1] 12.62062

$ref
[1] 7.39357

$IC_ARL
[1] 1000

$OOCARL_Z
[1] 2.597972

$OOCARL_F
[1] 2.006911

$OOCARL_S
[1] 1.325745

The reference value is        2.466 
k   2.4444   h   6.3333  ARL      99.64  
             h   6.4444  ARL     105.02 
DI       6.444 IC ARL     105.0  OOC ARL Zero start    11.0
      FIR     7.4 SS     7.4 
$DI
[1] 6.444444

$ref
[1] 2.444444

$IC_ARL
[1] 105.0164

$OOCARL_Z
[1] 10.96038

$OOCARL_F
[1] 7.375915

$OOCARL_S
[1] 7.441145

The reference value is       38.685 
k  38.6667   h   0.0000  ARL       1.00  
             h   0.3333  ARL  103265.32 
DI       0.333 IC ARL  103265.3  OOC ARL Zero start     1.0
      FIR     1.0 SS     0.0 
$DI
[1] 0.3333333

$ref
[1] 38.66667

$IC_ARL
[1] 103265.3

$OOCARL_Z
[1] 1.000007

$OOCARL_F
[1] 1.000007

$OOCARL_S
[1] 7.363954e-06

The reference value is        1.401 
k   1.4009   h  10.0000  ARL      99.83  
             h  10.2000  ARL     103.87 
DI      10.200 IC ARL     103.9  OOC ARL Zero start    15.7
      FIR    12.2 SS    12.8 
$DI
[1] 10.2

$ref
[1] 1.400892

$IC_ARL
[1] 103.8682

$OOCARL_Z
[1] 15.68369

$OOCARL_F
[1] 12.17098

$OOCARL_S
[1] 12.77594

The reference value is        1.333 
DI      18.183 IC ARL     999.5  OOC ARL Zero start    30.8
      FIR    22.8 SS    25.1 
$DI
[1] 18.18331

$ref
[1] 1.333333

$IC_ARL
[1] 999.4661

$OOCARL_Z
[1] 30.78667

$OOCARL_F
[1] 22.75136

$OOCARL_S
[1] 25.07536

CUSUMdesign documentation built on Feb. 25, 2020, 1:06 a.m.