roptest(ROptEst)
roptest()所属R语言包:ROptEst
Optimally robust estimation
最理想的稳健估计
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Function to compute optimally robust estimates for L2-differentiable parametric families via k-step construction.
通过k步建设函数来计算L2-微参数家庭的最佳可靠的估计数。
用法----------Usage----------
roptest(x, L2Fam, eps, eps.lower, eps.upper, fsCor = 1, initial.est,
neighbor = ContNeighborhood(), risk = asMSE(), steps = 1L,
distance = CvMDist, startPar = NULL, verbose = NULL,
OptOrIter = "iterate",
useLast = getRobAStBaseOption("kStepUseLast"),
withUpdateInKer = getRobAStBaseOption("withUpdateInKer"),
IC.UpdateInKer = getRobAStBaseOption("IC.UpdateInKer"),
withICList = getRobAStBaseOption("withICList"),
withPICList = getRobAStBaseOption("withPICList"),
na.rm = TRUE, initial.est.ArgList, ...)
参数----------Arguments----------
参数:x
sample
样品
参数:L2Fam
object of class "L2ParamFamily"
对象的类"L2ParamFamily"
参数:eps
positive real (0 < eps <= 0.5): amount of gross errors. See details below.
正实数(0 <eps<= 0.5):量的严重错误。详见下文。
参数:eps.lower
positive real (0 <= eps.lower <= eps.upper): lower bound for the amount of gross errors. See details below.
正实(0 <=eps.lower<=eps.upper):下限量的严重错误。详见下文。
参数:eps.upper
positive real (eps.lower <= eps.upper <= 0.5): upper bound for the amount of gross errors. See details below.
正实(eps.lower<=eps.upper<= 0.5):上界为量的严重错误。详见下文。
参数:fsCor
positive real: factor used to correct the neighborhood radius; see details.
正实:用来纠正邻域半径的因素,请参阅详细资料。
参数:initial.est
initial estimate for unknown parameter. If missing minimum distance estimator is computed.
初步估计未知参数。如果丢失的最小距离估计计算。
参数:neighbor
object of class "UncondNeighborhood"
对象的类"UncondNeighborhood"
参数:risk
object of class "RiskType"
对象的类"RiskType"
参数:steps
positive integer: number of steps used for k-steps construction
正整数:用于K-步骤建设的步骤
参数:distance
distance function
距离函数
参数:startPar
initial information used by optimize resp. optim; i.e; if (total) parameter is of length 1, startPar is a search interval, else it is an initial parameter value; if NULL slot startPar of ParamFamily is used to produce it; in the multivariate case, startPar may also be of class Estimate, in which case slot untransformed.estimate is used.
初始信息optimizeRESP。 optim,即(总)参数的长度为1,startPar是一个搜索的时间间隔,否则它是一个初始的参数值;如果NULL插槽startPar ParamFamily被用来制造它们,在多变量的情况下,startPar也可能是类Estimate,在这种情况下槽untransformed.estimate使用。
参数:verbose
logical: if TRUE, some messages are printed
逻辑:如果TRUE,一些消息都印
参数:useLast
which parameter estimate (initial estimate or k-step estimate) shall be used to fill the slots pIC, asvar and asbias of the return value.
参数估计(初步估计或k步估计)应被用于填补插槽pIC,asvar和asbias的返回值。
参数:OptOrIter
character; which method to be used for determining Lagrange multipliers A and a: if (partially) matched to "optimize", getLagrangeMultByOptim is used; otherwise: by default, or if matched to "iterate" or to "doubleiterate", getLagrangeMultByIter is used. More specifically, when using getLagrangeMultByIter, and if argument risk is of class "asGRisk", by default and if matched to "iterate" we use only one (inner) iteration, if matched to "doubleiterate" we use up to Maxiter (inner) iterations.
方法用于确定拉格朗日乘子的性格;A和a:如果(部分)匹配"optimize",getLagrangeMultByOptim使用,否则默认情况下,或者如果相匹配的"iterate"或"doubleiterate",getLagrangeMultByIter使用。更具体地,使用时:getLagrangeMultByIter,如果参数risk是类"asGRisk",缺省情况下,和如果"iterate"匹配我们只使用一个(内)迭代,如果匹配"doubleiterate"的“我们使用Maxiter(内部)迭代。
参数:withUpdateInKer
if there is a non-trivial trafo in the model with matrix D, shall the parameter be updated on ker(D)?
如果有一个不平凡的trafo模型中的矩阵D,应参数更新ker(D)?
参数:IC.UpdateInKer
if there is a non-trivial trafo in the model with matrix D, the IC to be used for this; if NULL the result of getboundedIC(L2Fam,D) is taken; this IC will then be projected onto ker(D).
如果有一个在模型中的非平凡trafo矩阵D,IC被用于此;如果NULL的结果getboundedIC(L2Fam,D)采取本IC然后将被投影到ker(D)。
参数:withPICList
logical: shall slot pICList of return value be filled?
逻辑:应插槽pICList的返回值被填补?
参数:withICList
logical: shall slot ICList of return value be filled?
逻辑:应插槽ICList的返回值被填补?
参数:na.rm
logical: if TRUE, the estimator is evaluated at complete.cases(x).
逻辑:如果TRUE,估计是评价complete.cases(x)。
参数:initial.est.ArgList
a list of arguments to be given to argument start if the latter is a function; this list by default already starts with two unnamed items, the sample x, and the model L2Fam.
的参数列表的说法start如果是后者的一个功能;,此列表默认情况下,已经开始有两个未命名的项目,样品x,和模型L2Fam。
参数:...
further arguments
进一步的论据
Details
详细信息----------Details----------
Computes the optimally robust estimator for a given L2 differentiable parametric family. The computation uses a k-step construction with an appropriate initial estimate; cf. also kStepEstimator. Valid candidates are e.g. Kolmogorov(-Smirnov) or von Mises minimum distance estimators (default); cf. Rieder (1994) and Kohl (2005).
对于一个给定的L2微参数系列计算的最优鲁棒估计。的计算采用了一个适当的初始估计;比照k步建设。也kStepEstimator。有效候选人是如柯尔莫哥洛夫(斯米尔诺夫)或“冯·米塞斯的最小距离估计(默认);比照。里德尔(1994)和科尔(2005年)。
If the amount of gross errors (contamination) is known, it can be specified by eps. The radius of the corresponding infinitesimal contamination neighborhood is obtained by multiplying eps by the square root of the sample size.
如果严重的错误(污染)的量是已知的,它可以指定eps。是通过以下方式获得相应的无穷小的污染附近的半径乘以eps的样本大小的平方根。
If the amount of gross errors (contamination) is unknown, try to find a rough estimate for the amount of gross errors, such that it lies between eps.lower and eps.upper.
如果是未知的总误差量(污染),试图找到一个粗略的估计量的严重错误,它位于之间eps.lower和eps.upper。
In case eps.lower is specified and eps.upper is missing, eps.upper is set to 0.5. In case eps.upper is specified and eps.lower is missing, eps.lower is set to 0.
有时eps.lower指定eps.upper缺少,eps.upper被设定为0.5。有时eps.upper指定eps.lower缺少,eps.lower被设置为0。
If neither eps nor eps.lower and/or eps.upper is specified, eps.lower and eps.upper are set to 0 and 0.5, respectively.
如果既不eps也不eps.lower和/或eps.upper指定,eps.lower和eps.upper被设置为0和0.5,分别。
If eps is missing, the radius-minimax estimator in sense of Rieder et al. (2001, 2008), respectively Section 2.2 of Kohl (2005) is returned.
eps如果丢失,半径极小极大估计的感Rieder等人。 (2001年,2008年),科尔(2005年)第2.2节回来了。
Finite-sample and higher order results suggest that the asymptotically optimal procedure is to liberal. Using fsCor the radius can be modified - as a rule enlarged - to obtain a more conservative estimate. In case of normal location and scale there is function finiteSampleCorrection which returns a finite-sample corrected (enlarged) radius based on the results of large Monte-Carlo studies.
有限样本和高阶结果表明,渐近最优的过程是自由的。使用fsCor的半径可以被修改 - 作为一项规则,扩大 - 获得一个比较保守的估计。在正常的位置和规模的情况下,功能finiteSampleCorrection返回一个有限的样本校正(扩大)半径大的Monte-Carlo研究结果的基础上。
The default value of argument useLast is set by the global option kStepUseLast which by default is set to FALSE. In case of general models useLast remains unchanged during the computations. However, if slot CallL2Fam of IC generates an object of class "L2GroupParamFamily" the value of useLast is changed to TRUE. Explicitly setting useLast to TRUE should be done with care as in this situation the influence curve is re-computed using the value of the one-step estimate which may take quite a long time depending on the model.
参数useLast的默认值设置的全局选项“kStepUseLast默认情况下,它被设置成FALSE。在一般车型的情况下useLast的计算过程中保持不变。 ,但如果插槽CallL2Fam的IC生成一个类的对象,"L2GroupParamFamily",值为useLast更改为TRUE。明确设置useLastTRUE应小心,在这种情况下,影响曲线重新计算使用的一个估计值,这可能需要相当长的时间,视型号而定。
If useLast is set to TRUE the computation of asvar, asbias and IC is based on the k-step estimate.
如果useLastTRUE计算asvar,asbias和ICk步估计的基础上。
值----------Value----------
Object of class "kStepEstimate".
对象类"kStepEstimate"。
(作者)----------Author(s)----------
Matthias Kohl <a href="mailto:Matthias.Kohl@stamats.de">Matthias.Kohl@stamats.de</a>,<br>
Peter Ruckdeschel <a href="mailtoeter.Ruckdeschel@itwm.fraunhofer.de">eter.Ruckdeschel@itwm.fraunhofer.de</a>
参考文献----------References----------
Kohl, M. (2005) Numerical Contributions to the Asymptotic Theory of Robustness. Bayreuth: Dissertation.
Kohl, M. and Ruckdeschel, P. (2010): R package distrMod: Object-Oriented Implementation of Probability Models. J. Statist. Softw. 35(10), 1–27
Kohl, M. and Ruckdeschel, P., and Rieder, H. (2010): Infinitesimally Robust Estimation in General Smoothly Parametrized Models. Stat. Methods Appl., 19, 333–354.
Rieder, H. (1994) Robust Asymptotic Statistics. New York: Springer.
Rieder, H., Kohl, M. and Ruckdeschel, P. (2008) The Costs of not Knowing the Radius. Statistical Methods and Applications 17(1) 13-40.
Rieder, H., Kohl, M. and Ruckdeschel, P. (2001) The Costs of not Knowing the Radius. Appeared as discussion paper Nr. 81. SFB 373 (Quantification and Simulation of Economic Processes), Humboldt University, Berlin; also available under www.uni-bayreuth.de/departments/math/org/mathe7/RIEDER/pubs/RR.pdf
参见----------See Also----------
roblox, L2ParamFamily-class UncondNeighborhood-class,
roblox,L2ParamFamily-classUncondNeighborhood-class,
实例----------Examples----------
#############################[############################]
## 1. Binomial data[#1。二项数据]
#############################[############################]
## generate a sample of contaminated data[#生成一个样本的污染数据]
ind <- rbinom(100, size=1, prob=0.05)
x <- rbinom(100, size=25, prob=(1-ind)*0.25 + ind*0.9)
## ML-estimate[#ML-估计]
MLest <- MLEstimator(x, BinomFamily(size = 25))
estimate(MLest)
confint(MLest)
## compute optimally robust estimator (known contamination)[#计算最佳的的鲁棒估计(被称为污染)]
robest1 <- roptest(x, BinomFamily(size = 25), eps = 0.05, steps = 3)
estimate(robest1)
confint(robest1, method = symmetricBias())
## neglecting bias[#忽略偏见]
confint(robest1)
plot(pIC(robest1))
qq1 <- qqplot(x, robest1, cex.pch=1.5, exp.cex2.pch = -.25,
exp.fadcol.pch = .55, jit.fac=.9)
str(qq1)
## compute optimally robust estimator (unknown contamination)[计算最佳的鲁棒估计(未知的污染)]
robest2 <- roptest(x, BinomFamily(size = 25), eps.lower = 0, eps.upper = 0.2, steps = 3)
estimate(robest2)
confint(robest2, method = symmetricBias())
plot(pIC(robest2))
## total variation neighborhoods (known deviation)[#的总变化街区(称为偏差)]
robest3 <- roptest(x, BinomFamily(size = 25), eps = 0.025,
neighbor = TotalVarNeighborhood(), steps = 3)
estimate(robest3)
confint(robest3, method = symmetricBias())
plot(pIC(robest3))
## total variation neighborhoods (unknown deviation)[#总的变化居民区(不明偏差)]
robest4 <- roptest(x, BinomFamily(size = 25), eps.lower = 0, eps.upper = 0.1,
neighbor = TotalVarNeighborhood(), steps = 3)
estimate(robest4)
confint(robest4, method = symmetricBias())
plot(pIC(robest4))
#############################[############################]
## 2. Poisson data[#2。 Poisson数据]
#############################[############################]
## Example: Rutherford-Geiger (1910); cf. Feller~(1968), Section VI.7 (a)[#例如:卢瑟福 - 盖格(1910);比照。费勒~(1968),第VI.7(一)]
x <- c(rep(0, 57), rep(1, 203), rep(2, 383), rep(3, 525), rep(4, 532),
rep(5, 408), rep(6, 273), rep(7, 139), rep(8, 45), rep(9, 27),
rep(10, 10), rep(11, 4), rep(12, 0), rep(13, 1), rep(14, 1))
## ML-estimate[#ML-估计]
MLest <- MLEstimator(x, PoisFamily())
estimate(MLest)
confint(MLest)
## compute optimally robust estimator (unknown contamination)[计算最佳的鲁棒估计(未知的污染)]
robest <- roptest(x, PoisFamily(), eps.upper = 0.1, steps = 3)
estimate(robest)
confint(robest, symmetricBias())
plot(pIC(robest))
qq2 <- qqplot(x, robest, cex.pch=1.5, exp.cex2.pch = -.25,
exp.fadcol.pch = .55, jit.fac=.9)
str(qq2)
## total variation neighborhoods (unknown deviation)[#总的变化居民区(不明偏差)]
robest1 <- roptest(x, PoisFamily(), eps.upper = 0.05,
neighbor = TotalVarNeighborhood(), steps = 3)
estimate(robest1)
confint(robest1, symmetricBias())
plot(pIC(robest1))
#############################[############################]
## 3. Normal (Gaussian) location and scale[#3。正常(高斯)的位置和规模]
#############################[############################]
## 24 determinations of copper in wholemeal flour[第24全麦面粉中铜的测定]
library(MASS)
data(chem)
plot(chem, main = "copper in wholemeal flour", pch = 20)
## ML-estimate[#ML-估计]
MLest <- MLEstimator(chem, NormLocationScaleFamily())
estimate(MLest)
confint(MLest)
## compute optimally robust estimator (known contamination)[#计算最佳的的鲁棒估计(被称为污染)]
## takes some time -> you can use package RobLox for normal [#需要一定的时间 - >您可以使用包ROBLOX为正常]
## location and scale which is optimized for speed[#地点和规模进行了速度优化]
robest <- roptest(chem, NormLocationScaleFamily(), eps = 0.05, steps = 3)
estimate(robest)
confint(robest, symmetricBias())
plot(pIC(robest))
## plot of relative and absolute information; cf. Kohl (2005)[#图的相对和绝对的信息;比照。科尔(2005年)]
infoPlot(pIC(robest))
qq3 <- qqplot(chem, robest, cex.pch=1.5, exp.cex2.pch = -.25,
exp.fadcol.pch = .55, withLab = TRUE, which.Order=1:4,
exp.cex2.lbl = .12,exp.fadcol.lbl = .45,
nosym.pCI = TRUE, adj.lbl=c(1.7,.2),
exact.pCI = FALSE, log ="xy")
str(qq3)
## finite-sample correction[#有限样本校正]
if(require(RobLox)){
n <- length(chem)
r <- 0.05*sqrt(n)
r.fi <- finiteSampleCorrection(n = n, r = r)
fsCor <- r.fi/r
robest <- roptest(chem, NormLocationScaleFamily(), eps = 0.05,
fsCor = fsCor, steps = 3)
estimate(robest)
}
## compute optimally robust estimator (unknown contamination)[计算最佳的鲁棒估计(未知的污染)]
## takes some time -> use package RobLox![#需要一定的时间 - >使用包ROBLOX的!]
robest1 <- roptest(chem, NormLocationScaleFamily(), eps.lower = 0.05,
eps.upper = 0.1, steps = 3)
estimate(robest1)
confint(robest1, symmetricBias())
plot(pIC(robest1))
## plot of relative and absolute information; cf. Kohl (2005)[#图的相对和绝对的信息;比照。科尔(2005年)]
infoPlot(pIC(robest1))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|