LR test in Cox PH model for difference in survival distributions 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.

*

*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.

*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!

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.
