| Variable | Recorded Values | Missing Values | % Miss Values |
|---|---|---|---|
| Preop HbA1c | 653 | 181 | 21.70 |
| 1-Month HbA1c | 206 | 628 | 75.30 |
| 3-Month HbA1c | 475 | 359 | 43.05 |
| 6-Month HbA1c | 410 | 424 | 50.84 |
| Year HbA1c | 290 | 544 | 65.23 |
We start with quantile-quantile plots (Q-Q plots) to visually evaluate for normality in the data:
Winning trick: the closer datapoints line up with the line proposed by the Q-Q plot, the closer the data is to a normal distribution.
Shapiro-Wilk’s test for Normality
## variables statistic p_value
## 1 Preop HbA1c 0.8312335 1.101613e-25
## 2 HbA1c 1-month 0.8586827 1.770142e-12
## 3 HbA1c 3-months 0.8817955 2.204902e-18
## 4 HbA1c 6-months 0.8740162 1.371731e-17
## 5 HbA1c 1-year 0.8527173 6.367683e-16
The results show a p-value < 0.05 for all the variables which is interpreted as the distribution of all variables are significantly different than a normal distribution. This means that the subsets will have to be analyzed with non-parametric methods.
| Variables | mean_hba1c | median | SD |
|---|---|---|---|
| Preop HbA1c | 6.14 | 5.8 | 1.13 |
| HbA1c 1-month | 5.93 | 5.7 | 0.93 |
| HbA1c 3-months | 5.63 | 5.5 | 0.73 |
| HbA1c 6-months | 5.56 | 5.4 | 0.69 |
| HbA1c 1-year | 5.50 | 5.3 | 0.79 |
##
## Kruskal-Wallis rank sum test
##
## data: HbA1c_value by Group
## Kruskal-Wallis chi-squared = 188.85, df = 4, p-value < 2.2e-16
The result of the Kruskal-Wallis test shows a p-value < 0.0000000000000016, therefore it is concluded that there are significant differences between the treatment groups.
To be able to know the pairs of groups that are different a multiple pairwise-comparison test has to be implemented.
##
## Pairwise comparisons using Wilcoxon rank sum test
##
## data: melted$HbA1c_value and melted$Group
##
## hba1c_preop one_hba1c three_hba1c six_hba1c
## one_hba1c 0.0510 - - -
## three_hba1c < 2e-16 8.1e-05 - -
## six_hba1c < 2e-16 1.8e-07 0.0552 -
## year_hba1c < 2e-16 5.4e-11 2.0e-05 0.0051
##
## P value adjustment method: BH
The results of the multiple pairwise-comparison, according to the p-values, show statistical significant differences between the following variables: