Re: [R] Defining reference category for a cph model summary inside of a "for" loop

2008-03-31 Thread Frank E Harrell Jr
ll estimate the ratio of hazards when X>Q3 to when X -Original Message- > From: Frank E Harrell Jr [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 30, 2008 9:14 AM > To: Wells, Brian > Cc: r-help@r-project.org > Subject: Re: [R] Defining reference category for a cph mo

Re: [R] Defining reference category for a cph model summary inside of a "for" loop

2008-03-31 Thread Wells, Brian
Message- From: Frank E Harrell Jr [mailto:[EMAIL PROTECTED] Sent: Sunday, March 30, 2008 9:14 AM To: Wells, Brian Cc: r-help@r-project.org Subject: Re: [R] Defining reference category for a cph model summary inside of a "for" loop Wells, Brian wrote: > Dr. Harrell, > Thank

Re: [R] Defining reference category for a cph model summary inside of a "for" loop

2008-03-30 Thread Frank E Harrell Jr
Sent: Friday, March 28, 2008 8:34 PM > To: Wells, Brian > Cc: r-help@r-project.org > Subject: Re: [R] Defining reference category for a cph model summary > inside of a "for" loop > > Wells, Brian wrote: >> I have the following code. >> >> >>

Re: [R] Defining reference category for a cph model summary inside of a "for" loop

2008-03-29 Thread Wells, Brian
AIL PROTECTED] Sent: Friday, March 28, 2008 8:34 PM To: Wells, Brian Cc: r-help@r-project.org Subject: Re: [R] Defining reference category for a cph model summary inside of a "for" loop Wells, Brian wrote: > I have the following code. > > > > > >> f <- cp

Re: [R] Defining reference category for a cph model summary inside of a "for" loop

2008-03-28 Thread Frank E Harrell Jr
Wells, Brian wrote: > I have the following code. > > > > > >> f <- cph(formula = Surv(TimeToDeath, Dead == "Yes") > ~1,data=single.dat, x=T, y=T, surv=T) > >> for(i in c('A', 'B', 'C', 'D', 'E', 'F')){ > >> f <-update(f,as.formula(paste('Surv(TimeToDeath, Dead == > "Yes")~',i,sep=''))) >

[R] Defining reference category for a cph model summary inside of a "for" loop

2008-03-28 Thread Wells, Brian
I have the following code. > f <- cph(formula = Surv(TimeToDeath, Dead == "Yes") ~1,data=single.dat, x=T, y=T, surv=T) > for(i in c('A', 'B', 'C', 'D', 'E', 'F')){ > f <-update(f,as.formula(paste('Surv(TimeToDeath, Dead == "Yes")~',i,sep=''))) > print(summary(f, paste(i,"=1st Quartile",