Library: | spc |
See also: | spccusum1c spccusum1arl spccusum1ad spccusum1pmf spccusum1pmfm |
Quantlet: | spccusum1 | |
Description: | graphical representation of a one-sided CUSUM chart for given data, critical value c and reference value k. |
Usage: | spccusum1(k, c, observed) | |
Input: | ||
k | scalar, reference value. It must be positive and be expressed as a multiple of the standard error. | |
c | scalar, representing the critical value | |
observed | vector of scalars containing user-defined data |
; One-sided CUSUM chart for 100 pseudorandom variables ; with normal distribution, where the first 80 observations ; have mean = 0 and the next 20 have mean = 1, ; the chart parameters are k = 0.5 and in-control ARL = 300: library("spc") mean = #(matrix(80) .* 0, matrix(20) .* 1) randomize(31) observed = normal(100) + mean c = spccusum1c(300,.5,50) spccusum1( .5, c, observed)
Display showing a one-sided CUSUM chart. Alarm is signaled at t = 87.