Description Usage Arguments Value Author(s) See Also
Extracts p-value from a logrank test
1 2 |
x |
Logrank test result, as returned by |
log_p |
Whether to return the logarithm of the p-value. |
... |
Ignored. Kept for S3 consistency. |
p-value. if(requireNamespace("survival", quitely = TRUE))
y <- survival::Surv(time=1:100, event=rep(1:0, each=50)) groups <- rep(1:2, each=50) x <- survival::survdiff(y ~ groups)
# Compare p-values of implementations print(x) pvalue(x)
Christofer Bäcklin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.