Functional data analysis proceeds by selecting a finite basis set and
fitting data to it. The current fda
package supports fitting
via least squares penalized with lambda times the integral over the
(finite) support of the basis set of the squared deviations from a
linear differential operator.
J. O. Ramsay and Spencer Graves
The most commonly used basis in fda
is probably B-splines. For
periodic phenomena, Fourier bases are quite useful. A constant basis
is provided to facilitation arithmetic with functional data objects.
To restrict attention to solutions of certain differential equations,
it may be useful to use a corresponding basis set such as exponential,
monomial or power basis sets.
Power bases support the use of negative and fractional powers, while monomial bases are restricted only to nonnegative integer exponents.
The polygonal basis is essentially a B-spline of order 2, degree 1.
The following summarizes arguments used by some or all of the current
create.basis
functions:
a vector of length 2 giving the lower and upper limits of the range of permissible values for the function argument.
For bspline
bases, this can be inferred from
range(breaks). For polygonal
bases, this can be inferred
from range(argvals). In all other cases, this defaults to 0:1.
an integer giving the number of basis functions.
This is not used for two of the create.basis
functions:
For constant
this is 1, so there is no need to specify it.
For polygonal
bases, it is length(argvals), and again there
is no need to specify it.
For bspline
bases, if nbasis
is not specified, it
defaults to (length(breaks) + norder - 2) if breaks
is
provided. Otherwise, nbasis
defaults to 20 for
bspline
bases.
For exponential
bases, if nbasis
is not specified,
it defaults to length(ratevec) if ratevec
is provided.
Otherwise, in fda_2.0.2
, ratevec
defaults to 1,
which makes nbasis
= 1; in fda_2.0.4
,
ratevec
will default to 0:1, so nbasis
will then
default to 2.
For monomial
and power
bases, if nbasis
is
not specified, it defaults to length(exponents) if
exponents
is provided. Otherwise, nbasis
defaults
to 2 for monomial
and power
bases. (Temporary
exception: In fda_2.0.2
, the default nbasis
for
power
bases is 1. This will be increased to 2 in
fda_2.0.4
.)
In addition to rangeval and nbasis, all but constant bases have one or two parameters unique to that basis type or shared with one other:
Beginning with fda_2.1.0, the last 6 arguments for all the create.basis functions will be as follows; some but not all are available in the previous versions of fda:
Ramsay, James O., Hooker, Giles, and Graves, Spencer (2009), Functional data analysis with R and Matlab, Springer, New York.
Ramsay, James O., and Silverman, Bernard W. (2005), Functional Data Analysis, 2nd ed., Springer, New York.
Ramsay, James O., and Silverman, Bernard W. (2002), Applied Functional Data Analysis, Springer, New York.
create.bspline.basis
create.constant.basis
create.exponential.basis
create.fourier.basis
create.monomial.basis
create.polygonal.basis
create.power.basis