Determines the direction of trends in HRV metrics using linear regression. The function fits a linear model to the values and categorizes the slope into descriptive trend categories.
calculate_trend_direction(values)Character string describing the trend direction and magnitude:
"Stable" (abs(slope) < 0.1)
"Slight Increase" (0.1 <= slope <= 0.5)
"Strong Increase" (slope > 0.5)
"Slight Decrease" (-0.5 <= slope < -0.1)
"Strong Decrease" (slope < -0.5)