Description Usage Arguments Value References Examples
The rcs
function calculates the basis terms for the restricted
cubic splines as defined in Royston and Parmar (2002). The drcs
function calculates the corresponding first derivative of the basis terms.
1 2 3 |
x |
A numeric vector for which to evaluate the spline basis terms. |
df |
Integer specifying the degrees of freedom for the splines. If
the |
iknots |
An optional vector of internal knot positions. Note that the
|
bknots |
A numeric vector of length 2 specifying the position
of the lower and upper boundary knots, beyond which a linearity
restriction is enforced. If |
A matrix, with dimension length(x)
by df
, where
df
is one greater than the number of internal knots.
Royston P, Parmar MKB. 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. 2002;21:2175–2197. doi: 10.1002/sim.1203
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.