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

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 flexsurvmix.

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 "Start".

B

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 Sept. 12, 2024, 7:23 a.m.