SCM

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: Sliding window on HRV using time and frequency domain [ Reply ]
By: Abraham Otero on 2021-11-27 18:34
[forum:49208]
Hello,

The CreateTimeAnalysis should only return a single value for each parameter, since it uses the entire recording to estimate temporal indices. If you want to perform an analysis in some type of window-episode, see section 5.3.5 of the tutorial (https://rhrv.r-forge.r-project.org/tutorial/tutorial.pdf)

CalculatePoIrBand should not return a vector with a size equal to the RR vector, since it will use windows of size = 30 seconds for the power calculation, returning a single power value for each window. Shift = 1 seems excessive to me; in a way this implies that you are looking for changes that could happen in as little as 1 second. On the other hand, using 30-second windows, the ULF band and, probalby the VLF would not make much sense, as they contain frequencies too low to be estimated with 30-second windows.

Sliding window on HRV using time and frequency domain [ Reply ]
By: Steffen Lehmann on 2021-11-25 17:20
[forum:49207]
I am trying to do an analysis on some IBI data using a sliding window. I am interested in SDNN, rMSSD, LF, HF and LFHF. The goal is to have a data frame where each row corresponds to a Timestamp, so I can see the change in HRV over time and compare it to the rest of my data.

Here is a link to our github branch: https://github.com/MED-Master/MED7-DataAnalysis/blob/HRV-analysis/Analysis.Rmd . The code chunk is called Heart Rate Measures HRV and starts on line 217.

Right now, I have code working on a single vector. However, I have two issues that I cannot figure out:
(1)The function CreateTimeAnalysis only returns one values for parameter.
hrv.data = CreateTimeAnalysis(hrv.data, size = 30, interval = 7.8125)

(2)The sliding window in the function CalculatePoIrBand does not return a list of equal length to the vector input.
Here is the function I am calling. I want a window size of 30 seconds that moves by one row for each computation which should make the vector input and output to equal length. However, right now the code returns a list with a length of 603 but the input vector is 1018 long.
hrv.data = CalculatePoIrBand(hrv.data, indexFreqAnalysis= 1, size = 30, sizesp = 45, shift = 1, type = "fourier", ULFmin = 0, ULFmax = 0.03, VLFmin = 0.03, VLFmax = 0.05, LFmin = 0.05, LFmax = 0.15, HFmin = 0.15, HFmax = 0.4 )

Thanks for your help!

Thanks to:
Vienna University of Economics and Business Powered By FusionForge