calcPREVENT.HF: Calculate PREVENT 10 year HF risk scores

View source: R/calcPREVENT.HF.R

calcPREVENT.HFR Documentation

Calculate PREVENT 10 year HF risk scores

Description

This function calculates PREVENT 10 year HF 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

Usage

calcPREVENT.HF(
  age,
  sex,
  sbp,
  bptx,
  smoking,
  dm,
  bmi,
  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")
)

Arguments

age

age in years

sex

0=female/1=male

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

bmi

body mass index in kg/m2

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")

Value

PREVENT 10 year HF risk as numeric from 0 to 1

Examples

calcPREVENT.HF(50,0,160,1,0,1,35,90)
calcPREVENT.HF(55,1,120,0,0,0,40,60)
calcPREVENT.HF(55,0,120,0,0,0,20,60)
calcPREVENT.HF(55,1,120,0,0,0,50,60)


test.dat <- data.frame(age=rep(56:65,4),sex=c(rep(0,20),rep(1,20)),
                       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),
                       bmi=c(rep(40,10),rep(20,10),rep(40,10),rep(20,10)),
                       egfr=c(rep(40,10),rep(90,10),rep(40,10),rep(90,10)))

test.dat$PREVENT.HF <- calcPREVENT.HF(test.dat$age,test.dat$sex,test.dat$sbp,test.dat$bptx,
                                      test.dat$smoking,test.dat$dm,test.dat$bmi,test.dat$egfr)

venkmurthy/vmtools documentation built on Oct. 16, 2024, 10:48 a.m.