[R] p-value of Logrank-Test
Thomas Lumley
tlumley at u.washington.edu
Tue Jan 3 22:46:31 CET 2006
On Tue, 3 Jan 2006, Verena Hoffmann wrote:
> Hello!
>
> I want to compare two Kaplan-Meier-Curves by using the Logrank-Test:
>
> logrank(Surv(time[b], status[b]) ~ group[b])
>
> This way I only get the value of the test-statistic, but not the p-value.
>
> Does anybody know how I can get the p-value?
>
You don't say where you found the logrank() function, but
a) The survdiff() function in the survival package gives p-values as well
as test statistic for the logrank test
b) The test statistic presumably has a chisquare null distribution, so
pchisq() would turn it into a p-value.
-thomas
More information about the R-help
mailing list