generate_gauss_mfdata {roahd} | R Documentation |
Generation of gaussian multivariate functional data
Description
generate_gauss_mfdata
generates a dataset of multivariate functional
data with a desired mean and covariance function in each dimension and a
desired correlation structure among components.
Usage
generate_gauss_mfdata(
N,
L,
centerline,
correlations,
listCov = NULL,
listCholCov = NULL
)
Arguments
N |
the number of distinct functional observations to generate. |
L |
the number of components of the multivariate functional data. |
centerline |
the centerline of the distribution, represented as a 2-dimensional data structure with L rows (one for each dimension) having the measurements along the grid as columns. |
correlations |
is the vector containing the
that is to say, the row-wise, upper triangular part of the correlation matrix without the diagonal. |
listCov |
a list containing the |
listCholCov |
the Cholesky factor of the |
Details
In particular, the following model is considered for the generation of data:
where is the number of components of the multivariate functional
random variable,
is the
th component of the center and
is a centered gaussian process with covariance function
. That is to say:
A correlation structure among is
allowed in the following way:
All the functions are supposed to be observed on an evenly-spaced, one-
dimensional grid of P points: .
Value
The function returns a list of L matrices, one for each component of
the multivariate functional random variable, containing the discretized
values of the generated observations (in form of
matrices).
See Also
exp_cov_function
, mfData
,
generate_gauss_fdata
Examples
N = 30
P = 1e2
L = 3
time_grid = seq( 0, 1, length.out = P )
C1 = exp_cov_function( time_grid, alpha = 0.1, beta = 0.2 )
C2 = exp_cov_function( time_grid, alpha = 0.2, beta = 0.5 )
C3 = exp_cov_function( time_grid, alpha = 0.3, beta = 1 )
centerline = matrix( c( sin( 2 * pi * time_grid ),
sqrt( time_grid ),
10 * ( time_grid - 0.5 ) * time_grid ),
nrow = 3, byrow = TRUE )
generate_gauss_mfdata( N, L, centerline,
correlations = c( 0.5, 0.5, 0.5 ),
listCov = list( C1, C2, C3 ) )
CholC1 = chol( C1 )
CholC2 = chol( C2 )
CholC3 = chol( C3 )
generate_gauss_mfdata( N, L, centerline,
correlations = c( 0.5, 0.5, 0.5 ),
listCholCov = list( CholC1, CholC2, CholC3 ) )