Hi there,

I perform a stratified cox and then I need the strata as a  numeric array 
"straft.ln"
ft.ln <- 
coxph(Surv(times,deaths)~ages+chemos+chemos:f1+chemos:f2+horms+horms:f1+horms:f2+grades+grades:f1+grades:f2+positives+positives:f1+positives:f2+sizes+sizes:f1+sizes:f2+strata(stra),data=ddd)

basehazzft.ln=basehaz(ft.ln,centered=FALSE)
H0ft.ln=c(basehazzft.ln[,1])
timeft.ln=c(basehazzft.ln[,2])
straft.ln=c(basehazzft.ln[,3])

I notice that basehazzft.ln[,3] is not the same with straft.ln with respect to 
the values i.e.:

(basehazzft.ln$stra[1])
[1] stra=1
134 Levels: stra=1 stra=10 stra=100 stra=101 stra=102 ... stra=99
> c(basehazzft.ln$stra[1])
[1] 1


so far so good but:

(basehazzft.ln$stra[285])
[1] stra=2
134 Levels: stra=1 stra=10 stra=100 stra=101 stra=102 ... stra=99
> c(basehazzft.ln$stra[285])
[1] 47

while the desired value is 2, I get a 47. What am I doing wrong? I tried the 
as.numeric function but I have the same problem..

I just want instead of the [ "stra=1" "stra=1" "stra=1" etc]  the [1,1,1 etc]

Thanx in advance for any answers!




      
___________________________________________________________ 
×ñçóéìïðïéåßôå Yahoo!; 
ÂáñåèÞêáôå ôá åíï÷ëçôéêÜ ìçíýìáôá (spam); Ôï Yahoo! Mail 
äéáèÝôåé ôçí êáëýôåñç äõíáôÞ ðñïóôáóßá êáôÜ ôùí åíï÷ëçôéêþí 
ìçíõìÜôùí http://login.yahoo.com/config/mail?.intl=gr

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to