[R] Cox proportional hazards model

Min-Han Tan minhan.science at gmail.com
Thu Sep 23 00:20:28 CEST 2004

Good afternoon,

I am currently trying to do some work on survival analysis.

- I hope to seek your advice re: 2 questions (1 general and 1 specific)

(1) I'm trying to do a stratified Cox analysis and subsequently
plot(survfit(object)). It seems to work for some strata, but not for

I have tumor grade, which is a range of 1 - 4. 

When I divide this range of 1:4 into 2 groups, it works fine for
strata(grade>2) and strata(grade > 3). However, if I do a
strata(grade>1), there is an error when I do a survfit( <coxph object>

Call: survfit.coxph(object = s)

Error in print.survfit(structure(list(n = as.integer(46), time = c(22,  : 
        length of dimnames [1] not equal to array extent

(2) As a general question, is it possible to distinguish between
confounding and interaction in the Cox proportional hazards model?



More information about the R-help mailing list