Biostatistics D Final Project

Abstract

Background: Chronic pain can trigger a stress response, leading to autonomic imbalance characterized by increased sympathetic output. Heart Rate Variability Biofeedback (HRV-B) is a novel biobehavioral intervention designed to restore autonomic balance by teaching individuals to regulate their autonomic function. This study aimed to evaluate the effectiveness of HRV-B training in reducing pain and stress levels among individuals with chronic pain. Additionally, the study explored the potential mediating role of stress in the relationship between HRV-B training duration and pain, as well as the moderating effects of demographic variables. Method: A retrospective analysis was conducted using data from 5,753 participants undergoing HRV-B training. Key variables included pain levels, stress levels, training duration, and demographic characteristics (weight, height, age, gender). Data underwent thorough validation, with missing values and implausible outliers addressed to ensure reliability. The analysis involved modeling the trajectories of pain, stress, and training duration over time using linear mixed-effects models. Mediation analysis was performed to assess whether stress mediated the effect of HRV-B on pain reduction, and moderation analysis was conducted to explore the impact of demographic variables. Predictive models for pain and stress were developed using available data, excluding stress and pain respectively. Results: The HRV-B training was associated with a significant reduction in pain levels over time, though it had minimal impact on stress levels. Mediation analysis revealed no significant mediating effect of stress on the relationship between HRV-B duration and pain. Furthermore, moderation analysis indicated that demographic variables, such as weight, height, age, and gender, did not significantly alter the effects of HRV-B training on pain, with height showing only a small direct association with pain reduction. Predictive models achieved moderate accuracy, with week index and height as significant predictors of pain levels and demographic factors, HRV-B duration, and stress duration ratio as key predictors of stress levels. Conclusion: HRV-B training appears to be effective for pain management among individuals with chronic pain, though its impact on stress is limited. The lack of a significant mediation effect of stress suggests that HRV-B’s influence on pain reduction may operate independently of stress modulation. These findings underscore the potential of HRV-B for managing pain and highlight areas for further research, including the development of personalized HRV-B protocols and additional interventions to address stress in chronic pain management.

Introduction & Background

Pain often triggers a stress response that leads to an increase in sympathetic nervous system activity and results in autonomic imbalance. One of the measures used to evaluate autonomic function is heart rate variability (HRV), a valid and easy-to-perform indicator of autonomic balance. Recent developments in HRV biofeedback (HRV-B) have introduced a novel method for individuals to learn how to regulate their autonomic function, potentially restoring balance between the sympathetic and parasympathetic branches of the nervous system.

HRV-B training is believed to help individuals reduce pain and stress by improving autonomic function. This study aims to evaluate the efficacy of HRV-B training in reducing pain levels among individuals with pain. Furthermore, it investigates the hypothesis that stress levels mediate the effect of HRV-B training on pain, with additional analyses exploring the moderating effects of variables such as weight, height, age, and gender.

Methods

This study conducted a retrospective analysis on a dataset of individuals with chronic pain who participated in Heart Rate Variability Biofeedback (HRV-B) training, a biobehavioral intervention aimed at restoring autonomic balance by managing stress responses. Participants recorded regular measurements of their pain and stress levels alongside demographic details, including weight, height, age, and gender. The data collection spanned several weeks, with weekly records of HRV-B training duration and self-reported pain and stress levels. To assess the efficacy of HRV-B training, we analyzed the trajectories of pain and stress over time, employing linear mixed-effects models to account for repeated measures. Mediation analysis was conducted to explore whether changes in stress mediated the relationship between HRV-B training duration and pain reduction, while moderation analysis evaluated whether demographic variables (weight, height, age, and gender) influenced this relationship. Additionally, two predictive models were developed: one to forecast pain levels excluding stress as a predictor, and another to predict stress levels excluding pain, enabling an independent assessment of the impact of HRV-B training duration and demographic factors on each outcome. The study’s primary focus was on understanding the direct and indirect effects of HRV-B training on pain and stress, as well as the potential moderating roles of individual characteristics.

Data Presentation

The study population comprised 5,753 participants, with 44% males (n = 2,533) and 56% females (n = 3,220). The average weight was notably higher in males (80.8 kg) compared to females (64.4 kg), with an overall mean of 71.7 kg. Similarly, height was greater in males, averaging 179 cm compared to 165 cm in females, yielding an overall mean of 171 cm. Age distribution was fairly consistent across genders, with males averaging 41.9 years and females 41.4 years, and an overall average of 41.6 years.

When assessing pain levels, the mean average pain reported by females (5.67) was slightly higher than that reported by males (5.42), though the overall mean was 5.56. Missing data was prevalent for average pain and average stress, with nearly 46% missing values in both genders. In terms of average stress, males reported a higher mean stress level (5.16) compared to females (4.69), resulting in an overall average of 4.89.

For training behavior, males averaged more days of training per week (3.92) compared to females (3.51), with an overall mean of 3.69 days per week. Males also reported a higher total duration of training (mean = 1,480 minutes) compared to females (mean = 1,170 minutes), with an overall average of 1,310 minutes. The week index, indicating the point in time during the HRV-B intervention, was similar between males and females, with a median of 4 weeks for both genders.

Outliers were identified in several key variables, highlighting potentially problematic data points. For example, extreme values in age were found, with some records indicating participants’ ages below 1 year, which are biologically implausible. Additionally, height values exceeding 250 cm were observed, which are unusually high and outside typical human biological ranges. In terms of total training duration, certain participants reported values greater than 6,000 minutes, which indicates extreme or potentially erroneous training data. Lastly, some average stress levels were reported above 10, suggesting implausibly high stress measurements that could impact the accuracy of the analysis. These extreme values were carefully considered when analyzing the dataset to ensure the reliability of the findings.

Male
(N=2533)
Female
(N=3220)
Overall
(N=5753)
Weight (kg)
Mean (SD) 80.8 (13.4) 64.4 (13.8) 71.7 (15.9)
Median [Min, Max] 79.0 [51.0, 150] 62.0 [40.0, 148] 70.0 [40.0, 150]
Height (cm)
Mean (SD) 179 (26.9) 165 (7.28) 171 (20.0)
Median [Min, Max] 178 [160, 710] 165 [145, 210] 170 [145, 710]
Age (years)
Mean (SD) 41.9 (25.3) 41.4 (14.6) 41.6 (20.0)
Median [Min, Max] 40.0 [-494, 88.0] 37.0 [16.0, 93.0] 38.0 [-494, 93.0]
gender
Male 2533 (100%) 0 (0%) 2533 (44.0%)
Female 0 (0%) 3220 (100%) 3220 (56.0%)
Average Pain
Mean (SD) 5.42 (2.39) 5.67 (2.43) 5.56 (2.42)
Median [Min, Max] 6.00 [0, 10.0] 6.00 [0, 10.0] 6.00 [0, 10.0]
Missing 1166 (46.0%) 1451 (45.1%) 2617 (45.5%)
Average Stress
Mean (SD) 5.16 (2.33) 4.69 (2.36) 4.89 (2.36)
Median [Min, Max] 6.00 [0, 12.0] 5.00 [0, 10.0] 5.00 [0, 12.0]
Missing 1166 (46.0%) 1451 (45.1%) 2617 (45.5%)
Days of Training in Week
Mean (SD) 3.92 (1.75) 3.51 (1.64) 3.69 (1.70)
Median [Min, Max] 4.00 [1.00, 7.00] 3.00 [1.00, 7.00] 4.00 [1.00, 7.00]
Total Duration of Training (min)
Mean (SD) 1480 (1120) 1170 (830) 1310 (981)
Median [Min, Max] 1170 [361, 14700] 924 [200, 12900] 1010 [200, 14700]
Week Index
Mean (SD) 4.75 (3.45) 4.48 (3.42) 4.60 (3.44)
Median [Min, Max] 4.00 [0, 11.0] 4.00 [0, 11.0] 4.00 [0, 11.0]

A.Reviewing and adressing Missing Data and Outliers in the Dataset

After thoroughly reviewing the dataset, we observed significant patterns of missing data, particularly in key variables such as “avg_pain” and “avg_stress,” which both exhibited 45.5% missing data. These variables play a critical role in our analysis, especially in testing hypotheses related to the effects of HRV-B training and mediation models.

In addition to the missing data, we identified several problematic outliers. These include extreme values in “age_in_years” (values below 1 year) - 4 values, “height_in_cm” (values above 250 cm) - 6 Values, “total_duration_in_min” (values exceeding 6000 minutes) - 14 values, and “avg_stress” (values above 10) - 1 value. These extreme values were deemed implausible and could distort the results of the analysis if left unaddressed. Consequently, these outliers were removed from the dataset to ensure more accurate modeling and to avoid skewing the findings.

With all missing values and outliers removed, the dataset is now prepared for further analysis. From this point forward, no missing or extreme values will affect the results, allowing us to focus on the key research questions with a more consistent and reliable dataset.

Descriptive Statistics

A1.Descriptive Statistics of the Study Population

The descriptive statistics of the study population reveal key sociodemographic and anthropometric insights. As visualized in the charts, the age distribution of participants shows a predominance of individuals between 20 to 60 years, with a notable peak around the 30 to 40-year range. The range of ages spans from approximately 16 years to 93 years, with a fairly consistent distribution across both genders.

In terms of weight, the majority of the participants fall within the 60 to 90 kg range, with a few outliers indicating participants weighing either below 50 kg or over 120 kg. The weight distribution shows a higher density around the 70 kg mark, indicating a balanced distribution of weight in the study population.

The height distribution shows the majority of participants measuring between 160 cm and 180 cm, with a clear peak around 170 cm. A small number of participants were taller, with a few extreme cases above 200 cm, but these are rare. The spread in height appears to follow a relatively normal distribution.

The gender distribution, as shown in the bar plot, indicates a slightly higher number of female participants compared to males in the study. This pattern aligns with the overall demographic breakdown in the sample, where 56% of the participants were female and 44% male.

These charts provide a foundational overview of the population’s demographics, which will be crucial in interpreting the HRV-B training and its potential effects on pain and stress levels, as well as other variables.

A3.Average Total Duration by Week Index and Days of Training

Average Total Duration by Week Index and Days of Training The chart shows the average total training duration (in minutes) across the weeks of HRV-B training, grouped by the number of training days per week. Participants who trained 7 days a week (pink line) consistently recorded the highest training duration, with peaks over 3000 minutes, showing significant variability across weeks. Those training fewer days (1-2 days, red and yellow lines) maintained lower, more stable durations, below 500 minutes.

Overall, as the number of training days increases, the total training duration rises, with more frequent training leading to higher cumulative minutes. Week-to-week fluctuations are most pronounced for those training 7 days a week.

A4.Correlation Between Stress, Pain, Week Index, and Days of Training

The table below presents the correlation matrix for the key variables in the dataset: avg_stress, avg_pain, week_index, and days_training_in_week. Notably, avg_stress and avg_pain are the only dependent variables in this analysis, reflecting the primary outcomes of interest in assessing intervention effects.

Average Stress (avg_stress) exhibits a slight positive correlation with week_index (0.28), suggesting that stress levels have a tendency to increase slightly over time during the intervention period. Average Pain (avg_pain) shows a moderate negative correlation with week_index (-0.34), indicating a general decrease in pain over time, aligning with the observed trends in the data. The correlation between days_training_in_week and avg_stress is weak (0.07), indicating minimal association between training frequency and stress levels. Similarly, the correlation between days_training_in_week and avg_pain is slightly negative (-0.08), suggesting a minor association between increased training frequency and reduced pain levels.

These observations underscore that while avg_stress and avg_pain are the primary dependent outcomes in this dataset, their relationships with other variables, such as time and training frequency, highlight nuanced patterns in the intervention’s effects.

Correlation Matrix for Stress, Pain, Week Index, and Days Training in Week
avg_stress avg_pain week_index days_training_in_week
avg_stress 1.00 -0.04 0.28 0.07
avg_pain -0.04 1.00 -0.34 -0.08
week_index 0.28 -0.34 1.00 -0.16
days_training_in_week 0.07 -0.08 -0.16 1.00

1.Modeling and Testing the Trajectories and Effect of Pain, Stress, and HRV-B Training Duration Fluctuations

A1.Modeling The Trajectory Of Pain, Stress And HRV-B Training Duration Fluctuations

The charts below illustrate the trajectories of average pain, average stress, and HRV-B training duration over both week index and days of training per week.

Pain Trajectory The “Trajectory of Average Pain over Week Index” shows a notable decline in pain levels, especially in the initial weeks, with pain stabilizing around week 4. This suggests that continuous HRV-B training may contribute to pain reduction over time. The “Trajectory of Average Pain over Days Training in Week” displays a decrease in pain levels with more training days per week. This trend reinforces the potential impact of frequent HRV-B training on reducing pain levels.

Stress Trajectory In the “Trajectory of Average Stress over Week Index”, there is an initial increase in stress levels, which then plateaus. This pattern might reflect participants’ adaptation to the HRV-B intervention, with stress stabilizing as they acclimate to the training.

The “Trajectory of Average Stress over Days Training in Week” chart shows a slight increase in stress as the number of training days rises. This could imply that while frequent training benefits pain management, it may contribute to mild stress elevation.

HRV-B Training Duration Trajectory The “Trajectory of HRV-B Duration over Week Index” reveals a gradual decrease in training duration over time, potentially indicating adaptation or increased efficiency in training. Conversely, the “Trajectory of HRV-B Duration over Days Training in Week” shows a steady increase with more training days, highlighting the importance of training frequency in sustaining HRV-B engagement.

A2.Linear Mixed Effects Model For Repeated Measures On Avg_Pain, Avg_Stress, Total_Duration_In_Min

The table below summarizes linear mixed effects models used to analyze the trajectory of pain, stress, and HRV-B training duration over time, represented by the week_index variable. Each model evaluates the effect of time on these outcomes separately.

For pain and stress, the week_index coefficient is statistically significant (p < 0.001), suggesting that week index is associated with changes in these outcomes over time. Specifically, the negative estimate for week_index in the pain model (-0.219) indicates a gradual decrease in pain over time, whereas the positive estimate for stress (0.178) suggests a slight increase in stress over the weeks.

The HRV-B training duration model also shows a significant negative association with week_index (-44.010), indicating a decrease in HRV-B duration over time. This may suggest that the frequency or intensity of HRV-B training diminishes as the weeks progress.

These results provide insights into the temporal trends for pain, stress, and HRV-B duration, with time-related changes for each variable that could inform further analyses or interventions aimed at stabilizing or improving these measures over time.

Linear Mixed Effects Models for Pain, Stress, and HRV-B by Week Index
Model effect group term estimate std.error df statistic p.value
Pain (week_index) fixed NA (Intercept) 6.628 0.059 2170 112.905 0.000
Pain (week_index) fixed NA week_index -0.219 0.010 2170 -21.550 0.000
Stress (week_index) fixed NA (Intercept) 4.018 0.066 2170 61.271 0.000
Stress (week_index) fixed NA week_index 0.178 0.010 2170 18.296 0.000
HRV-B (week_index) fixed NA (Intercept) 1391.280 27.566 2170 50.470 0.000
HRV-B (week_index) fixed NA week_index -44.010 3.678 2170 -11.966 0.000

B.Testing The Effect Of The HRV-B Training On Pain, Stress And HRV-B Training Duration Fluctuations

B1.Linear Mixed Effects Model for Repeated Measures of Average Pain, Average Stress, and Total Training Duration with Fixed Effects of Training Days and Random Intercepts by ID

The table below presents linear mixed effects models evaluating the impact of the number of HRV-B training days per week on pain, stress, and HRV-B training duration. Each model includes the variable days_training_in_week to assess whether training frequency influences these outcomes.

Pain Model the coefficient for days_training_in_week is negative (-0.049) and marginally significant (p = 0.051), suggesting a slight trend toward reduced pain with increased training days, though this effect is not strong enough to reach conventional significance levels.

Stress Model days_training_in_week has a positive but non-significant coefficient (0.022, p = 0.343), indicating no significant association between the number of training days and stress levels.

HRV-B Training Duration Model shows a significant positive association with days_training_in_week (estimate = 363.635, p < 0.001), indicating that as the number of training days per week increases, the duration of HRV-B training also significantly increases. This suggests that participants are spending more time in HRV-B training as they engage in it more frequently.

In summary, while increased training days show a slight trend toward reducing pain and significantly increase training duration, they do not significantly impact stress levels. These findings offer partial support for the efficacy of HRV-B training in influencing pain and training duration but not stress.

Linear Mixed Effects Models for Pain, Stress, and HRV-B by Number Of Days Training
Model effect group term estimate std.error df statistic p.value
Pain (trainings_per_week) fixed NA (Intercept) 5.923 0.109 2170 54.555 0.000
Pain (trainings_per_week) fixed NA days_training_in_week -0.049 0.025 2170 -1.951 0.051
Stress (trainings_per_week) fixed NA (Intercept) 4.656 0.104 2170 44.703 0.000
Stress (trainings_per_week) fixed NA days_training_in_week 0.022 0.024 2170 0.949 0.343
HRV-B (trainings_per_week) fixed NA (Intercept) -93.570 27.448 2170 -3.409 0.001
HRV-B (trainings_per_week) fixed NA days_training_in_week 363.635 6.153 2170 59.102 0.000

2.Mediation Analysis of Stress in the Relationship Between HRV-B Training Duration and Pain

A.Testing The Mediating Role Of Stress In The Effect Of HRV-B Training Duration On Pain

To evaluate the mediating role of stress in the effect of HRV-B training duration on pain, three linear mixed models were analyzed

Mediated Effect (table one) This model examines the effect of average stress and week index on average pain. The estimate for the week index effect is -0.216, with a significant p-value (< 0.001), indicating that, on average, pain decreases by 0.216 units per week. The effect of average stress on pain is -0.013, with a non-significant p-value (0.482). This suggests that, although there is a small negative relationship, stress does not significantly impact pain in this model.

Direct Effect (table two) This model assesses the effect of HRV-B training duration and week index on average stress. The estimate for the effect of HRV-B training duration on stress is 0.000 (with a significant p-value < 0.001), implying that HRV-B training duration has a statistically significant but very minimal positive impact on stress. Practically, this suggests that increases in HRV-B training duration are associated with almost negligible increases in stress levels. The week index effect on stress is 0.187, indicating a small but significant weekly increase in stress.

Total Effect (table three) This model includes HRV-B training duration, week index, and average stress as predictors of pain, representing the total effect of HRV-B training on pain. The estimate for week index is -0.227, with a significant p-value (< 0.001), showing that pain decreases by approximately 0.227 units per week. The HRV-B training duration effect on pain is 0.000 (significant at p < 0.001), suggesting that HRV-B training has a statistically significant but practically minimal effect on pain reduction. The effect of average stress on pain remains non-significant, with an estimate of -0.006 and a p-value of 0.767, further indicating that stress does not meaningfully contribute to pain in this model.

Linear Mixed Model for Average Pain with Week Index and Average Stress
Value Std.Error DF t-value p-value
(Intercept) 6.692 0.102 2169 65.844 0.000
week_index -0.216 0.010 2169 -22.016 0.000
avg_stress -0.013 0.019 2169 -0.703 0.482
Linear Mixed Model for Average Stress with Week Index and HRV-B Training Duration
Value Std.Error DF t-value p-value
(Intercept) 3.702 0.093 2169 39.703 0
week_index 0.187 0.009 2169 21.265 0
total_duration_in_min 0.000 0.000 2169 5.085 0
Linear Mixed Model for Average Pain with Week Index, Average Stress, and HRV-B Training Duration
Value Std.Error DF t-value p-value
(Intercept) 6.957 0.118 2168 59.106 0.000
week_index -0.227 0.010 2168 -22.490 0.000
avg_stress -0.006 0.019 2168 -0.297 0.767
total_duration_in_min 0.000 0.000 2168 -4.414 0.000

Based on the Mediation Analysis Summary, the mediation effects of stress on the relationship between HRV-B training duration and pain were evaluated. The Average Causal Mediation Effect (ACME), Average Direct Effect (ADE), and Total Effect all have estimated values of 0.000, with confidence intervals that suggest no effect in either direction (all confidence intervals are [0.00, 0.00]). The p-values associated with ACME and Proportion Mediated indicate no statistical significance (p = 0.860 for ACME and Prop. Mediated), reinforcing the finding that stress does not play a meaningful mediating role in this relationship.

In conclusion, these results suggest that HRV-B training duration does not impact pain through stress levels, as evidenced by the lack of significant mediation effect in the observed model. This further supports the notion that any pain reduction associated with HRV-B training duration likely operates through direct mechanisms rather than indirectly through changes in stress.

Mediation Analysis Summary
Effect Estimate X95..CI.Lower X95..CI.Upper p.value
ACME 0.000 0.000 0.00 0.860
ADE 0.000 0.000 0.00 0.000
Total Effect 0.000 0.000 0.00 0.000
Prop. Mediated 0.006 -0.033 0.04 0.860

The diagram below illustrates a conceptual model that tests the hypothesis of whether stress mediates the effect of HRV-B training duration on pain. The arrows depict different types of effects between HRV-B training duration, stress, and pain, with the key pathways and their observed statistical significance detailed below:

Direct Effect: This pathway represents the impact of HRV-B training duration on stress, with a near-zero but statistically significant positive effect. The small estimate (0.000 with p < 0.001) suggests that increasing the duration of HRV-B training has a minimal yet statistically measurable impact on stress levels.

Mediated Effect: This pathway examines whether stress influences pain outcomes as a mediator. However, the analysis reveals that the effect of stress on pain is statistically non-significant (estimate = -0.013, p = 0.482), indicating that stress does not meaningfully alter pain levels in this model. Thus, stress does not mediate the relationship between HRV-B training duration and pain reduction.

Indirect Effect: This path theoretically represents the combined effect of HRV-B training duration on pain through stress. However, given the lack of significant mediation by stress, this indirect effect is minimal and not statistically meaningful in contributing to pain reduction.

Total Effect: This pathway encompasses both direct and indirect influences of HRV-B training duration on pain. The overall effect of HRV-B training duration on pain is statistically significant (estimate = 0.000 with p < 0.001), but its practical impact remains minimal. The week index in the model shows a larger, significant negative impact on pain (estimate = -0.227, p < 0.001), suggesting that pain reduction over time is primarily attributed to other factors rather than mediated by stress.

In summary, this mediation model confirms that while HRV-B training duration has a statistically significant yet minimal effect on pain, this reduction does not occur through changes in stress levels. Instead, the observed pain reduction likely operates through other mechanisms not captured by stress as a mediating factor. This supports the conclusion that stress does not play a meaningful role as a mediator in this relationship.

B.Testing The Potential Moderating Role Of Weight_In_Kg, Height_In_Cm, Age_In_Years, And Gender In This Model

Weight The table below examines the potential moderating role of weight in the relationship between HRV-B training duration, stress, and pain. The results show that weight_in_kg itself does not have a significant direct effect on pain (estimate = -0.006, p = 0.395). The interaction terms HRV-B training duration and weight (total_duration_in_min, estimate = 0.000, p = 0.595) and stress and weight (avg_stress, estimate = 0.000, p = 0.977) are also non-significant. This suggests that weight does not moderate the effects of HRV-B training duration or stress on pain levels. Therefore, in this model, weight does not play a significant role as a moderator in the relationship between HRV-B training, stress, and pain.

Linear Mixed Model for Average Pain with Week Index, Average Stress, HRV-B Training Duration, and Weight
Value Std.Error DF t-value p-value
(Intercept) 7.376 0.511 2166 14.442 0.000
week_index -0.227 0.010 2166 -22.482 0.000
total_duration_in_min 0.000 0.000 2166 -1.458 0.145
avg_stress -0.003 0.078 2166 -0.039 0.969
weight_in_kg -0.006 0.007 950 -0.851 0.395
total_duration_in_min:weight_in_kg 0.000 0.000 2166 0.532 0.595
avg_stress:weight_in_kg 0.000 0.001 2166 -0.028 0.977

Height The table below evaluates the potential moderating role of height in the effects of HRV-B training duration and stress on pain. The results indicate that height_in_cm has a small but significant direct effect on pain (estimate = -0.032, p = 0.006), suggesting that taller individuals may experience slightly lower pain levels. However, the interaction terms—HRV-B training duration and height (total_duration_in_min, estimate = 0.000, p = 0.847) and stress and height (avg_stress, estimate = 0.003, p = 0.110)—are non-significant. This implies that height does not moderate the effects of HRV-B training duration or stress on pain levels. Therefore, while height has a direct association with pain, it does not play a moderating role in this model.

Linear Mixed Model for Average Pain with Week Index, Average Stress, HRV-B Training Duration, and Height
Value Std.Error DF t-value p-value
(Intercept) 12.310 1.968 2166 6.256 0.000
week_index -0.228 0.010 2166 -22.540 0.000
total_duration_in_min 0.000 0.001 2166 -0.066 0.948
avg_stress -0.498 0.310 2166 -1.605 0.109
height_in_cm -0.032 0.012 950 -2.736 0.006
total_duration_in_min:height_in_cm 0.000 0.000 2166 -0.193 0.847
avg_stress:height_in_cm 0.003 0.002 2166 1.597 0.110

Age The table below explores the potential moderating role of age on the effects of HRV-B training duration and stress on pain. The direct effect of age_in_years on pain is not significant (estimate = -0.010, p = 0.232), indicating that age alone does not have a direct impact on pain levels in this model. Additionally, the interaction terms—HRV-B training duration and age (total_duration_in_min , estimate = 0.000, p = 0.598) and stress and age (avg_stress , estimate = 0.002, p = 0.071) are also not significant. This suggests that age does not significantly moderate the effects of HRV-B training duration or stress on pain. In summary, age does not play a moderating or direct role in influencing pain levels in this context.

Linear Mixed Model for Average Pain with Week Index, Average Stress, HRV-B Training Duration, and Age
Value Std.Error DF t-value p-value
(Intercept) 7.346 0.350 2166 20.965 0.000
week_index -0.227 0.010 2166 -22.343 0.000
total_duration_in_min 0.000 0.000 2166 -0.925 0.355
avg_stress -0.097 0.054 2166 -1.797 0.072
age_in_years -0.010 0.008 950 -1.195 0.232
total_duration_in_min:age_in_years 0.000 0.000 2166 -0.527 0.598
avg_stress:age_in_years 0.002 0.001 2166 1.809 0.071

Gender The table below examines the potential moderating role of gender on the effects of HRV-B training duration and stress on pain. The direct effect of gender (Female) on pain is not significant (estimate = 0.376, p=0.114), indicating that gender alone does not have a direct impact on pain levels in this model. Additionally, the interaction terms HRV-B training duration and gender (estimate = 0.000, p=0.357) and stress and gender (estimate = -0.063, p=0.078) are also not significant. This suggests that gender does not significantly moderate the effects of HRV-B training duration or stress on pain. In summary, gender does not play a moderating or direct role in influencing pain levels in this context.

Linear Mixed Model for Average Pain with Week Index, Average Stress, HRV-B Training Duration, and Gender
Value Std.Error DF t-value p-value
(Intercept) 6.701 0.186 2166 36.020 0.000
week_index -0.228 0.010 2166 -22.471 0.000
total_duration_in_min 0.000 0.000 2166 -3.796 0.000
avg_stress 0.034 0.028 2166 1.199 0.231
genderFemale 0.376 0.238 950 1.581 0.114
total_duration_in_min:genderFemale 0.000 0.000 2166 0.921 0.357
avg_stress:genderFemale -0.063 0.036 2166 -1.765 0.078

Conclusion The analysis shows that weight, height, age, and gender do not significantly moderate the relationship between HRV-B training duration, stress, and pain. While height has a small direct association with pain, none of these demographic variables play a moderating role in influencing pain levels in this model.

3.Development and Validation of a Predictive Model for Pain Levels Excluding Stress Variables

A.Predictive Model of Pain Levels Using All Available Data Except Stress Levels

Model Summary The table below provides the fixed effects of the model, which predicts average pain based on week_index, total_duration_in_min (HRV-B training duration), weight_in_kg, height_in_cm, age_in_years, and gender. Significant predictors include:

week_index (estimate = -0.228, p < 0.001) Shows a significant negative effect on pain, suggesting that pain decreases over time.

total_duration_in_min (estimate = 0.000, p < 0.001) A very small but statistically significant effect, indicating that HRV-B training duration slightly impacts pain.

height_in_cm (estimate = -0.028, p = 0.001) Height has a significant negative effect, suggesting taller individuals report slightly less pain on average. Other predictors, such as weight, age, and gender, did not show statistically significant effects on pain in this model.

Linear Mixed Model for Average Pain with Demographic and Training Predictors
effect group term estimate std.error df statistic p.value
fixed NA (Intercept) 11.547 1.460 2169 7.908 0.000
fixed NA week_index -0.228 0.010 2169 -24.006 0.000
fixed NA total_duration_in_min 0.000 0.000 2169 -4.325 0.000
fixed NA weight_in_kg 0.005 0.005 947 1.069 0.285
fixed NA height_in_cm -0.028 0.009 947 -3.226 0.001
fixed NA age_in_years -0.003 0.004 947 -0.683 0.495
fixed NA genderFemale -0.124 0.158 947 -0.787 0.432

Model Validation The diagnostic plots provide insights into the model’s assumptions:

Histogram of Residuals with Normal Curve The residuals appear approximately normally distributed, aligning well with the overlaid normal curve, suggesting that the model errors are reasonably normal.

Q-Q Plot of Residuals Most points follow the theoretical quantile line closely, with slight deviations at the tails, further supporting the assumption of normality for residuals.

Residuals vs. Fitted Values Plot This plot shows no clear patterns, indicating homoscedasticity (constant variance) across the range of fitted values, which is a key assumption for linear models.

Model Performance The R-squared value of 0.596 suggests that approximately 59.6% of the variance in pain levels is explained by the model, indicating a moderate level of predictive accuracy.

Conclusion The model effectively predicts pain levels using demographic and training-related variables, with week index and height being particularly influential predictors. The R-squared value and diagnostic plots support the model’s validity, indicating that it meets key assumptions and captures a substantial portion of the variability in pain outcomes.

R-squared for Observed vs. Predicted Average Pain
Metric Value
R-squared 0.596

B.Predictive Model of Stress Levels Using All Available Data Except Pain Levels

Model Summary The table below provides a summary of the fixed effects in the model for predicting average stress levels, incorporating week_index, total_duration_in_min (HRV-B training duration), stress_duration_ratio, weight_in_kg, height_in_cm, age_in_years, and gender as predictors. Significant predictors include:

week_index (estimate = 0.185, p < 0.000) Indicates that stress levels slightly increase over time.

total_duration_in_min (estimate = 0.000, p < 0.000) Though the effect size is very small, HRV-B training duration has a statistically significant positive impact on stress levels.

stress_duration_ratio (estimate = -1.306, p < 0.001) Has a significant negative effect, suggesting that a higher ratio of stress duration is associated with reduced average stress levels.

age_in_years (estimate = 0.014, p = 0.001) and genderFemale (estimate = -0.498, p = 0.002) Both age and gender (with females reporting slightly lower stress) show statistically significant effects on stress.

Other predictors, such as weight and height, do not significantly impact stress in this model.

Linear Mixed Model for Average Stress with Demographic and Training Predictors
effect group term estimate std.error df statistic p.value
fixed NA (Intercept) 4.765 1.499 2168 3.178 0.002
fixed NA week_index 0.185 0.009 2168 21.055 0.000
fixed NA total_duration_in_min 0.000 0.000 2168 4.203 0.000
fixed NA stress_duration_ratio -1.307 0.224 2168 -5.834 0.000
fixed NA weight_in_kg -0.007 0.005 947 -1.522 0.128
fixed NA height_in_cm -0.003 0.009 947 -0.288 0.773
fixed NA age_in_years 0.014 0.004 947 3.200 0.001
fixed NA genderFemale -0.498 0.163 947 -3.063 0.002

Model Validation The diagnostic plots provide an evaluation of the model’s assumptions:

Histogram of Residuals with Normal Curve The residuals are approximately normally distributed, aligning well with the normal curve, suggesting that the error terms follow a normal distribution.

Q-Q Plot of Residuals The residuals mostly follow the theoretical quantile line, with minor deviations at the tails, indicating approximate normality.

Residuals vs. Fitted Values Plot This plot shows a random scatter around the zero line, suggesting no clear patterns, which supports the assumption of homoscedasticity (constant variance).

Model Performance The R-squared value of 0.655 suggests that approximately 65.5% of the variance in stress levels is explained by the model, indicating a moderate-to-strong level of predictive accuracy.

Conclusions The model demonstrates that week index, HRV-B training duration, stress duration ratio, age, and gender significantly influence stress levels, with these predictors explaining approximately 65.5% of the variance. Notably, stress slightly increases over time during the intervention, while a higher stress duration ratio correlates with lower average stress levels. Age and gender also play significant roles, with females reporting slightly lower stress. Overall, this model provides valuable insights into the factors that contribute to stress fluctuations, emphasizing the combined impact of time, training, and demographic characteristics.

R-squared for Observed vs. Predicted Average Pain
Metric Value
R-squared 0.655

Conclusions

This study evaluated the efficacy of Heart Rate Variability Biofeedback (HRV-B) training as a biobehavioral intervention to restore autonomic balance and manage pain and stress among individuals with chronic pain. The data underwent rigorous validation, with missing values and implausible outliers addressed to ensure the reliability of the analysis.

Key findings include:

Trajectory Analysis: Pain levels demonstrated a significant downward trajectory over time, suggesting that continuous HRV-B training may contribute to pain reduction. Stress levels showed a slight increase initially but stabilized in later weeks, potentially reflecting adaptation to HRV-B training. Training duration exhibited a gradual decline, possibly indicating adaptation in training needs or participant adherence over time.

Effect of HRV-B on Pain, Stress, and Training Duration: HRV-B training frequency was associated with a reduction in pain levels, although the effect on stress was minimal, suggesting that HRV-B may primarily influence pain rather than stress. More frequent training was also significantly linked to longer total training durations, highlighting adherence among participants with higher training frequency.

Mediation and Moderation Analysis: Stress did not mediate the relationship between HRV-B training and pain reduction, indicating that the effect of HRV-B on pain may operate through direct mechanisms rather than through stress. Additionally, demographic factors such as weight, height, age, and gender did not significantly moderate the HRV-B-pain relationship, with only height showing a slight direct association with pain reduction.

Predictive Models: The predictive model for pain, excluding stress as a predictor, identified significant factors including week index and height, capturing about 59.6% of the variability in pain levels. Similarly, the predictive model for stress, excluding pain, identified significant predictors such as week index, HRV-B training duration, stress duration ratio, age, and gender, achieving a moderate predictive accuracy with an R-squared value of 0.655.

Overall, these findings indicate that HRV-B training holds promise for pain management in individuals with chronic pain, even though its impact on stress appears limited. The lack of a mediating role for stress suggests that HRV-B’s primary pathway for pain reduction may be independent of stress modulation. Further research could investigate individualized HRV-B protocols or explore additional factors that may enhance both pain and stress reduction outcomes in chronic pain populations.