Description Usage Arguments Details Value References See Also Examples
This generates a functional Auto-Regressive, FAR, process of sample size n with a specific
number of basis functions where the eigenvalue decay of the covariance operator is given
by the defined vector Sigma. The norm of the FAR
operators are defined by the vector kappa
. The generic function uses Fourier basis in [0,1],
however one can define a different basis and different range values. If the order or kappa is not defined
then the function generates iid functional data by default.
1 2 |
n |
Sample size of generated functional data. A strictly positive integer |
nbasis |
Number of basis functions used to represent functional observations |
order |
Order of the FAR process |
kappa |
Vector of norm of the FAR operators. The length of this vector must be same as the
FAR |
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 |
This function should be used for a simple FAR data generation for a desired eigenvalue decay of covariance operator. The j-th FAR operator Ψ[j] is generated by Ψ[j] = κ[j]Ψ, where Ψ has a unit norm with Ψ[i,j] = N(0, σ[i]σ[j]). For more details see Aue A., Rice G., Sonmez O. (2017+).
Functional Auto-Regressive 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 15 16 17 18 | # FAR(1) data with 21 fourier basis with a geometric eigenvalue decay
fun_AR(n=100, nbasis=21, order=1, kappa=0.8)
# Define eigenvalue decay
Sigma1 = 2^-(1:21)
# Then generate FAR(2) data
fun_AR(n=100, nbasis=21, order=2, kappa= c(0.5, 0.3), 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 FAR(1)
fun_AR(n=100, nbasis=21, order=1, kappa= 0.3,Sigma=Sigma1, basis=basis1)
# Not defining order will result in generating IID functions
fun_AR(n=100, nbasis=21) # same as fun_IID(n=100, nbasis=21)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.