Get Multivariate Functional Data from a list of matrices
get_mfd_list( data_list, grid = NULL, n_basis = 30, lambda = NULL, lambda_grid = 10^seq(-10, 1, length.out = 10), ncores = 1 )
A named list of matrices. Names of the elements in the list denote the functional variable names. Each matrix in the list corresponds to a functional variable. All matrices must have the same dimension, where the number of rows corresponds to replications, while the number of columns corresponds to the argument values at which functions are evaluated.
A numeric vector, containing the argument values at which functions are evaluated. Its length must be equal to the number of columns in each matrix in data_list. Default is NULL, in this case a vector equally spaced numbers between 0 and 1 is created, with as many numbers as the number of columns in each matrix in data_list.
An integer variable specifying the number of basis functions; default value is 30. See details on basis functions.
A non-negative real number.
If you want to use a single specified smoothing parameter
for all functional data objects in the dataset,
this argument is passed to the function
Default value is NULL, in this case the smoothing parameter is chosen
by minimizing the generalized cross-validation (GCV) criterion
over the grid of values given by the argument.
See details on how smoothing parameters work.
A vector of non-negative real numbers.
lambda is provided as a single number, this argument is ignored.
lambda is NULL, then this provides
the grid of values over which the optimal smoothing parameter is
searched. Default value is
An object of class
mfd for additional details
on the multivariate functional data class.
Basis functions are created with
fda::create.bspline.basis(domain, n_basis), i.e.
B-spline basis functions of order 4 with equally spaced knots
are used to create
The smoothing penalty lambda is provided as
fda::fdPar(bs, 2, lambda),
where bs is the basis object and 2 indicates that
the integrated squared second derivative is penalized.
Rather than having a list of matrices,
you may have a data frame with long format,
i.e. with all functional observations in a single column
for each functional variable.
In this case, see