Hi all,
I am trying to compute inverse probability weight for multiple treatments. But I am struggling to do so.
The common way to generate ipw for binary treatments is as follows.
* Estimate the propensity score
qui logit treatment x1 x2 x3, nolog
predict double pscore if e(sample)
* Create IP weight
gen ipw = 1/pscore if treatment == 1
replace ipw = 1/(1-pscore) if treatment ==0
But I’m trying to compute inverse probability weighting for multiple treatment groups. My treatment values are 0, 1, 2, 3.
I have obtained propensity score (pscore) for each group. Does anyone know how to compute “ipw” for each treatment group, please?
Thank you so much for your time.
Related Posts with Inverse Probability Weighing for Multiple Treatments
Including sampling weight into multilevel logistic model with imputed dataHi everyone, I am analyzing data from a large-scale survey. I used the command mi (sequential imput…
identifying indirect relationshipsI have a dataset with physicians id (variable named phy_id) working in different hospitals (variable…
Creating WeightsI am trying to create a weighted wage, using employment and wage. I tried the following command, but…
Quantile regression with factor variables and clustered errors in Stata 14.2Dear all, is it possible to conduct a quantile regression with factor variables and clustered stand…
Lincom after xtpoisDear Statalist members, I have read that it doesn't make much sense using margins after non-linear …
Subscribe to:
Post Comments (Atom)
0 Response to Inverse Probability Weighing for Multiple Treatments
Post a Comment