fit_ends_mods_spl {psm3mkv} | R Documentation |
Fit multiple spline regressions to the multiple required endpoints
Description
Fits multiple survival regressions, according to the distributions stipulated, to the multiple endpoints required in fitting partitioned survival analysis, clock forward and clock reset semi-markov models.
Usage
fit_ends_mods_spl(
simdat,
knot_set = 1:3,
scale_set = c("hazard", "odds", "normal"),
expvar = NA
)
Arguments
simdat |
Dataset of patient level data. Must be a tibble with columns named:
Survival data for all other endpoints (time to progression, pre-progression death, post-progression survival) are derived from PFS and OS. |
knot_set |
is a vector of the numbers of knots to consider, following |
scale_set |
is a vector of the spline scales to consider, following |
expvar |
Explanatory variable for modeling of PPS |
Value
A list by endpoint, then distribution, each containing two components:
result: A list of class flexsurv::flexsurvspline containing information about the fitted model.
error: Any error message returned on fitting the regression (NULL indicates no error). Also, the given cuttime.
See Also
Parametric modeling is handled by fit_ends_mods_par()
Examples
# Create dataset in suitable form using bos dataset from the flexsurv package
bosonc <- create_dummydata("flexbosms")
fit_ends_mods_spl(bosonc, expvar=bosonc$ttp.durn)