# Packages
library(dplyr)
library(traumar)
# Simulated data for SEQIC Indicator 11
test_data <- tibble::tibble(
id = as.character(1:10),
trauma_level = c("I", "II", "III", "IV", "II", "I", "IV", "III", "II",
"I"),
transferred_out = c(FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE,
FALSE, FALSE),
received = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE),
iss = c(4, 8, 10, 6, 5, 7, 6, 15, 3, 2),
ed_LOS = c(6, 20, 30, 18, 8, 5, 22, 40, 2, 4),
region = rep(c("East", "West"), each = 5)
)
# Run the function
traumar::seqic_indicator_11(
data = test_data,
level = trauma_level,
included_levels = c("I", "II", "III", "IV"),
transfer_out_indicator = transferred_out,
receiving_indicator = received,
unique_incident_id = id,
iss = iss,
ed_LOS = ed_LOS,
groups = "region",
calculate_ci = "clopper-pearson"
)
Run the code above in your browser using DataLab