Shewhart charts.

Share:

Description

Shewhart charts.

Slots

twosided

TRUE if a two-sided chart should be used. Default FALSE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
X<-rnorm(100);
##calibrate to ARL 100
chartShew <- new("SPCShew",model=SPCModelNormal(),twosided=TRUE)
## Not run: 
SPCproperty(data=X,nrep=500,
            property="calARL",chart=chartShew,params=list(target=100),
            covprob=c(0.7,0.9))

chartShewOneSided <- new("SPCShew",model=SPCModelNormal(),twosided=FALSE)
SPCproperty(data=X,nrep=500,
            property="calARL",chart=chartShewOneSided,
            params=list(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="calhitprob",
            chart=chartShew,params=list(target=0.01,nsteps=100))
SPCproperty(data=X,nrep=500,
            property="calhitprob",chart=chartShewOneSided,params=list(target=0.01,nsteps=100))

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

SPCproperty(data=X,nrep=500,
            property="hitprob",chart=chartShew,params=list(nsteps=100,threshold=4))

SPCproperty(data=X,nrep=500,
            property="hitprob",chart=chartShewOneSided,params=list(nsteps=100,threshold=4))

## End(Not run)

X<-rnorm(100)
chartShew <- new("SPCShew",model=SPCModelNormal())
## Not run: 
SPCproperty(data=X,nrep=500,
            property="calARL", chart=chartShew,
            params=list(target=1000))
SPCproperty(data=X,nrep=500,
            property="calhitprob",chart=chartShew,
            params=list(target=0.01,nsteps=100))
SPCproperty(data=X,nrep=10,chart=chartShew,
            property="ARL",params=list(threshold=3))
SPCproperty(data=X,nrep=500,
            property="hitprob",
            chart=chartShew,params=list(nsteps=100,threshold=4))

## End(Not run)