ajfit_flexsurvmix {flexsurv} | R Documentation |
Forms a tidy data frame for plotting the fit of parametric mixture multi-state models against nonparametric estimates
Description
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
.
Usage
ajfit_flexsurvmix(x, maxt = NULL, startname = "Start", B = NULL)
Arguments
x |
Fitted model returned by |
maxt |
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. |
startname |
Label to give the state corresponding to "no event happened
yet". By default this is |
B |
Number of simulation replications to use to calculate a confidence
interval for the parametric estimates in |