Dear colleagues,
I am conducting a research study that examines how state-year level political uncertainty affects firm-state-year level cash flows. Worrying that the political uncertainty may be endogenous, I decide to use the state-year number of undocumented immigrants as my IV. However, I encountered some implementation difficulties and hope to get some suggestions.
At the very beginning, I used the old-fashion approach that I first regress political uncertainty on undocumented immigrants and then have the predicted value matched to my firm dataset and then regress firm cash flow on the fitted political uncertainty. The code I used follows:
The difficulty I encountered using this procedure was the calculation of the F-statistics of my instrument in the first stage. I could only estimate it using the fact that I only have one instrumental variable so the F-statistics of it would be the the square of the t-statistics. I also wanted to rely on the joint F-test score displayed on the upper right corner of the reghdfe command but I'm aware that it actually does not measure the same thing.
Thus, my first question would be how could I compute the F-statistics for testing weak instrument in my first stage?
Then, I also tried the ivreghdfe command directly after matching the undocumented immigrants data to my main data on state and year. The code I used follows:
Based on the first-stage estimation the first option gives me, it seems that all the undocumented, state_GDP, firm_controls are used for instrumenting for my endogenous variable, political_uncertainty, which is not what I wanted. Plus, for the first stage, I only wanted to run regressions on state-year level observations but now it automatically run on observations at firm-state-year level, which is the observation level of my main data.
Thus, my second question for this procedure would be how could I specify which variables are used as first stage controls while rest are used as my second stage controls.
I am aware that typically we require the same set of control variables in both stages (which is also how theory suggests), but my instrumental variable is actually at state-level. Basically, I'm regressing firm-level variables on state-level variables assuming that firms headquartered in the corresponding states have the exposure to the local political uncertainty.
It would be super-helpful that if someone could inform me how I could directly compute the F-statistics in the first stage for my first procedure.
Thank you in advance for any help you provide.
I am conducting a research study that examines how state-year level political uncertainty affects firm-state-year level cash flows. Worrying that the political uncertainty may be endogenous, I decide to use the state-year number of undocumented immigrants as my IV. However, I encountered some implementation difficulties and hope to get some suggestions.
At the very beginning, I used the old-fashion approach that I first regress political uncertainty on undocumented immigrants and then have the predicted value matched to my firm dataset and then regress firm cash flow on the fitted political uncertainty. The code I used follows:
Code:
reghdfe political_uncertainty undocumented state_GDP, a(state year) cluster(year) predict pol_fitted, xb reghdfe cash_flow pol_fitted firm_controls, a(firm state year) cluster(year)
Thus, my first question would be how could I compute the F-statistics for testing weak instrument in my first stage?
Then, I also tried the ivreghdfe command directly after matching the undocumented immigrants data to my main data on state and year. The code I used follows:
Code:
ivreghdfe cash_flow (political_uncertainty=undocumented state_GDP) firm_controls, a(firm state year) cluster(year) first
Thus, my second question for this procedure would be how could I specify which variables are used as first stage controls while rest are used as my second stage controls.
I am aware that typically we require the same set of control variables in both stages (which is also how theory suggests), but my instrumental variable is actually at state-level. Basically, I'm regressing firm-level variables on state-level variables assuming that firms headquartered in the corresponding states have the exposure to the local political uncertainty.
It would be super-helpful that if someone could inform me how I could directly compute the F-statistics in the first stage for my first procedure.
Thank you in advance for any help you provide.

Comment