Learn R Programming

emil (version 2.2.10)

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

Description

Extracts p-value from a competing risk model

Usage

# S3 method for 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
# NOT RUN {
if(requireNamespace("cmprsk", quitely = TRUE)){

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

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

}
# }

Run the code above in your browser using DataLab