plot.rocJM {JM} | R Documentation |
Plot Method for rocJM Objects
Description
Produces plots of ROC curves and the corresponding areas under the curve.
Usage
## 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 |
which |
a numeric vector specifying for which generic subjects to produce the plots.
This refers to the different cases identified by the |
type |
a character string specifying which plot to produce the ROC curves or the areas under the ROC curves. |
ndt |
the character string |
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 |
legend |
logical; if |
lx , ly |
the |
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 |
... |
extra graphical parameters passed to |
Author(s)
Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl
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
Examples
## 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)