hoping the hive can help me understand this.
I want to study the effect of a continuous variable (x1) on survival, accounting for interaction between x1 and another continuous variable (x2). My full model looks like this
full_model = coxph(Surv(time, status) ~ x1 + x2 + age + sex + dummy_var1 + dummy_var2 + dummy_var3 + dummy_var4 + x1:x2 + offset(dummy), data=outcome)
From summary(coxph()$coefficients)), I obtain a p-value for the x1:x2 which was 0.0004.
I then tested the likelihood ratio between the full model and the reduced model
reduced_model=coxph(Surv(time, status) ~ x1 + x2 + age + sex + dummy_var1 + dummy_var2 + dummy_var3 + dummy_var4 + offset(dummy), data=outcome)
lrtest(reduced_model,full_model)
The p-value I obtained was 6.4E-172.
I performed this interaction analysis in a few different ways. Another method I used was coding X2 as binary (low vs high = 0 vs 1). Again, I receive a p-value for the interaction term (continuous x binary) of 0.03 from summary(coxph), but the LR p-value was 6.4E-158.
Why are the p-values different between the interaction coefficient and the LR test? Which one really tells me if there's an interaction?
Thanks in advance!
I am not sure this question should be posted here. Probably posting on CrossValidated would get you some answers more easily!
That aside, the p-value you get from the function
summaryof your model tests the hypothesis that the coefficient is equal to 0 (it's Wald test). On the other hand, the likelihood ratio test compares two models, one more simple (reduced) and one more complicated (full model) testing if their likelihoods are different enough. This means you are essentially testing two different hypotheses, even though you are only interested in knowing whatever your interaction term is significant or not. That is why you get different p-value!To learn about testing interaction in the Cox model in R, I followed some material (here) from Paul Dickman website.