我正在尝试绘制 rlm - 对象
,但出现以下错误
Error in lm.influence(x, do.coef = FALSE) :
non-NA residual length does not match cases used in fitting
我在互联网上搜索了此错误,但没有找到任何内容,而且我不明白它的含义以及为什么会出现。
rlm 回归中使用的日期由 1 个因变量和 4 个解释变量组成。没有观察结果为 NA
或 NULL
。
结果对象model$df.residual
等于NA
。这是整个结果对象中唯一的NA
。
有人可以解释一下如何避免 df.residual
等于 NA
吗?
最佳答案
这实际上是在 the docs 中:
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
还有来自MASS
作者的引用
df.residual is not a relevant concept [for rlm], and the coefficients are not t-distributed
关于r - 无法绘制 rlm 对象。非 NA 剩余长度与拟合中使用的情况不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33299621/