calculate_prevent_risk_full: Calculate AHA PREVENT Risk (full model)

View source: R/calculate_prevent_risk_full.R

calculate_prevent_risk_fullR Documentation

Calculate AHA PREVENT Risk (full model)

Description

Uses the PREVENT Full model incorporating urine albumin, A1C, and SDI if available into risk estimate: PREVENT (AHA Predicting Risk of CVD Events). The PREVENT equations enable 10 and 30-year risk estimates for total CVD (composite of atherosclerotic CVD and heart failure), ASCVD (atherosclerotic CVD), Heart failure (HF), Coronary Artery Disease (CAD), and Stroke. Details provided in Khan et al., Circulation. 2024. This model incorporates urine albumin, A1C and socioeconomic risk (by Zip code) if available. SDI lookup by zipcode is slightly off in SDI estimate- enter the SDI decile (1-10) for most accurate results.

Usage

calculate_prevent_risk_full(
  risk,
  gender,
  age,
  Tc,
  HDL,
  SBP,
  eGFR,
  BMI = NA,
  UACR = NA,
  HbA1c = NA,
  SDI = NA,
  zipcode = NA,
  year = 2019,
  current_smoker = FALSE,
  using_antihypertensive_medication = FALSE,
  using_statin = FALSE,
  diabetes = FALSE,
  chol_units = "mg/dL"
)

Arguments

risk

Desired Risk Calculation ("cvd", "ascvd", "hf", "cad", "stroke")

gender

Gender, (Female/Male)

age

Age in years

Tc

Total Cholesterol (mg/dL). converted to mmol/L internally

HDL

HDL Cholesterol (mg/dL). converted to mmol/L internally

SBP

Systolic Blood Pressure, mmHg

eGFR

estimated GFR (ml/min/1.73m2)

BMI

Body Mass Index (kg/m2), used only in HF estimate

UACR

Urine albumin/creatinine ratio (mg/g creatinine)

HbA1c

Hemoglobin A1C (percent)

SDI

Social Deprivation Index (SDI), decile

zipcode

Zipcode to use for SDI lookup, if SDI not provided

year

Year to use for SDI lookup, if SDI not provided

current_smoker

current_smoker, T/F

using_antihypertensive_medication

HTN medication use, T/F

using_statin

Statin use, T/F

diabetes

Diabetes, T/F

chol_units

default = mg/dL; cholesterol units not in mg/dL then define here for conversion

Value

10- and 30-year Risk (percent) in Dataframe format

Examples



 calculate_prevent_risk_full(risk="cvd",gender="Female", age=50, Tc=200, HDL=45, SBP=160, eGFR=90,
                             UACR = 40, HbA1c = 7.5, SDI = 8,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)
 calculate_prevent_risk_full(risk="ascvd",gender="female", age=50, Tc=200, HDL=45, SBP=160, eGFR=90,
                             UACR = 40, HbA1c = 7.5, SDI = 8,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)
 calculate_prevent_risk_full(risk="hf",gender="female", age=50, Tc=200, HDL=45, SBP=160, eGFR=90, BMI=35,
                             UACR = 40, HbA1c = 7.5, SDI = 8,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)
 calculate_prevent_risk_full(risk="cad",gender="female", age=50, Tc=200, HDL=45, SBP=160, eGFR=90,
                             UACR = 40, HbA1c = 7.5, SDI = 8,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)
 calculate_prevent_risk_full(risk="stroke",gender="female", age=50, Tc=200, HDL=45, SBP=160, eGFR=90,
                             UACR = 40, HbA1c = 7.5, SDI = 8,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)

 # men
 calculate_prevent_risk_full(risk="cvd",gender="male", age=50, Tc=200, HDL=45, SBP=160, eGFR=90,
                             UACR = 40, HbA1c = 7.5, SDI = 8,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)
 calculate_prevent_risk_full(risk="ascvd",gender="male", age=50, Tc=200, HDL=45, SBP=160, eGFR=90,
                             UACR = 40, HbA1c = 7.5, SDI = 8,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)
 calculate_prevent_risk_full(risk="hf",gender="male", age=50, Tc=200, HDL=45, SBP=160, eGFR=90, BMI=35,
                             UACR = 40, HbA1c = 7.5, SDI = 8,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)
 calculate_prevent_risk_full(risk="cad",gender="male", age=50, Tc=200, HDL=45, SBP=160, eGFR=90,
                             UACR = 40, HbA1c = 7.5, SDI = 8,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)
 calculate_prevent_risk_full(risk="stroke",gender="male", age=50, Tc=200, HDL=45, SBP=160, eGFR=90,
                             UACR = 40, HbA1c = 7.5, SDI = 8,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)

# Lookup SDI by zipcode; defaults to year 2019
 calculate_prevent_risk_full(risk="stroke",gender="male", age=50, Tc=200, HDL=45, SBP=160, eGFR=90,
                             UACR = 40, HbA1c = 7.5, SDI = NA, zipcode=37220,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)
 calculate_prevent_risk_full(risk="stroke",gender="male", age=50, Tc=200, HDL=45, SBP=160, eGFR=90,
                             UACR = 40, HbA1c = 7.5, SDI = 1,
                             using_antihypertensive_medication = TRUE, diabetes = TRUE)

 library(tidyverse)
 df <- crossing(
   gender=c("female", "male"),
   age=50, Tc=200, HDL=45, eGFR=90, BMI=35,
   using_antihypertensive_medication = TRUE, diabetes = TRUE,
   HbA1c = 7.5, SDI = 10,
   SBP= seq(130,180,by=10),
   UACR=seq(0,300, by=50)
 )
 # seq(0,3000, by=50)
 df_risk <-
   df |>
   rowwise() |>
   mutate(calculate_prevent_risk_full(risk="cvd", gender, age, Tc, HDL, SBP, eGFR, BMI,
                                      UACR, HbA1c, SDI,
                                      using_antihypertensive_medication = using_antihypertensive_medication,
                                      diabetes=diabetes),
          calculate_prevent_risk_full(risk="ascvd", gender, age, Tc, HDL, SBP, eGFR, BMI,
                                      UACR, HbA1c, SDI,
                                      using_antihypertensive_medication = using_antihypertensive_medication,
                                      diabetes=diabetes),
          calculate_prevent_risk_full(risk="hf", gender, age, Tc, HDL, SBP, eGFR, BMI,
                                      UACR, HbA1c, SDI,
                                      using_antihypertensive_medication = using_antihypertensive_medication,
                                      diabetes=diabetes),
          calculate_prevent_risk_full(risk="cad", gender, age, Tc, HDL, SBP, eGFR, BMI,
                                      UACR, HbA1c, SDI,
                                      using_antihypertensive_medication = using_antihypertensive_medication,
                                      diabetes=diabetes),
          calculate_prevent_risk_full(risk="stroke", gender, age, Tc, HDL, SBP, eGFR, BMI,
                                      UACR, HbA1c, SDI,
                                      using_antihypertensive_medication = using_antihypertensive_medication,
                                      diabetes=diabetes)
   ) 
df_risk

JMLuther/tabletools documentation built on April 14, 2025, 3:09 a.m.