Learn R Programming

spcadjust (version 0.9)

SPCShewNormalCenterScale-class: Class "SPCShewNormalCenterScale"

Description

Implements a Shewart chart, where the observations are centered and scaled and past data is resampled parametrically from an estimated normal distribution.

Arguments

Objects from the Class

Objects can be created by calls of the form new("SPCShewNormalCenterScale", ...).

Extends

Class "SPCShew", directly. Class "SPCchart", by class "SPCShew", distance 2.

See Also

SPCShewNonparCenterScale, ARLShew, hitprobShew, calARLShew, calhitprobShew.

Examples

Run this code
X<-rnorm(100);

##calibrate to ARL 100
chartShew <- new("SPCShewNormalCenterScale",twosided=TRUE)
SPCproperty(data=X,nrep=500,
            property=new("calARLShew",chart=chartShew,target=100),covprob=c(0.7,0.9))

chartShewOneSided <- new("SPCShewNormalCenterScale",twosided=FALSE)
SPCproperty(data=X,nrep=500,
            property=new("calARLShew",chart=chartShewOneSided,target=100),covprob=c(0.7,0.9))


##calibrate to a hitting probability of 0.01 in 100 steps
SPCproperty(data=X,nrep=500,
            property=new("calhitprobShew",chart=chartShew,target=0.01,nsteps=100))
SPCproperty(data=X,nrep=500,
            property=new("calhitprobShew",chart=chartShewOneSided,target=0.01,nsteps=100))

## work out  for ARL for a fixed threshold of 4
SPCproperty(data=X,nrep=500,
            property=new("ARLShew",chart=chartShew,threshold=4))
SPCproperty(data=X,nrep=500,
            property=new("ARLShew",chart=chartShewOneSided,threshold=4))


SPCproperty(data=X,nrep=500,
            property=new("hitprobShew",chart=chartShew,nsteps=100,threshold=4))

SPCproperty(data=X,nrep=500,
            property=new("hitprobShew",chart=chartShewOneSided,nsteps=100,threshold=4))

Run the code above in your browser using DataLab