2017-09-02 303 views
-1

我使用带有固定效果''内'选项'的'plm'命令来运行我的面板回归。 因变量是数字,而所有自变量都是分类的或二元的,除了cgi,eui,sjump和rv。解释'plm'中的固定效应模型没有截距时的分类变量

三个二元变量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 
+0

请不要恶意破坏你的自己的问题。 –

回答

1

首先:对不起,这应该是一个评论,但我不能评论,因为我有几点和徽章。

您是否尝试过使用within_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")) 
+0

非常感谢!它给了我正确的答案! – Eric

+0

为了呈现我的固定效果模型结果,是否可以正确使用此拦截器? – Eric

相关问题