Description Usage Arguments Value Converting to probability scale References Examples
This function will parse a dataframe and compute morbidity and mortality based on the Surgical Outcome Risk Tool (SORT). To use the function, you will need to manipulate your dataframe to have columns with the structure detailed below.
1 | gen.SORT(x)
|
x |
A dataframe or tbl where each row is a patient observation, and the columns are SORT predictor variables. x must contain the following column names (not necessarily in order):
|
A dataframe (or tbl), which you can assign to an object, with the following variables:
The log-odds for mortality as calculated by SORT
The log-odds for morbidity as calculated by SORT
The function will produce SORT_mortLogit and SORT_morbLogit values which are on the log-odds scale
To convert to probabilities (0 to 1 scale), use arm::invlogit()
. See: invlogit
.
Protopapa KL, Simpson JC, Smith NCE, Moonesinghe SR. Development and validation of the Surgical Outcome Risk Tool (SORT). Br J Surg. 2014 Dec;101(13):1774–83. http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4240514/.
Wong DJN, Oliver CM, Moonesinghe SR. Predicting postoperative morbidity in adult elective surgical patients using the Surgical Outcome Risk Tool (SORT). BJA: British Journal of Anaesthesia. 2017;119(1):95–105. https://doi.org/10.1093/bja/aex117
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
#Example of pre-processing to rename data variables to match expected column names
library(tidyverse)
test_data <- raw_data %>%
select(Age = S01Age,
ASA = S03AsaPsClass,
OpUrgency = S02OperativeUrgency,
Specialty = Specialty,
OpSeverity = S02PlannedProcSeverity,
Malignancy = S04Malignancy)
## End(Not run)
test_data <- patients
test_output <- gen.SORT(test_data)
head(test_output)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.