View source: R/dat2bsplinemat.R
dat2bsplinemat | R Documentation |
Convert a dataset to its b-spline basis set
dat2bsplinemat(
x,
df = NULL,
knots = NULL,
degree = 3L,
intercept = FALSE,
Boundary.knots = range(x, na.rm = TRUE),
return.deriv = FALSE,
as.data.frame = TRUE
)
x |
data.frame: Input |
df |
Integer: Degrees of freedom. See |
knots |
Float, vector: Internal breakpoints. See |
degree |
Integer (>0): Degree of the piecewise polynomial. See |
intercept |
Logical: If TRUE, an intercept is included. Default = FALSE |
Boundary.knots |
Float, vector (length = 2): Boundary points to anchor the spline basis. |
return.deriv |
Logical: If TRUE, return list containing a data frame with the splines and another data frame with their derivatives |
as.data.frame |
Logical: If TRUE, return data.frame, otherwise matrix. Default = TRUE
See |
If return.deriv=F
, a data frame where each original feature is replaced with its basis set or a list,
otherwise a list containing a data frame with splines and a data frame with their derivatives
E.D. Gennatas
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.