I am now replicating the paper of Kumar et. al (2021). Social Learning and Analyst Behavior. Journal of Financial Economics. 143, 434-461. The goal is to examine whether an equity analyst’s current forecast error will be influenced by peer analysts’ previous earning forecast errors on other portfolio firms.
So my dataset includes something like :
CUSIP: Company's ID
ANALYS: Equity Analyst's ID
YEAR_Q: Quarter in a year, e.g. 2022q1, 2022q2 etc
ANN_DATE: Quarterly earning announcement date, e.g. 27Apr2022
FE_own (Dependent variable): analyst i’s forecast error on firm j’s earnings in quarter t
FE_other_prev (Main independent variable): peer analysts’ average forecast error on other firms in the portfolio of analyst i in quarter t-1
FE_own_other_prev: analyst i’s own average forecast error on other portfolio firms in quarter t-1
FE_own_prev: analyst i’s own forecast error on the focal firm j in quarter t-1
According to the paper of Kumar et.al (2021), I have to include the following fixed effects into my regression:
All regression specifications include earnings announcement fixed effects, which control for all common firm- and time-specific factors that potentially affect the forecast errors of all analysts following a given firm. This means that we implicitly control for all firm characteristics and the average forecast error on the firm in the previous quarter. When these fixed effects are included, we are effectively comparing the forecast errors of all analysts following a certain firm against each other. We also include firm-analyst fixed effects to control for the analyst’s own average forecast error on the firm. We cluster standard errors by earnings announcement.
What I could think of is:
Code:
reghdfe FE_own FE_other_prev FE_own_other_prev FE_own_prev, abs(CUSIP YEAR_Q CUSIP#c.ANALYS) vce (cluster ANN_DATE)
Would be great if someone could give me some feedback on the regression code. Especially regarding the firm-analyst FE, I am wondering if -CUSIP#c.ANALYS- is the right way to capture that.
Also as my dataset has > 1million observations, I include the CUSIP YEAR_Q in the -abs()- otherwise it would take forever to run the regression if I have i.CUSIP and i.YEAR_Q in the main regression part.
Any help much appreciated!
Thanks,
sc
0 Response to Multiple Fixed Effects with Regression reghdfe
Post a Comment