[R] retrieve p-value from a cox.obj

clearsky haiyingwithu at gmail.com
Wed Aug 29 19:35:13 CEST 2007


Thanks, Bert . It is a lot help!


gunter.berton wrote:
> 
> str() is your friend. It tells you about the structure of any R object,
> from
> which you can usually glean what you need to know to get what you want. It
> is often useful to use it on summary(object) rather than on the object, as
> the summary method for an (S3) classed object often contains what you're
> looking for.
> 
> Less generally, names() and as.list() can sometimes get you what you want
> also.
> 
> Alternatively, check the summary.coxph() code (survival:::summary.coxph,
> as
> it's hidden in the namespace). It is clear there how to get what you want,
> either direct from the fitted object or from the summary.coxph object.
> 
> Bert Gunter
> Genentech Nonclinical Statistics
> 
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of clearsky
> Sent: Wednesday, August 29, 2007 8:41 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] retrieve p-value from a cox.obj
> 
> 
> I have a cox.obj named obj, 
> obj <- coxph( Surv(time, status) ~ group, surv.data)
> now I want to retrieve the p-value from obj, so that I can run this
> hundreds
> of times and plot out the distribution of the p-value. could anyone tell
> me
> how to get p-value from obj?
> 
> thanks,
> 
> -- 
> View this message in context:
> http://www.nabble.com/retrieve-p-value-from-a-cox.obj-tf4348520.html#a123896
> 52
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/retrieve-p-value-from-a-cox.obj-tf4348520.html#a12392027
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list