Survival analysis interaction interpretation: interaction is insignificant, but pairwise comparison does hold significance

I'm new with survival analyses, and have been breaking my head over this for a while, so I hope someone can explain this in a simple manner:

Variable HR
Gender(Female) 1.391*
Treat (Yes) 0.544***
Gender*Treat 1.149

So, the interaction term is not significant, does this simply mean that the effect of treatment is not different for men and women? Or, does the interaction effect now show the effect of treatment for women, while Treat shows the effect for men, meaning that treat does nothing for women but does for men? Similarly, does the HR of gender now ONLY represent the effect of gender in the non-treatment group?

I further get confused by the fact that the pairwise comparisons of these groups (malextreat, malexcontrol, femalextreat, femalexcontrol) dó hold significant differences. How does that work if the interaction is not significant?

Part of this is a general issue with interactions in regression models, not specific to Cox models. An interaction term is the extra difference for that combination of predictors over what you would predict from each individual coefficient alone.

Start with the baseline condition. The baseline condition for comparison here is untreated males. The HR for Gender(female) is with respect to males under no treatment conditions. That for Treat(yes) is with respect to no treatment for males.

As you are working with hazard ratios you multiply the individual ratios to get estimates for different conditions.* What you would predict based on those individual Gender and Treat coefficients alone for HR versus the baseline would be 1.391 * 0.544 = 0.757. The interaction term means that for the combination of treatment with female you also have to multiply by the interaction HR, 1.149, so that the HR for treated females versus untreated males is 0.757 * 1.149 = 0.869. For treated females versus untreated females, the HR is 0.544 * 1.149 = 0.625

The behavior you describe, an "insignificant" interaction but some significant pairwise tests consistent with an interaction, has a lot to do with the arbitrary p < 0.05 cutoff for "significance." It's possible for an effect to be "important" without being "significant."

The pairwise tests involve the covariances among the regression coefficient estimates, not just the displayed individual coefficient standard errors. The covariance matrix isn't typically displayed in the output of a model, so you can't evaluate the "significance" of particular comparisons by looking at displayed coefficients and standard errors.

If you had specific pairwise comparisons in mind before looking at the results and did appropriate multiple-comparison corrections, you don't need to worry about the "insignificant" interaction term.

One extra consideration with Cox models or other models fit by maximum (partial) likelihood: the coefficient standard errors and p-values are generally based on Wald estimates. With small data sets, likelihood-ratio estimates are more reliable. See this page for an introduction to tests for models fit that way.

Likelihood-ratio tests are typically reported for the entire model but not for individual coefficients. Likelihood-ratio confidence intervals and tests for an individual coefficient require re-fitting the model over a range of potential coefficient values. Therneau and Grambsch show how to do such calculations in Section 3.4.1. I understand that SAS can produce such individual coefficient tests directly.

*I strongly recommend in the future that you work with the "coefficient" values, the log-hazards, instead of hazard ratios. The coefficients then add and their (co)variances can more easily be combined; that's how the pairwise comparisons were presumably done by the software before exponentiating to get the displayed HR and their confidence intervals.