XtToCt {attrCUSUM} | R Documentation |
Conversion of data to FSI CUSUM statistic for monitoring of mean increase.
XtToCt(Xt, refv, c.zero = 0, maxndec = 7L)
Xt |
A non-negative integer-valued vector of count process of interest. |
refv |
A reference value of CUSUM statistic. |
c.zero |
An initial state of CUSUM statistic (default is 0). |
maxndec |
The maximum number of decimal places
of |
For CUSUM control chart for detecting mean increase, the CUSUM statistic (C_{t}) are defined as following:
C_{t}=max(C_{t-1}, 0) + X_{t} - refv, t=1,2,...,
wherein X_{t} is a count process of interest.
A time-series object of CUSUM statistic for monitoring of mean increase.
# Example 1: Poisson distribution Ct <- XtToCt(Xt = rpois(200L, 4), refv = 5, c.zero = 0) plot(Ct, type = "o", pch = 16, main = "CUSUM statistic", ylab = expression(C[t]), sub = expression(paste(C[t],"=", "max(",C[t - 1],",",0,")", "+ refv -",X[t])))