This function plots the output from the cumulative residuals function "cum.residuals". The cumulative residuals are compared with the performance of similar processes under the model.
# S3 method for cum.residuals
plot(
x,
pointwise.ci = 1,
hw.ci = 0,
sim.ci = 0,
robust = 1,
specific.comps = FALSE,
level = 0.05,
start.time = 0,
stop.time = 0,
add.to.plot = FALSE,
mains = TRUE,
main = NULL,
xlab = NULL,
ylab = "Cumulative MG-residuals",
ylim = NULL,
score = 0,
conf.band = FALSE,
...
)
the output from the "cum.residuals" function.
if >1 pointwise confidence intervals are plotted with lty=pointwise.ci
if >1 Hall-Wellner confidence bands are plotted with lty=hw.ci. Only 95% bands can be constructed.
if >1 simulation based confidence bands are plotted with lty=sim.ci. These confidence bands are robust to non-martingale behaviour.
if "1" robust standard errors are used to estimate standard error of estimate, otherwise martingale based estimate are used.
all components of the model is plotted by default, but a list of components may be specified, for example first and third "c(1,3)".
gives the significance level. Default is 0.05.
start of observation period where estimates are plotted. Default is 0.
end of period where estimates are plotted. Estimates thus plotted from [start.time, max.time].
to add to an already existing plot. Default is "FALSE".
add names of covariates as titles to plots.
vector of names for titles in plots.
label for x-axis. NULL is default which leads to "Time" or "". Can also give a character vector.
label for y-axis. Default is "Cumulative MG-residuals".
limits for y-axis.
if '0' plots related to modelmatrix are specified, thus resulting in grouped residuals, if '1' plots for modelmatrix but with random realizations under model, if '2' plots residuals versus continuous covariates of model with random realizations under the model.
makes simulation based confidence bands for the test processes under the 0 based on variance of these processes limits for y-axis. These will give additional information of whether the observed cumulative residuals are extreme or not when based on a variance weighted test.
unused arguments - for S3 compatibility
Martinussen and Scheike, Dynamic Regression Models for Survival Data, Springer (2006).
# NOT RUN {
# see cum.residuals for examples
# }
Run the code above in your browser using DataLab