# Is it possible to estimate IPTW in two different subgroups to evaluate interaction? (Subgroup Balancing Propensity Score?)

This questions needs a toy example to be explained. I apologize if the question is not clear.

Suppose we have an observational study in which we want to evalute the association between exposure to Drug A and the risk of cancer. The two groups (exposed vs. non exposed) are fairly balanced according to baseline characteristics, and a Cox-regression model (adjusted for potential confounders such as age, smoking status etc.) found that Drug A is indeed associated with a reduced risk of cancer.

Now, we want to evaluate whether the sex has an interaction on the association between exposure to drug A and the outcome.

When we evaluate the baseline characteristics, we found that among those who received Drug A, males were older and more likely smokers, as well as burdened with more comorbidities. On the other side, among those who did not received the Drug A, males are indeed younger, less frequently smoker than females, and with less comorbidities. In other words, not only the baseline characteristics are imbalanced between sex; but the imbalance is of "opposite sign" for most of those among those who vs. who did not received the drug.

After running a Cox-model, adjusted for the aforementioned covariates (and others), we unsurprisingly found that interaction is significant: Drug A has a strong association with the outcome in females, while no association at all was found in men (p for interaction <0.001).

However, it is conceivable that the imbalance in the baseline characteristics have played a role (i.e., if the two population, males and females, were balanced both in those who received Drug A and who did not, the interaction may not have been significant).

How to handle a situation like that?

I've mentally run through a number of options.

• I am concerned that the adjustment for the baseline characteristics may not "be enough" to account for the fact that females and males present severe different characteristics among the treatments group, and that the I dont know if I am right, obviously.
• I've thought to an IPTW-approach. However, calculating IPTW on the treatment may not be appropriate here: the imbalance is not related to have received the Drug, but instead may be due to the sex:drug interactions group
• Is there a way to fit two different IPTW (one in the groups exposed to Drug A, and one in the non-exposed group), so that I may end with two groups (exposed vs. non exposed) in which the two sexes are not severely imabalanced for baseline characteristics?

EDIT: It turns out that the third idea of mine was similar to the approach of "Subgroup Balancing Propensity Score" which is mentioned in here Should a variable one is interested in examining for effect modification be used in a propensity model to balance covariates?.

However, I am still unsure that this method apply here, so open to answers.

• Your idea that "The imbalance is not related to have received the Drug, but instead among the sex:drug interactions group" might be getting in your way. There clearly was imbalance in terms of the comorbidity:age:smoking variables among males with respect to the treatment status. There's no reason to omit such interactions in IPTW calculations. It's also possible that you need a richer survival model that takes even more interactions into account, like drug:smoking and drug:comorbidity.
– EdM
May 13 at 18:31
• The reason why I wanted not to focus on the contribution of a single factor-imbalance, is that there are several covariates that are imbalanced between the sexes when stratifying for having received the Drug A. I cannot easily figure out what is the most relevant among those, and therefore I would like to balance groups using IPTW - I am sorry if the scenario was not clear from the "toy" example. May 13 at 22:48

calculating IPTW on the treatment may not be appropriate here: the imbalance is not related to have received the Drug, but instead may be due to the sex:drug interactions group

That should still allow for inverse propensity of treatment weighting (IPTW), provided that you have a rich enough propensity-score model. The model might include interactions of interest, for example sex:cormorbidity, sex:smoking, age:smoking, etc.

With respect to propensity-score models, Frank Harrell says: "we usually use a 'kitchen sink' approach." Noah Greifer reminds us: "you should include all pre-treatment causes of the outcome in the propensity-score model, even if they don't cause selection into treatment."

Thus, if interactions are important in the outcome model, they should be part of the propensity-score model too. You might consider gradient-boosted propensity-score models, which can evaluate multiple interactions automatically. The R twang package provides for such models; the WeightIt package provides extended functionality for that and other propensity-modeling approaches.

I don't have experience with the "Subgroup Balancing Propensity Score." It seems to provide you a choice of whether overall or within-group weights work better, so I don't see that there's much risk in evaluating it. The WeightIt package provides an interface to it.

All that said, heed @Noah's warning:

There are so many ways of estimating propensity scores and using them that I really don't think someone with no expertise on this matter should be performing this analysis without the guidance of a trained statistician.

As you seem to have an observational study in which older and sicker males were more likely to receive the drug in question, that's particularly crucial.