Compute Risk Scores for Cardiovascular Diseases

Calculate various cardiovascular disease risk scores from the Framingham Heart Study (FHS), the American College of Cardiology (ACC), and the American Heart Association (AHA) as described in D’agostino, et al (2008) , Goff, et al (2013) , and Mclelland, et al (2015) , and Khan, et al (2024) .


CVrisk CVrisk website

R build status Codecov test coverage CRAN status CRAN downloads

About the package

CVrisk is a package to calculate various cardiovascular disease risk scores.

Currently available risk scores

  • Framingham 2008 10-year ASCVD risk (model with lipid labs)
  • Framingham 2008 10-year ASCVD risk (model with BMI)
  • ACC/AHA 2013 10-year ASCVD risk
  • MESA 2015 10-year ASCVD risk (traditional risk factors)
  • MESA 2015 10-year ASCVD risk (using coronary artery calcium)
  • AHA PREVENT 2024 10- and 30-year ASCVD risk - New!

Installation

# Install from CRAN
install.packages("CVrisk")

# Install the development version from GitHub:
# install.packages("devtools")
devtools::install_github("vcastro/CVrisk")

Usage

Calculate a single score:

library(CVrisk)
ascvd_10y_accaha(race = "aa", gender = "male", age = 55, 
   totchol = 213, hdl = 50, sbp = 140, 
   bp_med = FALSE, smoker=0, diabetes=0)

# Calculate PREVENT risk score (requires additional parameters)
ascvd_10y_prevent(gender = "female", age = 50, sbp = 160, bp_med = 1,
   totchol = 200, hdl = 45, statin = 0, diabetes = 1, smoker = 0,
   egfr = 90, bmi = 35)
   

Calculate multiple scores for a dataframe and append scores to the dataframe:


# Compute traditional risk scores
compute_CVrisk(sample_data,
   age = "age", race = "race", gender = "gender", bmi = "BMI", sbp = "sbp",
   hdl = "hdl", totchol = "totchol", bp_med = "bp_med", smoker = "smoker",
   diabetes = "diabetes", lipid_med = "lipid_med",
   fh_heartattack = "fh_heartattack", cac = "cac"
)

# To include PREVENT score, specify scores explicitly and provide egfr
compute_CVrisk(make_sample_data(100),
   scores = c("ascvd_10y_accaha", "ascvd_10y_prevent"),
   age = "age", gender = "sex", sbp = "sbp", 
   hdl = "hdl", totchol = "totchol", bmi = "bmi",
   bp_med = "bp_med", diabetes = "diabetes", smoker = "smoker",
   statin = "lipid_med", egfr = "egfr"
)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("CVrisk")

1.2.1 by Victor Castro, 9 months ago


https://vcastro.github.io/CVrisk/, https://github.com/vcastro/CVrisk/


Report a bug at https://github.com/vcastro/CVrisk/issues


Browse source code at https://github.com/cran/CVrisk


Authors: Victor Castro [aut, cre] (ORCID:


Documentation:   PDF Manual  


GPL-3 license


Imports utils, preventr

Suggests testthat, covr, tibble, knitr, rmarkdown


Suggested by HealthMarkers.


See at CRAN