*2.2. Analysis*

In the initial analysis, algorithms were assessed for consistent ability to identify the location of the patient in the crib, whether the patient was breathing, and finally if the monitoring could track respiration long enough to generate a respiratory rate.

Analysis was based on the assumptions that the camera or crib did not move or sway and that the only moving element in the frame was the patient (i.e., no mobiles, moving toys or moving devices were in the frame of the recording).

In the secondary analysis, RR measured by the algorithm was compared to that extracted from standard monitoring data at the same moment in time. Agreement between the two modes of measurements was analyzed using a Bland–Altman plot. The extent and significance of correlation between the algorithm and standard monitoring were performed via linear regression. Finally, assuming complete accuracy of the ECG impedance pneumography measurement of respiratory rate, errors of algorithm measurements were determined by calculating the root mean square error.
