【发布时间】:2017-08-24 12:06:14
【问题描述】:
我在将 rxGlm 模型转换为普通 glm 模型时遇到问题。每次我尝试隐藏我的模型时,我都会遇到同样的错误:
Error in qr.lm(object) : lm object does not have a proper 'qr' component.
Rank zero or should not have used lm(.., qr=FALSE).
这是一个简单的例子:
cols <- colnames(iris)
vars <- cols[!cols %in% "Sepal.Length"]
form1 <- as.formula(paste("Sepal.Length ~", paste(vars, collapse = "+")))
rx_version <- rxGlm(formula = form1,
data = iris,
family = gaussian(link = 'log'),
computeAIC = TRUE)
# here is the equivalent model with base R
R_version <- glm(formula = form1,
data = iris,
family = gaussian(link = 'log'))
summary(as.glm(rx_version)) #this always gives the above error
我似乎无法在 rxGlm 公式中找到这个“qr”组件(我假设这与矩阵分解有关)。
其他人处理过这个吗?
【问题讨论】:
-
为什么要转换它?
-
能否指定
RevoScaleR的版本 -
@NielsBerglund 我希望对其进行转换以便将其与 Broom 包一起使用(它使处理系数输出变得更加容易,尤其是在绘图时)
-
@akrun its 9.0.1
-
也许您可以更新到 9.1,然后检查是否仍然出现相同的错误
标签: r glm microsoft-r