该软件包的最新版本 1.34.3texreg
支持model.selection
和averaging
对象。
您的代码示例:
library("texreg")
library("MuMIn")
data(cement)
fm1 <- lm(y ~ ., data = Cement, na.action = na.fail)
ms1 <- dredge(fm1)
screenreg(ms1)
产量:
==========================================================================================================================================================================================================
Model 1 Model 2 Model 3 Model 4 Model 5 Model 6 Model 7 Model 8 Model 9 Model 10 Model 11 Model 12 Model 13 Model 14 Model 15 Model 16
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(Intercept) 52.58 *** 71.65 *** 48.19 *** 103.10 *** 111.68 *** 203.64 *** 62.41 131.28 *** 72.07 *** 117.57 *** 57.42 *** 94.16 81.48 *** 72.35 *** 110.20 *** 95.42 ***
(2.29) (14.14) (3.91) (2.12) (4.56) (20.65) (70.07) (3.27) (7.38) (5.26) (8.49) (56.63) (4.93) (17.05) (7.95) (4.17)
X1 1.47 *** 1.45 *** 1.70 *** 1.44 *** 1.05 *** 1.55 * 1.87 *** 2.31 *
(0.12) (0.12) (0.20) (0.14) (0.22) (0.74) (0.53) (0.96)
X2 0.66 *** 0.42 * 0.66 *** -0.92 *** 0.51 0.73 *** 0.79 *** 0.31
(0.05) (0.19) (0.04) (0.26) (0.72) (0.12) (0.17) (0.75)
X4 -0.24 -0.61 *** -0.64 *** -1.56 *** -0.14 -0.72 *** -0.74 *** -0.46
(0.17) (0.05) (0.04) (0.24) (0.71) (0.07) (0.15) (0.70)
X3 0.25 -0.41 * -1.45 *** 0.10 -1.20 *** -1.01 *** 0.49 -1.26 *
(0.18) (0.20) (0.15) (0.75) (0.19) (0.29) (0.88) (0.60)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Log Likelihood -28.16 -26.93 -26.95 -29.82 -27.31 -29.73 -26.92 -35.37 -40.96 -45.87 -46.04 -45.76 -48.21 -48.00 -50.98 -53.17
AICc 69.31 72.44 72.48 72.63 73.19 78.04 79.84 83.74 94.93 100.41 100.74 104.52 105.08 109.01 110.63 111.54
Delta 0.00 3.13 3.16 3.32 3.88 8.73 10.52 14.43 25.62 31.10 31.42 35.21 35.77 39.70 41.31 42.22
Weight 0.57 0.12 0.12 0.11 0.08 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Num. obs. 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13
==========================================================================================================================================================================================================
*** p < 0.001, ** p < 0.01, * p < 0.05
和模型平均:
MA.ests <- model.avg(ms1, subset = delta < 5, revised.var = TRUE)
screenreg(MA.ests)
产量:
=======================
Model 1
-----------------------
(Intercept) 64.69 **
(22.24)
X1 1.46 ***
(0.20)
X2 0.63 ***
(0.12)
X4 -0.48 *
(0.22)
X3 -0.02
(0.38)
-----------------------
Num. obs. 13
=======================
*** p < 0.001, ** p < 0.01, * p < 0.05
有关微调,另请参阅extract
帮助页面上两种方法的参数:?extract