p-value of Logrank-Test

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

p-value of Logrank-Test

Verena Hoffmann
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?

Thanks in advance!

Verena Hoffmann

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: p-value of Logrank-Test

Thomas Lumley
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html