ajfit_flexsurvmix: Forms a tidy data frame for plotting the fit of parametric...

View source: R/summary.flexsurvmix.R

ajfit_flexsurvmixR Documentation

Forms a tidy data frame for plotting the fit of parametric mixture multi-state models against nonparametric estimates


This computes Aalen-Johansen estimates of the probability of occupying each state at a series of times, using ajfit. The equivalent estimates from the parametric model are then produced using p_flexsurvmix, and concatenated with the nonparametric estimates to form a tidy data frame. This data frame can then simply be plotted using ggplot.


ajfit_flexsurvmix(x, maxt = NULL, startname = "Start", B = NULL)



Fitted model returned by flexsurvmix.


Maximum time to produce parametric estimates for. By default this is the maximum event time in the data, the maximum time we have nonparametric estimates for.


Label to give the state corresponding to "no event happened yet". By default this is "Start".


Number of simulation replications to use to calculate a confidence interval for the parametric estimates in p_flexsurvmix. Comparable intervals for the Aalen-Johansen estimates are returned if this is set. Otherwise if B=NULL then no intervals are returned.

flexsurv documentation built on Feb. 16, 2023, 5:07 p.m.