Description Usage Arguments Details Value Warning See Also
These functions calculate a tensor cosine basis representation for
functional data on two or threedimensional domains based on a
discrete cosine transformation (DCT) using the Clibrary fftw3
(http://www.fftw.org/). Coefficients under a given threshold are
set to 0 to reduce complexity and for denoising.
1 2 3  dctBasis2D(funDataObject, qThresh, parallel = FALSE)
dctBasis3D(funDataObject, qThresh, parallel = FALSE)

funDataObject 
An object of class 
qThresh 
A numeric with value in [0,1], giving the quantile for thresholding the coefficients. See Details. 
parallel 
Logical. If 
Given the (discretized) observed functions X_i, the function
dctBasis2D
calculates a basis representation
X_i(s,t) = ∑_{m = 0}^{K_11} ∑_{n = 0}^{K_21} θ_{mn} f_{mn}(s,t)
of a twodimensional function X_i(s,t) in terms of (orthogonal) tensor cosine basis functions
f_{mn}(s,t) = c_m c_n \cos(ms) \cos(nt), \quad (s,t) \in \calT
with c_m = \frac{1}{√{π}} for m=0 and c_m = √{\frac{2}{π}} for m=1,2,… based on a discrete cosine transform (DCT).
If not thresholded (qThresh = 0
), the function returns all
nonzero coefficients θ_{mn} in the basis representation in
a sparseMatrix
(package Matrix) called
scores
. Otherwise, coefficients with
θ_{mn} <= q
are set to zero, where q is the qThresh
quantile of
θ_{mn}.
For functions X_i(s,t,u) on threedimensional domains, the
function dctBasis3D
calculates a basis representation
X_i(s,t,u) = ∑_{m = 0}^{K_11} ∑_{n = 0}^{K_21} ∑_{k = 0}^{K_31} θ_{mnk} f_{mnk}(s,t,u)
in terms of (orthogonal) tensor cosine basis functions
f_{mnk}(s,t,u) = c_m c_n c_k \cos(ms) \cos(nt) \cos(ku), \quad (s,t,u) \in \calT
again with c_m = \frac{1}{√{pi}} for m=0 and c_m = √{\frac{2}{pi}} for m=1,2,… based on a discrete cosine transform (DCT). The thresholding works analogous as for the twodimensional case.
scores 
A 
B 
A diagonal matrix, giving the norms of the different basis functions used (as they are orthogonal). 
ortho 
Logical, set to 
functions 

If the Clibrary fftw3
is not available when
the package MFPCA
is installed, this function is disabled an
will throw an error. For full functionality install the Clibrary
fftw3
from http://www.fftw.org/ and reinstall
MFPCA
. This function has not been tested with
ATLAS/MKL/OpenBLAS.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.