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.

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!

• The LR test you describe in 1. could be done by comparing a model with both predictors and a model with gender only. Commented Apr 20, 2022 at 11:27
• @ocram but wouldn't that be testing the impact of height on the model, rather than gender? Commented Apr 20, 2022 at 11:30
• You are right, I read to quickly ! Commented Apr 20, 2022 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. Commented Apr 20, 2022 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? Commented Apr 20, 2022 at 16:13