These functions calculate a penalized or unpenalized spline basis decomposition for functional data on one-dimensional domains based on the gam function in the mgcv package.
splineBasis1D(funDataObject, bs = "ps", m = NA, k = -1)splineBasis1Dpen(funDataObject, bs = "ps", m = NA, k = -1, parallel = FALSE)
A matrix of scores (coefficients) with dimension
N x K
, reflecting the weights for each of the K
basis
functions and for each of the N
observations.
A matrix containing the scalar product of all pairs of basis functions.
Logical, set to FALSE
, as basis functions are not
orthonormal.
NULL
, as basis functions are known
A list with entries bs
, m
and k
,
giving the actual parameters used for generating the spline basis
functions.
An object of class funData
containing the observed functional data samples and for which the basis
decomposition is calculated.
A character string, specifying the type of basis functions to be
used. Defaults to "ps"
(B-spline functions). Please refer to
smooth.terms
for a list of possible basis functions.
A numeric, the order of the spline basis. Defaults to NA
,
i.e. the order is chosen automatically. See s
for
details.
A numeric, the number of basis functions used. Defaults to
-1
, i.e. the number of basis functions is chosen automatically. See
s
for details.
Logical (only for splineBasis1Dpen
. If TRUE
,
the coefficients for the basis functions are calculated in parallel. The
implementation is based on the foreach
function and
requires a parallel backend that must be registered before. See
foreach
for details.