standscore {PHeval} | R Documentation |
Standardized Score Process
Description
This function evaluates the standardized score process of OQuigley (2003). The process helps evaluating the goodness of fit of the proportional hazards model and visualizing the shape of time-dependent effects.
Usage
standscore(formula, data, globstan = TRUE, beta0 = 0)
Arguments
formula |
A formula object or character string with the time and censoring status separated by "+" on the left hand side and the covariates separated by "+" on the right. For instance, if the time name is "Time", the censoring status is "Status" and the covariates are "Cov1" and "Cov2", the formula is "Time+Status~Cov1+Cov2". |
data |
A data.frame with the data. The censoring status should be 1 for failure and 0 for censoring. No missing data accepted. |
globstan |
With one covariate in the model, globstan has no effect. With several covariates,
|
beta0 |
a vector of parameters to evaluate the process (by default, parameters set to 0). Its length is the number of covariates. Each value corresponds to the regression coefficient for a covariate, in the same order as appearing in formula. |
Details
The program does not handle ties in the data. We suggest to randomly split the ties before using the program.
Value
Score |
A vector or matrix with the value of the standardized score process. Each row corresponds to a failure time, each column to a covariate. |
Sigma |
The matrix used for the standardization of the process. Sigma is the estimator of the variance-covariance matrix between the coviates to the power of - 1 / 2. This value is present only with multiple covariates and globstan = TRUE. |
confbandCOV |
A matrix with the confidence bands of the process for a constant regression effect associated with the covariate named COV. Each row corresponds to a failure time. The first column is the lower band and the second column is the upper band. This value is present with one covariate or with multiple covariates and globstan = TRUE. |
Author(s)
Cecile Chauvel <chauvel.cecile@gmail.com>
References
Chauvel, C. and OQuigley, J. (2014) Tests for comparing estimated survival functions. Biometrika |
101, 535-552. https://doi.org/10.1093/biomet/asu015 |
Chauvel, C. and OQuigley, J. (2017) Survival model construction guided by fit and predictive strength. |
Biometrics 73, 483-494. https://doi.org/10.1111/biom.12611 |
OQuigley, J. (2008) Proportional hazards regression. Springer New-York. Chapter 8. |
See Also
Examples
library(survival)
data(ovarian)
#############################################
# Evaluation and plot of the standardized score process at parameter beta0 = 0
score1=standscore(futime+fustat~age+rx,data=ovarian)
plotscore(score1,printCB=TRUE)
#############################################
# Evaluation of the standardized score process at parameter
# beta0 = maximum partial likelihood estimator of beta
beta=coxph(Surv(futime,fustat)~age+rx,data=ovarian)$coeff
score2=standscore(futime+fustat~age+rx,data=ovarian,beta0=beta)
# Separated plots for each regression effect
par(mfrow=c(1,2))
plotscore(score2,printCB=TRUE,component.num=1,main="age")
plotscore(score2,printCB=TRUE,component.num=2,main="rx")
#############################################
# Evaluation and plot of the standardized score process at parameter beta0 = 0
# without global standardization
fo="futime+fustat~age+rx"
score3=standscore(fo,data=ovarian,globstan=FALSE)
plotscore(score3)