I am using
ppmlhdfe for a Poisson regression and I want to understand if some points might be influencing my estimates. My professor suggested using an added variable plot, which I know can be created with
avplot after
regress.
ppmlhdfe does not have an equivalent command, but I thought I could use the same logic to construct an added variable plot. Here is an example of my data without the fixed effect indicators (I thought it would be too much to include):
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input double(troop_events GII) float(lgdp ltote1)
0 .343 9.101155 3.8501475
0 .262 9.514791 0
0 .491 5.492427 0
0 .677 6.52196 0
0 .323 8.207817 3.135494
0 .085 10.6951 3.218876
0 . 8.891001 0
0 .232 9.246528 0
0 .582 6.281343 0
0 .122 9.96443 3.218876
0 .177 8.650077 0
end
My regression is:
Code:
ppmlhdfe troop_events GII lgdp ltote1, cluster(code_miss code_nat) absorb(year code_miss code_reg)
My dependent variable
troop_events is a count variable and ranges between 0 and 17. The independent variable of interest,
GII, is an index ranging from about 0 to 1.
I ran the following to create my "avplot":
Code:
ppmlhdfe troop_events lgdp ltote1, cluster(code_miss code_nat) absorb(year code_miss code_reg) d
predict resy, res
reghdfe GII lgdp ltote1, cluster(code_miss code_nat) absorb(year code_miss code_reg) resid
predict resx, res
scatter resy resx
It seems logical to me that one would use a linear regression to partial out the effects of the other covariates for
GII, but what I am unsure about is whether it is valid to plot the residuals of a Poisson regression against the residuals of a linear model. If this is incorrect, is there a better way to construct an "avplot" for
ppmlhdfe or does the concept not really apply in my case?
0 Response to Added Variable Plot and PPMLHDFE
Post a Comment