| mfpca_vd | R Documentation |
Performs a multivariate functional principal component analysis (MFPCA) for functional data observed on subject-specific (variable) domains. Each functional variable is first decomposed through a variable domain FPCA, and the resulting univariate scores are combined into a domain-varying multivariate decomposition.
mfpca_vd(
Data,
Times = NULL,
M_grid = NULL,
Hz = 1,
m_npcs = NULL,
u_npcs = 5,
k_m = 15,
model_type = "gam"
)
Data |
A list (one entry per functional variable) of matrices with
subjects in rows and observation points in columns, with |
Times |
A list of matrices, the same shape as |
M_grid |
A numeric vector of length |
Hz |
Sampling rate used to build the equidistant grid when |
m_npcs |
Number of multivariate principal components to retain. If
|
u_npcs |
Number of univariate principal components retained per variable
(default |
k_m |
Dimension of the basis used to model the score covariances along
the domain (default |
model_type |
Either |
The observation times can be supplied in two mutually exclusive ways. With
Times, each variable carries a matrix (subjects in rows, observation
points in columns) holding the actual observation time of every measurement,
and the domain of subject i is taken as the maximum observed time. With
M_grid, the observations are assumed equidistant and M_grid is a
vector of length N giving the domain length of each subject, so subject
i is evaluated on seq(0, M_grid[i], by = 1 / Hz). Exactly one of
Times or M_grid must be provided.
A list with the following items:
scores_mMatrix of multivariate scores.
efunctions_mMultivariate eigenfunctions, as a list over domains, each a list over variables.
efunctions_uUnivariate eigenfunctions, as a list over variables.
scores_uMatrix of univariate scores.
evalues_uUnivariate eigenvalues, as a list over variables.
evalues_mMultivariate eigenvalues, as a list over domains.
var_uCumulative variance explained by the univariate components.
mean_modelThe fitted univariate mean models (one per variable).
M_gridThe domain grid used.
argvals_uThe observation times of each subject, as a list over variables, each a list over subjects.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.