0

I have a 4-level categorical variable (assume levels a,b,c,d) as my exposure. My initial interest was to estimate associations between three levels compared to a reference level (specifically: a vs d, b vs d and c vs d) in relation to a time-to-event outcome. I used time-varying Cox to do this so I ended up with 3 HRs. Assuming I am also interested in testing whether or not the 3 HRs are different to each other through a global test (I am not a great fan of statistical tests when I can simply compare point estimates but it was a request from someone). So the null hypothesis here is: HR1=HR2=HR3 and the alternative is that at least one of the HR is different. What test could I use here? I am using SAS phreg by the way, would be great if there was an embedded approach to this. Thanks

1 Answers1

0

It's usually considered best practice to start with a global test before you proceed to paired comparisons, hence the request for a global test. For example, I assume that you found your Cox model to be significant versus a null model before you went on to your comparisons against the reference.

A simple and logically equivalent way to accomplish what you want would be to do a separate reduced model in which exposures a, b, and c are all coded the same, with d maintained as the reference. Now there's just the reference and a single other "exposure." Then do a standard Anova test of that reduced model against the full model you just described, in which a, b, and c are distinguished. That will tell you whether distinguishing those 3 exposures adds anything significant to the model.

Another way to perform a joint test on multiple parameter estimates is a Wald test. That test takes into account the covariances among the coefficient estimates. The test should be performed on the Cox regression coefficients, not the HRs obtained by exponentiating them, as the regression coefficient estimates are what can reasonably be assumed to have the joint normal distribution required by the test. The hypothesis of equal HRs then is a test that all of the pairwise differences in regression coefficients equal 0.

I don't use SAS and software-specific questions are off-topic on this site, so I can't give a particular command to use for either approach. Anova tests of 2 nested models, the first suggestion, are pretty standard. For the Wald test you will have to read the manual carefully, as "Wald test" is a general type of test that can be applied to a very wide set of circumstances. Or you could just do your own Wald test, applying the formula in the Wikipedia page linked above together with the coefficient covariance matrix from your full model.

EdM
  • 57,766
  • 7
  • 66
  • 187
  • Thank you EdM. That's really nicely explained. I had initially thought of doing an LRT, as you suggested ANOVA, but I wasn't sure if this answers my question. If the model with more parameters fits better..does this tell me that at least of the HRs is different to the rest? It makes sense but is it possible to have a better fit for other reasons? Thanks again – blackandwhite Aug 12 '20 at 16:49
  • @blackandwhite the Wald test is a more direct test of your specific multiple hypotheses, but the LRT (how ANOVA would be implemented here) might be more informative. I suppose in principle you could get a significant LRT without finding "statistically significant" differences among those 3 coefficients, but that result would indicate that there is some advantage to distinguishing among those 3 exposures (enough advantage to be worth using up 2 more degrees of freedom), which could be a stimulus to further research. – EdM Aug 12 '20 at 17:35
  • that makes sense, thank you!! – blackandwhite Aug 12 '20 at 17:48
  • one last question, if you don't mind: are these two models nested? I think they are not in the traditional sense (ie, one being a simpler model relative to the original) because the single coefficient in the reduced/simpler model is replaced by three other ones. I wonder if the LRT is a good option here because of that – blackandwhite Aug 13 '20 at 14:34
  • @blackandwhite I think about it the other way around: the three coefficients in the complex model are replace by a single coefficient in the simpler model. There's no crossing of cases among the combinations of predictors, which is what makes comparisons of non-nested models impossible. So to my mind the simpler model is nested within the complex model. And the Wald test is always there as a possibility. I think there is just the usual difference between Wald tests and likelihood-ratio tests for evaluating models fit by (partial) maximum likelihood. But I could be wrong. – EdM Aug 13 '20 at 14:51
  • @blackandwhite I think about this like [this example](https://stats.stackexchange.com/a/6565/28500) with an indicator variable for having a loan and a separate predictor for loan amount. In your case the simple model is a model with just the indicator variable, now representing whether there is a "treatment" (exposure other than the reference `d`). The full model adds a treatment-type categorical predictor (with `d` as reference) that is analogous to the loan-amount predictor in that example. The indicator-only model is nested inside the model with the added treatment-type predictor. – EdM Aug 13 '20 at 17:05
  • I think I see your point. The "indicator" variable is 1 when all other 3 coefficients are 0, and 0 if these are not 0. That makes sense. Thanks so much for explaining this – blackandwhite Aug 14 '20 at 16:00