Code for obtaining the envelope Ji of a curve specified by the index i. The implementation is based on Algorithm 1 in [1]. References:
envelope(data, i, max_iter = 10)
Envelope (set of indices).
Data matrix.
Index of curve.
Maximum number of nearest curves considered in for loop. By default, max_iter = 5.
[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.