splineBasis2D {MFPCA} | R Documentation |
Calculate a spline basis representation for functional data on two-dimensional domains
Description
These functions calculate a penalized or unpenalized tensor product spline
basis representation for functional data on two-dimensional domains based on
the gam
/bam
functions in the
mgcv package. See Details.
Usage
splineBasis2D(funDataObject, bs = "ps", m = NA, k = -1)
splineBasis2Dpen(funDataObject, bs = "ps", m = NA, k = -1, parallel = FALSE)
Arguments
funDataObject |
An object of class |
bs |
A vector of character strings (or a single character string),
specifying the type of basis functions to be used. Defaults to |
m |
A numeric vector (or a single number), the order of the spline
basis. Defaults to |
k |
An numeric vector (or a single number), the number of basis
functions used. Defaults to |
parallel |
Logical (only for function |
Details
If the basis representation is calculated without penalization
(splineBasis2D
), the coefficients are computed using the
gam
function from the mgcv package. In the case of
penalization (splineBasis2Dpen
), the function bam
(for large GAMs) is used instead.
Value
scores |
A matrix of scores (coefficients) with dimension
|
B |
A matrix containing the scalar product of all pairs of basis functions. |
ortho |
Logical, set to |
functions |
|
settings |
A list with entries |
See Also
univDecomp
, splineBasis1D
,
gam
, bam
,
foreach