Modeling time varying density objects with respect to L2-Wasserstein distance by Fréchet variance trajectory
VarObj(tgrid, yin =NULL, hin =NULL, din =NULL, qin =NULL, optns = list())
Arguments
tgrid: Time grid vector for the time varying object data.
yin: An array or list of lists holding the samples of observations. If yin is an array, it has size n x length(tgrid) x numbers of samples holding the observation, such that yin[i,j,] holds the observations to the ith sample at the jth time grid. If yin is a list of lists, yin[[i]][[j]] holds the observations to the ith sample at the jth time grid.
hin: A list of lists holding the histogram for each subject. hin[[i]][[j]] holds the histogram to the ith sample at the jth time grid.
din: A three dimension array of size n x length(tgrid) x length(optns$dSup) holding the observed densities, such that din[i,j,] holds the observed density function taking values on optns$dSup corresponding to the ith sample at the jth time grid.
qin: A three dimension array of size n x length(tgrid) x length(optns$qSup) holding the observed quantiles, such that din[i,j,] holds the observed density function taking values on optns$qSup corresponding to the ith sample at the jth time grid. Note that only one of yin, hin, din and qin needs to be input. If more than one of them are specified, yin overwrites hin, hin overwrites din and din overwrites qin. where each row holds the observations for one subject on the common grid tGrid.
optns: a list of options control parameters specified by list(name=value).
Returns
A list of the following: - tgridout: Time grid vector for the output time varying object data.
K: Numbers of principal components.
nu: A vector of dimension length(tgridout) giving the mean function support on tgridout of the Fréchet variance function.
lambda: A vector of dimension K containing eigenvalues.
phi: A length(tgridout) X K matrix containing eigenfunctions support on tgridout of the Fréchet variance function.
xiEst: A n X K matrix containing the FPC estimates.
cumFVE: A vector of dimension K with the fraction of the cumulative total variance explained with each additional FPC.
FPCAObj: FPCA Object of Fréchet variance function.
tgridin: Input tgrid.
qSup: A vector of dimension length(tgridin) giving the domain grid of quantile functions qout.
qout: A three dimension array of dimension n x length(tgridin) x length(qSup) holding the observed quantiles, such that qout[i,j,] holds the observed density function taking values on qSup corresponding to the ith sample at the jth time grid.
qmean: A length(tgridin) X length(qSup) matrix containing the time varying Fréchet mean function.
VarTraj: A n X length(tgridin) matrix containing the variance trajectory.
Details
Available control options are qSup, nqSup, dSup and other options in FPCA of fdapace.