Title: | Compute Risk Scores for Cardiovascular Diseases |
Version: | 1.1.1 |
Description: | 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) <doi:10.1161/circulationaha.107.699579>, Goff, et al (2013) <doi:10.1161/01.cir.0000437741.48606.98>, and Mclelland, et al (2015) <doi:10.1016/j.jacc.2015.08.035>. |
License: | GPL-3 |
Depends: | R (≥ 2.10) |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.2.3 |
URL: | https://github.com/vcastro/CVrisk |
BugReports: | https://github.com/vcastro/CVrisk/issues |
Imports: | utils |
Suggests: | testthat (≥ 2.1.0), covr, tibble |
NeedsCompilation: | no |
Packaged: | 2023-08-19 21:05:48 UTC; victormc |
Author: | Victor Castro |
Maintainer: | Victor Castro <vcastro@mgh.harvard.edu> |
Repository: | CRAN |
Date/Publication: | 2023-08-19 22:12:31 UTC |
CVrisk: Compute Risk Scores for Cardiovascular Diseases
Description
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) doi:10.1161/circulationaha.107.699579, Goff, et al (2013) doi:10.1161/01.cir.0000437741.48606.98, and Mclelland, et al (2015) doi:10.1016/j.jacc.2015.08.035.
Author(s)
Maintainer: Victor Castro vcastro@mgh.harvard.edu (ORCID)
See Also
Useful links:
ACC/AHA 2013 ASCVD risk score
Description
Computes 10-year risk for hard ASCVD event (defined as first occurrence of non-fatal myocardial infarction (MI), congestive heart disease (CHD) death, or fatal or nonfatal stroke).
Usage
ascvd_10y_accaha(
race = "white",
gender = c("male", "female"),
age,
totchol,
hdl,
sbp,
bp_med,
smoker,
diabetes,
...
)
Arguments
race |
patient race (white, aa, other) |
gender |
patient gender (male, female) |
age |
patient age (years) |
totchol |
Total cholesterol (mg/dL) |
hdl |
HDL cholesterol (mg/dL) |
sbp |
Systolic blood pressure (mm Hg) |
bp_med |
Patient is on a blood pressure medication (1=Yes, 0=No) |
smoker |
Current smoker (1=Yes, 0=No) |
diabetes |
Diabetes (1=Yes, 0=No) |
... |
Additional predictors can be passed and will be ignored |
Value
Estimated 10-Y Risk for hard ASCVD (percent)
References
Goff, David C., et al. "2013 ACC/AHA guideline on the assessment of cardiovascular risk: a report of the American College of Cardiology/American Heart Association Task Force on Practice Guidelines." Journal of the American College of Cardiology 63.25 Part B (2014): 2935-2959.
Examples
library(CVrisk)
ascvd_10y_accaha(
race = "aa", gender = "male", age = 55,
totchol = 213, hdl = 50, sbp = 140,
bp_med = 0, smoker = 0, diabetes = 0
)
Framingham 2008 ASCVD risk score (with lab measurement)
Description
Computes 10-year risk for ASCVD event (coronary death, myocardial infarction (MI), coronary insufficiency, angina, ischemic stroke, hemorrhagic stroke, transient ischemic attack, peripheral artery disease, or heart failure).
Usage
ascvd_10y_frs(
gender = c("male", "female"),
age,
hdl,
totchol,
sbp,
bp_med,
smoker,
diabetes,
...
)
Arguments
gender |
patient gender (male, female) |
age |
patient age (years), between 30 and 74 |
hdl |
HDL cholesterol (mg/dL) |
totchol |
Total cholesterol (mg/dL) |
sbp |
Systolic blood pressure (mm Hg) |
bp_med |
Patient is on a blood pressure medication (1=Yes, 0=No) |
smoker |
Current smoker (1=Yes, 0=No) |
diabetes |
Diabetes (1=Yes, 0=No) |
... |
Additional predictors can be passed and will be ignored |
Value
Estimated 10-Y Risk for hard ASCVD event (percent)
References
D’agostino, R.B., Vasan, R.S., Pencina, M.J., Wolf, P.A., Cobain, M., Massaro, J.M. and Kannel, W.B., 2008. General cardiovascular risk profile for use in primary care: the Framingham Heart Study. Circulation, 117(6), pp.743-753.
Examples
library(CVrisk)
ascvd_10y_frs(
gender = "male", age = 55,
hdl = 50, totchol = 213, sbp = 140,
bp_med = 0, smoker = 0, diabetes = 0
)
# 16.7
Framingham 2008 ASCVD risk score (no lab measurement)
Description
Computes 10-year risk for ASCVD event (coronary death, myocardial infarction (MI),coronary insufficiency, angina, ischemic stroke, hemorrhagic stroke, transient ischemic attack, peripheral artery disease, or heart failure).
Usage
ascvd_10y_frs_simple(
gender = c("male", "female"),
age,
bmi,
sbp,
bp_med,
smoker,
diabetes,
...
)
Arguments
gender |
patient gender (male, female) |
age |
patient age (years), between 30 and 74 |
bmi |
Body mass index (kg/m2) |
sbp |
Systolic blood pressure (mm Hg) |
bp_med |
Patient is on a blood pressure medication (1=Yes, 0=No) |
smoker |
Current smoker (1=Yes, 0=No) |
diabetes |
Diabetes (1=Yes, 0=No) |
... |
Additional predictors can be passed and will be ignored |
Value
Estimated 10-Y Risk for hard ASCVD (percent)
References
D’agostino, R.B., Vasan, R.S., Pencina, M.J., Wolf, P.A., Cobain, M., Massaro, J.M. and Kannel, W.B., 2008. General cardiovascular risk profile for use in primary care: the Framingham Heart Study. Circulation, 117(6), pp.743-753.
Examples
library(CVrisk)
ascvd_10y_frs_simple(
gender = "male", age = 55,
bmi = 30, sbp = 140,
bp_med = 0, smoker = 0, diabetes = 0
)
# 16.7
Model coefficients for ASCVD 10y ACC/AHA model
Description
A data set containing the 2013 ACC/AHA ASCVD 10-year risk pooled cohort coefficients
Usage
ascvd_pooled_coef
Format
A data frame with 4 obs. and 17 variables:
- race
Patient race, either white or aa
- gender
Patient gender, either female or male
- ln_age
Natural log of patient age
- ln_age_squared
Natural log of patient age in years, squared
- ln_totchol
Natural log of total cholesterol level
- ln_age_totchol
Natural log of combined age and total cholesterol
- ln_hdl
Natural log of HDL level
- ln_age_hdl
Natural log of HDL and age
- ln_treated_sbp
Natural log of treated systolic blood pressure
- ln_age_treated_sbp
Natural log of treated systolic blood pressure and age
- ln_untreated_sbp
Natural log of untreated systolic blood pressure
- ln_age_untreated_sbp
Natural log of untreated systolic blood pressure and age
- smoker
Smoking status
- ln_age_smoker
Natural log of smoking status and age
- diabetes
Diabetes status
- group_mean
Grouped mean
- baseline_survival
Baseline survival
References
Goff, David C., et al. "2013 ACC/AHA guideline on the assessment of cardiovascular risk: a report of the American College of Cardiology/American Heart Association Task Force on Practice Guidelines." Journal of the American College of Cardiology 63.25 Part B (2014): 2935-2959.
MESA 2015 CHD risk score
Description
Computes 10-year risk for hard coronary heart disease (CHD) event (defined as first occurrence of myocardial infarction (MI), resuscitated cardiac arrest, CHD death, or revascularization with prior or concurrent adjudicated angina).
Usage
chd_10y_mesa(
race = "white",
gender = c("male", "female"),
age,
totchol = NA,
hdl = NA,
lipid_med = NA,
sbp = NA,
bp_med = NA,
smoker = NA,
diabetes = NA,
fh_heartattack = NA,
...
)
Arguments
race |
patient race/ethnicity (white, aa, chinese, or hispanic) |
gender |
patient gender (male, female) |
age |
patient age (years), risk computed for 45-85 year olds |
totchol |
Total cholesterol (mg/dL) |
hdl |
HDL cholesterol (mg/dL) |
lipid_med |
Patient is on a hyperlipidemic medication (1=Yes, 0=No) |
sbp |
Systolic blood pressure (mm Hg) |
bp_med |
Patient is on a blood pressure medication (1=Yes, 0=No) |
smoker |
Current smoker (1=Yes, 0=No) |
diabetes |
Diabetes (1=Yes, 0=No) |
fh_heartattack |
Family history of heart attacks (parents, siblings ,or children) (1=Yes, 0=No) |
... |
Additional predictors can be passed and will be ignored |
Value
Estimated 10-Y Risk for hard CAD event (percent)
References
McClelland RL, Jorgensen NW, Budoff M, et al. 10-Year Coronary Heart Disease Risk Prediction Using Coronary Artery Calcium and Traditional Risk Factors: Derivation in the MESA (Multi-Ethnic Study of Atherosclerosis) With Validation in the HNR (Heinz Nixdorf Recall) Study and the DHS (Dallas Heart Study). J Am Coll Cardiol. 2015;66(15):1643-1653. doi:10.1016/j.jacc.2015.08.035
Examples
library(CVrisk)
chd_10y_mesa(
race = "aa", gender = "male", age = 55,
totchol = 213, hdl = 50, sbp = 140, lipid_med = 0,
bp_med = 1, smoker = 0, diabetes = 0, fh_heartattack = 0
)
MESA 2015 CHD risk score with CAC
Description
Computes 10-year risk for hard coronary heart disease (CHD) event (defined as first occurrence of myocardial infarction (MI), resuscitated cardiac arrest, CHD death, or revascularization with prior or concurrent adjudicated angina). Includes coronary artery calcification score for more precise estimate of risk
Usage
chd_10y_mesa_cac(
race = "white",
gender = c("male", "female"),
age,
totchol = NA,
hdl = NA,
lipid_med = NA,
sbp = NA,
bp_med = NA,
smoker = NA,
diabetes = NA,
fh_heartattack = NA,
cac = NA,
...
)
Arguments
race |
patient race/ethnicity (white, aa, chinese, or hispanic) |
gender |
patient gender (male, female) |
age |
patient age (years), risk computed for 45-85 year olds |
totchol |
Total cholesterol (mg/dL) |
hdl |
HDL cholesterol (mg/dL) |
lipid_med |
Patient is on a hyperlipidemic medication (1=Yes, 0=No) |
sbp |
Systolic blood pressure (mm Hg) |
bp_med |
Patient is on a blood pressure medication (1=Yes, 0=No) |
smoker |
Current smoker (1=Yes, 0=No) |
diabetes |
Diabetes (1=Yes, 0=No) |
fh_heartattack |
Family history of heart attacks (parents, siblings ,or children) (1=Yes, 0=No) |
cac |
Coronary artery calcification (Agatston units) |
... |
Additional predictors can be passed and will be ignored |
Value
Estimated 10-Y Risk for hard CAD event (percent)
References
McClelland RL, Jorgensen NW, Budoff M, et al. 10-Year Coronary Heart Disease Risk Prediction Using Coronary Artery Calcium and Traditional Risk Factors: Derivation in the MESA (Multi-Ethnic Study of Atherosclerosis) With Validation in the HNR (Heinz Nixdorf Recall) Study and the DHS (Dallas Heart Study). J Am Coll Cardiol. 2015;66(15):1643-1653. doi:10.1016/j.jacc.2015.08.035
Examples
library(CVrisk)
chd_10y_mesa_cac(
race = "aa", gender = "male", age = 55,
totchol = 213, hdl = 50, sbp = 140, lipid_med = 0,
bp_med = 1, smoker = 0, diabetes = 0, fh_heartattack = 0, cac = 0
)
Compute multiple CV risk scores
Description
Compute multiple CV risk scores
Usage
compute_CVrisk(
df,
scores = c("ascvd_10y_accaha", "ascvd_10y_frs", "ascvd_10y_frs_simple", "chd_10y_mesa",
"chd_10y_mesa_cac"),
age,
gender,
race,
sbp = NULL,
bmi = NULL,
hdl = NULL,
totchol = NULL,
bp_med = NULL,
smoker = NULL,
diabetes = NULL,
lipid_med = NULL,
fh_heartattack = NULL,
cac = NULL
)
Arguments
df |
input dataframe |
scores |
scores to compute, default is all scores |
age |
patient age in years (required for all scores) |
gender |
patient gender (male or female) |
race |
character string for patient race (white, aa, other) column |
sbp |
character string of systolic blood pressure (in mm Hg) column |
bmi |
character string of Body mass index (kg/m2) column |
hdl |
character string of HDL column |
totchol |
character string of total cholesterol column |
bp_med |
character string of blood pressure medication column |
smoker |
character string of smoking status column |
diabetes |
character string of diabetes status column |
lipid_med |
character string of lipid medication column |
fh_heartattack |
character string of fh of heart attack status column |
cac |
character string of cac column |
Value
input data frame with risk score results appended as columns
Examples
library(CVrisk)
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"
)
Model coefficients for ASCVD 10y FRS model
Description
A data set containing the Framingham risk score coefficients (full model with lab features)
Usage
frs_coef
Format
A data frame with 2 obs. and 10 variables:
- gender
Patient gender, either female or male
- ln_age
Natural log of patient age
- ln_totchol
Natural log of total cholesterol level
- ln_hdl
Natural log of HDL level
- ln_untreated_sbp
Natural log of untreated systolic blood pressure
- ln_treated_sbp
Natural log of treated systolic blood pressure
- smoker
Smoking status
- diabetes
Diabetes status
- group_mean
Grouped mean
- baseline_survival
Baseline survival
References
D’agostino, R.B., Vasan, R.S., Pencina, M.J., Wolf, P.A., Cobain, M., Massaro, J.M. and Kannel, W.B., 2008. General cardiovascular risk profile for use in primary care. Circulation, 117(6), pp.743-753.
Model coefficients for ASCVD 10y FRS simple model
Description
A data set containing the Framingham risk score coefficients (simple model without lab features)
Usage
frs_simple_coef
Format
A data frame with 2 obs. and 10 variables:
- gender
Patient gender, either female or male
- ln_age
Natural log of patient age (years)
- ln_bmi
Natural log of body mass index kg/m2
- ln_untreated_sbp
Natural log of untreated systolic blood pressure
- ln_treated_sbp
Natural log of treated systolic blood pressure
- smoker
Smoking status
- diabetes
Diabetes status
- group_mean
Grouped mean
- baseline_survival
Baseline survival
References
D’agostino, R.B., Vasan, R.S., Pencina, M.J., Wolf, P.A., Cobain, M., Massaro, J.M. and Kannel, W.B., 2008. General cardiovascular risk profile for use in primary care. Circulation, 117(6), pp.743-753.
mesa_cac_coef
Description
A data set containing the MESA risk score coefficients (model with CAC)
Usage
mesa_cac_coef
Format
A data frame with 1 obs. and 15 variables:
- age
Coefficient for age
- gender_male
Coefficient for male gender
- race_chinese
Coefficient for Chinese race
- race_aa
Coefficient for African American race
- race_hispanic
Coefficient for Hispanic race
- diabetes
Coefficient for diabetes status
- smoker
Coefficient for current smoker
- totchol
Coefficient for total cholesterol level
- hdl
Coefficient for HDL level
- hld_med
Coefficient for antihyperlipidemic medication
- sbp
Coefficient for systolic blood pressure
- bp_med
Coefficient for antihypertensive medication
- fh_heartattack
Coefficient for family history of heart attacks
- log1p_cac
Coefficient for ln(coronary artery calcification (units)+1)
- baseline_survival
Baseline survival
References
McClelland RL, Jorgensen NW, Budoff M, et al. 10-Year Coronary Heart Disease Risk Prediction Using Coronary Artery Calcium and Traditional Risk Factors: Derivation in the MESA (Multi-Ethnic Study of Atherosclerosis) With Validation in the HNR (Heinz Nixdorf Recall) Study and the DHS (Dallas Heart Study). J Am Coll Cardiol. 2015;66(15):1643-1653. doi:10.1016/j.jacc.2015.08.035
mesa_coef
Description
A data set containing the MESA risk score coefficients (model without CAC)
Usage
mesa_coef
Format
A data frame with 1 obs. and 14 variables:
- age
Coefficient for age
- gender_male
Coefficient for male gender
- race_chinese
Coefficient for Chinese race
- race_aa
Coefficient for African American race
- race_hispanic
Coefficient for Hispanic race
- diabetes
Coefficient for diabetes status
- smoker
Coefficient for current smoker
- totchol
Coefficient for total cholesterol level
- hdl
Coefficient for HDL level
- hld_med
Coefficient for antihyperlipidemic medication
- sbp
Coefficient for systolic blood pressure
- bp_med
Coefficient for antihypertensive medication
- fh_heartattack
Coefficient for family history of heart attacks
- baseline_survival
Baseline survival
References
McClelland RL, Jorgensen NW, Budoff M, et al. 10-Year Coronary Heart Disease Risk Prediction Using Coronary Artery Calcium and Traditional Risk Factors: Derivation in the MESA (Multi-Ethnic Study of Atherosclerosis) With Validation in the HNR (Heinz Nixdorf Recall) Study and the DHS (Dallas Heart Study). J Am Coll Cardiol. 2015;66(15):1643-1653. doi:10.1016/j.jacc.2015.08.035
Sample patient data
Description
A data set containing sample patient data
Usage
sample_data
Format
A data frame with 3 obs. and 10 variables:
- age
age in years
- gender
Patient gender
- race
race
- BMI
Body mass index (kg/m2)
- sbp
systolic blood pressure
- hdl
HDL
- totchol
Total cholesterol
- bp_med
Patient is on blood pressure medication
- smoker
Smoking status
- diabetes
Diabetes status
- lipid_med
Patient is on hyperlipidemic medication
- fh_heartattack
Family history of heart attack
- cac
Coronary artery calcification score