framingham_riskequation: Framingham Risk Equation

Description Usage Arguments Details Value Examples

View source: R/framinghamRiskEquation.R

Description

Calculate cardiovascular disease risk according to Framingham Risk Equation

Usage

1
framingham_riskequation(df, years = 5, outcome = "CVD")

Arguments

df

a dataframe, which must include the following columns/fields:

  • InternalID (numeric) case identifier

  • CardiovascularDisease (logical - TRUE or FALSE)

  • Diabetes (logical)

  • SmokingStatus (character) - "Smoker" if a smoker. All other values ignored

  • UrineAlbuminDate (character), UrineAlbuminValue (double), UrineAlbuminUnit (character)

  • PersistentProteinuria (logical)

  • eGFRDate (date), eGFRValue (double), eGFRUnits (character)

  • FamilialHypercholesterolaemia (logical)

  • LVH (logical) = left ventricular hyp0ertrophy

  • Cholesterol (double) in millimoles per litre (mmol/L or mM)

  • Triglycerides (double) in millimoles per litre (mmol/L or mM)

  • CholHDLRatio (double)

  • BP (character, two numbers separated by "/") in mmHg

  • Sex (character) "Female" or not

  • Ethnicity (character) "Aboriginal", "Torres Strait Islander", "Aboriginal/Torres Strait Islander" or not

  • Age (double)

years

number of years to predict (from 4 to 12). default is 5 years.

outcome

(default is "CVD")

"CHD" - coronary heart disease. includes myocardial infarction, death from coronary heart disease plus angina pectoris and coronary insufficiency.

"CVD" cardiovascular disease (the default) includes coronary heart disease, stroke (including transient ischaemia), congestive heart failure and peripheral vascular disease.

Details

Equations and examples sourced from:

Value

a dataframe

Examples

 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
framingham_riskequation(data.frame(
  InternalID = 1, BP = "135/80", Sex = "Female",
  Age = 55,
  SmokingStatus = "Smoker", CholHDLRatio = 230 / 48, Diabetes = TRUE, LVH = FALSE,
  CardiovascularDisease = FALSE, PersistentProteinuria = FALSE, eGFRValue = NA,
  eGFRUnits = NA, UrineAlbuminValue = NA, UrineAlbuminUnits = NA,
  FamilialHypercholesterolaemia = NA, Cholesterol = 5.96, Ethnicity = NA
),
outcome = "CHD", years = 10
)
# this comes from "Cardiovascular disease risk profiles" (Anderson 1991)
# the worked answer in the paper is 0.22. this function returns 0.2189125
# the same risk-factors with outcome = "CVD" and years = 5 returns 0.180
#  (cvdcheck.org.au reports 18%)
# the same risk-factors except Sex = "Male" with outcome = "CVD" and years = 5 returns 0.202
#  (cvdcheck.org.au reports 20%)

framingham_riskequation(data.frame(
  InternalID = 2, BP = "130/80", Sex = "Male",
  Age = 55,
  SmokingStatus = "Smoker", CholHDLRatio = 240 / 45, Diabetes = FALSE, LVH = FALSE,
  CardiovascularDisease = FALSE, PersistentProteinuria = FALSE, eGFRValue = NA,
  eGFRUnits = NA, UrineAlbuminValue = NA, UrineAlbuminUnits = NA,
  FamilialHypercholesterolaemia = NA, Cholesterol = 6.22, Ethnicity = NA
),
outcome = "CHD", years = 10
)
# this comes from "An Updated Coronary Risk Profile" (Anderson 1991)
# the worked answer in the paper is 0.192, this function returns 0.1919
# the same risk-factors with outcome = "CVD" and years = 5 returns 0.133
#  (cvdcheck.org.au reports 13%)
# the same risk-factors except LVH = TRUE (outcome = CVD, years = 5) returns 0.211
#  (cvdcheck.org.au reports 21%)

framingham_riskequation(data.frame(
  InternalID = 3, BP = "130/80", Sex = "Female",
  Age = 55,
  SmokingStatus = "Smoker", CholHDLRatio = 240 / 45, Diabetes = FALSE, LVH = FALSE,
  CardiovascularDisease = FALSE, PersistentProteinuria = FALSE, eGFRValue = NA,
  eGFRUnits = NA, UrineAlbuminValue = NA, UrineAlbuminUnits = NA,
  FamilialHypercholesterolaemia = NA, Cholesterol = 6.22, Ethnicity = NA
),
outcome = "CHD", years = 10
)
# this comes from "An Updated Coronary Risk Profile" (Anderson 1991)
# the worked answer in the paper is 0.135, this function returns 0.1349
# the same risk-factors with outcome = "CVD" and years = 5 returns 0.088
#  (cvdcheck.org.au reports 9%)
# the same risk-factors except LVH = TRUE (outcome = CVD, years = 5) returns 0.150
#  (cvdcheck.org.au reports 15%)

DavidPatShuiFong/framinghamRiskEquation documentation built on July 6, 2020, 4:40 a.m.