Description Usage Arguments Details Value References See Also Examples
This function generates independent functional observations of sample size n with a desired eigenvalue decay structure of the covariance operator.
1 2 |
n |
Sample size of generated functional data. A strictly positive integer |
nbasis |
Number of basis functions used to represent functional observations |
Sigma |
Eigen value decay of the covariance operator of the functional data. The eigenvalues of
the covariance operator of the generated functional sample are given by |
basis |
A functional basis object defining the basis. It can be the class of
" |
rangeval |
A vector of length 2 containing the initial and final values of the interval over which the functional data object can be evaluated. As a default it is set to be [0,1]. |
... |
Further arguments to pass |
Independent functional sample is generated based on a linear combination of basis functions where the i-th linear combination coefficient is normally distributed with mean zero and standard deviation σ[i].
An independent functional data sample (class fd
) containing:
coefs |
The coefficient array |
basis |
A basis object |
fdnames |
A list containing names for the arguments, function values and variables |
Ramsay, James O., and Silverman, Bernard W. (2006), Functional Data Analysis, 2nd ed., Springer, New York.
Aue A., Rice G., Sonmez O. (2017+), Detecting and dating structural breaks in functional data without dimension reduction (https://arxiv.org/pdf/1511.04020.pdf)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Functional data with 21 fourier basis with a geometric eigenvalue decay
fun_IID(n=100, nbasis=21)
# Define eigenvalue decay
Sigma1=2^-(1:21)
# Then generate functional data
fun_IID(n=100, nbasis=21, Sigma=Sigma1)
# Define eigenvalue decay, and basis function
library(fda)
basis1 = create.bspline.basis(rangeval = c(0,1), nbasis=21)
Sigma1=2^-(1:21)
# Then generate functional data
fun_IID(n=100, nbasis=21, Sigma=Sigma1, basis=basis1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.