国家固定效应
Country fixed effects
我正在尝试使用国家虚拟变量估计国家固定效应。
fe1b <- plm(
bond_GDP_local ~ real_r + equity_volatility, model = 'within', data = panel_eme_filtered
)
这给了我与下面一个相同的系数:
fe1bc <- plm(
bond_GDP_local ~ real_r + equity_volatility +country_code, model = 'within', data = panel_eme_filtered
)
尽管我在方程式中输入了国家/地区虚拟变量,但我在结果中看不到它。
这是否意味着第一个模型已经包含它?
谢谢
他们都给我这个:
Oneway (individual) effect Within Model
Call:
plm(formula = bond_GDP_local ~ real_r + equity_volatility, data = panel_eme_filtered,
model = "within")
Balanced Panel: n=8, T=60, N=480
Residuals :
Min. 1st Qu. Median 3rd Qu. Max.
-2.7200 -0.3450 -0.0927 0.2200 5.6200
Coefficients :
Estimate Std. Error t-value Pr(>|t|)
real_r -0.0331088985 0.0171886368 -1.926 0.0547 .
equity_volatility -0.0000003838 0.0000006396 -0.600 0.5488
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Total Sum of Squares: 345.7
Residual Sum of Squares: 342.7
R-Squared: 0.008731
Adj. R-Squared: -0.01025
F-statistic: 2.06979 on 2 and 470 DF, p-value: 0.1274
另一个问题:如何估计该模型中稳健的面板时间序列数据标准误差?
大概 panel_eme_filtered
是 pdata.frame 索引 country_code
?如果是这种情况,那么在回归方程中包含 country_code
并不重要。另一种方法是使用 lfe
.
library(lfe)
fe2 <- felm(
bond_GDP_local ~ real_r + equity_volatility | country_code,
data = panel_eme_filtered
)
summary(fe2, robust = T) # heteroskedastic robust SE's
您还可以使用
获得聚类标准错误
fe3 <- felm(
bond_GDP_local ~ real_r + equity_volatility | country_code | 0 | country_code,
data = panel_eme_filtered
)
summary(fe3)
我正在尝试使用国家虚拟变量估计国家固定效应。
fe1b <- plm(
bond_GDP_local ~ real_r + equity_volatility, model = 'within', data = panel_eme_filtered
)
这给了我与下面一个相同的系数:
fe1bc <- plm(
bond_GDP_local ~ real_r + equity_volatility +country_code, model = 'within', data = panel_eme_filtered
)
尽管我在方程式中输入了国家/地区虚拟变量,但我在结果中看不到它。 这是否意味着第一个模型已经包含它?
谢谢
他们都给我这个:
Oneway (individual) effect Within Model
Call:
plm(formula = bond_GDP_local ~ real_r + equity_volatility, data = panel_eme_filtered,
model = "within")
Balanced Panel: n=8, T=60, N=480
Residuals :
Min. 1st Qu. Median 3rd Qu. Max.
-2.7200 -0.3450 -0.0927 0.2200 5.6200
Coefficients :
Estimate Std. Error t-value Pr(>|t|)
real_r -0.0331088985 0.0171886368 -1.926 0.0547 .
equity_volatility -0.0000003838 0.0000006396 -0.600 0.5488
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Total Sum of Squares: 345.7
Residual Sum of Squares: 342.7
R-Squared: 0.008731
Adj. R-Squared: -0.01025
F-statistic: 2.06979 on 2 and 470 DF, p-value: 0.1274
另一个问题:如何估计该模型中稳健的面板时间序列数据标准误差?
大概 panel_eme_filtered
是 pdata.frame 索引 country_code
?如果是这种情况,那么在回归方程中包含 country_code
并不重要。另一种方法是使用 lfe
.
library(lfe)
fe2 <- felm(
bond_GDP_local ~ real_r + equity_volatility | country_code,
data = panel_eme_filtered
)
summary(fe2, robust = T) # heteroskedastic robust SE's
您还可以使用
获得聚类标准错误fe3 <- felm(
bond_GDP_local ~ real_r + equity_volatility | country_code | 0 | country_code,
data = panel_eme_filtered
)
summary(fe3)