Extracting propensity scores from weightthem objects with a continuous exposure
dannysack opened this issue · 2 comments
Hey, this is an excellent package, thank you so much!
I am trying to do a sensitivity analysis where I compare the effect estimate generated from the weight them object for a continuous exposure weighted sample to the effect estimate that includes the propensity score as a covariate (without weighing it). I am doing so using imputed data, however, using weightthem
. Even after including include.obj = TRUE
as suggested in #3, I do not see any components of the output object that include propensity scores for such a sensitivity analysis (I am posting here because the weightthem
documentation suggests that additional arguments beyond what is specified in the documentation are implemented via weightit
).
As an example:
Generate weights: ols_wt <- weightthem(X ~ Z1 + Z2 + Z3, datasets = imp_data, method = "ps", approach = "within")
Model 1: with(ols_wt, glm(Y ~ X, family = binomial))
Model 2: with(imp_data, glm(Y ~ X + PS, family = binomial))
- I would obviously need to be more creative to make sure that each vector of propensity scores corresponds to the appropriate imputed dataset, but this is for illustration.
Does the propensity score exist in the weightthem
object or will I just need to create it myself (which is not a problem, I just want to make sure I'm not missing anything and would rather use the propensity score used to generate the weights so I know I'm comparing related quantities)?
Thanks so much!
Danny
Hi Danny,
For continuous treatments, I don't include a generalized propensity score (GPS) in the output because it doesn't have the same interpretation as a propensity score for categorical treatments and can't really be used like the propensity score in regression adjustment as you are proposing. See Hirano & Imbens (2005). If you want to implement a Hirano & Imbens style GPS regression, you will have to program it yourself or look in another package. If you want to perform a sensitivity analysis, I recommend using other types of weights rather than other methods of adjusting for the GPS.
Thanks, Noah!