Description Usage Arguments Author(s) References See Also Examples

Produces plots of conditional probabilities of survival.

1 2 3 4 5 6 7 8 | ```
## S3 method for class 'survfitJM'
plot(x, estimator = c("both", "mean", "median"),
which = NULL, fun = NULL, conf.int = FALSE,
fill.area = FALSE, col.area = "grey", col.abline = "black", col.points = "black",
add.last.time.axis.tick = FALSE, include.y = FALSE, main = NULL,
xlab = NULL, ylab = NULL, ylab2 = NULL, lty = NULL, col = NULL,
lwd = NULL, pch = NULL, ask = NULL, legend = FALSE, ...,
cex.axis.z = 1, cex.lab.z = 1)
``` |

`x` |
an object inheriting from class |

`estimator` |
character string specifying, whether to include in the plot the mean of the conditional probabilities of survival,
the median or both. The mean and median are taken as estimates of these conditional probabilities over the M replications of the
Monte Carlo scheme described in |

`which` |
a numeric or character vector specifying for which subjects to produce the plot. If a character vector, then is
should contain a subset of the values of the |

`fun` |
a vectorized function defining a transformation of the survival curve. For example with |

`conf.int` |
logical; if |

`fill.area` |
logical; if |

`col.area` |
the color of the area defined by the confidence interval of the survival function. |

`col.abline,col.points` |
the color for the vertical line and the points when |

`add.last.time.axis.tick` |
logical; if |

`include.y` |
logical; if |

`main` |
a character string specifying the title 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. |

`ylab2` |
a character string specifying the y-axis label in the plotm when |

`lty` |
what types of lines to use. |

`col` |
which colors to use. |

`lwd` |
the thickness of the lines. |

`pch` |
the type of points to use. |

`ask` |
logical; if |

`legend` |
logical; if |

`cex.axis.z, cex.lab.z` |
the par |

`...` |
extra graphical parameters passed to |

Dimitris Rizopoulos [email protected]

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.

Rizopoulos, D. (2010) JM: An R Package for the Joint Modelling of Longitudinal and Time-to-Event Data.
*Journal of Statistical Software* **35** (9), 1–33. http://www.jstatsoft.org/v35/i09/

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
# linear mixed model fit
fitLME <- lme(sqrt(CD4) ~ obstime + obstime:drug,
random = ~ 1 | patient, data = aids)
# cox model fit
fitCOX <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE)
# joint model fit
fitJOINT <- jointModel(fitLME, fitCOX,
timeVar = "obstime", method = "weibull-PH-aGH")
# sample of the patients who are still alive
ND <- aids[aids$patient == "141", ]
ss <- survfitJM(fitJOINT, newdata = ND, idVar = "patient", M = 50)
plot(ss)
plot(ss, include.y = TRUE, add.last.time.axis.tick = TRUE, legend = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.