Rdocumentation
powered by
Learn R Programming
stm (version 1.1.3)
s: Make a B-spline Basis Function
Description
This is a simple wrapper around the
bs
function in the splines package. It will default to a spline with 10 degrees of freedom.
Usage
s(x, df, ...)
Arguments
x
the predictor value.
df
degrees of freedom. Defaults to the minimum of 10 or one minus the number of unique values in x.
...
Arguments passed to the
bs
function.
Value
a predictor matrix of the basis functions.
Details
This is a simple wrapper written as users may find it easier to simply type
s
rather than selecting parameters for a spline.
See Also
bs
ns