View source: R/assess_phregr.R
| assess_phregr | R Documentation |
Obtains the standardized score processes and the simulated distribution under the null hypothesis as well as the p-values for the supremum tests.
assess_phregr(object, resample = 1000, seed = 12345)
object |
The output from the |
resample |
The number of simulation samples for the supremem test. |
seed |
The random seed for the simulations. |
The supremum test corresponds to the ASSESS statement with ph
option of SAS PROC PHREG.
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.
Kaifeng Lu, kaifenglu@gmail.com
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.