Learn R Programming

PHeval (version 0.5.2)

standscore: 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
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,
  • if globstan = TRUE (default) a global standardization by the matrix Sigma is applied to the process. Sigma is the estimator of the variance-covariance matrix be
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.

Value

  • ScoreA vector or matrix with the value of the standardized score process. Each row corresponds to a failure time, each column to a covariate.
  • SigmaThe 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.
  • confbandCOVA 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.

Details

The program does not handle ties in the data. We suggest to randomly split the ties before using the program.

References

l{ OQuigley, J. (2008) Proportional hazards regression. Springer New-York. Chapter 8. OQuigley, J. (2003) Khmaladze-Type Graphical Evaluation of the Proportional Hazards Assumption. Biometrika 90, 577-594 }

See Also

plotscore

Examples

Run this code
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)

Run the code above in your browser using DataLab