dgp.far | R Documentation |
It generates functional data that follows a functional autoregressive process of order p
, denoted as FAR(p). The generated data consists of curves evaluated at discrete grid points.
dgp.far(J, N, S = 0.5, p = 1, kernel = "Gaussian", burn_in = 50)
J |
The number of grid points for each curve observation. |
N |
The sample size, representing the number of curves to be generated. |
S |
The serial dependence factor for the kernel used in the FAR(p) process. Default is 0.5. |
p |
The order of the autoregressive process. Default is 1. |
kernel |
The type of kernel function |
burn_in |
The number of initial points discarded to eliminate transient effects. Default is 50. |
The functional autoregressive model of order p
is given by:
X_i(t) -\mu(t) = \sum_{j=1}^{p} \Psi(X_{i-j}-\mu)(t) + \epsilon_i(t),
where \Psi(X)(t) = \int \psi(t,s)X(s) dt
is the kernel operator, and \epsilon_i(t)
are i.i.d. errors generated from a standard Brownian motion process.
The mean function \mu
is assumed to be zero in the generating process.
A J \times N
matrix where each column contains a curve evaluated at J
grid points, generated from the FAR(p) model.
# Generate discrete evaluations of 200 curves, each observed at 50 grid points.
yd_far = dgp.far(J = 50, N = 200, S = 0.7, p = 2, kernel = "Gaussian", burn_in = 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.