-1

我使用带有固定效果“within”选项的“plm”命令运行我的面板回归。因变量是数值型的,而所有自变量都是分类变量或二元变量,除了 cgi、eui、sjump 和 rv。

三个二元变量 cc、ce、cw 应该代表具有 4 个类别的相同分类变量,所以我排除了一个。

但是,当我尝试从代表 4 个类别的这三个二元变量中分析第四个类别的影响时,我遇到了困难,因为这个固定效应模型没有给出截距,我可以使用它来获得第四个类别变量的影响,其中我必须将所有内容设置为零。

我可以帮忙吗?

 Oneway (individual) effect Within Model

 Call:
 plm(formula = liq ~ gov + indus + fin + cc * us + ce * us + cw * 
     us + cgi + eui + sjump + rv, data = DATA, model = "within", 
     index = c("year", "id"))

 Unbalanced Panel: n=20, T=1-5, N=56

 Residuals :
        Min.     1st Qu.      Median     3rd Qu.        Max. 
 -0.00261615 -0.00032955  0.00000000  0.00054460  0.00355775 

 Coefficients :
          Estimate  Std. Error t-value  Pr(>|t|)    
 gov    2.6297e-03  9.3741e-04  2.8053 0.0100474 *  
 indus  1.2222e-03  5.6817e-04  2.1511 0.0422088 *  
 fin    1.8561e-04  1.1653e-03  0.1593 0.8748340    
 cc    -4.9511e-03  2.2878e-03 -2.1641 0.0410807 *  
 us    -4.1023e-03  5.4593e-04 -7.5143 1.235e-07 ***
 ce    -5.6131e-03  2.2753e-03 -2.4669 0.0215034 *  
 cw    -5.1635e-03  2.5178e-03 -2.0508 0.0518462 .  
 cgi   -1.5682e-03  3.4829e-04 -4.5026 0.0001608 ***
 eui    1.1203e-06  4.1869e-05  0.0268 0.9788832    
 sjump -1.8977e-03  7.2104e-03 -0.2632 0.7947520    
 rv    -2.7708e+00  5.6234e+00 -0.4927 0.6268798    
 cc:us  1.2738e-03  2.4844e-03  0.5127 0.6130542    
 us:ce  6.6711e-04  2.5962e-03  0.2570 0.7994964    
 ---
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

 Total Sum of Squares:    0.00052049
 Residual Sum of Squares: 5.7059e-05
 R-Squared:      0.89037
 Adj. R-Squared: 0.73785
 F-statistic: 14.3696 on 13 and 23 DF, p-value: 4.5827e-08
4

1 回答 1

1

首先:对不起,这应该是评论,但我无法评论,因为我的积分和徽章很少。

您是否尝试过使用 inside_intercept() 函数?“这个函数给出了模型内的整体截距及其伴随的标准误差”

如果你去 plm 手册有一些例子(第 117 页)(https://cran.r-project.org/web/packages/plm/plm.pdf):

gi <- plm(inv ~ value + capital, data = Grunfeld, model = "within")
fx_level <- fixef(gi, type = "level")
fx_dmean <- fixef(gi, type = "dmean")
overallint <- within_intercept(gi)
all.equal(overallint + fx_dmean, fx_level, check.attributes = FALSE) # TRUE
# overall intercept with robust standard error
within_intercept(gi, vcov = function(x) vcovHC(x, method="arellano", type="HC0"))
于 2017-09-02T08:53:07.983 回答