generate_gauss_fdata {roahd} | R Documentation |
Generation of gaussian univariate functional data
Description
generate_gauss_fdata
generates a dataset of univariate functional data
with a desired mean and covariance function.
Usage
generate_gauss_fdata(N, centerline, Cov = NULL, CholCov = NULL)
Arguments
N |
the number of distinct functional observations to generate. |
centerline |
the centerline of the distribution, represented as a one-
dimensional data structure of length |
Cov |
the covariance operator (provided in form of a |
CholCov |
the Cholesky factor of the covariance operator (provided in
form of a |
Details
In particular, the following model is considered for the generation of data:
where is the center and
is a centered gaussian
process with covariance function
.
That is to say:
All the functions are supposed to be observed on an evenly-spaced, one-
dimensional grid of P points: .
Value
The function returns a matrix containing the discretized
values of the generated observations (in form of an
matrix).
See Also
exp_cov_function
, fData
,
generate_gauss_mfdata
Examples
N = 30
P = 1e2
t0 = 0
tP = 1
time_grid = seq( t0, tP, length.out = P )
C = exp_cov_function( time_grid, alpha = 0.1, beta = 0.2 )
CholC = chol( C )
centerline = sin( 2 * pi * time_grid )
invisible(generate_gauss_fdata( N, centerline, Cov = C ))
invisible(generate_gauss_fdata( N, centerline, CholCov = CholC ))