Description Usage Arguments Value
The function has a usage similar to bs
and ns
in the splines package.
However, this function utilizes smooth constructor
in the package mgcv
to construct cubic regression splines with an optional penalty.
1 |
x |
the predictor variable. Missing values are allowed. |
df |
degrees of freedom of the basis matrix. The default is 5. The minimum allowed is 3. |
knots |
breakpoints that define the spline. by default these are automatically selected, and not defined by the user. |
intercept |
If TRUE, an intercept is included in the basis matrix. |
fx |
If TRUE, it removes the penalization. |
S |
penalty matrix, defined internally if NULL (the default). |
A matrix with class "cr"
and class "basis"
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.