PriorT2DRisk: PREDICT CVD Type-II Diabetes (2018.1) Risk Score for People...

Description Usage Arguments Details Value See Also Author(s) References Examples

View source: R/PriorT2DRisk.R

Description

PriorT2DRisk calculates the 5 year risk of cardiovascular disease (CVD) (hospitalisation for acute coronary syndrome, heart failure, stroke or other cerebrovascular disease, peripheral vascular death, cardiovascular death), for people with diabetes. This equation takes into account multiple diabetes-related variables. The outcome of interest is the 5-year risk of a non-fatal or fatal CVD event, including hospitalisation for coronary heart disease, stroke or other cerebrovascular disease (including transient ischaemic attack), peripheral vascular disease and heart failure, or cardiovascular death.

Usage

1
2
3
PriorT2DRisk(sex, age, eth, nzdep, smoker, af, familyhx,
             lld, athrombi, bpl, oral, insulin, sbp, tchdl, bmi,
             egfr, acr, hba1c, years, ...)

Arguments

dat

an optional data.frame or data.table containing input data (see details)

sex

binary sex or gender

age

age in years (see details)

eth

ethnicity (see details)

nzdep

socio-economic deprivation (see details)

smoker

currently smoking

af

atrial fibrillation status

familyhx

family history of premature CVD

lld

receiving lipid lowering medication

athrombi

receiving antiplatelet or anticoagulant medication

bpl

receiving at least one blood pressure lowering medication

oral

receiving oral hypoglycaemic medication

insulin

receiving insulin treatment

sbp

measured systolic blood pressure in mmHg

tchdl

most recent value of total:HDL cholesterol

bmi

body mass index in kg/m^2

egfr

most recent calculated value of eGFRvalue in mL/min/1.73m2

acr

most recent value of ACR value in mg/mmol

hba1c

most recent value of HbA1c in mmol/mol

years

years since diagnosis of type 2 diabetes

...

further arguments (see values)

Details

When a dataset is supplied, a risk score is produced for each row of data, resulting in a numeric vector of the same length. Each argument requires the variable name from the dataset dat that corresponds with the parameter. If the parameter dat is not supplied, then each argument is assigned an individual's actual parameter value.

The risk prediction equations were developed from a cohort of people aged 30 to 74 years. Additional analyses indicate that the sex-specific risk equations performed adequately in those aged 75-79 years. People aged 18-29 years or 80 years and older, are outside the range used to derive the equation, and therefore risk will be even more of an approximation. The function will calculate ages 18-29 as 30; and ages 80-110 as 79. All other age inputs are invalid and will return NA.

The co-efficients for ethnicity apply only to the following groups: European, Maori, Pacific, Indian, and (non-Indian) Asian. To obtain a risk estimate, ensure that the ethnicity input is either labelled or encoded using one of the values listed below (see values). All other inputs are invalid and will return NA.

The scale for socioeconomic deprivation is derived from the New Zealand Index of Deprivation; a small area-based measure that combines census data relating to income, home ownership, employment, qualifications, family structure, housing, access to transport and communications. The equations require NZDep to be categorised as quintiles, with 1 being the least deprived and 5 being the most deprived.

Value

returns either a single 5-year CVD risk estimate, or a numeric vector of risk estimates if dat is provided. Input values for each parameter must conform to the following convention:

sex

label or encode as one of the following:

  • M, Male, 1

  • F, Female, 0

age

numeric value for years of age between 20 and 110

eth

label or encode as one of the following:

  • NZ European, European, NZEO, Euro, E, 1, 10, 11, or 12

  • Maori, NZMaori, NZ Maori, M, 2, or 21

  • Pacific, Pacific Islander, PI, P, 3, 30, 31, 32, 33, 34, 35, 36, or 37

  • Indian, Fijian Indian, South Asian, IN, I, or 43

  • Asian, Other Asian, SE Asian, East Asian, Chinese, ASN, A, 4, 40, 41, 42, or 44

  • note: Other Asian includes non-Indian South Asian

nzdep

numeric value between 1 and 5

smoker

label or encode as one of the following:

  • Y, Yes, Smoker, Current, S, 1, T, TRUE

  • N, No, Non-smoker, 0, F, FALSE

af, familyhx

label or encode as one of the following:

  • Y, Yes, 1, T, TRUE

  • N, No, 0, F, FALSE

bpl, lld,
athrombi

label or encode as one of the following:

  • Y, Yes, 1, T, TRUE

  • N, No, 0, F, FALSE

oral, insulin

label or encode as one of the following:

  • Y, Yes, 1, T, TRUE

  • N, No, 0, F, FALSE

bmi, sbp, tchdl,
egfr, acr, hba1c

numeric value of measured result. Note:

  • all values must be available

years

numeric value of number of years since T2D diagnosis

...

further arguments:

  • dp numeric value to set decimal place; default is 4

  • allow.age logical. Whether or not age range is extended outside of 30 - 74; default is TRUE. If set to FALSE, then NA is returned as risk estimate.

  • allow.na logical. Whether or not missing values for binary variables and smoking status are treated as 0; default is TRUE. If set to FALSE, then NA is returned as risk estimate.

See Also

NoPriorCVDRisk
NoPriorCVDRisk_BMI
NoPriorCVDRisk_Policy
NoPriorCVDBleedRisk
NoPriorT2DRisk
PostCVDRisk
PostACSRisk

Author(s)

Billy Wu (R Developer) and Romana Pylypchuk (Principal Investigator)

References

New Zealand Ministry of Health: HISO 10071:2019 Cardiovascular Disease Risk Assessment Data Standard

HISO Document

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# As calculator (Dataset not provided)
PriorT2DRisk(sex="M", age=35, eth=2, nzdep=5, smoker=1, af=1, familyhx=1, lld=0,
             athrombi=0, bpl=0, oral=0, insulin=0, sbp=120, tchdl=3.3, bmi=27,
             egfr=78, acr=1, hba1c=48, years=1)

PriorT2DRisk(sex=0, age=75, eth=PI, nzdep=3, smoker=0, af=F, familyhx=0, lld=Y,
             athrombi=0, bpl=F, oral=T, insulin=0, sbp=130, tchdl=4, bmi=31,
             egfr=92, acr=1.4, hba1c=56, years=3)

# As a vectoriser (Dataset provided)
PriorT2DRisk(dat=DF, sex=sex, age=age, eth=eth, nzdep=nzdep, smoker=smoker,
             af=af, familyhx=familyhx, sbp=sbp, tchdl=tchdl, bmi=bmi, years=years,
             egfr=egfr, acr=acr, hba1c=hba1c, oral=oral, insulin=insulin, bpl=bpl,
             lld=lld, athrombi=athrombi)

billy-nz/PredictRiskScores documentation built on April 4, 2020, 6:23 p.m.