fda (version 2.4.4)

project.basis: Approximate Functional Data Using a Basis

Description

A vector or matrix of discrete data is projected into the space spanned by the values of a set of basis functions. This amounts to a least squares regression of the data on to the values of the basis functions. A small penalty can be applied to deal with situations in which the number of basis functions exceeds the number of basis points. This function is used with function data2fd, and is not normally used directly in a functional data analysis.

Usage

project.basis(y, argvals, basisobj, penalize=FALSE, returnMatrix=FALSE)

Arguments

y

a vector or matrix of discrete data.

argvals

a vector containing the argument values correspond to the values in y.

basisobj

a basis object.

penalize

a logical variable. If TRUE, a small roughness penalty is applied to ensure that the linear equations defining the least squares solution are linearly independent or nonsingular.

returnMatrix

logical: If TRUE, a two-dimensional is returned using a special class from the Matrix package.

Value

the matrix of coefficients defining the least squares approximation. This matrix has as many rows are there are basis functions, as many columns as there are curves, and if the data are multivariate, as many layers as there are functions.

See Also

Data2fd