This function implements a constructor for elements of
mfData, aimed at implementing a representation of a multivariate
the (evenly spaced) grid over which the functional dataset is defined.
The functional dataset is represented as a collection of
each one an object of class
fData. Each component must contain elements
defined on the same grid as the others, and must contain the same number of
The function returns a
S3 object of class
the following elements:
N": the number of elements in the dataset;
L": the number of components of the functional dataset;
P": the number of points in the 1D grid over which elements
t0": the starting point of the 1D grid;
tP": the ending point of the 1D grid;
fDList": the list of
fData objects representing the
L components as corresponding univariate functional datasets.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# Defining parameters N = 1e2 P = 1e3 t0 = 0 t1 = 1 # Defining the measurement grid grid = seq( t0, t1, length.out = P ) # Generating an exponential covariance matrix to be used in the simulation of # the functional datasets (see the related help for details) C = exp_cov_function( grid, alpha = 0.3, beta = 0.4 ) # Simulating the measurements of two univariate functional datasets with # required center and covariance function Data_1 = generate_gauss_fdata( N, centerline = sin( 2 * pi * grid ), Cov = C ) Data_2 = generate_gauss_fdata( N, centerline = sin( 2 * pi * grid ), Cov = C ) # Building the mfData object mfData( grid, list( Data_1, Data_2 ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.