Class extending SPCChart with a basic CUSUM charts implementation.
The only slot this class contains is the data model. This data model should already incorporate the negative mean for in-control updates that is typical for CUSUM charts.
Let U_t, t=1,2,… be the updates from the data model. Then the CUSUM chart is given by S_0=0 and
S_t=max(S_{t-1}+U_t,0)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | X <- rnorm(1000)
chart <- new("SPCCUSUM",model=SPCModelNormal(Delta=1))
## Not run:
SPCproperty(data=X,nrep=10,chart=chart,
property="calARL",params=list(target=100))
SPCproperty(data=X,nrep=10,chart=chart,
property="calhitprob",params=list(target=0.05,nsteps=1e3))
SPCproperty(data=X,nrep=10,chart=chart,
property="ARL",params=list(threshold=3))
## End(Not run)
SPCproperty(data=X,nrep=10,chart=chart,
property="hitprob",params=list(threshold=3,nsteps=1e3))
#increase the number of repetitions nrep for real applications.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.