i should perform a panelregression with industry and year FE and cluster by firm and year at the end
My data is ranging from 2002 until 2019 and includes all firms from the s&p 500.
i cannot go
Code:
xtset industry_key year repeated time values within panel
Code:
regress firm_beta_w esg_single_lag1 i.industry_key i.year, vce (cluster company_key year)
Then i tried this
Code:
reghdfe firm_beta esg_single_lag1, absorb(industry_key year) vce (cluster company_key year) (MWFE estimator converged in 4 iterations) HDFE Linear regression Number of obs = 6,196 Absorbing 2 HDFE groups F( 1, 15) = 0.12 Statistics robust to heteroskedasticity Prob > F = 0.7367 R-squared = 0.1404 Adj R-squared = 0.1367 Number of clusters (company_key) = 494 Within R-sq. = 0.0001 Number of clusters (year) = 16 Root MSE = 0.4120 (Std. Err. adjusted for 16 clusters in company_key year) --------------------------------------------------------------------------------- | Robust firm_beta | Coef. Std. Err. t P>|t| [95% Conf. Interval] ----------------+---------------------------------------------------------------- esg_single_lag1 | .0202003 .0589782 0.34 0.737 -.1055087 .1459094 _cons | 1.103985 .0276022 40.00 0.000 1.045153 1.162818 --------------------------------------------------------------------------------- Absorbed degrees of freedom: ------------------------------------------------------+ Absorbed FE | Categories - Redundant = Num. Coefs | --------------+---------------------------------------| industry_key | 11 0 11 | year | 16 16 0 *| ------------------------------------------------------+ * = FE nested within cluster; treated as redundant for DoF computation (MWFE estimator converged in 4 iterations) HDFE Linear regression Number of obs = 6,196 Absorbing 2 HDFE groups F( 1, 15) = 0.12 Statistics robust to heteroskedasticity Prob > F = 0.7367 R-squared = 0.1404 Adj R-squared = 0.1367 Number of clusters (company_key) = 494 Within R-sq. = 0.0001 Number of clusters (year) = 16 Root MSE = 0.4120 (Std. Err. adjusted for 16 clusters in company_key year) --------------------------------------------------------------------------------- | Robust firm_beta | Coef. Std. Err. t P>|t| [95% Conf. Interval] ----------------+---------------------------------------------------------------- esg_single_lag1 | .0202003 .0589782 0.34 0.737 -.1055087 .1459094 _cons | 1.103985 .0276022 40.00 0.000 1.045153 1.162818 --------------------------------------------------------------------------------- Absorbed degrees of freedom: ------------------------------------------------------+ Absorbed FE | Categories - Redundant = Num. Coefs | --------------+---------------------------------------| industry_key | 11 0 11 | year | 16 16 0 *| ------------------------------------------------------+ * = FE nested within cluster; treated as redundant for DoF computation
I woul appreciate some help since i am really struggling
Thanks Patrick
0 Response to Panelregression with industry and year FE
Post a Comment