Skip to contents

Correlates each covariate with rank-transformed event times.

Usage

ph_assumption_test(
  survival_times,
  event_indicator,
  covariates,
  covariate_names = NULL
)

Arguments

survival_times

Event/censoring times.

event_indicator

1 = event, 0 = censored.

covariates

Covariate matrix.

covariate_names

Optional names.

Value

A list of morie_specification_test objects, one per covariate.

Examples

set.seed(1)
res <- try(ph_assumption_test(rexp(60), rbinom(60, 1, 0.7),
                              matrix(rnorm(120), ncol = 2)))
if (!inherits(res, "try-error")) str(res, max.level = 1)
#> List of 2
#>  $ :List of 5
#>   ..- attr(*, "class")= chr [1:2] "morie_specification_test" "list"
#>  $ :List of 5
#>   ..- attr(*, "class")= chr [1:2] "morie_specification_test" "list"