Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getClarkeZones

Assign Clarke error grid zones to paired glucose values


Description

referenceVals and testVals are assumed to contain paired glucose values from a reference method and a test method, respectively. unit contains info on the unit of measurement. Two options exist: "gram" for mg/dL and "mol" for mmol/l with "gram" applied by default. The discrepancy between the two values is used to place the pair into a Clarke error grid zone according to the criteria described in the original paper by Clarke et. al. (see reference below).

Usage

getClarkeZones(referenceVals, testVals, unit = "gram")

Arguments

referenceVals

A vector of glucose values obtained via the reference method.

testVals

A vector of glucose values obtained via a non-reference method (e.g. a new meter). The values in this vector are paired with those in referenceVals, so the length should be the same.

unit

A string specifying the units of measurement. This should be either "gram" (the default) for mg/dl or "mol" for mmol/l.

Value

A character vector is returned, with each element being one of "A", "B", "C", "D", or "E".

References

Clarke, W. L., D. Cox, L. A. Gonder-Frederick, W. Carter, and S. L. Pohl. "Evaluating Clinical Accuracy of Systems for Self-Monitoring of Blood Glucose." Diabetes Care 10, no. 5 (September 1, 1987): 622-28.

Examples

zones <- getClarkeZones (glucose_data$ref / 18, glucose_data$test / 18,
unit="mol")

# counts
table(zones)

# percentages
round (table (zones) / length (zones) * 100, digits=2)

ega

Error Grid Analysis

v2.0.0
MIT + file LICENSE
Authors
Daniel Schmolze [aut, cre], Sergei Mihhailov [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.