mfData: 'S3' class for multivariate functional datasets

Description Usage Arguments Details Value See Also Examples

View source: R/fData.R

Description

This function implements a constructor for elements of S3 class mfData, aimed at implementing a representation of a multivariate functional dataset.

Usage

1
mfData(grid, Data_list)

Arguments

grid

the (evenly spaced) grid over which the functional dataset is defined.

Data_list

a list containing the L components of the multivariate functional dataset, defined as 2D data structures (e.g. matrix or array) having as rows the N observations and as columns the P measurements on the grid provided by grid.

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:

See Also

fData, generate_gauss_fdata, generate_gauss_mfdata

Examples

 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 ) )

roahd documentation built on May 20, 2017, 3:53 a.m.

Search within the roahd package
Search all R packages, documentation and source code