splineFunction2D {MFPCA} | R Documentation |
Calculate linear combinations of spline basis functions on two-dimensional domains
Description
Given scores (coefficients), these functions calculate a linear
combination of spline tensor basis functions on two-dimensional domains
based on the gam
/bam
functions
in the mgcv package. See Details.
Usage
splineFunction2D(scores, argvals, bs, m, k)
splineFunction2Dpen(scores, argvals, bs, m, k)
Arguments
scores |
A matrix of dimension |
argvals |
A list containing a two numeric vectors, corresponding to the x- and y-values, on which the functions should be defined. |
bs |
A vector of character strings (or a single character), the
type of basis functions to be used. Please refer to
|
m |
A numeric vector (or a single number), the order of the spline
basis. See |
k |
A numeric vector (or a single number), the number of basis
functions used. See |
Details
If the scores have been calculated based on an unpenalized tensor
spline basis, the linear combination is computed based on the
gam
functions ((splineFunction2D
)). If the
scores were obtained using penalization, the expansion is calculated
via bam (splineFunction2Dpen
).
Value
An object of class funData
with N
observations on
the two-dimensional domain specified by argvals
, corresponding
to the linear combination of spline basis functions.
Warning
The function splineFunction2Dpen
, which relies
on bam has not been tested with ATLAS/MKL/OpenBLAS.
See Also
univExpansion
, gam
,
splineBasis2D