plot.changepoint | R Documentation |
Plot functions for change-point models
## S3 method for class 'changepoint'
plot(
object,
type = "survival",
chng.num = "all",
add.km = T,
max_predict = 10,
add.post = T,
alpha.pos = NULL,
t_pred = NULL,
final_chng_only = F,
col_km = "black",
km_risk = NULL,
...
)
object |
an object of class "changepoint". |
type |
the type of plot to be drawn, default is the survival function. Also can plot the hazard function with "hazard". |
chng.num |
value indicating the changepoint model to plotted, default is "all", in which all posterior simulations will be used. |
add.km |
indicator to add Kaplan Meier curve. Only applicable to survival function. Default is true. |
max_predict |
maximum time to be plotted. Default is 10, however, depending on the timescale this should be changed. |
add.post |
indicator whether to plot the posterior simulations (a random sample of 500) for the survival function. Default is true. |
a ggplot object
## Not run:
plot(Collapsing_Model, add.post = F)
plot(Collapsing_Model, type = "hazard")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.