我已经成功使用memisc
包中的 mtable 到漂亮的打印结果(APSR 样式)并排几个回归,但是我无法让相同的命令适用lrm()
于MASS
包中适合的模型和lmrob()
从robustbase
包中。
效果很好:
lm0 <- lm(sr ~ pop15 + pop75, data = LifeCycleSavings)
lm1 <- lm(sr ~ dpi + ddpi, data = LifeCycleSavings)
lm2 <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
mtable123 <- mtable("Model 1"=lm0,"Model 2"=lm1,"Model 3"=lm2)
mtable()
命令失败("Error in qt(p, df, lower.tail, log.p): Non-numeric argument to mathematical function")
:
rlm0 <- rlm(sr ~ pop15 + pop75, data = LifeCycleSavings)
rlm1 <- rlm(sr ~ dpi + ddpi, data = LifeCycleSavings)
rlm2 <- rlm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
mtable123 <- mtable("Model 1"=rlm0, "Model 2"=rlm1, "Model 3"=rlm2)
mtable()
在命令 ( "Error in UseMethod("getSummary"): no applicable method for 'getSummary' applied to an object of class "lmrob""
)处失败:
lmrob0 <- lmrob(sr ~ pop15 + pop75, data = LifeCycleSavings)
lmrob1 <- lmrob(sr ~ dpi + ddpi, data = LifeCycleSavings)
lmrob2 <- lmrob(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
mtable123 <- mtable("Model 1"=lmrob0, "Model 2"=lmrob1, "Model 3"=lmrob2)
我愿意接受不涉及 mtable 的建议,但我正在寻找纯文本或制表符分隔的输出(换句话说,不是 LaTeX)。