Hi all,
One of the cohort studies I have carried out recently involved examining the association between post-diagnostic beta-blocker use and breast cancer outcomes in a cohort of breast cancer patients. I have used a Cox model to model beta-blocker use and treated it as a time-varying covariate.
I have tested the PH assumption for beta-blocker use through scaled Schoenfeld residuals, and the assumption seems to hold up (a slope of near enough to 0, as well as a p-value of >0.05 when running
). I am now wondering about how to test the PH assumption for multi-level categorical covariates, and if this is possible in STATA. I had a lengthy discussion with a user over at stats.stackexhange (https://stats.stackexchange.com/ques...1180203_631711), and it seems like testing the assumption for covariates which aren't our primary variable/exposure of interest isn't quite as important, but I'm still interested in examining them. I would like to know if there is a way to test this globally for categorical covariates. When I run
in STATA, I get tests of each different level of a categorical covariate compared to a base level, but there is no 'overall' test carried out. The user I was exchanging with on stackexchange said the following:
"Whether and how to stratify is a judgment call for which there is no definitive right/wrong answer. It's hard to evaluate p values without knowing how many cases are in each category and seeing the curves of residuals over time. The cox.zph() function in R has a terms argument that allows for a joint test over all levels of a multi-level categorical predictor; the smoothed plot of residuals then evaluates the entire linear predictor associated with all levels together. You might ask a STATA help group if that's available in that software"
As such, I was wondering if there was an equivalent test I can implement in STATA for these categorical predictors?
Warm regards, Oliver
One of the cohort studies I have carried out recently involved examining the association between post-diagnostic beta-blocker use and breast cancer outcomes in a cohort of breast cancer patients. I have used a Cox model to model beta-blocker use and treated it as a time-varying covariate.
I have tested the PH assumption for beta-blocker use through scaled Schoenfeld residuals, and the assumption seems to hold up (a slope of near enough to 0, as well as a p-value of >0.05 when running
Code:
estat phtest
Code:
estat phtest, detail
"Whether and how to stratify is a judgment call for which there is no definitive right/wrong answer. It's hard to evaluate p values without knowing how many cases are in each category and seeing the curves of residuals over time. The cox.zph() function in R has a terms argument that allows for a joint test over all levels of a multi-level categorical predictor; the smoothed plot of residuals then evaluates the entire linear predictor associated with all levels together. You might ask a STATA help group if that's available in that software"
As such, I was wondering if there was an equivalent test I can implement in STATA for these categorical predictors?
Warm regards, Oliver