plotscore: Plot of the standardized score process

Description Usage Arguments Author(s) See Also Examples

View source: R/PHeval.R

Description

The function plots the standardized score process. This process is a list resulting of an appeal to the function standscore.

Usage

1
2
plotscore(s, printCB = FALSE , component.num = 1:dim(s[[1]])[2], main = "" ,
 xlab = "Time", ylab = "Standardized score", ylim)

Arguments

s

A list resulting from a call to the function standscore which corresponds to the process and, possibly, its confidence bands.

printCB

Set printCB = TRUE for plotting the confidence bands. Default is printCB = FALSE.

component.num

A vector of length lower than the number of covariates. Indicates which components of the process to plot. For example, set component.num=c(2,3) for plotting the second and third components. By default, all components are plotted.

main,xlab,ylab,ylim

Classical arguments for plotting. See help(plot).

Author(s)

Cecile Chauvel <chauvel.cecile@gmail.com>

See Also

standscore

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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 
score3=standscore(futime+fustat~age+rx,data=ovarian,globstan=FALSE)
plotscore(score3)	

PHeval documentation built on May 1, 2019, 9:21 p.m.