This repository contains the R script used for the analyses in the study on pain reduction in patients treated with Natrox therapy.
This script demonstrates the statistical analysis of pain levels before and after Natrox therapy. The analyses aim to:
- Evaluate overall pain reduction.
- Compare continuous and discontinuous treatments.
- Investigate associations between clinical conditions and pain outcomes.
The following R packages are necessary to execute the analyses:
- ggplot2
- ggalluvial
- MASS
- dplyr
This script performs the following analyses:
- Overall pain reduction: Paired Wilcoxon signed-rank test for ordinal data.
- Subgroup analysis: Wilcoxon tests for continuous and discontinuous treatment groups.
- Comparative effectiveness: Comparison of pain reduction between the two groups (Mann-Whitney U test or t-test).
- Logistic regression: Binary logistic regression to estimate odds ratios for "No Pain" based on clinical conditions.
- Visualization: Sankey plots illustrating pain transitions before and after treatment.
- Download or clone this repository.
- Prepare a dataset (
data.csv
) with the format described in the script. - Open the script (
main_analysis.R
) in RStudio. - Install the required R packages (see above).
- Run the script to replicate the analyses.
The data file (data.csv
) used in this study is not publicly available but can be provided upon reasonable request. The script demonstrates the workflow for the analyses without requiring access to the raw data.
This repository is licensed under CC0 1.0 Universal (Public Domain). The code is free to use, modify, and distribute without restrictions.