[R] log rank test p value

From: Murray Pung <mcpung_at_gmail.com>
Date: Wed, 16 May 2007 11:54:44 +1000


How can I get the Log - Rank p value to be output?

The chi square value can be output, so I was thinking if I can also have the degrees of freedom output I could generate the p value, but can't see how to find df either.

> (survtest <- survdiff(Surv(time, cens) ~ group, data = surv,rho=0))
Call:
survdiff(formula = Surv(time, cens) ~ group, data = surv, rho = 0)

         N Observed Expected (O-E)^2/E (O-E)^2/V
group=1 20       16     11.0      2.23      4.64
group=2 20       12     17.0      1.45      4.64

 Chisq= 4.6 on 1 degrees of freedom, p= 0.0312

> survtest$chisq

[1] 4.641028

> survtest$df

NULL

-- 
Murray Pung
Statistician, Datapharm Australia Pty Ltd
0404 273 283

	[[alternative HTML version deleted]]

______________________________________________
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.
Received on Wed 16 May 2007 - 01:58:40 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 16 May 2007 - 14:31:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.