residuals.glmrob(robustbase)
residuals.glmrob()所属R语言包:robustbase
Residuals of Robust Generalized Linear Model Fits
残差的鲁棒广义线性模型适合
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute residuals of a fitted glmrob model, i.e., robust generalized linear model fit.
计算一个装有glmrob模型,即强大的广义线性模型拟合的残差。
用法----------Usage----------
## S3 method for class 'glmrob'
residuals(object,
type = c("deviance", "pearson", "working",
"response", "partial"),
...)
参数----------Arguments----------
参数:object
an object of class glmrob, typically the result of a call to glmrob.
类的一个对象glmrob,通常调用glmrob的结果。
参数:type
the type of residuals which should be returned. The alternatives are: "deviance" (default), "pearson", "working", "response", and "partial".
应返回的残差的类型。的替代品有:"deviance"(默认),"pearson","working","response"和"partial"。
参数:...
further arguments passed to or from other methods.
进一步的参数传递给其他方法。
Details
详细信息----------Details----------
The references in glm define the types of residuals: Davison & Snell is a good reference for the usages of each.
中的引用glm定义类型的残差:戴维森和Snell是一个很好的的参照各自的用法。
The partial residuals are a matrix of working residuals, with each column formed by omitting a term from the model.
部分残差的工作残差矩阵,每列由从模型中省略了术语的。
The residuals (S3) method (see methods) for glmrob models has been modeled to follow closely the method for classical (non-robust) glm fitted models. Possibly, see its documentation, i.e., residuals.glm, for further details.
的residuals(S3)方法(见methods)glmrob:模型进行了建模密切关注经典(不健壮的)glm拟合模型的方法。可能的话,请参阅其文档,即residuals.glm,进一步的细节。
参考文献----------References----------
参见----------See Also----------
glmrob for computing object, anova.glmrob; the corresponding generic functions, summary.glmrob, coef, fitted, residuals.
glmrob的计算object,anova.glmrob;相应的通用功能,summary.glmrob,coef,fitted,residuals。
实例----------Examples----------
### -------- Gamma family -- data from example(glm) ---[##--------伽玛家庭 - 例如数据(GLM)---]
clotting <- data.frame(
u = c(5,10,15,20,30,40,60,80,100),
lot1 = c(118,58,42,35,27,25,21,19,18),
lot2 = c(69,35,26,21,18,16,13,12,12))
summary(cl <- glm (lot1 ~ log(u), data=clotting, family=Gamma))
summary(ro <- glmrob(lot1 ~ log(u), data=clotting, family=Gamma))
clotM5.high <- within(clotting, { lot1[5] <- 60 })
cl5.high <- glm (lot1 ~ log(u), data=clotM5.high, family=Gamma)
ro5.high <- glmrob(lot1 ~ log(u), data=clotM5.high, family=Gamma)
rr <- range(residuals(ro), residuals(cl), residuals(ro5.high))
plot(residuals(ro5.high) ~ residuals(cl5.high), xlim = rr, ylim = rr, asp = 1)
abline(0,1, col=2, lty=3)
points(residuals(ro) ~ residuals(cl), col = "gray", pch=3)
## Show all kinds of residuals:[#显示所有的残留物:]
r.types <- c("deviance", "pearson", "working", "response")
sapply(r.types, residuals, object = ro5.high)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|