Estimates the complexity of a time series across a range of temporal
scales (Costa, Goldberger & Peng 2002): the series is coarse-grained
(non-overlapping block-averaged) at each scale factor, and
sample_entropy() is computed on each coarse-grained series, using a
tolerance held fixed relative to the original (not the coarse-grained)
series' standard deviation – this is the standard MSE convention and
essential for entropy values to be comparable across scales. Direct
C++ port of the coarse-graining + sample-entropy core in PhysioNet's
reference mse.c (Costa), validated to reproduce the compiled
reference binary's output exactly (to its own displayed precision) on
synthetic test data. See inst/COPYRIGHTS.
Arguments
- x
Numeric vector. The time series to analyse.
- scale_max
Integer >= 1. Largest scale factor to evaluate; MSE is computed at every integer scale from
1toscale_max. Default20(the standard MSE convention).- m
Integer >= 1. Template length, passed to
sample_entropy(). Default2(the standard MSE convention).- r
Numeric > 0. Tolerance as a fraction of the original series' standard deviation, passed to
sample_entropy(). Default0.15(the standard MSE convention).
Value
A list with:
- scale
The scale factors evaluated,
1:scale_max.- mse
Sample entropy at each scale (may contain
NAat large scales, where the coarse-grained series becomes too short to estimate reliably).- m, r
The parameters used, echoed back for reference.
