| mfData {roahd} | R Documentation |
S3 class for multivariate functional datasets
Description
This function implements a constructor for elements of S3 class
mfData, aimed at implementing a representation of a multivariate
functional dataset.
Usage
mfData(grid, Data_list)
Arguments
grid |
the (evenly spaced) grid over which the functional dataset is defined. |
Data_list |
a |
Details
The functional dataset is represented as a collection of L components,
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
elements (N).
Value
The function returns a S3 object of class mfData, containing
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 are measured;"
t0": the starting point of the 1D grid;"
tP": the ending point of the 1D grid;"
fDList": the list offDataobjects representing theLcomponents as corresponding univariate functional datasets.
See Also
fData, generate_gauss_fdata,
generate_gauss_mfdata
Examples
# 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 ) )