define_surv_spline | R Documentation |
Define Royston & Parmar restricted cubic spline parametric survival distribution.
define_surv_spline(scale, ...)
define_spline_survival(scale, ...)
scale |
"hazard", "odds", or "normal", as described in flexsurvspline. With the default of no knots in addition to the boundaries, these models reduce to the Weibull, log-logistic and log-normal respectively. The scale must be common to all times. |
... |
parameters and knot log times of spline distribution, which can be provided either in order starting with spline parameters followed by knot log times, or by names (e.g gamma1, gamma2, ... gammaN, knots1, knots2, ... knotsN). See examples below for named and unnamed calls. |
a surv_spline
object.
Royston, P. and Parmar, M. (2002). Flexible parametric proportional-hazards and proportional-odds models for censored survival data, with application to prognostic modelling and estimation of treatment effects. Statistics in Medicine 21(1):2175-2197.
define_surv_spline(
scale = 'hazard',
-2.08, 2.75, 0.23, # parameters
-1.62, 0.57, 1.191 # knot times
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.