找回密码
 注册
查看: 1143|回复: 0

R语言 spc包 xewma.arl()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 14:33:28 | 显示全部楼层 |阅读模式
xewma.arl(spc)
xewma.arl()所属R语言包:spc

                                        Compute ARLs of EWMA control charts
                                         计算连串长度的EWMA控制图

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Computation of the (zero-state) Average Run Length (ARL)
计算(零状态)的平均运行长度(ARL)


用法----------Usage----------


xewma.arl(l,c,mu,zr=0,hs=0,sided="one",limits="fix",q=1,r=40)



参数----------Arguments----------

参数:l
smoothing parameter lambda of the EWMA control chart.
平滑的EWMA控制图参数的lambda。


参数:c
critical value (similar to alarm limit) of the EWMA control chart.
临界值(报警限值)的EWMA控制图。


参数:mu
true mean.
真正的意思。


参数:zr
reflection border for the one-sided chart.
反射边界的片面的图表。


参数:hs
so-called headstart (give fast initial response).
所谓的领先地位提供快速初始响应。


参数:sided
distinguish between one- and two-sided EWMA control chart  by choosing "one" and "two", respectively.
区分和双面EWMA控制图的选择"one"和"two",分别。


参数:limits
distinguish between different control limits behavior.
区分不同的控制限制行为。


参数:q
change point position. For q=1 and μ=μ_0 and μ=μ_1, the usual zero-state ARLs for the in-control and out-of-control case, respectively, are calculated. For q>1 and μ!=0 conditional delays, that is, E_q(L-q+1|L≥q), will be determined. Note that mu0=0 is implicitely fixed.
改变点的位置。对于q=1和μ=μ_0和μ=μ_1,零状态连串长度通常在控制和控制的情况下,分别计算。对于q>1和μ!=0有条件的延误,也就是E_q(L-q+1|L≥q),将确定。请注意,MU0 = 0的是,implicitely固定。


参数:r
number of quadrature nodes, dimension of the resulting linear equation system is equal to r+1 (one-sided) or r (two-sided).
正交的节点的数量,所得的线性方程系统的维数是等于r+1(单面)或r(两面)。


Details

详细信息----------Details----------

In case of the two-sided chart with fixed control limits and of the one-sided chart, xewma.arl determines the Average Run Length (ARL) by numerically solving the related ARL integral equation by means of the Nystroem method based on Gauss-Legendre quadrature. If limits is not "fix", then the method presented in Knoth (2003) is utilized. Note that for one-sided EWMA charts (sided="one"), only "vacl" and "stat" are deployed, while for two-sided ones (sided="two") also "fir", "both" (combination of "fir" and "vacl"), and "Steiner" are implemented. For details see Knoth (2004).
在双面固定的控制限制和片面的图图的情况下,xewma.arl决定相关的ARL通过的Nystroem方法基于高斯积分方程通过数值求解的平均运行长度(ARL)勒让德正交。 limits如果是不是"fix",然后在Knoth(2003)提出的方法是利用。请注意,为片面的EWMA图(sided="one"),只有"vacl"和"stat"的部署,而双面的(sided= "two")"fir","both"(组合"fir"和"vacl"),和"Steiner"来实现。有关详细信息,请参阅Knoth(2004年)。


值----------Value----------

Returns a single value which resembles the ARL.
返回一个单一的值,类似于ARL。


(作者)----------Author(s)----------


Sven Knoth



参考文献----------References----------

K.-H. Waldmann (1986), Bounds for the distribution of the run length of geometric moving  average charts, Appl. Statist. 35, 151-158.
S. V. Crowder (1987), A simple method for studying run-length distributions of exponentially weighted moving average charts, Technometrics 29, 401-407.
J. M. Lucas, M. S. Saccucci (1990), Exponentially weighted moving average control schemes: Properties and enhancements, Technometrics 32, 1-12.
S. Chandrasekaran, J. R. English, R. L. Disney (1995),  Modeling and analysis of EWMA control schemes with variance-adjusted  control limits, IIE Transactions 277, 282-290.
T. R. Rhoads, D. C. Montgomery, C. M. Mastrangelo (1996), Fast initial response scheme for exponentially weighted moving average control chart, Quality Engineering 9, 317-327.
S. H. Steiner (1999), EWMA control charts with time-varying control limits and fast initial response,  Journal of Quality Technology 31, 75-86.
S. Knoth (2003), EWMA schemes with non-homogeneous transition kernels, Sequential Analysis 22, 241-255.
S. Knoth (2004), Fast initial response features for EWMA Control Charts, Statistical Papers 46, 47-64.

参见----------See Also----------

xcusum.arl for zero-state ARL computation of CUSUM control charts and xewma.ad for the steady-state ARL.
xcusum.arl零状态CUSUM控制图的ARL计算和xewma.ad的稳态ARL的。


实例----------Examples----------


## Waldmann (1986), one-sided EWMA[#沃达迈(1986年),片面的EWMA]
l <- .75
round(xewma.arl(l,2*sqrt((2-l)/l),0,zr=-4*sqrt((2-l)/l)),digits=1)
l <- .5
round(xewma.arl(l,2*sqrt((2-l)/l),0,zr=-4*sqrt((2-l)/l)),digits=1)
## original values are 209.3 and 3907.5 (in Table 2).[#原始值是209.3和3907.5(在表2中)。]

## Waldmann (1986), two-sided EWMA with fixed control limits[#沃达迈(1986年),双面EWMA有固定的控制范围内]
l <- .75
round(xewma.arl(l,2*sqrt((2-l)/l),0,sided="two"),digits=1)
l <- .5
round(xewma.arl(l,2*sqrt((2-l)/l),0,sided="two"),digits=1)
## original values are 104.0 and 1952 (in Table 1).[#原始值分别为104.0和1952年(表1)。]

## Crowder (1987), two-sided EWMA with fixed control limits[#克罗德(1987年),双面EWMA有固定的控制范围内]
l1 <- .5
l2 <- .05
c <- 2
mu <- (0:16)/4
arl1 <- sapply(mu,l=l1,c=c,sided="two",xewma.arl)
arl2 <- sapply(mu,l=l2,c=c,sided="two",xewma.arl)
round(cbind(mu,arl1,arl2),digits=2)

## original results are (in Table 1)[#原来的结果(表1)]
## 0.00 26.45 127.53[#0.00 26.45 127.53]
## 0.25 20.12  43.94[#0.25 20.12 43.94]
## 0.50 11.89  18.97[#0.50 11.89 18.97]
## 0.75  7.29  11.64[#0.75 7.29 11.64]
## 1.00  4.91   8.38[#1.00 4.91 8.38]
## 1.25  3.95*  6.56[#1.25 3.95 * 6.56]
## 1.50  2.80   5.41[#1.50 2.80 5.41]
## 1.75  2.29   4.62[#1.75 2.29 4.62]
## 2.00  1.94   4.04[#2.00 1.94 4.04]
## 2.25  1.70   3.61[#2.25 1.70 3.61]
## 2.50  1.51   3.26[#2.50 1.51 3.26]
## 2.75  1.37   2.99[#2.75 1.37 2.99]
## 3.00  1.26   2.76[#3.00 1.26 2.76]
## 3.25  1.18   2.56[#3.25 1.18 2.56]
## 3.50  1.12   2.39[#3.50 1.12 2.39]
## 3.75  1.08   2.26[#3.75 1.08 2.26]
## 4.00  1.05   2.15  (* -- in Crowder (1987) typo!?). [#4.00 1.05 2.15(*  - 克罗德(1987)错字!)。]

## Lucas/Saccucci (1990)[#卢卡斯/ Saccucci的(1990)]
## two-sided EWMA[#双面EWMA]

## with fixed limits[#固定的限制]
l1 <- .5
l2 <- .03
c1 <- 3.071
c2 <- 2.437
mu <- c(0,.25,.5,.75,1,1.5,2,2.5,3,3.5,4,5)
arl1 <- sapply(mu,l=l1,c=c1,sided="two",xewma.arl)
arl2 <- sapply(mu,l=l2,c=c2,sided="two",xewma.arl)
round(cbind(mu,arl1,arl2),digits=2)

## original results are (in Table 3)[#原来的结果(表3)]
## 0.00 500.   500.[#0.00 500。 500。]
## 0.25 255.    76.7[#0.25 255。 76.7]
## 0.50  88.8   29.3[#0.50 88.8 29.3]
## 0.75  35.9   17.6[#0.75 35.9 17.6]
## 1.00  17.5   12.6[#1.00 17.5 12.6]
## 1.50   6.53   8.07[#1.50 6.53 8.07]
## 2.00   3.63   5.99[#2.00 3.63 5.99]
## 2.50   2.50   4.80[#2.50 2.50 4.80]
## 3.00   1.93   4.03[#3.00 1.93 4.03]
## 3.50   1.58   3.49[#3.50 1.58 3.49]
## 4.00   1.34   3.11[#4.00 1.34 3.11]
## 5.00   1.07   2.55.[#5.00 1.07 2.55。]

## with fir feature[#杉木功能]
l1 <- .5
l2 <- .03
c1 <- 3.071
c2 <- 2.437
hs1 <- c1/2
hs2 <- c2/2
mu <- c(0,.5,1,2,3,5)
arl1 <- sapply(mu,l=l1,c=c1,hs=hs1,sided="two",limits="fir",xewma.arl)
arl2 <- sapply(mu,l=l2,c=c2,hs=hs2,sided="two",limits="fir",xewma.arl)
round(cbind(mu,arl1,arl2),digits=2)

## original results are (in Table 5)[#原来的结果(表5)]
## 0.0 487.   406.[#0.0 487。 406。]
## 0.5  86.1   18.4[#0.5 86.1 18.4]
## 1.0  15.9    7.36[#1.0 15.9 7.36]
## 2.0   2.87   3.43[#2.0 2.87 3.43]
## 3.0   1.45   2.34[#3.0 1.45 2.34]
## 5.0   1.01   1.57.[#5.0 1.01 1.57。]

## Chandrasekaran, English, Disney (1995)[#Chandrasekaran,英语,迪士尼(1995年)]
## two-sided EWMA with fixed and variance adjusted limits (vacl)[双面EWMA固定和方差调整后的限制(VACL)]

l1 <- .25
l2 <- .1
c1s <- 2.9985
c1n <- 3.0042
c2s <- 2.8159
c2n <- 2.8452
mu <- c(0,.25,.5,.75,1,2)
arl1s <- sapply(mu,l=l1,c=c1s,sided="two",xewma.arl)
arl1n <- sapply(mu,l=l1,c=c1n,sided="two",limits="vacl",xewma.arl)
arl2s <- sapply(mu,l=l2,c=c2s,sided="two",xewma.arl)
arl2n <- sapply(mu,l=l2,c=c2n,sided="two",limits="vacl",xewma.arl)
round(cbind(mu,arl1s,arl1n,arl2s,arl2n),digits=2)

## original results are (in Table 2)[#原始的结果(表2)]
## 0.00 500.   500.   500.   500.[#0.00 500。 500。 500。 500。]
## 0.25 170.09 167.54 105.90  96.6[#0.25 170.09 167.54 105.90 96.6]
## 0.50  48.14  45.65  31.08  24.35[#0.50 48.14 45.65 31.08 24.35]
## 0.75  20.02  19.72  15.71  10.74[#0.75 20.02 19.72 15.71 10.74]
## 1.00  11.07   9.37  10.23   6.35[#1.00 11.07 9.37 10.23 6.35]
## 2.00   3.59   2.64   4.32   2.73.[#2.00 3.59 2.64 4.32 2.73。]

## The results in Chandrasekaran, English, Disney (1995) are not[#Chandrasekaran,英语,迪士尼(1995)]
## that accurate. Let us consider the more appropriate comparison[#准确。让我们考虑更恰当的比较]

c1s <- xewma.crit(l1,500,sided="two")
c1n <- xewma.crit(l1,500,sided="two",limits="vacl")
c2s <- xewma.crit(l2,500,sided="two")
c2n <- xewma.crit(l2,500,sided="two",limits="vacl")
mu <- c(0,.25,.5,.75,1,2)
arl1s <- sapply(mu,l=l1,c=c1s,sided="two",xewma.arl)
arl1n <- sapply(mu,l=l1,c=c1n,sided="two",limits="vacl",xewma.arl)
arl2s <- sapply(mu,l=l2,c=c2s,sided="two",xewma.arl)
arl2n <- sapply(mu,l=l2,c=c2n,sided="two",limits="vacl",xewma.arl)
round(cbind(mu,arl1s,arl1n,arl2s,arl2n),digits=2)

## which demonstrate the abilities of the variance-adjusted limits[#展现的能力方差调整的限制]
## scheme more explicitely.[#计划更明确地定义。]

## Rhoads, Montgomery, Mastrangelo (1996)[#罗兹,蒙哥马利,马斯特兰赫洛(1996)]
## two-sided EWMA with fixed and variance adjusted limits (vacl),[双面EWMA固定和方差调整后的限制(VACL),]
## with fir and both features[#与杉木,这两个功能]

l <- .03
c <- 2.437
mu <- c(0,.5,1,1.5,2,3,4)
sl <- sqrt(l*(2-l))
arlfix  <- sapply(mu,l=l,c=c,sided="two",xewma.arl)
arlvacl <- sapply(mu,l=l,c=c,sided="two",limits="vacl",xewma.arl)
arlfir  <- sapply(mu,l=l,c=c,hs=c/2,sided="two",limits="fir",xewma.arl)
arlboth <- sapply(mu,l=l,c=c,hs=c/2*sl,sided="two",limits="both",xewma.arl)
round(cbind(mu,arlfix,arlvacl,arlfir,arlboth),digits=1)

## original results are (in Table 1)[#原来的结果(表1)]
## 0.0 477.3* 427.9* 383.4* 286.2*[#0.0 477.3 * 427.9 * 383.4 * 286.2 *]
## 0.5  29.7   20.0   18.6   12.8[#0.5 29.7 20.0 18.6 12.8]
## 1.0  12.5    6.5    7.4    3.6[#1.0 12.5 6.5 7.4 3.6]
## 1.5   8.1    3.3    4.6    1.9[#1.5 8.1 3.3 4.6 1.9]
## 2.0   6.0    2.2    3.4    1.4[#2.0 6.0 2.2 3.4 1.4]
## 3.0   4.0    1.3    2.4    1.0[#3.0 4.0 1.3 2.4 1.0]
## 4.0   3.1    1.1    1.9    1.0[#4.0 3.1 1.1 1.9 1.0]
## * -- the in-control values differ sustainably from the true values![#*  - 在控制值不同,可持续的真正价值!]

## Steiner (1999)[#施泰纳(1999)]
## two-sided EWMA control charts with various modifications[#双面EWMA控制图进行各种修改]

## fixed vs. variance adjusted limits[#固定与方差调整后的限制]

l <- .05
c <- 3
mu <- c(0,.25,.5,.75,1,1.5,2,2.5,3,3.5,4)
arlfix <- sapply(mu,l=l,c=c,sided="two",xewma.arl)
arlvacl <- sapply(mu,l=l,c=c,sided="two",limits="vacl",xewma.arl)
round(cbind(mu,arlfix,arlvacl),digits=1)

## original results are (in Table 2)[#原始的结果(表2)]
## 0.00 1379.0   1353.0[#0.00 1379.0 1353.0]
## 0.25  135.0    127.0[#0.25 135.0 127.0]
## 0.50   37.4     32.5 [#0.50 37.4 32.5]
## 0.75   20.0     15.6[#0.75 20.0 15.6]
## 1.00   13.5      9.0[#1.00 13.5 9.0]
## 1.50    8.3      4.5[#1.50 8.3 4.5]
## 2.00    6.0      2.8[#2.00 6.0 2.8]
## 2.50    4.8      2.0[#2.50 4.8 2.0]
## 3.00    4.0      1.6[#3.00 4.0 1.6]
## 3.50    3.4      1.3[#3.50 3.4 1.3]
## 4.00    3.0      1.1.[#4.00 3.0 1.1。]

## fir, both, and Steiner's modification[#杉,都和施泰纳的修改]

l <- .03
cfir <- 2.44
cboth <- 2.54
cstein <- 2.55
hsfir <- cfir/2
hsboth <- cboth/2*sqrt(l*(2-l))
mu <- c(0,.5,1,1.5,2,3,4)
arlfir <- sapply(mu,l=l,c=cfir,hs=hsfir,sided="two",limits="fir",xewma.arl)
arlboth <- sapply(mu,l=l,c=cboth,hs=hsboth,sided="two",limits="both",xewma.arl)
arlstein <- sapply(mu,l=l,c=cstein,sided="two",limits="Steiner",xewma.arl)
round(cbind(mu,arlfir,arlboth,arlstein),digits=1)

## original values are (in Table 5)[#原始值(在表5中)]
## 0.0 383.0   384.0   391.0[#0.0 383.0 384.0 391.0]
## 0.5  18.6    14.9    13.8[#0.5 18.6 14.9 13.8]
## 1.0   7.4     3.9     3.6[#1.0 7.4 3.9 3.6]
## 1.5   4.6     2.0     1.8[#1.5 4.6 2.0 1.8]
## 2.0   3.4     1.4     1.3[#2.0 3.4 1.4 1.3]
## 3.0   2.4     1.1     1.0[#3.0 2.4 1.1 1.0]
## 4.0   1.9     1.0     1.0.[#4.0 1.9 1.0 1.0。]

## SAS/QC manual 1999[#SAS / QC手册1999年]
## two-sided EWMA control charts with fixed limits[#双面EWMA控制图与固定的限制]

l <- .25
c <- 3
mu <- 1
print(xewma.arl(l,c,mu,sided="two"),digits=11)

# original value is 11.154267016.[原来的值是11.154267016。]

## Some recent examples for one-sided EWMA charts[#最近的一些例子片面的EWMA图]
## with varying limits and in the so-called stationary mode[#有不同的限制和所谓的固定模式]

# 1. varying limits = "vacl"[1。不同的限制=“VACL”]

lambda <- .1
L0 <- 500

## Monte Carlo results (10^9 replicates)[#蒙特卡罗(10 ^ 9个重复)]
# mu    ARL      s.e.[亩ARL标准差表示。]
# 0     500.00   0.0160[0 500.00 0.0160]
# 0.5   21.637   0.0006[0.5 21.637 0.0006]
# 1     6.7596   0.0001[1 6.7596 0.0001]
# 1.5   3.5398   0.0001[1.5 3.5398 0.0001]
# 2     2.3038   0.0000[2 2.3038 0.0000]
# 2.5   1.7004   0.0000[2.5 1.7004 0.0000]
# 3     1.3675   0.0000[3 1.3675 0.0000]

zr <- -6
r <- 50
c <- xewma.crit(lambda, L0, zr=zr, limits="vacl", r=r)
Mxewma.arl <- Vectorize(xewma.arl, "mu")
mus <- (0:6)/2
arls <- round(Mxewma.arl(lambda, c, mus, zr=zr, limits="vacl", r=r), digits=4)
data.frame(mus, arls)

# 2. stationary mode, i. e. limits = "stat"[2。固定的模式,i。 E。限制=“STAT”]

## Monte Carlo results (10^9 replicates)[#蒙特卡罗(10 ^ 9个重复)]
# mu    ARL      s.e.[亩ARL标准差表示。]
# 0     500.00   0.0159[0 500.00 0.0159]
# 0.5   22.313   0.0006[0.5 22.313 0.0006]
# 1     7.2920   0.0001[1 7.2920 0.0001]
# 1.5   3.9064   0.0001[1.5 3.9064 0.0001]
# 2     2.5131   0.0000[2 2.5131 0.0000]
# 2.5   1.7983   0.0000[2.5 1.7983 0.0000]
# 3     1.4029   0.0000[3 1.4029 0.0000]

c <- xewma.crit(lambda, L0, zr=zr, limits="stat", r=r)
arls <- round(Mxewma.arl(lambda, c, mus, zr=zr, limits="stat", r=r), digits=4)
data.frame(mus, arls)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-17 18:47 , Processed in 0.024965 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表