I am using the -teffects ipwra- command to perform analysis on an observational dataset. The command is straightforward and very useful. However, part of my project is investigating whether any effect modification exists for subgroups of the main dataset. For example, whether there is an effect modification of sex on the primary outcome, and whether this effect is statistically significant.
Normally, I would do this by incorporating an interaction term in a logistic regression model (for a binary outcome variable). However, using the -teffects- commands, it is not clear to me how I would investigate this.
Here is an example, where primary and sex are binary indicator outcome variables, group is a binary treatment group variable, and age is a continuous variable:
I start by investigating the overall treatment effect, after controlling for sex and age (both sex and age are potentially predictors of both treatment and outcome):
I then investigate the treatment effects in each of the subgroups of sex, first for females:
and then for males:
This gives me the estimated treatment effect (and 95% CIs) for each subgroup of sex.
My question is, how do I investigate whether or not the difference between sexes is statistically significant?
Many thanks for any help with this.
Phil
Normally, I would do this by incorporating an interaction term in a logistic regression model (for a binary outcome variable). However, using the -teffects- commands, it is not clear to me how I would investigate this.
Here is an example, where primary and sex are binary indicator outcome variables, group is a binary treatment group variable, and age is a continuous variable:
I start by investigating the overall treatment effect, after controlling for sex and age (both sex and age are potentially predictors of both treatment and outcome):
Code:
teffects ipwra (primary i.sex c.age, logit) (group i.sex c.age, logit), ate Iteration 0: EE criterion = 5.391e-16 Iteration 1: EE criterion = 2.137e-29 Treatment-effects estimation Number of obs = 464 Estimator : IPW regression adjustment Outcome model : logit Treatment model: logit ---------------------------------------------------------------------------------------------- | Robust primary | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------------------+---------------------------------------------------------------- ATE | group | (sevoflurane vs isoflurane) | -.0546617 .0408894 -1.34 0.181 -.1348034 .0254801 -----------------------------+---------------------------------------------------------------- POmean | group | isoflurane | .3005392 .0297764 10.09 0.000 .2421786 .3588999 ----------------------------------------------------------------------------------------------
Code:
. teffects ipwra (primary c.age, logit) (group c.age, logit) if sex==1, ate Iteration 0: EE criterion = 7.012e-17 Iteration 1: EE criterion = 1.907e-32 Treatment-effects estimation Number of obs = 97 Estimator : IPW regression adjustment Outcome model : logit Treatment model: logit ---------------------------------------------------------------------------------------------- | Robust primary | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------------------+---------------------------------------------------------------- ATE | group | (sevoflurane vs isoflurane) | -.1590846 .0898707 -1.77 0.077 -.335228 .0170589 -----------------------------+---------------------------------------------------------------- POmean | group | isoflurane | .3737519 .0677898 5.51 0.000 .2408862 .5066175 ----------------------------------------------------------------------------------------------
Code:
. teffects ipwra (primary c.age, logit) (group c.age, logit) if sex==2, ate Iteration 0: EE criterion = 9.539e-25 Iteration 1: EE criterion = 6.300e-33 Treatment-effects estimation Number of obs = 367 Estimator : IPW regression adjustment Outcome model : logit Treatment model: logit ---------------------------------------------------------------------------------------------- | Robust primary | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------------------+---------------------------------------------------------------- ATE | group | (sevoflurane vs isoflurane) | -.0268644 .0457452 -0.59 0.557 -.1165234 .0627947 -----------------------------+---------------------------------------------------------------- POmean | group | isoflurane | .2807117 .0329393 8.52 0.000 .2161519 .3452715 ----------------------------------------------------------------------------------------------
My question is, how do I investigate whether or not the difference between sexes is statistically significant?
Many thanks for any help with this.
Phil
Comment