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 Answers
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.
- 92,183
- 10
- 92
- 267
d). The full model adds a treatment-type categorical predictor (withdas 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