Hi everyone, R user switching to STATA for replicaiton purposes here. Apologies in advance if my questions are rudimentary or the problem of Syntax.
Essentially, I am running a Poisson Pseudo Maximum Likelihood regression with three types of fixed effects (provincial, country, and year) while clustering my standard errors at the country level. The problem I have is that the poi2hdfe code only allows for 2 high dimensional fixed effects (HDFEs) but the paper I am replicating managed to do it but their codes were not posted by the journal. What I have worked but wanted to confirm with more experienced STATA users my approach is correct.
I have tried keep country year as the two HDFEs and including the regions as factor variables but it returned an error:
poi2hdfe Aid Explanator i.Regions, id1(Country) id2(Year) cluster(Country)
factor-variable and time-series operators not allowed
r(101);
Then I tried combining country (as a long variable) and Year (float) into 1 variable before running it as 1 fixed effect dimension:
gen Country*Year=Country*Year
poi2hdfe Aid Explanator, id1(Country_Year) id2(Regions) cluster(Country)
This worked, but when i viewed the Country*Year variable, only the year was visible (i.e. Cambodia*2007 was just "2007" in the new variable). I am worried if it just gave me the results for year in the end.
Any advice would be much appreciated.
Thank you!
Nathan
Related Posts with Using poi2hdfe to account for both country-year and regional fixed effects
Weighted returns for the entire sector(all panels) in a panel studyHi I am stuck in understanding how to generate the sector_return (SR) using the average of returns …
median survival time using stciDear Users, I would like to estimate median survival time for a survival model in Stata15. My file …
asroprobit with incomplete or partial rankingMy data consists of individuals presented with 10 alternatives and they mention their first and seco…
Mixlogit: willingness to pay with quadratic costsDear all, I have data from a choice experiment with 120 individuals who answered from 6 sets of sit…
Propensity score matching (PSM)Hello, I am doing PSM in order to test the results and compare with the ones I obtained from regress…
Subscribe to:
Post Comments (Atom)
0 Response to Using poi2hdfe to account for both country-year and regional fixed effects
Post a Comment