Re: [R] cox regression extract strata as numeric

2009-10-28 Thread Terry Therneau
-- begin included message --- > (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..

Re: [R] cox regression extract strata as numeric

2009-10-27 Thread Steven McKinney
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of ?e???da? ?pa?t?? > Sent: Tuesday, October 27, 2009 3:51 PM > To: r-help@r-project.org > Subject: [R] cox regression extract strata as numeric > > >

[R] cox regression extract strata as numeric

2009-10-27 Thread Λεωνίδας Μπαντής
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)