residuals.rpart(rpart)
residuals.rpart()所属R语言包:rpart
Residuals From a Fitted Rpart Object
残差一个装软件rpart对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Method for residuals for an rpart object.
residualsrpart对象的方法。
用法----------Usage----------
## S3 method for class 'rpart'
residuals(object, type = c("usual", "pearson", "deviance"), ...)
参数----------Arguments----------
参数:object
fitted model object of class "rpart".
拟合模型对象的类"rpart"。
参数:type
Indicates the type of residual desired. For regression or anova trees all three residual definitions reduce to y - fitted. This is the residual returned for user method trees as well. For classification trees the usual residuals are the misclassification losses L(actual, predicted) where L is the loss matrix. With default losses this residual is 0/1 for correct/incorrect classification. The pearson residual is (1-fitted)/sqrt(fitted(1-fitted)) and the deviance residual is sqrt(minus twice logarithm of fitted). For poisson and exp (or survival) trees, the usual residual is the observed - expected number of events. The pearson and deviance residuals are as defined in McCullagh and Nelder.
指示剩余所需的类型。回归或anova树木残留量的定义,减少y - fitted。这是残留的返回user方法树。对于分类树usual的残差是误判损失L(实际预测),其中L是损失矩阵。违约损失残留为0/1,正确/不正确的分类。 pearson剩余的是(安装)/ SQRT()和安装(安装)deviance剩余的是sqrt(减去两倍的拟合对数)。对于poisson和exp(或存活)绿树成荫,usual残差是观察到的 - 预期的事件数。 pearson和devianceMcCullagh和Nelder残差的定义。
参数:...
further arguments passed to or from other methods.
进一步的参数传递给其他方法。
值----------Value----------
Vector of residuals of type type from a fitted rpart object.
向量的类型type一个装有rpart对象残差。
参考文献----------References----------
Generalized Linear Models. London: Chapman and Hall.
实例----------Examples----------
fit <- rpart(skips ~ Opening + Solder + Mask + PadType + Panel,
data=solder, method='anova')
summary(residuals(fit))
plot(predict(fit),residuals(fit))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|