plot-rocJM: Plot Method for rocJM Objects

Description Usage Arguments Author(s) References See Also Examples

Description

Produces plots of ROC curves and the corresponding areas under the curve.

Usage

1
2
3
4
5
6
## S3 method for class 'rocJM'
plot(x, which = NULL, type = c("ROC", "AUC"), 
  ndt = "all", main = NULL, caption = NULL, xlab = NULL, 
  ylab = NULL, ask = NULL, legend = FALSE, lx = NULL, ly = NULL, 
  lty = NULL, col = NULL, cex.caption = 0.8, cex.axis = NULL, 
  cex.lab = NULL, cex.main = NULL, ...)

Arguments

x

an object inheriting from class rocJM.

which

a numeric vector specifying for which generic subjects to produce the plots. This refers to the different cases identified by the idVar argument in rocJM.

type

a character string specifying which plot to produce the ROC curves or the areas under the ROC curves.

ndt

the character string "all" or a numeric scalar specifying for which time windows (dt argument of rocJM) to produce the plots.

main

a character string specifying the title in the plot.

caption

a character string specifying a caption in the plot.

xlab

a character string specifying the x-axis label in the plot.

ylab

a character string specifying the y-axis label in the plot.

ask

logical; if TRUE, the user is asked before each plot, see par().

legend

logical; if TRUE, a legend is included in the plot.

lx,ly

the x and y arguments of legend().

lty

what types of lines to use.

col

which colors to use.

cex.caption

font size for the caption.

cex.axis, cex.lab, cex.main

graphical parameters; see par for more info.

...

extra graphical parameters passed to plot().

Author(s)

Dimitris Rizopoulos [email protected]

References

Rizopoulos, D. (2012) Joint Models for Longitudinal and Time-to-Event Data: with Applications in R. Boca Raton: Chapman and Hall/CRC.

Rizopoulos, D. (2011). Dynamic predictions and prospective accuracy in joint models for longitudinal and time-to-event data. Biometrics 67, 819–829.

See Also

rocJM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
fitLME <- lme(sqrt(CD4) ~ obstime + obstime:(drug + AZT + prevOI + gender), 
    random = ~ obstime | patient, data = aids)
fitSURV <- coxph(Surv(Time, death) ~ drug + AZT + prevOI + gender, 
    data = aids.id, x = TRUE)
fit.aids <- jointModel(fitLME, fitSURV, timeVar = "obstime", 
    method = "piecewise-PH-aGH")

ND <- aids[aids$patient == "7", ]
roc <- rocJM(fit.aids, dt = c(2, 4, 8), ND, idVar = "patient")
plot(roc, lwd = 2, legend = TRUE)
plot(roc, type = "AUC")

## End(Not run)

drizopoulos/JM documentation built on May 15, 2019, 2:12 p.m.