2
我使用memisc
包中的mtable取得了一些成功,可以並行排列多個迴歸結果(APSR樣式),但我無法獲得相同的結果命令可以從MASS
包中選擇lrm()
,包可以從robustbase
包中選擇。迴歸表R
偉大工程:
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()
命令():
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)。
哇 - 這正是我需要的!感謝代碼。 一個問題:第4行應該是「係數< - cbind(coef(obj_summary),dt(coef(obj_summary)[,3],df = obj_summary $ df))」,對嗎? –