Description Usage Arguments Value See Also Examples
This function plots the estimated marginal survival function based on draws from the posterior predictive distribution of the fitted joint model, and then overlays the KaplanMeier curve based on the observed data.
1 2 3 
object 
A fitted model object returned by the

check 
The type of plot to show. Currently only "survival" is allowed, which compares the estimated marginal survival function under the joint model to the estimated KaplanMeier curve based on the observed data. 
limits 
A quoted character string specifying the type of limits to
include in the plot. Can be one of: 
draws 
An integer indicating the number of MCMC draws to use to to estimate the survival function. The default and maximum number of draws is the size of the posterior sample. 
seed 
An optional 
xlab, ylab 
An optional axis label passed to

ci_geom_args 
Optional arguments passed to

... 
Optional arguments passed to

A ggplot object that can be further customized using the ggplot2 package.
posterior_survfit
for the estimated marginal or
subjectspecific survival function based on draws of the model parameters
from the posterior distribution,
posterior_predict
for drawing from the posterior
predictive distribution for the longitudinal submodel, and
pp_check
for graphical checks of the longitudinal submodel.
1 2 3 4 5 6 7  if (!exists("example_jm")) example(example_jm)
# Compare estimated survival function to KaplanMeier curve
ps < ps_check(example_jm)
ps +
ggplot2::scale_color_manual(values = c("red", "black")) + # change colors
ggplot2::scale_size_manual(values = c(0.5, 3)) + # change line sizes
ggplot2::scale_fill_manual(values = c(NA, NA)) # remove fill

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.