knot.design {hero} | R Documentation |
Design knot/breakpoint spacing
Description
See Details of bspline
for additional
information about arguments.
Usage
knot.design(
rangeval = 0:1,
nbasis,
nknots,
norder = 4,
extend = FALSE,
interior = FALSE
)
knot_design(
rangeval = 0:1,
nbasis,
nknots,
norder = 4,
extend = FALSE,
interior = FALSE
)
knotDesign(
rangeval = 0:1,
nbasis,
nknots,
norder = 4,
extend = FALSE,
interior = FALSE
)
KnotDesign(
rangeval = 0:1,
nbasis,
nknots,
norder = 4,
extend = FALSE,
interior = FALSE
)
Arguments
rangeval |
A numeric vector of length 2 defining the
interval over which the functional data object can be
evaulated. The default value is |
nbasis |
An integer specifying the number of
basis functions to construct. This is closely linked to
the number of knots ( |
nknots |
The number of *interior* knots. See Details. |
norder |
An integer specifying the order of the B-splines, which is one higher than their degree. The default is 4, which corresponds to cubic splines. |
extend |
Should the knots stop at the endpoints specified by |
interior |
A logical value specifying whether only interior knots should be returned. Default is |
Value
An ascending sequence of univarite knot locations.
Examples
if (requireNamespace("fda", quietly = TRUE)) {
b = fda::create.bspline.basis(nbasis = 10)
# interior knots only
bknots = b$params
# should match
knots = knot.design(nbasis = 10, interior = TRUE)
all.equal(bknots, knots)
}