I ran a cox model with an interaction between two categorical variables (sex and treatment group) included like:

coxph(Surv(time, status) ~ sex*treat+age+edu, data=data)

And there is no significant interaction (coef=0.11, p = .30) but I find it odd that when I actually run the same model separated by sex, treatment effect is significant and very strongly among women (coef=-0.22, p = .005), but not at all among men (coef = -0.03, p = .84).

I'm wondering if this looks ok, or if there's something wrong with the way I tested it. With such a big difference, I keep wondering why the interaction didn't come out as significant. Could this be because of the difference in the DV among men and women? (likelihood of getting diagnosed?)

Among women, number of event is almost 700 out of 2000, among men, it's 300 out of 2300, so very different.


The models are not equivalent. When you split the data set you implicitly fit the model below (although you won't get coefficients for sex and the interactions in the subset models).

In your original model you assume that age and edu have the same effect in both sex groups, in the subsets models (and the model below) you allow age and edu to have different effects depending on sex. Additionally the subset models allow the baseline hazard to be different (and non-proportional).

So the model you fit using subsets is more something like this:

coxph(Surv(time, status) ~ strata(sex) + treat + age + edu + (treat + age + edu):sex, data = data)
  • $\begingroup$ Oh I see. Thanks a lot! Is it okay then to just report the subset models?? (i.e., women and men separately) or would that be problematic?? $\endgroup$
    – llbia
    Jun 28 '19 at 22:08
  • $\begingroup$ Can I even trust that interaction p value?? Is that even the right way to test interaction? I kind of get what you mean by the baseline hazard being different... but I’m not sure if then the interaction (the way I tested it) is really testing whether the treatment effects differ by gender $\endgroup$
    – llbia
    Jun 28 '19 at 23:20
  • $\begingroup$ Well, all of these questions are not trivial to answer and depend on context and goal of the analyses. When in doubt I'd advice to post another Q giving more detail about your analysis goals and ask for help on how to achieve that. $\endgroup$
    – adibender
    Jun 30 '19 at 13:06
  • $\begingroup$ The general danger is to try different analyses until you get a result you like (e.g. initial model vs. subset models). In any case I would report all analyses you tried and discuss the different results. Based on this exploratory analyses it would be best to then test your conclusion from exploration on a new, independent data set. $\endgroup$
    – adibender
    Jun 30 '19 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.