You can install using
devtools::install_github("csthiago/lshtmR")
# or
pak::pak("csthiago/lshtmR")
Minimal example
library(lshtmR)
data("lung_cancer_cc")
data("mortality_cohort")mh_analysis(lung_cancer_cc, exposure = "smoking", outcome = "case", measure = "or",
strata="age_group")
mh_analysis(lung_cancer_cc, exposure = "smoking", outcome = "case", measure = "or")strate(
data = mortality_cohort,
event = "death",
time = "person_years",
strata = "age_cat",
per = 1000,
)mh_analysis(mortality_cohort, exposure = "treatment", outcome = "death",
time = "person_years", measure = "irr")
mh_analysis(mortality_cohort, exposure = "treatment", outcome = "death",
strata = "age_cat",
time = "person_years", measure = "irr")