我在将rxGlm模型转换为正常的glm模型时遇到问题。每次我和隐蔽我的模型,我得到了同样的错误:将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
我似乎无法找到这个“QR”成分(我假设这是与矩阵分解有关)在rxGlm公式中指定。
其他人处理过吗?
你为什么要转换它? –
你可以指定'RevoScaleR'的版本吗 – akrun
@NielsBerglund我希望将它转换为与Broom包一起使用(它使处理系数输出变得容易很多,尤其是绘图) –