2

Say you have a Cox proportional hazards model with 1 covariate, gender (coded 0 and 1 for male and female). The R summary will give a likelihood ratio test, and p < 0.05 indicates that the survival distribution is different for the two genders, because it's essentially comparing the "null" baseline model with gender = 0 to the "full" model where you specify gender is female. (At least this is my understanding).

Now say you introduce a continuous height variable.

  1. How do you test whether the survival distribution differs between males and females after controlling for height? I think one way is for you fit two models, one with both height and gender, and one with just height, and doing a likelihood ratio test between the two, but it's not like gender is 0 in one model and 1 in the other; gender is either 0 or 1 in each model. It seems like it wouldn't test for a difference between male/female at all, because if you compare both models when gender is 0, then you just have the same model.
  2. I've read that the LR test can help you figure out if an interaction term is needed. How would that be accomplished with this simple example? Which models do you compare to calculate the statistic in this case?

Any help would be appreciated!

fmtcs
  • 525
  • The LR test you describe in 1. could be done by comparing a model with both predictors and a model with gender only. – ocram Apr 20 '22 at 11:27
  • @ocram but wouldn't that be testing the impact of height on the model, rather than gender? – fmtcs Apr 20 '22 at 11:30
  • You are right, I read to quickly ! – ocram Apr 20 '22 at 12:27
  • A model with both predictors returns stats (parameter estimate, confidence interval, f-test, ...) on the gender effect while controlling for the other predictor. – ocram Apr 20 '22 at 12:28
  • @ocram That's what I was thinking also, but to actually test whether the curves for male vs female are different, what can you do? – fmtcs Apr 20 '22 at 16:13
  • My guess is that the coefficient for sex taken from a single model that contains sex and height will answer your question. If you are interested in the exact shape of the time to event, you may need to plot KM curves for each combination of sex and categorized height (not recommended). – Todd D Apr 20 '22 at 20:19

1 Answers1

1

One way to "control for" a second variable (like height) when you are interested in a primary variable (like sex) is to build a model that contains both and test the remaining "significance" of the primary variable. The simplest way to do this with a Cox model is to perform a Wald test on its coefficient. If you insist on a likelihood-based test, you can perform a profile-likelihood test on the coefficient instead. (That's implemented efficiently in SAS; see here for how to do that in R with a Cox model.)

That leads to the question about whether "controlling for" height should be done with a simple term or via an interaction with sex. A likelihood-ratio test is easily done to evaluate this, by comparing a model with the interaction against a model with both predictors but without the interaction.

If the interaction is significant then there really is no single answer to the question of the association between sex and survival, however. In that case the association of sex with survival depends on the value of height (and vice-versa). You could examine the differences between specific scenarios, for example males versus females at each of their population-average heights.

EdM
  • 92,183
  • 10
  • 92
  • 267
  • 1
    Please see https://stats.meta.stackexchange.com/questions/6304/my-upvoting-policy, when you find a question sufficiently clear to write an answer, consider to upvote the question! – kjetil b halvorsen Apr 21 '22 at 15:00