Hello everyone,
I am trying to analyse the effect of L.X1 on Y under variations in L.X2. I have strongly balanced panel data from 2019 to 2023 with 2929690 observations. Y and X1 are continuous and at the town level and X2 is binary but at the state level (towns are nested within states).
I suspect X1 to be endogenous so I instrument it with Z. I use the ivreghdfe command to regress, an amalgamation of the reghdfe and ivreg2 commands. My specification is as follows:
ivreghdfe Y (L.X1 c.L.X1#i.L.X2 = L.Z c.L.Z#i.L.X2) L.X2 Controls, a(state_id town_id year) first cluster(town_id)
I account for state, town and year-fixed effects and cluster by towns.
Is my modelling correct given I have different levels of exploratory variables or should I change it, for example, use state*year fe and town fe?
Your help is much appreciated.
Thank you.
Regards,
Kaustabh
I am trying to analyse the effect of L.X1 on Y under variations in L.X2. I have strongly balanced panel data from 2019 to 2023 with 2929690 observations. Y and X1 are continuous and at the town level and X2 is binary but at the state level (towns are nested within states).
I suspect X1 to be endogenous so I instrument it with Z. I use the ivreghdfe command to regress, an amalgamation of the reghdfe and ivreg2 commands. My specification is as follows:
ivreghdfe Y (L.X1 c.L.X1#i.L.X2 = L.Z c.L.Z#i.L.X2) L.X2 Controls, a(state_id town_id year) first cluster(town_id)
I account for state, town and year-fixed effects and cluster by towns.
Is my modelling correct given I have different levels of exploratory variables or should I change it, for example, use state*year fe and town fe?
Your help is much appreciated.
Thank you.
Regards,
Kaustabh
Comment