## Comparing sleep studies in terms of the Apnea-Hypopnea Index using dedicated Shiny web application

Marcel Mglyph[suppress]y´czak l n 1 , glyph[star] , Tulio A. Valdez , and Wojciech Kukwa 2 3

1 Warsaw University of Technology, Faculty of Mechatronics, Institute of Metrology and Biomedical Engineering, 8 Boboli Street, 02-525 Warsaw, Poland, marcel.mlynczak@pw.edu.pl 2 Stanford University, Department of Otolaryngology, Palo Alto, California, US 3 Medical University of Warsaw, Department of Otorhinolaryngology, Warsaw, Poland

## Abstract

The Apnea-Hypopnea Index (AHI) is one of the most-used parameters from the sleep study that allows assessing both the severity of obstructive sleep apnea and the reliability of new devices and methods. However, in many cases, it is compared with a reference only via a correlation coefficient, or this value is at least the most emphasized. In this paper, we discuss the limitations of such an approach and list several alternative quantitative and qualitative techniques, along with their interpretations. We propose the assessment of clinical significance along with the statistical one. Qualitative analysis can be used for this purpose, or we suggest using the ranking function which enables consideration of various AHI values with different weights. It can be reliable for both adult-related and pediatric sleep studies. The dedicated Shiny web application, written in R, was developed to enable quick analysis for both physicians and statisticians.

## Keywords

Apnea-Hypopnea Index, correlation coefficient, Bland-Altman analysis, clinical significance, ranking function, Shiny web application

## Highlights

- · AHI is the most popular parameter assessing the sleep-disordered breathing severity.
- · It is used to evaluate the new devices, but too often by only a correlation coefficient.
- · Other context-increasing qualitative and quantitative approaches are discussed.
- · Shiny Web application is provided to enable quick calculations and comparisons.
- · The clinical significance may be tested, e.g., by applying the ranking function.

## 1 Introduction

Obstructive sleep apnea (OSA) is the most severe form of sleep-disordered breathing. It is a common health problem, moderate to severe forms affecting 49 7% of men and 23 4% . . of women, according to the latest epidemiological data [1]. This condition affects all age groups, with a prevalence of 2 -4% in children, and a peak prevalence occurring at 2-8 years of age for pediatric patients [2-6].

The gold standard study for diagnosing OSA is polysomnography (PSG), and one of the main parameters is the Apnea-Hypopnea Index (AHI). It allows assessment of the degree of sleep-disordered breathing, particularly considering the number of apneas and hypopneas within a single 'average' hour during sleep. It is generally accepted and widely used. Based on the medical guidelines, there are four qualitative subranges of sleep apnea for adults [7]:

- · Normal: AHI &lt; 5,
- · Mild: 5 glyph[lessorequalslant] AHI &lt; 15,
- · Moderate: 15 glyph[lessorequalslant] AHI &lt; 30, and
- · Severe: AHI glyph[greaterorequalslant] 30.

Different thresholds are used for the same classifications in the pediatric population:

- · Normal: AHI &lt; 1,
- · Mild: 1 glyph[lessorequalslant] AHI &lt; 5,
- · Moderate: 5 glyph[lessorequalslant] AHI &lt; 10, and
- · Severe: AHI glyph[greaterorequalslant] 10.

PSG is a very complex and costly test. Therefore, many different abbreviated sleep studies (usually home sleep tests, HST) are being developed, and all of these need to be validated against full polysomnography. Therefore, new devices and/or methods evaluating obstructive sleep apnea (and sleep disordered breathing in general) are undergoing comparative studies wherein they are used to measure AHI, and assessed against reference equipment.

## 1.1 Correlation coefficient

However, despite the guidelines, still the exact (raw) values are compared, very often using correlation coefficients, like in a recent meta-analysis of peripheral arterial tonometry diagnostics [8] or an assessment of portable wireless sleep monitors [9].

There is nothing inherently wrong with the analysis of numbers instead of diagnostics subranges; however, it appears that the meaning of the correlation coefficient was overlooked

in those cases. Several issues should be addressed in the context of AHI comparison. Firstly, correlation coefficient does not evaluate the clinical significance of the method, e.g., how often subjects are correctly classified (as normal, mild, moderate, or severe). It is also susceptible to outliers and influential observations. Pearson's version should be used only for data with a normal distribution, a condition usually unfulfilled due to a limited range of physiologically relevant values and the spectrum of the invited study group. Also, its interpretation is connected with a linear model - many regression lines, with different slopes and intercepts, may produce high correlation coefficients, even if not clinically relevant (slope of 45 degrees without the intercept). Additionally, there is no insight into whether the slope is slightly greater than or (to the same extent) less than 1, which might otherwise drive important conclusions on the reliability of the tested device.

## 1.2 Qualitative approaches

Therefore, we asked the question - how to compare results from sleep studies, and to emphasize possible clinical (not only statistical) errors?

Parameters of the possible quantitative approaches that still work with raw values, but do not (or to a much lesser extent) introduce the aforementioned misinterpretations, are (the order is arbitrary): the intercept of the linear model that best fits data points; the slope of another linear model with the intercept value forced to 0; the p-value (or test statistics) from a Wilcoxon rank paired test (or from a paired T-test in case of normally distributed data); the rho value (along with its p-value) from Spearman's rank correlation test (not assuming a normal distribution); Lin's Concordance Correlation Coefficient (with its confidence interval limits), measuring how far the data deviate from the line of perfect concordance (line at 45 degrees) [10,11]; the bias correction factor (from Lin's analysis), that determines how far the best-fit line deviates from a line at 45 degrees (no deviation from the 45 degree line occurs when factor equals 1) [10-12].

Also, the following quantitative ones might be mentioned: mean difference of AHI scores and ± 1 96 . SD of AHI score differences on a Bland-Altman plot (means of AHI scores on the X-axis, and differences of AHI scores on the Y-axis) [13]; slope and intercept of the linear model that best fits data points on the modified Bland-Altman plot (in which reference values are used instead of the mean AHI scores on the X-axis) - this technique enables one to assess whether the nature of the differences' distribution depends strictly on the reference value; simple heuristic ratio - the number of data points above the Y = X line divided by the number of points below it; or mean absolute error (MAE). Another technique, the relativedeviation Bland-Altman plot, may also be used to complete the analysis with regards to the visual distribution of points [14].

## 1.3 Quantitative approaches - clinical significance

While the techniques listed above are mathematically correct, all of them use the numerical data directly, without supplying the right context (established subranges of AHI and their clinical interpretations). Therefore, qualitative techniques are also important, being able to estimate 'clinical significance' along with 'statistical significance'. The introductory concept is presented in Fig. 1. It is an illustration of squares, that if the values from both measurements are inside, the same clinical approach to a patient would be performed ('same clinical approach' means that in the medical guidelines the same medical procedure is proposed when the subjects are within the same AHI subranges - it doesn't matter if one has, for example, AHI 16 and the other 28). The main idea behind the figure is that the method can 'clinically' comparable to the reference when points are within squares, not only when as close to Y = X line as possible.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00960v4-figure-b19940fd-420b-4145-ba6e-3bb4c3f19115.jpg)

Reference AHI value

Figure 1: While assessing the clinical significance of the results compared to the reference, one needs to check whether the points are inside presented squares, even if the numerical differences are relatively large (but still within the same clinical interpretation - AHI subrange). The figure presents squares for adults.

The main parameters - accuracy, sensitivity, specificity, positive and negative predictive values (PPV and NPV, respectively), or Cohen's Kappa - may then be estimated for the specific case. The accuracy is the ratio of the number of correctly classified data points to the total number of data points. Even if there is a relatively big difference, as between 16 and 28, the assignment to a group will be the same, unlike for 14 and 16, which could result in

the patient receiving different treatment. The sensitivity can be calculated as the proportion of true positives; it can be extended to a multi-variables case by making the positive state the one being analyzed, and grouping all others into the negative. The extended specificity uses the same definition, with true positives replaced by true negatives.

PPV and NPV are the proportions of predicted positive and negative results in the test to the true positive and true negative results, respectively. Cohen's Kappa is a more robust value, which describes the accuracy after removing the effect of random choice and takes into account possible imbalances in the data; all values greater than 0 mean that the method is better than a coin toss (the maximum is 1, the same as for accuracy).

Additionally, multi-class Receiver Operating Characteristic (multi-class ROC) analysis may provide the parameter of area under the curve (AUC), along with pair-wise ROC curves [15, 16].

## 1.4 Objectives

This work aims to discuss approaches of the AHI comparison, and their mathematical and clinical interpretations; to propose a novel ranking function to enhance values around different clinical managements; and to present the Shiny web application, which contributes to the field by implementing selected methods and enabling extended analysis of data.

## 2 Materials and Methods

## 2.1 Shiny web application

The dedicated Shiny web application [17] (written in R with external packages: shiny [18], shinythemes [19], ggplot2 [20], plotly [21], DT [22], BlandAltmanLeh [23], caret [24], e1071 [25], DescTools [12], pROC [16], grid [26] and ggExtra [27]) was developed primarily for doctors and clinicians in order to enable work with these methods using only two vectors reference and measurement AHI values.

The home page, containing inputs (left panel), tabs (upper right) and the output display (lower right) is shown in Fig. 2.

The input file should be an Excel spreadsheet with two columns comprising reference AHI values and values from a tested device. Before any file is uploaded, the tabs present the results of the analysis of the default data, coming from [28], a study assessing the agreement between the AHI parameters measured by portable monitor and by reference polysomnogram. The data are not well concordant, which facilitates presentation.

In the left panel, the app enables choosing all thresholds to determine which subrange the specific result is located in (by default, these are 5, 15 and 30, as presented in the Introduction for the adult-related group). It is also possible to set the minimum and maximum of the ranking function (by default, 0 5 . and 1 5, . respectively), and the approximation approach (the function is described in the next section).

Figure 2: The home page of the Shiny web application, supplemental for the paper [17].

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00960v4-figure-cb441b0e-9194-4ef7-9d32-ba8098a45685.jpg)

Contents provides the preview of the Data. Pearson's Correlation tab can be used for estimating the coefficient and the p-value of the statistical test. Extended Correlation tab allows estimation of Spearman's correlation coefficient (rho) and p-value, along with Lin's coefficient, confidence intervals, and bias correction factor (which measures how far the best-fit line deviates from a line at 45 degrees. No deviation from the 45 degree line occurs when factor equals 1). Linear models calculates intercept of the linear model when intercept is included, slope of another model when intercept is excluded; and both equations with the figure are provided. Wilcoxon test tab implements Wilcoxon rank paired test p-value calculation (with interpretation), and the histogram of differences is also presented.

Bland-Altman plot presents the results of the method. Modified BA plot also presents the results, but in comparison to the original method, reference AHI values create X axis and slope of the linear model is calculated. Relative Deviation BA plot enables presentation of relative differences - this is related with Bland-Altman plot. MAE, eMAE &amp; Heuristics tab collects mean absolute error, extended mean absolute error (after applying ranking function described in the next section) and heuristic ratio - being a ratio between values above and below Y = X line. Qualitative analysis presents several results of the analysis based on defined subranges of AHI values, e.g., accuracy, Cohen's Kappa, statistics by class etc. ROC analysis allows calculating multiclass-ROC area under the curve, supplemented by pair-wise ROC figures.

Other visual/analytical methods are possible (like finding the distribution of absolute or square differences, Bayesian reasoning, etc.); due to their poorer interpretability from the

physician's perspective, they were not considered further.

## 2.2 Ranking function

Coming back to the statement that the difference between 16 and 28 may be less significant from the clinical point of view than that between 14 and 16 (which may cause different treatment to be prescribed), and considering an approach based on numerical values, we would like to propose a ranking function that will allow the introduction of weights, which should be multiplied by the original difference, increasing its impact around hotspots (for standard adult-related AHI analysis, they are 5, 15 and 30) and decreasing impact in the middles of the subranges.

Of course, the definition of such a ranking function may vary. There may be cubic, sinusoidal or linear approximations between hotspots. All are available to be selected in the application. We decided to set a default value of 1 5 at hotspots and a value of 0 5 at range . . midpoints. We also decided, that the function would equal 0 5 after twice as big as the third . hotspot - 60 by default for adult population. The shapes of such functions are presented in Fig. 3. The graph is produced by: (1) taking into account hotspots (for adults 5, 15 and 30 by default); (2) establishing extrema values; (3) interpolating the function in between based on the chosen method (cubic by default). For instance, when finding the formula for the range between AHI 5 and 15, the parabola is searched to cross 3 points (5 and 15 at maximum, and 10 (middle) at minimum.

Figure 3: The shapes of the proposed ranking functions - three different approximations cubic (default), sinusoidal and linear; the X-axis value is the reference AHI and the Y-axis presents the coefficient for multiplying the difference.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00960v4-figure-c6f46f41-39d7-44e9-8087-0e40d232a38c.jpg)

Further generalization can take into account the case in which each of the points is near a different hotspot, with both still in the same subrange. For clarity and simplicity, we

propose to apply the multiplier of 0 5, as explained below, for the extended mean absolute . error (eMAE) formula (1)

$$\ e M A E \, = \, \frac { 1 } { n } \sum _ { i = 1 } ^ { n } A \left ( e _ { i } \right ) \cdot B \left ( r e f _ { i } \right ) \cdot \left | r e s _ { i } - r e f _ { i } \right |$$

where n is the number of participants in the study, res is the measured AHI value, ref is the reference value, i is the iterator counting successive participants, B is the ranking function, and A is the function with a value of 0 5 for points ( . e ) in the same subrange of AHI values, and 1 0 for others. . Of course, the chosen values may be different, but we decided to set them arbitrarily.

## 2.3 Testing procedure

The motivation of the testing procedure is to show how to quantify the performance of methods for automatically estimating the AHI. The elaborated solution was carried out on two sample independent (in terms of the method and subjects) datasets: (1) on the data from the paper [28] (available online), and (2) from [29] (received from authors). The former consists of 71 observations, the latter - 304 points coming from testing subset. The demographics of subjects included in the studies are reported in Table 1.

Table 1: The summary of demographic parameters of the participants included in the assessed studies [28,29]

.

|                     | Dataset 1 [28]   | Dataset 2 [29]   |
|---------------------|------------------|------------------|
| N                   | 71               | 304              |
| Age [Y; mean ± SD ] | 52 ± 10          | 54 . 8 ± 15 . 4  |
| Sex [F/M]           | 29 / 42          | 64 / 240         |
| Normal [N]          | 6                | 32               |
| Mild [N]            | 17               | 60               |
| Moderate [N]        | 9                | 62               |
| Severe [N]          | 39               | 150              |

The Results section presents the most important results produced for two various sample datasets (and the eMAE is compared for all considered approximation approaches), using the app [17]. The reason why we chose the two datasets were to present worse and better results, which came from two independent methods.

## 3 Results

Scatter-plots of data are presented in Fig. 4, along with the Pearson's correlation coefficients, the p-values of the correlation test, the formulas and lines for the simple linear regressions

with intercept, and only the formulas for another simple linear regressions calculated without considering intercept.

Figure 4: The scatter-plots and basic statistics of the data points (in the Shiny web app, the plot is divided into two tabs: Pearson's Correlation and Linear models). a) On the left - the analysis on the first dataset; b) on the right - the analysis on the second dataset.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00960v4-figure-3e78e0f3-cea9-4ba7-8259-41594aa6aa3f.jpg)

One can note that for the former dataset the intercept of the first considered linear model was 16 928, even higher than the second hotspot. On the other hand, the slope of the model . with the intercept value forced to 0 is 0 883. . The latter dataset has close slopes, 0 97, and . 1 001, for the model with and without considering intercept in the linear model, respectively. .

The Spearman's rho were about 0 68, and 0 95, respectively. In both cases, it was similar . . to the Lin's coefficient, which does not differ much from the other correlation measures, as the bias correction factor is very close to 1, regardless of poor data concordance for the first dataset.

As the data did not come from a normal distribution, a Wilcoxon rank paired test should be performed. The p-values of 0 95 and 0 04 were reported, respectively. . . It indicates that for the first case there is no cause to reject the null hypothesis - exact medians; however, slight, but statistically significant difference is observed - probably due to higher N.

The Bland-Altman plots are presented in Fig. 5. The mean value of the differences (without using their absolute values) are -1 91 and . -0 59, respectively; and the mean spread . calculated by the ± 1 96 . SD measure are 56 62 and 17 03, respectively. . . For the first dataset it is very high, which can also be observed in the Bland-Altman plot's high percentages of relative deviation.

For the modified Bland-Altman (Fig. 6), the slope of the linear model for the first considered dataset was relatively high, about 0 34, . showing that the difference between values is related to the actual value. It does not apply for the latter dataset (which is

Figure 5: The Bland-Altman plots of the analyzed data points. a) On the left - the analysis on the first dataset; b) on the right - the analysis on the second dataset.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00960v4-figure-d2288baf-a2a0-44e1-8752-1bc884dec329.jpg)

positive).

Figure 6: The modified Bland-Altman plots of the analyzed data points, along with the linear model. a) On the left - the analysis on the first dataset; b) on the right - the analysis on the second dataset.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00960v4-figure-438c4ce4-9e81-4844-ad4f-5b77c4fd01d4.jpg)

The values of MAE and eMAE for all considered ranking functions are gathered in Table 2.

Presented results show that eMAE enable stressing the errors more than regular MAE, and cubic ranking function little more than sinusoidal and linear, as the mean value of ranking function throughout the range is the lowest (the differences are the highest around hotspots).

For qualitative analysis, the three main parameters for both datasets were as stored in

Table 2: The values of mean absolute errors and extended mean absolute errors (for all ranking functions - cubic, sinusoidal and linear). The relative differences are estimated in relation to Dataset 2.

|                   | Dataset   | Dataset 2   | Relative difference   |
|-------------------|-----------|-------------|-----------------------|
| MAE               | 20 . 21   | 5 . 91      | 2.42x                 |
| eMAE (Cubic)      | 11 . 90   | 2 . 76      | 3.31x                 |
| eMAE (Sinusoidal) | 13 . 88   | 3 . 24      | 3.28x                 |
| eMAE (Linear)     | 13 . 85   | 3 . 23      | 3.29x                 |

Table 3.

Table 3: The summary of qualitative analysis of both considered datasets, and assuming default boundaries of subranges as for adults.

|                 | Dataset 1   | Dataset 2   |
|-----------------|-------------|-------------|
| Accuracy [%]    | 57 . 7      | 84 . 2      |
| Cohen's Kappa   | 0 . 32      | 0 . 76      |
| Multi-class AUC | 0 . 733     | 0 . 939     |

It shows, that even though several methods prefer to treat the differences as statistically insignificant (like for the Wilcoxon test as for the first dataset), the assessment of clinical significance (e.g., difference between accuracy and 100%) provides noticeable results - for the first dataset almost half of points would have different diagnosis, and for another - even if the quantitative measures are very promising, the presence of approximately 15% of bad interpretations seems to be indisputable.

## 4 Discussion

The PSG is still a gold standard in sleep research, even if it is too complex for breathingrelated studies -the final analysis being based on several parameters, e.g., the apneahypopnea index, respiratory disturbance index, or percentage of snoring during the night, from which the first seems most popular. However, it has already been observed that simpler and more comfortable setups allow estimation of those parameters. Therefore, there is an increasing spectrum of methods and devices available to perform a HST.

The American Academy of Sleep Medicine suggested in its guidelines four types of devices: in-laboratory, technician-attended, overnight PSG (Type I); full PSG outside of the laboratory not needing a technologist's presence (Type II); devices not recording the signals needed to determine sleep stages or sleep disruption, typically including respiratory movement and airflow, heart rate or ECG, and arterial oxygen saturation (Type III); and those recording 1-2 variables and without a technician, typically arterial oxygen saturation and airflow (Type IV) [30]. Therefore, for Types III and IV, there are many novel applications,

sometimes even failing to be accurately classified, e.g., peripheral arterial tonometry [31], or audio-based technologies [32].

Even if using these techniques, one can measure sleep for several nights and calculate sophisticated parameters that assess the statistics over many nights. The AHI values are the starting point, often only as raw values, and not connected to clinical ranges.

It should be mentioned, that there are also studies for which the statistical analysis is reported in the correct, more specific, manner. E.g., Yuceege et al. reported results of qualitative analysis, such as sensitivity, specificity, PPV or NPV [33]. This is consistent with the newest methodological recommendations presented by Miller et al. , who stated that correlational analyses should be conducted alongside qualitative analysis during validity testing [34].

In addition to that, we proposed a list of possible parameters and approaches, consisting of well known, modified, or heuristically deduced parameters, which can be considered by physicians and statisticians, particularly for comparing and validating various techniques and methods.

We can state general interpretations of the proposed parameters to allow non-statisticians understanding the course of results. When analyzing the intercept of the linear model - the closer to zero, the better. For the slope of the linear model with a zero intercept and for all correlation analyses (Pearson's, Spearman's or Lin's), or for the bias correction factor - the closer to one, the better. Next, a T/Wilcoxon test p-value greater than 0.05 indicates no reasons to reject the null hypothesis that two means or medians are equal.

The mean value of the differences calculated during Bland-Altman analysis should be as close to zero as possible; however, one should also assess the distribution of the points vs. the mean of all pairs (there should be no relation). The spread of the differences in the Bland-Altman plot should be as low as possible, probably not greater than 20 (it is related with the number of subjects, that participated in the study). Then, the slope in the modified Bland-Altman plot should be as close to zero as possible.

The simple heuristic ratio should be close to one, which means the distribution of points below and above the Y=X line is similar. The smaller the MAE/eMAE, the better (but the values should be primarily used in relation to other studies). In our opinion, cubic type of ranking function is the most restrictive in terms of its shape (hence chosen as a default one), and sinusoidal - the most liberal, excluding regular MAE. Finally, the higher the accuracy, sensitivity, specificity, Cohen's Kappa or multi-class AUC, the better.

We do not mean to endorse a single parameter over the range of options that allows considering different contexts of the analysis. Of course, all quantitative approaches remain sensible when considered only within specific subranges of AHI values; however, we omitted such analysis in order to preserve clarity and readability.

It is also important to remember that, in this type of analysis, outliers can have a very large impact. It is possible to estimate the distribution of the 'lo-factors' (coefficients indirectly assessing the distance between data points) and to choose the cut-off threshold to remove observations with higher lo-factor values [35]. However, as caution in using this

option is recommended, we decided not to make it available in this version of the Shiny web app [17].

Also, the American Academy of Statistics has proposed that the Bayesian approach be used in similar research [36]. However, based on the presented distributions of AHI points in the studied populations, we think that adopting an appropriate prior distribution for such analysis could be difficult.

Gathering all, we decided to introduce a ranking function that can focus more on those results that may ultimately lead to incorrect diagnoses, not only numerical and statistical differences. Surely, it would be also interesting to check whether there is an effect of age and gender on the results. We are considering introducing such functionality into Shiny applications in the future. For now, this can be done 'manually' by appropriate division of the input data.

We would also like to emphasize, that the primary aim of this paper was not to compare studies, from which we took the data (noting that they were performed using different methods, on different study groups, and with slightly different motivations). Rather, we aimed to show the application that can evaluate a dataset 'statistically' and 'clinically' (and compare it with a reference study) in general. Chosen two datasets are only examples, taken for illustration purposes.

It should also be added that the presented consideration may be extended to different areas of research, where comparative analysis is part of the process.

## 5 Summary

This paper presents the ways in which AHI parameters established by new devices and methods can be compared with the gold standard, reference method. We tried to pay close attention to clinical significance of the AHI results, that are compared; various methods were collected together with a discussion of the interpretation of their results. We also propose a ranking function and modified Bland-Altman plot to extend the analysis. In order to speed up the analysis process, the Shiny web application was prepared for both clinicians and data scientists.

## Acknowledgment

The work is part of a short-term scholarship project (The Bekker Programme) funded by the Polish National Agency for Academic Exchange (NAWA). The authors thank Martin Berka for linguistic adjustments. We would also like to thank Dr. Hiroshi Nakano, Dr. Tomokazu Furukawa, and Dr. Takeshi Tanigawa for sharing their data for the presentation.

## CRediT Author Statement

Marcel Mglyph[suppress]y´czak: l n Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Resources, Data curation, Writing - original draft, Visualization, Project administration; Tulio A. Valdez: Conceptualization, Validation, Resources, Writing - Review &amp; Editing, Project administration; Wojciech Kukwa: Conceptualization, Methodology, Validation, Investigation, Data curation, Writing - original draft, Supervision, Project administration

## References

- [1] R. Heinzer, S. Vat, P. Marques-Vidal, H. Marti-Soler, D. Andries, N. Tobback, and P. Vollenweider, 'Prevalence of sleep-disordered breathing in the general population: the HypnoLaus study,' The Lancet Respiratory Medicine, vol. 3, no. 4, pp. 310-318, 2015.
- [2] J.C. Lumeng and R.D. Chervin, 'Epidemiology of pediatric obstructive sleep apnea', Proc Am Thorac Soc, vol. 5, no. 2, pp. 242-252, 2008.
- [3] A.M. Li, C.T. Au R.Y. Sung RY, et al., 'Ambulatory blood pressure in children with obstructive sleep apnoea: a community based study', Thorax, vol. 63, no. 9, pp. 803-809, 2008.
- [4] O.S. Capdevila, L. Kheirandish-Gozal, E. Dayyat, et al., 'Pediatric obstructive sleep apnea: complications, management, and long-term outcomes', Proc Am Thorac Soc, vol. 5, no. 2, pp. 274-282, 2008.
- [5] R.B. Mitchell and J. Kelly, 'Behavior, neurocognition and quality-of-life in children with sleep-disordered breathing', Int J Pediatr Otorhinolaryngol, vol. 70, no. 3, pp. 395-406, 2006.
- [6] H.L. Tan, D. Gozal and L. Kheirandish-Gozal, 'Obstructive sleep apnea in children: a critical update', Nat Sci Sleep, vol. 5, pp. 109-123, 2013.
- [7] W. R. Ruehland, P. D. Rochford, F. J. O'Donoghue, R. J. Pierce, P. Singh, and A. T. Thornton, 'The new AASM criteria for scoring hypopneas: impact on the apnea hypopnea index,' Sleep, vol. 32, no. 2, pp. 150-157, 2009.
- [8] S. Yalamanchali, V. Farajian, C. Hamilton, T. R. Pott, C. G. Samuelson, and M. Friedman, 'Diagnosis of obstructive sleep apnea by peripheral arterial tonometry: metaanalysis', JAMA Otolaryngology-Head &amp; Neck Surgery, vol. 139, no. 12, pp. 1343-1350, 2013.

- [9] M. Younes, M. Soiferman, W. Thompson and E. Giannouli, Performance of a New Portable Wireless Sleep Monitor, Journal of Clinical Sleep Medicine, vol. 13, no. 2, pp. 245-258, 2017
- [10] L. I. Lin, 'A concordance correlation coefficient to evaluate reproducibility', Biometrics, vol. 45, pp. 255-268, 1989.
- [11] L. I. Lin, 'A note on the concordance correlation coefficient', Biometrics, vol. 56, pp. 324-325, 2000.
- [12] A. Signorell et al., 'DescTools: Tools for Descriptive Statistics', R package version 0.99.28, 2019, https://cran.r-project.org/package=DescTools .
- [13] J. M. Bland, and D. Altman, 'Statistical methods for assessing agreement between two methods of clinical measurement' Lancet, vol. 327, no.8476, pp. 307-310, 1986.
- [14] F. Seoane, S. Abtahi, F. Abtahi, L. Elleg˚rd, G. Johannsson, I. Bosaeus, and L. C. Ward, a 'Mean expected error in prediction of total body water: a true accuracy comparison between bioimpedance spectroscopy and single frequency regression equations', BioMed Research International, 656323, 2015.
- [15] D. J. Hand, and R. J. Till, 'A Simple Generalisation of the Area Under the ROC Curve for Multiple Class Classification Problems', Machine Learning, vol. 45, no. 2, pp. 171-186, 2001.
- [16] X. Robin, N. Turck, A. Hainard, N. Tiberti, F. Lisacek, J.-C. Sanchez, and M. Muller, 'pROC: an open-source package for R and S+ to analyze and compare ROC curves', BMC Bioinformatics, vol. 12, p. 77, 2011.
- [17] https://mmlynczak.shinyapps.io/AHIComparison/
- [18] W. Chang, J. Cheng, J.J. Allaire, Y. Xie, and J. McPherson, 'shiny: Web Application Framework for R', R package version 1.2.0, 2018, https://CRAN.R-project.org/ package=shiny .
- [19] W. Chang, 'shinythemes: Themes for Shiny', R package version 1.1.2, 2018, https: //CRAN.R-project.org/package=shinythemes .
- [20] H. Wickham, 'ggplot2: Elegant Graphics for Data Analysis', Springer-Verlag New York, 2016.
- [21] C. Sievert, 'plotly for R', 2016, https://plotly-book.cpsievert.me .
- [22] Y. Xie, J. Cheng, and X. Tan, 'DT: A Wrapper of the JavaScript Library 'DataTables' ', R package version 0.5, 2018, https://CRAN.R-project.org/package=DT .

| [23]   | B. Lehnert, 'BlandAltmanLeh: Plots (Slightly Extended) Bland-Altman Plots', R package version 0.3.1, 2015, https://CRAN.R-project.org/package= BlandAltmanLeh .                                                                                                                                                                |
|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [24]   | M. Kuhn et al., 'caret: Classification and Regression Training', R package version 6.0-81, 2018, https://CRAN.R-project.org/package=caret .                                                                                                                                                                                    |
| [25]   | D. Meyer, E. Dimitriadou, K. Hornik, A. Weingessel, and F. Leisch, 'e1071: Misc Func- tions of the Department of Statistics', Probability Theory Group (Formerly: E1071), TU Wien, R package version 1.7-0., 2018, https://CRAN.R-project.org/package= e1071 .                                                                 |
| [26]   | RCore Team, 'R: Alanguage and environment for statistical computing'. RFoundation for Statistical Computing, Vienna, Austria, 2018, https://www.R-project.org/ .                                                                                                                                                               |
| [27]   | D. Attali, and C. Baker, 'ggExtra: Add Marginal Histograms to 'ggplot2', and More 'ggplot2' Enhancements', R package version 0.8, 2018, https://CRAN.R-project.org/ package=ggExtra .                                                                                                                                          |
| [28]   | S. Nagubadi, R. Mehta, M. Abdoh, M. Nagori S. Littleton, R. Gueret and A. Tu- laimat, 'The Accuracy of Portable Monitoring in Diagnosing Significant Sleep Disor- dered Breathing in Hospitalized Patients' PLOS ONE, vol. 11, no. 12, pp. e0168073, 2016.                                                                     |
| [29]   | H. Nakano, T. Furukawa, T. Tanigawa, 'Tracheal Sound Analysis Using a Deep Neural Network to Detect Sleep Apnea', Journal of Clinical Sleep Medicine, vol. 15, no. 8, pp. 1125-1133, 2019.                                                                                                                                     |
| [30]   | V.K. Kapur, D.H. Auckley, S. Chowdhuri, D.C. Kuhlmann, R. Mehra, K. Ramar and C.G. Harrod, 'Clinical practice guideline for diagnostic testing for adult obstructive sleep apnea: an American Academy of Sleep Medicine clinical practice guideline', Jour- nal of Clinical Sleep Medicine, vol. 13, no. 3, pp. 479-504, 2017. |
| [31]   | S. Yalamanchali, V. Farajian, C. Hamilton, T.R. Pott, C.G. Samuelson and M. Fried- man, 'Diagnosis of obstructive sleep apnea by peripheral arterial tonometry: meta- analysis', JAMA Otolaryngology-Head and Neck Surgery, vol. 139, no. 12, pp. 1343- 1350, 2013.                                                            |
| [32]   | M. Glos, A. Sabil, K.S. Jelavic, G. Baffet, C. Sch¨bel, o I. Fietze, and T. Penzel, 'Tracheal sound analysis for detection of sleep disordered breathing', Somnologie, vol. 23, no. 2, pp. 80-85, 2019.                                                                                                                        |
| [33]   | M. Yuceege, H. Firat, A. Demir and S. Ardic, 'Reliability of the Watch-PAT 200 in detecting sleep apnea in highway bus drivers', Journal of Clinical Sleep Medicine, vol. 9 no. 4, pp. 339-344, 2013.                                                                                                                          |

- [34] J. N. Miller, P. Schulz, B. Pozehl, D. Fiedler, A. Fial and A. M. Berger, 'Methodological strategies in using home sleep apnea testing in research and practice', Sleep and Breathing, vol. 22, no. 3, pp. 569-577, 2018.
- [35] M. M. Breunig, H. P. Kriegel, R. T. Ng and J. Sander, 'LOF: identifying density-based local outliers', In ACM sigmod record, vol. 29, no. 2, pp. 93-104, 2000.
- [36] R. L. Wasserstein and N. A. Lazar, 'The ASA's statement on p-values: context, process, and purpose', The American Statistician, vol. 70, no. 2, pp. 129-133, 2016.
Marcel Młyńczak Tulio A. Valdez Wojciech Kukwa
Comparing sleep studies in terms of the Apnea-Hypopnea Index using dedicated Shiny web application
The Apnea-Hypopnea Index (AHI) is one of the most-used parameters from the
sleep study that allows assessing both the severity of obstructive sleep apnea
and the reliability of new devices and methods. However, in many cases, it is
compared with a reference only via a correlation coefficient, or this value is
at least the most emphasized. In this paper, we discuss the limitations of such
an approach and list several alternative quantitative and qualitative
techniques, along with their interpretations. We propose the assessment of
clinical significance along with the statistical one. Qualitative analysis can
be used for this purpose, or we suggest using the ranking function which
enables consideration of various AHI values with different weights. It can be
reliable for both adult-related and pediatric sleep studies. The dedicated
Shiny web application, written in R, was developed to enable quick analysis for
both physicians and statisticians.