CalculateSampleEntropy {RHRV} | R Documentation |
Sample Entropy (also known as Kolgomorov-Sinai Entropy)
Description
These functions measure the complexity of the RR time series. Large values of the Sample Entropy indicate high complexity whereas that smaller values characterize more regular signals.
Usage
CalculateSampleEntropy(HRVData,
indexNonLinearAnalysis = length(HRVData$NonLinearAnalysis), doPlot = TRUE)
EstimateSampleEntropy(HRVData,
indexNonLinearAnalysis = length(HRVData$NonLinearAnalysis),
regressionRange = NULL, useEmbeddings = NULL, doPlot = TRUE)
PlotSampleEntropy(HRVData,
indexNonLinearAnalysis = length(HRVData$NonLinearAnalysis), ...)
Arguments
HRVData |
Data structure that stores the beats register and information related to it |
indexNonLinearAnalysis |
Reference to the data structure that will contain the nonlinear analysis |
doPlot |
Logical value. If TRUE (default), a plot of the correlation sum is shown |
regressionRange |
Vector with 2 components denoting the range where the function will perform linear regression |
useEmbeddings |
A numeric vector specifying which embedding dimensions should the algorithm use to compute the sample entropy. |
... |
Additional plot parameters. |
Details
The sample entropy is computed using:
h_q(m,r) = log(C_q(m,r)/C_{q}(m+1,r))
where m is the embedding dimension and r is the radius of the neighbourhood. When
computing the correlation dimensions we use the linear regions from the correlation
sums in order to do the estimates. Similarly, the sample entropy h_q(m,r)
should not change for both various m and r.
Value
The CalculateSampleEntropy returns a HRVData structure containing the sample entropy computations of the RR time series under the NonLinearAnalysis list.
The EstimateSampleEntropy function estimates the sample entropy of the RR time series by performing a linear regression over the radius' range specified in regressionRange. If doPlot is TRUE, a graphic of the regression over the data is shown. In order to run EstimateSampleEntropy, it is necessary to have performed the sample entropy computations before with ComputeSampleEntropy. The results are returned into the HRVData structure, under the NonLinearAnalysis list.
PlotSampleEntropy shows a graphic of the sample entropy computations.
Note
In order to run this functions, it is necessary to have used the CalculateCorrDim function.
This function is based on the sampleEntropy
function from the
nonlinearTseries package.
References
H. Kantz and T. Schreiber: Nonlinear Time series Analysis (Cambridge university press)
See Also
Examples
## Not run:
# ...
hrv.data = CreateNonLinearAnalysis(hrv.data)
hrv.data = CalculateCorrDim(hrv.data,indexNonLinearAnalysis=1,minEmbeddingDim=2,
maxEmbeddingDim=8,timeLag=1,minRadius=1,maxRadius=15,
pointsRadius=20,theilerWindow=10,corrOrder=2,doPlot=FALSE)
hrv.data = CalculateSampleEntropy(hrv.data,indexNonLinearAnalysis=1,doPlot=FALSE)
PlotSampleEntropy(hrv.data,indexNonLinearAnalysis=1)
hrv.data = EstimateSampleEntropy(hrv.data,indexNonLinearAnalysis=1,regressionRange=c(6,10))
## End(Not run)