Learn R Programming

peRiodiCS (version 0.5.0)

b_rcs: Basis for restricted cubic splines

Description

Function that derives the restricted cubic splines for a value/vector of values, given the knots; obtains exactly the same results as the rcs function included in the rms package.

Usage

b_rcs(x, knots, inclx = FALSE)

Arguments

x

numerical vector

knots

vector specifying the knot locations

inclx

logical, if TRUE returns also the x vector