Navigation Menu

Skip to content

resplab/cvdanderson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R build status

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

CRAN status

cvdanderson

R package for the prediction of developing Cardiovascular Disease (CVD) risk using Systolic Blood Pressure (SBP) and Diastolic Blood Pressure (DBP) risk factors described in https://www.sciencedirect.com/science/article/pii/000287039190861B.

Installation

The latest stable version can be downloaded from CRAN:
You can download the latest development version from GitHub:

install.packages("remotes")
remotes::install_github("resplab/cvdanderson")

Cardiovascular Disease (CVD) Prediction

To get a prediction for Cardiovascular Disease (CVD), you will need to pass in patient's risk factors. For example:

library(cvdanderson)
predictcvd (gender = 1, age = 33, Tchol = 230, HDLchol = 48, SBP = 135, DBP = 88, diabetes = 1, smoker = 1, ECG_LVH = 0, t = 10)

The predictcvd() function returns the risk Cardiovascular Disease (CVD) using Systolic Blood Pressure (SBP) and Diastolic Blood Pressure (DBP). The prediction based on SBP is recommended in the reference paper because the log likelihoods are slightly higher. The differences in otucome are not significant when comapring SBP estimation compared to DBP except for Stroke and to some extend CVD (which includes stroke). Definitions of risk factors and outcomes are based on Framingham study standard. Time interval of 4 to 12 years are recommended.

Cloud-based API Access

The Peer Models Network PRISM platform allows users to access CVDAnderson through the cloud. A MACRO-enabled Excel-file can be used to interact with the model and see the results. To download the PRISM Excel template file for CVDAnderson please refer to the PRISM model repository.

Linux

In Ubuntu, you can call the API with curl:

curl \
-X POST \
-H "x-prism-auth-user: REPLACE_WITH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"func":["prism_model_run"],"model_input":[{"age": 33,"gender": 1,"Tchol": 230,"ECG_LVH": 0,"HDLchol": 48, "SBP": 135, "DBP": 88, "diabetes": 1, "smoker": 1, "t": 10}]}' \
https://prism.peermodelsnetwork.com/route/cvdanderson/run

Citation

Please cite:

Anderson, K. M., Odell, P. M., Wilson, P. W., & Kannel, W. B. (1991). Cardiovascular disease risk profiles. American heart journal, 121(1), 293-298.