Formula: iterative sifting into intrinsic mode functions. Given the running residual r, the sifting loop of Huang et al (1998) sec. 4 is
locate the local maxima and minima of h;
cubic-spline the maxima into an upper envelope u and the minima into a lower envelope l;
m = (u + l) / 2 ; h <- h - m;
stop when SD = sum (h_k - h_{k-1})^2 / sum h_{k-1}^2 < sd_tol (Huang eq. 5.5, recommended 0.2-0.3).
The extracted h is an IMF; it is subtracted from r and the loop
repeats until the residual has fewer than three extrema or
max_imf IMFs have been taken. Endpoints are appended to both
extremum sets so the envelopes span the record.
References
Huang, Shen, Long, Wu, Shih, Zheng, Yen, Tung & Liu (1998), Proc. R. Soc. Lond. A 454(1971):903-995, doi:10.1098/rspa.1998.0193.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Emdtsm(V)
#> $estimate
#> [1] 0
#>
#> $n_imf
#> [1] 0
#>
#> $imfs
#> numeric(0)
#>
#> $residual
#> [1] 1 2 3 4 5 6 7 8
#>
#> $completeness
#> [1] 0
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Empirical Mode Decomposition"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
