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
Cross-sectional t test & standard deviation (event study caar)Dear all, I've got a question regarding the cross-sectional t-test when determining the significanc…
LoopsHi, I have the following code : egen identifier = group(isin) sum identifier scalar max2=r(max) lo…
Interpreting logistic regression "Odds ratio ouputHello everyone I am investigating the factors that influence Adherence Pre-Exposure Prophylaxis (Pr…
Export ANOVA OutputHi, I am trying to save the output from running multiple ANOVAs, however the Word output isn't corr…
Creating panel datasetHello I am trying to create a panel dataset using Waves 1 to 5 from the South African National Inco…
Subscribe to:
Post Comments (Atom)
0 Response to Using poi2hdfe to account for both country-year and regional fixed effects
Post a Comment