pvalue.survdiff: Extracts p-value from a logrank test

Description Usage Arguments Value Author(s) See Also

View source: R/survival.r

Description

Extracts p-value from a logrank test

Usage

1
2
## S3 method for class 'survdiff'
pvalue(x, log_p = FALSE, ...)

Arguments

x

Logrank test result, as returned by survdiff.

log_p

Whether to return the logarithm of the p-value.

...

Ignored. Kept for S3 consistency.

Value

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)

Author(s)

Christofer Bäcklin

See Also

pvalue


emil documentation built on Aug. 1, 2018, 1:03 a.m.

Related to pvalue.survdiff in emil...