Create a Fourier Basis
Create a set of Fourier basis functions for constructing a functional
data object.
DESCRIPTION:
Functional data objects are constructed by specifying a set of basis
functions and a set of coefficients defining a linear combination of
these basis functions. The Fourier basis is a system
that is usually used for periodic functions. It has the advantages
of very fast computation and great flexibility. If the data are
considered to be nonperiod, the Fourier basis is usually preferred.
USAGE:
create.fourier.basis(rangeval=c(0, 1), nbasis=3, period=width,
dropind=NULL, quadvals=NULL, values=NULL)
REQUIRED ARGUMENTS:
-
None
OPTIONAL ARGUMENTS:
- rangeval
-
A vector of length 2 containing the initial and final
values of the interval over which the functional
data object can be evaluated. Default value c(0,1)
- nbasis
-
An integer variable specifying the number of basis functions. Default
value 3.
- period
-
The width of any interval over which the Fourier functions repeat
themselves, or are periodic. The default is the width of the
interval defined in rangeval.
VALUE:
Returns a list with the basis.fd, class attribute with
entries as above having names type, rangeval, nbasis, and
params, respectively. The type member is
fourier.
SEE ALSO:
basis.fd. create.basis, create.bspline.basis
DETAILS:
The first basis
function is the unit function with the value one everywhere. The next
two are the sine/cosine pair with period defined in the argument
period. The fourth and fifth are the sin/cosine series with
period one half of period. And so forth. The number of basis
functions is usually odd.
EXAMPLES:
# set up the Fourier basis for the temperature data,
# using 9 basis functions with period 12 months.
monthbasis <- create.fourier.basis(c(0,12), 9, 12.0)