View source: R/depthbasedreconstructPOFD.R
depthbasedreconstructionPOFD | R Documentation |
This function implements the reconstruction procedure [1] which is based on the depth measure [2] for partially observed functional data. Missing trajectories are imputed by the mean of the k nearest neighbors within the envelope. The parameter k is tuned minimizing the Mean Squared Error of the reconstruction in the observed part of the curve.
depthbasedreconstructionPOFD(data, id_recons = 1:dim(data)[2])
data |
Data matrix 'p' by 'n', being 'n' the number of functions and 'p' the number of grid points. The row names of the matrix should be the common evaluation grid and the column names the identifiers of each functional data. |
id_recons |
Vector indicating functions to be reconstructed. By default, all functions are reconstructed. |
[1] Elías, A., Jiménez, R., & Shang, H. L. (2023). Depth-based reconstruction method for incomplete functional data. Computational Statistics, 38(3), 1507-1535.
[2] Elías, A., Jiménez, R., Paganoni, A. M., & Sangalli, L. M. (2023). Integrated depths for partially observed functional data. Journal of Computational and Graphical Statistics, 32(2), 341-352.
The reconstructed data matrix 'recons_data'.
data <- exampleData$PoFDintervals
recons_data <- depthbasedreconstructionPOFD(data, id_recons = 1:2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.