View source: R/model_helper_functions.R
get_basis | R Documentation |
Get Basis Function Values for Flexible Hazard Specifications
get_basis(x, knots, hazard, deriv = FALSE, flexsurv_compatible = FALSE)
x |
Numeric vector of event times (e.g., |
knots |
Increasing vector of integers corresponding to the knots used
in the desired spline or piecewise specification. Often an element of
list generated from |
hazard |
String specifying the form of the baseline hazard. |
deriv |
Boolean for whether returned values should be from derivatives of
basis functions if |
flexsurv_compatible |
For Royston-Parmar basis, boolean for whether returned values should be untransformed,
as in |
A matrix with each row corresponding to an element of the input, and each column giving the corresponding basis function value.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.