Description Usage Arguments Value Note Author(s) Source References See Also Examples
Calculate the 10-year risk of developing type 2 diabetes, using the B-variant of the QDiabetes-2018 algorithm. This variant includes all risk predictors present in the A-variant, with the addition of fasting plasma glucose.
1 2 3 |
sex |
Gender. Must be |
age |
Age, in years. Must be ≥25 and <85. |
bmi |
Body-mass index, in kg/m^2. Must be ≥40/2.1^2 and ≤180/1.4^2. Within this range, values >40 are set to 40, while values <20 are set to 20. |
ht |
Height, in m. Must be ≥1.4 and ≤2.1. |
wt |
Weight, in kg. Must be ≥40 and ≤180. |
fpg |
Fasting plasma glucose level, in mmol/L. Must be ≥2 and <7. |
ethn |
Ethnicity. Must be one of:
|
smoke |
Smoking status. Must be one of:
|
tds |
Townsend deprivation score. Must be ≥-8 and ≤14. |
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. |
Risk (%) of type 2 diabetes.
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.
Benjamin G. Feakins benjamin.feakins@ndph.ox.ac.uk
https://qdiabetes.org/2018/src.php
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
QDR2013
- For estimating the 1–10-year risk using QDiabetes-2013.
QDR2018A
- For estimating the 10-year risk using QDiabetes-2018 (Model A).
QDR2018C
- For estimating the 10-year risk using QDiabetes-2018 (Model C).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## Simple usage
QDR2018B(sex = "Female", age = 76, ht = 1.65, wt = 70, fpg = 4)
QDR2018B(sex = "Male", age = 55, bmi = 40, fpg = 2:6, ethn = "BlackCaribbean")
QDR2018B(sex = "Female", age = 65, bmi = 35, fpg = 5, smoke = "Ex", cvd = c(FALSE, TRUE))
## Using postcodes to estimate Townsend deprivation scores
QDR2018B(sex = "Male", age = 65, bmi = 40, fpg = 6, tds = getTDS("OX3 7LF"))
QDR2018B(sex = "Female", age = 60, bmi = 35, fpg = 6, tds = getTDS(c("OX2 6NW", "OX2 6GG")))
## Data frame usage
data(dat_qdr)
with(dat_qdr, QDR2018B(sex = sex, age = age, bmi = bmi, fpg = fpg))
## Plotting outputs
fpg <- seq(2, 6.5, length.out = 10)
risk_m <- QDR2018B(sex = "Male", age = 65, bmi = 40, fpg = fpg)
risk_f <- QDR2018B(sex = "Female", age = 65, bmi = 40, fpg = fpg)
oldpar <- par(no.readonly = TRUE)
par(cex = 0.8, cex.sub = 0.8)
plot.new()
plot.window(xlim = range(fpg), ylim = range(pretty(c(risk_m, risk_f))))
axis(1, at = fpg)
axis(2, at = pretty(c(risk_m, risk_f)))
title(
main = "Diabetes 10-year risk with fasting plasma glucose level:\nQDiabetes-2018 (B-Variant)",
sub = expression("Age set to 65 years, BMI set to"~40*kg/m^2*", other variables set to defaults"),
xlab = "Fasting Plasma Glucose (mmol/L)", ylab = "Risk (%)"
)
lines(fpg, risk_m, type = "b", col = "navy", lwd = 1.5)
lines(fpg, 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.