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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/survival.r

Description

Extracts p-value from a competing risk model

Usage

1
2
## 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.

Author(s)

Christofer Bäcklin

See Also

pvalue

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)

}

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

Related to pvalue.crr in emil...