data <- data.frame(
age = c(39, 85, 70),
male = c(1, 0, 0),
sbp = c(120, 130, 135),
t2dm = c(NA, 1, 1),
tc = c(180, 110, 185),
hdl = c(55, 45, 58),
urineprotein = c(1, 1, 0),
smoking = c(0, 1, 0)
)
# age :age(continuous)
# male :male(category: 0 = female, 1 = male)
# sbp :systolic blood pressure(continuous)
# t2dm :diabetes mellitus(category: 0 = non-prevalent DM, 1 = prevalent DM)
# tc :total cholesterol(continuous)
# hdl :high-density lipoprotein cholesterol(continuous)
# urineprotein :proteinuria(category: 0 = negative, 1 = positive)
# smoking :smoking status(category: 0 = never/past smoker, 1 = current smoker)
epoch_chd(data)
Run the code above in your browser using DataLab