'plm' 中的固定效应模型没有截距时解释分类变量

Interpreting categorical variable when fixed effect model in 'plm' has no intercept

我 运行 我的面板回归使用 'plm' 命令和固定效果 'within' 选项。 因变量是数值型的,而所有自变量都是分类型或二元型的,除了 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

首先:对不起,这应该是评论,但我没有积分和徽章,所以不能评论。

您是否尝试过使用 within_intercept() 函数? "This function gives an overall intercept for within models and its accompanying standard error"

如果你去看 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"))