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", sep=''))) There is no error message generated in R, but R ignores the reference category defined with paste in the summary function for the cph model. The output uses the "1st Quartile" as the reference category to calculate hazards for some of the variables defined by i, but not all of them. Any help would be greatly appreciated. thanks Brian J. Wells, MD, MS Research Associate Quantitative Health Sciences Cleveland Clinic =================================== P Please consider the environment before printing this e-mail Cleveland Clinic is ranked one of the top hospitals in America by U.S. News & World Report (2007). Visit us online at http://www.clevelandclinic.org for a complete listing of our services, staff and locations. Confidentiality Note: This message is intended for use only by the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. Thank you.
BEGIN:VCARD VERSION:2.1 N:Brian J. Wells;;;Dr. FN:Dr. Brian J. Wells ORG:Cleveland Clinic TITLE:Research Associate TEL;WORK;VOICE:216-444-9933 TEL;CELL;VOICE:440-308-5561 TEL;WORK;FAX:216-445-2781 ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Cleveland Clinic=0D=0ADepartment of Quantitative Health Sciences=0D=0A9500= Euclid Ave. Wb-4;Cleveland;OH;44195;United States of America LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Cleveland Clinic=0D=0ADepartment of Quantitative Health Sciences=0D=0A9500 E= uclid Ave. Wb-4=0D=0ACleveland, OH 44195=0D=0AUnited States of America EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20080312T184612Z END:VCARD
______________________________________________ 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.