Compute multiple CV risk scores
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
)
input dataframe
scores to compute, default is all scores
patient age in years (required for all scores)
patient gender (male or female)
character string for patient race (white, aa, other) column
character string of systolic blood pressure (in mm Hg) column
character string of Body mass index (kg/m2) column
character string of HDL column
character string of total cholesterol column
character string of blood pressure medication column
character string of smoking status column
character string of diabetes status column
character string of lipid medication column
character string of fh of heart attack status column
character string of cac column
input data frame with risk score results appended as columns
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"
)
#> age gender race BMI sbp hdl totchol bp_med smoker diabetes lipid_med
#> 1 55 male white 30 140 50 NA 0 0 0 0
#> 2 45 female white 27 125 50 200 1 0 0 0
#> 3 45 female white 27 125 50 200 NA 0 0 0
#> 4 70 male hispanic NA 140 50 190 1 0 0 0
#> 5 70 male hispanic NA 140 50 190 1 0 0 0
#> 6 80 female chinese NA 140 50 190 1 0 0 0
#> 7 60 male aa 29 140 50 190 1 0 0 0
#> fh_heartattack cac ascvd_10y_accaha ascvd_10y_frs ascvd_10y_frs_simple
#> 1 0 NA NA NA 16.75
#> 2 0 0 1.22 4.68 4.91
#> 3 0 NA NA NA NA
#> 4 0 NA 23.47 30.95 NA
#> 5 0 0 23.47 30.95 NA
#> 6 0 0 NA NA NA
#> 7 0 50 15.49 20.63 28.35
#> chd_10y_mesa chd_10y_mesa_cac
#> 1 NA NA
#> 2 1.65 1.38
#> 3 NA NA
#> 4 9.34 NA
#> 5 9.34 3.26
#> 6 5.19 1.88
#> 7 5.91 8.33