# Example usage:
trauma_data <- data.frame(
Trauma_Type = c("Blunt", "Penetrating"),
Patient_Age_Years = c(30, 60),
RTS = c(7.84, 6.90),
ISS = c(10, 25)
)
result <- trauma_data |>
dplyr::mutate(Ps = probability_of_survival(
trauma_type = Trauma_Type,
age = Patient_Age_Years,
rts = RTS,
iss = ISS
))
Run the code above in your browser using DataLab