For my project, I try to know if a certain type of policy ("pol", which is a dummy) has an impact on credit growth ("cred"). The problem is that there is an endogeneity bias, because variations in "cred" impact the implementation of "pol". In order to alleviate this endogeneity bias, I try to estimate the IPW score, because it gives less weight to observations that are easy to predict and more weight to observations that are unanticipated.
I want to calculate the IPW by hand, following the methodology in Richter et al (2019).
In a first step, I use a xtlogit in order to obtain the IPW score.
Code:
xtlogit pol l(1/4).pol l(1/4).cred l(1/4).control1 l(1/4).control2, fe predic pred
Code:
gen IPW = (pol / pred) + (1- pol)/(1 - pred)
Code:
lp cred l(1/4).pol l(1/4).cred l(1/4).control1 l(1/4).control2
Code:
lp
Code:
[pweight= IPW]
Also, I don't understand clearly how the IPW estimor (and other weigthing methodology) work:
- Does it only weight the treatment with something like this: IPW*pol
- Or all the variables: IPW*pol, IPW*cred, IPW*control1, etc.
- Or none of that.
Thanks for your answers.
Reference:
- Richter, B., Schularick, M., & Shim, I. (2019). The costs of macroprudential policy. Journal of International Economics, 118, 263-282.
- Jordà, Ò. (2005). Estimation and inference of impulse responses by local projections. American economic review, 95(1), 161-182.
0 Response to Computing IPW estimator by hand
Post a Comment