On Oct 15, 2010, at 9:21 AM, ?hagen Patrik wrote: > > Dear List, > > I each iteration of a simulation study, I would like to save the p- > value generated by "coxph". I fail to see how to adress the p-value. > Do I have to calculate it myself from the Wald Test statistic?
No. Look at help(coxph.object). This list the components of a coxph object and explains what they are. You will find that fit <- coxph(..... fit$wald.test contains the Wald test statistic. I prefer the likelihood ratio test myself 2*diff(fit$loglik), with fit$df degrees of freedom. Hunting with str(...) is a good strategy, but even better is the documentation (when it exists). Terry T. ______________________________________________ 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.