calcPCE | R Documentation |
This function calculates Pooled Cohorts Equations risk scores per prior ACC/AHA recommendations. Reference: Goff DC, et al. Circulation 2014;19:S49-S73 DOI: 10.1161/01.cir.0000437741.48606.98
calcPCE(
age,
race,
sex,
tc,
hdl,
sbp,
bptx,
smoking,
dm,
white = c(0, "w", "white"),
black = c(1, "b", "black"),
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")
)
age |
age in years |
race |
white (non-black) vs. black |
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 |
white |
values which indicate white/non-black the parameter race, case-insensitive (default=0,"w","white") |
black |
values which indicate blacks in the parameter race, case-insensitive (default=1,"b","black") |
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") |
PCE risk as numeric from 0 to 1
calcPCE(55,0,0,213,50,120,0,0,0)
calcPCE(55,1,0,213,50,120,0,0,0)
calcPCE(55,0,1,213,50,120,0,0,0)
calcPCE(55,1,1,213,50,120,0,0,0)
test.dat <- data.frame(age=rep(56:65,4),race=c(rep(0,10),rep(1,10),rep(0,10),rep(1,10)),
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))
test.dat$PCE <- calcPCE(test.dat$age,test.dat$race,test.dat$sex,test.dat$tc,test.dat$hdl,test.dat$sbp,
test.dat$bptx,test.dat$smoking,test.dat$dm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.