splineFunction2D: Calculate linear combinations of spline basis functions on...

Description Usage Arguments Details Value Warning See Also

View source: R/univariateExpansions.R

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

1
2
3
splineFunction2D(scores, argvals, bs, m, k)

splineFunction2Dpen(scores, argvals, bs, m, k)

Arguments

scores

A matrix of dimension N x K, representing the K scores (coefficients) for each of the N observations.

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 te for a list of possible basis functions.

m

A numeric vector (or a single number), the order of the spline basis. See s for details.

k

A numeric vector (or a single number), the number of basis functions used. See s for details.

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


MFPCA documentation built on Oct. 17, 2021, 5:06 p.m.