Learn R Programming

emil (version 2.0.2)

pvalue.crr: Extracts p-value from a competing risk model

Description

Extracts p-value from a competing risk model

Usage

## S3 method for class 'crr':
pvalue(x, log_p = FALSE, ...)

Arguments

x
Fitted crr model, as returned by crr.
log_p
Whether to return the logarithm of the p-value.
...
Ignored. Kept for S3 consistency.

Value

  • Two-sided p-value.

See Also

pvalue

Examples

Run this code
library(cmprsk)
time <- 1:20
event <- c(rep(0, 9), rep(2, 3), rep(1, 8))
data <- rep(0:1, each=10)
x <- crr(time, event, data)

# Compare p-values of implementations
print(x)
pvalue(x)

Run the code above in your browser using DataLab