Function used to quick visualize the fitted values (survival estimate) on the data used to fit the model (via EM algorithm or Gibbs).
plot_fit_on_data.Rd
plot_fit_on_data()
estimates survival/hazard for the data the model was fitted on and plots the results.
Arguments
- model
A
survival_ln_mixture
orsurvival_ln_mixture_em
object.- data
A
data.frame()
ortibble()
containing the data used to fit the model. For appropriate behavior, should be the same object used to generate survival_ln_mixture/survival_ln_mixture_em objects.- type
A character string specifying the type of plot. The default is "survival", but can be "hazard".
- interval
A character string specifying the type of interval to be plotted. The default is "none", but can be "credible". The EM algorithm does not provide confidence intervals and this parameter is only support for the Bayesian version (
survival_ln_mixture
object).- level
A numeric value between 0 and 1 specifying the level of the confidence interval. The default is 0.95.