Learn R Programming

trtswitch (version 0.2.4)

assess_phregr: Assess Proportional Hazards Assumption Based on Supremum Test

Description

Obtains the standardized score processes and the simulated distribution under the null hypothesis as well as the p-values for the supremum tests.

Usage

assess_phregr(object, resample = 1000, seed = 12345)

Value

A list with the following components:

  • time the unique event times.

  • score_t the observed standardized score process.

  • score_t_list a list of simulated standardized score processes under the null hypothesis.

  • max_abs_value the supremum of the absolute value of the observed standardized score process for each covariate and the supremum of the sum of absolute values of the observed standardized score processes across all covariates.

  • p_value the p-values for the supremum tests for each covariate and the global test.

Arguments

object

The output from the phregr call.

resample

The number of simulation samples for the supremem test.

seed

The random seed for the simulations.

Author

Kaifeng Lu, kaifenglu@gmail.com

Details

The supremum test corresponds to the ASSESS statement with ph option of SAS PROC PHREG.

References

D. Y. Lin, L. J. Wei, and Z. Ying. Checking the Cox model with cumulative sums of martingale-based residuals. Biometrika 1993; 80:557-572.

Examples

Run this code

fit <- phregr(data = liver, time = "Time", event = "Status", 
              covariates = c("log(Bilirubin)", "log(Protime)", 
                             "log(Albumin)", "Age", "Edema"),
              ties = "breslow")
              
aph <- assess_phregr(fit, resample = 1000, seed = 314159)
  
aph

plot(aph, nsim = 20)

Run the code above in your browser using DataLab