plot.scproc: Graphical model diagnostic

Description Usage Arguments Details Author(s) References Examples

Description

Produce a graphical model diagnostic, with the possibility of adding the prediction bands calculated by predband.scproc.

Usage

1
2
3
4
5
## S3 method for class 'scproc'
plot(x, idx=1:length(x$variable), col=c("grey"), ci=FALSE,
                      col.ci="darkblue", col.alpha=0.3, lty.ci=0, level=0.95,
                      legend=c("type1","type2","none"), xlab=NULL, ylab=NULL,
                      ylim=NULL, xlim=NULL, title=NULL, cex.lab=1,cex.main=1,...)

Arguments

x

An object of class scproc.

idx

The index number of covariates whose the plot is required.

col

Boolean argument controlling for the plot of prediction bands. Values are TRUE or FALSE.

ci

Color of the processes realizations.

col.ci

Color of the prediction bands.

col.alpha

Color intensity of the prediction bands.

lty.ci

Line thickness of the prediction bands border.

level

The required level for prediction bands.

legend

Argument controling the type of legend on the plot. "type1" for p-values, "type2" for usual type of legends and "none" for no legend.

xlab

Label of the x-axis.

ylab

Label of the y-axis.

xlim

Vector of two components which indicates the extremum values of x-axis.

ylim

Vector of two components which indicates the extremum values of y-axis.

title

Vector of length idx whose components are titles of plots.

cex.lab

Magnification of x and y labels relative to cex.

cex.main

Magnification of titles relative to cex.

...

additional arguments.

Details

This function is derived from plot.cumres of gof package.

Author(s)

Patrick Sfumato and Jean-Marie Boher.

References

Holst KK (2014). gof: Model-diagnostics based on cumulative residuals. R package version 0.9.1, URL https://CRAN.R-project.org/package=gof.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
require(cmprsk)

#Simulating survival data with competing events
set.seed(10)
ftime <- rexp(200)
fstatus <- sample(0:2,200,replace=TRUE)
cov <- matrix(runif(200),nrow=200)

# Fine & Gray regression
fit.crr <- crr(ftime,fstatus,cov)

#Checking the covariates functional form assumption
k<-fcov(model=fit.crr, ftime=ftime,fstatus=fstatus,cov1=cov)

#Plotting a graphical model diagnostic
plot(k)

Example output

Loading required package: survival
Loading 'goftte' version 1.0.3
Loading required package: cmprsk

goftte documentation built on May 2, 2019, 5:12 a.m.