Hello everyone,

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
Following Richter et al (2019), I use this formula for the IPW score:

Code:
gen IPW = (pol / pred) + (1- pol)/(1 - pred)
In a second step, I want to estimate the response function of the credit growth using local projections à la Jordà (2005).

Code:
lp cred l(1/4).pol  l(1/4).cred  l(1/4).control1  l(1/4).control2
The problem is that the command
Code:
lp
doesn't work with the option
Code:
 [pweight= IPW]
I struggle to understang how i can weighting my observations. Is it possible to do it by hand?

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.