Learn R Programming

emil (version 1.1-6)

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

Description

Extracts p-value from a competing risk model

Usage

## S3 method for class 'crr':
p.value(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

p.value

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)
p.value(x)

Run the code above in your browser using DataLab