Learn R Programming

far (version 0.6-7)

simul.far: FAR(1) process simulation

Description

Simulation of a FAR process using a Gram-Schmidt basis.

Usage

simul.far(m=12,
  n=100,
  base=base.simul.far(24, 5),
  d.rho=diag(c(0.45, 0.9, 0.34, 0.45)),
  alpha=diag(c(0.5, 0.23, 0.018)),
  cst1=0.05)

Value

A fdata object containing one variable ("var") which is a FAR(1) process of length n with p discretization points.

Arguments

m

Integer. Number of discretization points.

n

Integer. Number of observations.

base

A functional basis expressed as a matrix, as the matrix created by base.simul.far or with orthonormalization.

d.rho

Numerical matrix. Expression of the first bloc of the linear operator in the Gram-Schmidt basis.

alpha

Numerical matrix. Expression of the first bloc of the covariance operator in the Gram-Schmidt basis.

cst1

Numeric. Perturbation coefficient on the linear operator.

Author

J. Damon, S. Guillas

Details

This function simulate a FAR(1) process with a strong white noise.

The simulation is realized in two steps.

First step, the function compute a FAR(1) process \(T_n\) in a functional space (that we call in the sequel H) using a simple equation and the d.rho, alpha and cst parameters.

Second step, the process \(T_n\) is projected in the canonical basis using the base linear projector.

The base basis need to be a orthonormal basis wide enought. In the contrary, the function use the orthonormalization function to make it so. Notice that the size of this matrix corresponds to the dimension of the "modelization space" H (let's call it \(m_2\)). Of course, the larger m2 the better the functionnal approximation is. Whatever, keep in mind that m2=2m is a good compromise, in order to avoid the memory limits.

In H, the linear operator \(\rho\) is expressed as:

$$ \left(\begin{array}{cc}% \code{d.rho} & 0 \cr% 0 & eps.rho% \end{array}\right)% $$

Where d.rho is the matrix provided in the call, the two 0 are in fact two blocks of 0, and eps.rho is a diagonal matrix having on his diagonal the terms:

$$\left(\varepsilon_{k+1}, \varepsilon_{k+2}, \ldots, % \varepsilon_{\code{m2}}\right)$$

where

$$\varepsilon_{i}=\frac{\code{cst1}}{i^2}+% \frac{1-\code{cst1}}{e^i}$$

and k is the length of the d.rho diagonal.

The d.rho matrix can be viewed as the information and the eps.rho matrix as a perturbation. In this logic, the norm of eps.rho need to be smaller than the one of d.rho.

In H, \(C^T\), the covariance operator of \(T_n\), is defined by:

$$ \left(\begin{array}{cc}% m_2 * \code{alpha} & 0 \cr% 0 & eps.alpha% \end{array}\right)% $$

Where alpha is the matrix provided in the call, the two 0 are in fact two blocks of 0, and eps.alpha is a diagonal matrix having on his diagonal the terms:

$$\left(\epsilon_{k+1}, \epsilon_{k+2}, \ldots, % \epsilon_{\code{m2}}\right)$$

where

$$\epsilon_{i}=\frac{\code{cst1}}{i}$$

See Also

simul.far.sde, simul.far.wiener, simul.farx, simul.wiener, base.simul.far.

Examples

Run this code
  far1 <- simul.far(m=64,n=100)
  summary(far1)
  print(far(far1,kn=4))
  par(mfrow=c(2,1))
  plot(far1,date=1)
  plot(select.fdata(far1,date=1:5),whole=TRUE,separator=TRUE)

Run the code above in your browser using DataLab