clarke_REGA Performs Clarke Rate Error Grid Analysis (REGA)
The Clarke rate error grid approach is used to assess the clinical
significance of differences between the glucose measurement technique
under test and the venous blood glucose reference measurements.
Zone A (acceptable) represents the glucose rates that deviate from the
reference rate by +-10%. The values within this range are considered as
clinically accurate. B (benign errors) is located above and below zone A;
this zone represents those rates that deviate from the reference rates,
by +-20%. The values that fall within zones A and B are clinically
acceptable, whereas the rates included in areas C (over correction), D
(failure to detect) and E (erroneous readings) are potentially dangerous,
and there is a possibility of making clinically significant mistakes.
[total, percentage, indZone, h] = clarke_REGA(y, yp, flagFig, threshold)
y Reference rates
yp Predicted/estimtated rates
flagFig [OPTIONAL] Flag for plotting the Clarke error grid figure:
1 : with figure
0 : without figure (default)
threshold [OPTIONAL] The threshold used to define zone A in the REGA;
the default is 1 mg/dl/min.
total Total points per zone:
total(1) = zone A,
total(2) = zone B, and so on
percentage Percentage of data which fell in certain region:
percentage(1) = zone A,
percentage(2) = zone B, and so on.
indZone Indicators of zones for each sample
h [OPTIONAL] Handle of the figure (if plotted)
y = randn(1000, 1) *2;
yp = randn(1000, 1) *2;
[tot, per, ind, h] = clarke_REGA(y,yp,1,1);
Modified from the codes by Edgar Guevara
MATLAB Version: 18.104.22.1688559 (R2020b) Update 3