QDR2018C {QDiabetes} | R Documentation |
QDiabetes-2018 Risk Calculator (C-Variant)
Description
Calculate the 10-year risk of developing type 2 diabetes, using the C-variant of the QDiabetes-2018 algorithm. This variant includes all risk predictors present in the A-variant, with the addition of glycated haemoglobin A1c.
Usage
QDR2018C(sex, age, bmi, ht, wt, hba1c, ethn = "WhiteNA", smoke = "Non", tds = 0,
fhdm = FALSE, htn = FALSE, cvd = FALSE, gdm = FALSE, pcos = FALSE,
learn = FALSE, psy = FALSE, ster = FALSE, stat = FALSE, apsy = FALSE)
Arguments
sex |
Gender. Must be |
age |
Age, in years. Must be |
bmi |
Body-mass index, in kg/m^2. Must be |
ht |
Height, in m. Must be |
wt |
Weight, in kg. Must be |
hba1c |
Glycated haemoglobin A1c level, in mmol/mol. Must be |
ethn |
Ethnicity. Must be one of:
|
smoke |
Smoking status. Must be one of:
|
tds |
Townsend deprivation score. Must be |
fhdm |
Family history of diabetes in 1st degree relative. |
htn |
History of hypertension. |
cvd |
History of cardiovascular disease. |
gdm |
History of gestational diabetes. |
pcos |
History of polycystic ovary syndrome. |
learn |
History of one or more conditions conveying learning difficulties. |
psy |
History of schizophrenia or bipolar affective disorder. |
ster |
History of use of corticosteroids. |
stat |
History of use of statins. |
apsy |
History of use of 2nd generation antipsychotics. |
Value
Risk (%) of type 2 diabetes.
Note
The QDiabetes R package has been created as a research tool for scientific purposes only. The QDiabetes R package has not been granted Medicines and Healthcare products Regulatory Agency (MHRA) approval as a medical device, and hence, should not be used as part of any individualised risk assessment.
Author(s)
Benjamin G. Feakins benjamin.feakins@ndph.ox.ac.uk
Source
https://qdiabetes.org/2018/src.php
References
Hippisley-Cox, J. and Coupland, C. (2017). Development and validation of QDiabetes-2018 risk prediction algorithm to estimate future risk of type 2 diabetes: cohort study. BMJ 359, j5019. doi: 10.1136/bmj.j5019
See Also
QDR2013
- For estimating the 1–10-year risk using QDiabetes-2013.
QDR2018A
- For estimating the 10-year risk using QDiabetes-2018 (Model A).
QDR2018B
- For estimating the 10-year risk using QDiabetes-2018 (Model B).
Examples
## Simple usage
QDR2018C(sex = "Female", age = 76, ht = 1.65, wt = 70, hba1c = 25)
QDR2018C(sex = "Male", age = 55, bmi = 40, hba1c = seq(15, 40, 5), ethn = "Chinese")
QDR2018C(sex = "Female", age = 65, bmi = 35, hba1c = 30, smoke = "Ex", fhdm = c(FALSE, TRUE))
## Using postcodes to estimate Townsend deprivation scores
QDR2018C(sex = "Male", age = 65, bmi = 40, hba1c = 42, tds = getTDS("OX3 7LF"))
QDR2018C(sex = "Female", age = 60, bmi = 35, hba1c = 42, tds = getTDS(c("OX2 6NW", "OX2 6GG")))
## Data frame usage
data(dat_qdr)
with(dat_qdr, QDR2018C(sex = sex, age = age, bmi = bmi, hba1c = hba1c))
## Plotting outputs
hba1c <- seq(15, 42, length.out = 10)
risk_m <- QDR2018C(sex = "Male", age = 65, bmi = 40, hba1c = hba1c)
risk_f <- QDR2018C(sex = "Female", age = 65, bmi = 40, hba1c = hba1c)
oldpar <- par(no.readonly = TRUE)
par(cex = 0.8, cex.sub = 0.8)
plot.new()
plot.window(xlim = range(hba1c), ylim = range(pretty(c(risk_m, risk_f))))
axis(1, at = hba1c)
axis(2, at = pretty(c(risk_m, risk_f)))
title(
main = "Diabetes 10-year risk with glycated haemoglobin level:\nQDiabetes-2018 (C-Variant)",
sub = expression("Age set to 65 years, BMI set to"~40*kg/m^2*", other variables set to defaults"),
xlab = expression("Haemoglobin"~A[1*c]~"(mmol/mol)"), ylab = "Risk (%)"
)
lines(hba1c, risk_m, type = "b", col = "navy", lwd = 1.5)
lines(hba1c, risk_f, type = "b", col = "red3", lwd = 1.5)
legend("bottomright", legend = c("Male", "Female"), col = c("navy", "red3"), lty = 1, bty = "n")
par(oldpar)