data <- data.frame(
age = c(39, 85, 70),
sbp = c(120, 130, 140),
t2dm = c(NA, 1, 0),
urineprotein = c(1, 1, 0),
smoking = c(0, 1, 1)
)
# age :age(continuous)
# sbp :systolic blood pressure(continuous)
# t2dm :diabetes mellitus(category: 0 = non-prevalent DM, 1 = prevalent DM)
# urineprotein :proteinuria(category: 0 = negative, 1 = positive)
# smoking :smoking status(category: 0 = never/past smoker, 1 = current smoker)
epoch_stroke(data)
Run the code above in your browser using DataLab