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 1/2 L (L-1) correlation coefficients \rho_{ij} in the model generating data. They have to be provided in the following order:

(\rho_{1,2},\ldots,\rho_{1,L},\rho_{2,3},\ldots,\rho_{2,L},\ldots, \rho_{L,L-1}),

that is to say, the row-wise, upper triangular part of the correlation matrix without the diagonal.

listCov

a list containing the L covariance operators (provided in form of a P \times P matrix), one for each component of the multivariate functional random variable, that have to be used in the generation of the processes \epsilon_1(t), \ldots, \epsilon_L(t). At least one argument between listCov and listCholCov must be different from NULL.

listCholCov

the Cholesky factor of the L covariance operators (in P \times P matrix form), one for each component of the multivariate functional random variable, that have to be used in the generation of the processes \epsilon_1(t), \ldots, \epsilon_L(t). At least one argument between listCov and listCholCov must be different from NULL.

Details

In particular, the following model is considered for the generation of data:

X(t) = ( m_1( t ) + \epsilon_1( t ), \ldots, m_L(t) + \epsilon_L(t)), \quad t \in I = [a, b]

where L is the number of components of the multivariate functional random variable, m_i(t) is the i-th component of the center and \epsilon_i(t) is a centered gaussian process with covariance function C_i. That is to say:

Cov( \epsilon_{i}(s), \epsilon_{i}(t) ) = C( s, t ), \quad \forall i = 1, \ldots, L, \quad \forall s, t \in I

A correlation structure among \epsilon_1(t),\ldots,\epsilon_L(t) is allowed in the following way:

Cor( \epsilon_i(t), \epsilon_j(t)) = \rho_{i,j}, \quad \forall i \neq j, \quad \forall t \in I.

All the functions are supposed to be observed on an evenly-spaced, one- dimensional grid of P points: [ a = t_0, t_1, \ldots, t_{P-1} = b] \subset I .

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 N \times P 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 ) )


[Package roahd version 1.4.3 Index]