View source: R/calcPREVENT.ASCVD.R
calcPREVENT.ASCVD | R Documentation |
This function calculates PREVENT 10 year ASCVD risk scores per recent AHA recommendations. Reference: Khan SS, et al. Circulation 2023 online ahead of print DOI: https://doi.org/10.1161/CIRCULATIONAHA.123.067626
calcPREVENT.ASCVD(
age,
sex,
tc,
hdl,
sbp,
bptx,
smoking,
dm,
statin,
egfr,
female = c(0, "f", "female"),
male = c(1, "m", "male"),
bptx.true = c(1, "t", "true", "y", "yes"),
bptx.false = c(0, "f", "false", "n", "no"),
smoking.true = c(1, "t", "true", "y", "yes", "active"),
smoking.false = c(0, "f", "false", "former", "non-smoker", "nonsmoker"),
dm.true = c(1, "t", "true", "y", "yes"),
dm.false = c(0, "f", "false", "n", "no"),
statin.true = c(1, "t", "true", "y", "yes"),
statin.false = c(0, "f", "false", "n", "no")
)
age |
age in years |
sex |
0=female/1=male |
tc |
total cholesterol in mg/dl |
hdl |
HDL cholesterol in mg/dl |
sbp |
Systolic blood pressure in mmHg |
bptx |
treatment for blood pressure 0=FALSE/1=TRUE |
smoking |
active smoking 0=FALSE/1=TRUE |
dm |
diabetes mellitus 0=FALSE/1=TRUE |
statin |
use of statin medication 0=FALSE/1=TRUE |
egfr |
estimated glomerular filtration rate in ml/min/1.73m^2 |
female |
values which indicate female in the parameter sex, case-insensitive (default=0,"f","female") |
male |
values which indicate male in the parameter sex, case-insensitive (default=1,"m","male") |
bptx.true |
values which indicate BP med use, case-insensitive (default=1,"t","true","y","yes") |
bptx.false |
values which indicate no BP med use, case-insensitive (default=0,"f","false","n","no") |
smoking.true |
values which indicate active smoking, case-insensitive (default=1,"t","true","y","yes","active") |
smoking.false |
values which indicate no active smoking, case-insensitive (default=0,"f","false","n","no","former","non-smoker","nonsmoker") |
dm.true |
values which indicate diabetes, case-insensitive (default=1,"t","true","y","yes") |
dm.false |
values which indicate no diabetes, case-insensitive (default=0,"f","false","n","no") |
statin.true |
values which indicate statin use, case-insensitive (default=1,"t","true","y","yes") |
statin.false |
values which indicate no statin use, case-insensitive (default=0,"f","false","n","no") |
PREVENT 10 year ASCVD risk as numeric from 0 to 1
calcPREVENT.ASCVD(50,0,200,45,160,1,0,1,0,90)
calcPREVENT.ASCVD(55,1,213,50,120,0,0,0,0,60)
calcPREVENT.ASCVD(55,0,213,50,120,0,0,0,0,60)
calcPREVENT.ASCVD(55,1,213,50,120,0,0,0,0,60)
test.dat <- data.frame(age=rep(56:65,4),sex=c(rep(0,20),rep(1,20)),tc=rep(136:145,4),hdl=rep(46:55,4),
sbp=rep(126:135,4),bptx=rep(c(rep(0,5),rep(1,5)),4),
smoking=rep(c(rep(0,5),rep("active",5)),4),dm=rep(c(rep("No",5),rep(1,5)),4),
statin=c(rep(0,10),rep(1,10),rep(0,10),rep(1,10)),
egfr=c(rep(40,10),rep(90,10),rep(40,10),rep(90,10)))
test.dat$PREVENT.ASCVD <- calcPREVENT.ASCVD(test.dat$age,test.dat$sex,test.dat$tc,test.dat$hdl,test.dat$sbp,
test.dat$bptx,test.dat$smoking,test.dat$dm,test.dat$statin,test.dat$egfr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.