[R] stratified variables in a cox regression
Bob Green
bgreen at dyson.brisnet.org.au
Sat Mar 28 12:28:13 CET 2009
>Hello,
I am hoping for assistance in regards to examining the contribution
of stratified variables in a cox regression. A previous post by Terry
Therneau noted that "That is the point of a strata; you are declaring
a variable to NOT be proportional hazards, and thus there is no
single "hazard ratio" that describes it". Given this purpose of
stratification, in the process of building and testing a model, is
there a way to test if the stratified variables do add anything to a model?
Two variables were stratified because it was considered that the
proportional hazards assumption was not met (via inspection of
log-log plots where the curves crossed. I have examined. There were
no cox.zph values that were statistically significant. I did produce
plots but found these difficult to interpret). The statistician I
have been consulting said that in SPSS when variables are stratified
a model is produced for each different strata (e.g a separate
analysis for male and female if a gender variable were stratified). I
have not seen this approach used in R examples I have seen.
Below is my current code - is there a method to test whether the
stratified variables should be included in the final model at all?
library(survival)
recidivismv <- read.csv("g://Chapsurv_v.csv",header=T)
cox.V2 <- coxph(Surv(intDaysUntilFVPO, Event_v) ~ intAgeAtMHCIndex +
PRE + group + strata (MHC, strGender), data = recidivismv)
regards
Bob
More information about the R-help
mailing list