Thanks Mayeul, I actually would like to test each variable individually and use those have low p-value to build a classifier (not in cox model). Therefore, I need to write a function to subset those low p-value variables, instead of putting them as covariates. Any ideas?
Chris -----Original Message----- From: Mayeul KAUFFMANN [mailto:[EMAIL PROTECTED] Sent: Thursday, August 12, 2004 8:17 PM To: [EMAIL PROTECTED] Subject: [R] coxph question > I have many variables to test using cox model (coxph), and I am only interested in those variables with p value less than 0.01. Is there a quick way to do this automatically instead of looking at the output of each variable? > Chris I guess you need covariate selection. for a lengthy discussion of another method (AIC/BIC), look at last month archive: https://www.stat.math.ethz.ch/pipermail/r-help/2004-July/subject.html#53519 and try using > library(MASS) > stepAIC (...) Most of the time, it starts removing the covariate with the lower p-value. Mayeul KAUFFMANN Univ. Pierre Mendes France Grenoble - France ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html