simul.far: FAR(1) process simulation

View source: R/simul.R

simul.farR Documentation

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)

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.

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 Tn 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 Tn 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 m2). 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:

\code{d.rho} 0 \cr 0 eps.rho

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:

(eps(k+1), eps(k+2), …, eps(\code{m2}))

where

eps(i)= \code{cst1}/(i^2)+(1-\code{cst1})/exp(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, CT, the covariance operator of Tn, is defined by:

m2 * \code{alpha} 0 \cr 0 eps.alpha

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:

(epsilon(k+1), epsilon(k+2), …, epsilon(\code{m2}))

where

epsilon(i)= \code{cst1}/i

Value

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

Note

To simulate Tn, the function creates a white noise En having the following covariance operator:

CT - rho * CT t(CT)

where t(.) is the transposition operator. Tn is the computed using the equation:

Tn+1 = rho * Tn + En

Author(s)

J. Damon, S. Guillas

See Also

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

Examples

  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)

Looping027/far documentation built on Aug. 15, 2022, 7:15 a.m.