Dear Stata Members
I ran the following panel regression with firm fixed effects(in my case, xtset id year; where id denotes individual firms) and year dummies, and standard errors clustered at firm level
Now I want standard errors to be clustered by both firm and year to control for the possibility that standard errors are correlated across firms and over time.
I ran the following code
Did I run the right code?
References
I ran the following panel regression with firm fixed effects(in my case, xtset id year; where id denotes individual firms) and year dummies, and standard errors clustered at firm level
Code:
xtreg cash_ta2_w epu /// tra_cre2_w inven_ta_w /// size_w fixed_ass_w lever_w ltbankborr2_w stbankborr2_w rd_ta_w div_w /// sgrowth_w oppro_ta_w mb_w /// fcfvol icfvol fsalvol isalvol /// realinterestrate gdpgrowthannual /// i.year, fe vce(robust)
I ran the following code
Code:
reghdfe cash_ta2_w epu /// tra_cre2_w inven_ta_w /// size_w fixed_ass_w lever_w ltbankborr2_w stbankborr2_w rd_ta_w div_w /// sgrowth_w oppro_ta_w mb_w /// fcfvol icfvol fsalvol isalvol /// realinterestrate gdpgrowthannual /// i.year, absorb(id) vce(cluster id year)
References
HTML Code:
http://scorreia.com/software/reghdfe/
Comment