rlm(MASS)
rlm()所属R语言包:MASS
Robust Fitting of Linear Models
线性模型的鲁棒拟合
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fit a linear model by robust regression using an M estimator.
适合使用M估计稳健回归线性模型。
用法----------Usage----------
rlm(x, ...)
## S3 method for class 'formula'[类formula的方法]
rlm(formula, data, weights, ..., subset, na.action,
method = c("M", "MM", "model.frame"),
wt.method = c("inv.var", "case"),
model = TRUE, x.ret = TRUE, y.ret = FALSE, contrasts = NULL)
## Default S3 method:[默认方法]
rlm(x, y, weights, ..., w = rep(1, nrow(x)),
init = "ls", psi = psi.huber,
scale.est = c("MAD", "Huber", "proposal 2"), k2 = 1.345,
method = c("M", "MM"), wt.method = c("inv.var", "case"),
maxit = 20, acc = 1e-4, test.vec = "resid", lqs.control = NULL)
psi.huber(u, k = 1.345, deriv = 0)
psi.hampel(u, a = 2, b = 4, c = 8, deriv = 0)
psi.bisquare(u, c = 4.685, deriv = 0)
参数----------Arguments----------
参数:formula
a formula of the form y ~ x1 + x2 + ....
形式y ~ x1 + x2 + ...公式。
参数:data
data frame from which variables specified in formula are preferentially to be taken.
数据框中指定的变量formula是优先要采取的。
参数:weights
a vector of prior weights for each case.
每情况件事先权向量。
参数:subset
An index vector specifying the cases to be used in fitting.
索引向量指定要在装修中使用的情况下。
参数:na.action
A function to specify the action to be taken if NAs are found. The "factory-fresh" default action in R is na.omit, and can be changed by options(na.action=).
如果NA的发现将采取的一个函数来指定动作。研发的“工厂新鲜的默认动作是na.omit,可以通过options(na.action=)改变。
参数:x
a matrix or data frame containing the explanatory variables.
矩阵或数据框包含的解释变量。
参数:y
the response: a vector of length the number of rows of x.
回应:一个长度为向量x行数。
参数:method
currently either M-estimation or MM-estimation or (for the formula method only) find the model frame. MM-estimation is M-estimation with Tukey's biweight initialized by a specific S-estimator. See the "Details" section.
目前任的M-估计或MM估计或(formula方法只)模型框架。 MM估计是与杜克初始化特定的S-估计的biweight M-估计。看到“详细资料”一节。
参数:wt.method
are the weights case weights (giving the relative importance of case, so a weight of 2 means there are two of these) or the inverse of the variances, so a weight of two means this error is half as variable?
重的情况下重量(给予相对重要性的情况下,2表示的重量有这两个)或方差的倒数,所以两个重量意味着这个错误是作为变量的一半?
参数:model
should the model frame be returned in the object?
应返回的对象模型框架?
参数:x.ret
should the model matrix be returned in the object?
应返回的对象模型矩阵?
参数:y.ret
should the response be returned in the object?
应该响应返回的对象呢?
参数:contrasts
optional contrast specifications: se lm.
可选的对比度规格:SElm。
参数:w
(optional) initial down-weighting for each case.
(可选)初始向下加权每情况件。
参数:init
(optional) initial values for the coefficients OR a method to find initial values OR the result of a fit with a coef component. Known methods are "ls" (the default) for an initial least-squares fit using weights w*weights, and "lts" for an unweighted least-trimmed squares fit with 200 samples.
初始值(可选)的系数或方法找到初始值或coef组件适合的结果。已知的方法是初步最小二乘"ls"(默认)适合使用权w*weights,"lts"适合非加权的最少修剪广场,200个样本。
参数:psi
the psi function is specified by this argument. It must give (possibly by name) a function g(x, ..., deriv) that for deriv=0 returns psi(x)/x and for deriv=1 returns psi'(x). Tuning constants will be passed in via ....
PSI的功能,通过此参数指定。它必须给函数(可能由名称)g(x, ..., deriv),deriv=0回报PSI(X)/ Xderiv=1回报PSI(X)。通过...将通过调整常量。
参数:scale.est
method of scale estimation: re-scaled MAD of the residuals (default) or Huber's proposal 2 (which can be selected by either "Huber" or "proposal 2").
规模估算方法:重新缩放MAD残差(默认)或Huber的建议2(可以选择,要么"Huber"或"proposal 2")。
参数:k2
tuning constant used for Huber proposal 2 scale estimation.
调整胡伯建议2规模估计使用的常数。
参数:maxit
the limit on the number of IWLS iterations.
IWLS迭代的数量限制。
参数:acc
the accuracy for the stopping criterion.
停止准则的准确性。
参数:test.vec
the stopping criterion is based on changes in this vector.
停止准则的基础上在这个向量的变化。
参数:...
additional arguments to be passed to rlm.default or to the psi function.
额外的参数被传递到rlm.default或psi功能。
参数:lqs.control
An optional list of control values for lqs.
lqs控制值的可选列表。
参数:u
numeric vector of evaluation points.
数字向量的评估点。
参数:k, a, b, c
tuning constants.
调整常数。
参数:deriv
0 or 1: compute values of the psi function or of its first derivative.
0或1:PSI的功能或它的一阶导数计算的值。
Details
详情----------Details----------
Fitting is done by iterated re-weighted least squares (IWLS).
拟合是通过迭代重加权最小二乘(IWLS)。
Psi functions are supplied for the Huber, Hampel and Tukey bisquare proposals as psi.huber, psi.hampel and psi.bisquare. Huber's corresponds to a convex optimization problem and gives a unique solution (up to collinearity). The other two will have multiple local minima, and a good starting point is desirable.
PSI的功能是提供胡伯,汉佩尔和Tukey bisquarepsi.huber,psi.hampel和psi.bisquare建议。 Huber的对应的凸优化问题,并给出了一个独特的解决方案(共线)。其他两个将有多个局部极小,和一个很好的起点是可取的。
Selecting method = "MM" selects a specific set of options which ensures that the estimator has a high breakdown point. The initial set of coefficients and the final scale are selected by an S-estimator with k0 = 1.548; this gives (for n >> p) breakdown point 0.5. The final estimator is an M-estimator with Tukey's biweight and fixed scale that will inherit this breakdown point provided c > k0; this is true for the default value of c that corresponds to 95% relative efficiency at the normal. Case weights are not supported for method = "MM".
选择method = "MM"选择一个选项,从而确保估计有一个高击穿点的具体。系数的初始设置和规模最终选择的S-k0 = 1.548估计,这给(n >> p)击穿点0.5。最后估计是Tukey的biweight和固定的规模,将继承此故障点提供c > k0M-估计,这是真正的c,对应95%的相对效率,在正常的默认值。 method = "MM"不支持的情况下重量。
值----------Value----------
An object of class "rlm" inheriting from "lm". Note that the df.residual component is deliberately set to NA to avoid inappropriate estimation of the residual scale from the residual mean square by "lm" methods.
一个类的对象"rlm"继承"lm"。注意df.residual组件是故意设置NA"lm"方法的平均剩余平方避免不适当的剩余规模估计。
The additional components not in an lm object are
lm对象的附加组件
参数:s
the robust scale estimate used
使用强大的规模估计
参数:w
the weights used in the IWLS process
在使用的IWLS过程的重量
参数:psi
the psi function with parameters substituted
PSI的功能与参数取代
参数:conv
the convergence criteria at each iteration
在每个迭代的收敛准则
参数:converged
did the IWLS converge?
没有IWLS收敛吗?
参数:wresid
a working residual, weighted for "inv.var" weights only.
工作残留,"inv.var"只重加权。
参考文献----------References----------
Robust Statistics. Wiley.
Robust Statistics: The Approach based on Influence Functions. Wiley.
Algorithms, Routines and S Functions for Robust Statistics. Wadsworth & Brooks/Cole.
Modern Applied Statistics with S. Fourth edition. Springer.
参见----------See Also----------
lm, lqs.
lm,lqs。
举例----------Examples----------
summary(rlm(stack.loss ~ ., stackloss))
rlm(stack.loss ~ ., stackloss, psi = psi.hampel, init = "lts")
rlm(stack.loss ~ ., stackloss, psi = psi.bisquare)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|