Description Usage Arguments Value Converting to probability scale References Examples
This function will parse a dataframe and compute mortality based on the Surgical Risk Scale (SRS). To use the function, you will need to manipulate your dataframe to have columns with the structure detailed below.
1 | gen.SRS(x)
|
x |
A dataframe or tbl where each row is a patient observation, and the columns are SRS 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 SRS score
The log-odds for mortality as calculated according to the equation SRS_mortLogit = 0.84 * SRS - 9.81. See reference below, page 765.
The function will produce SRS_mort values which are on the log-odds scale
To convert to probabilities (0 to 1 scale), use arm::invlogit()
. See: invlogit
.
Sutton R, Bann S, Brooks M, Sarin S. The surgical risk scale as an improved tool for risk-adjusted analysis in comparative surgical audit. Br J Surg. 2002 Jun 1;89(6):763–8. http://onlinelibrary.wiley.com/doi/10.1046/j.1365-2168.2002.02080.x/abstract.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
#Example of pre-processing to rename data variables to match expected column names
library(tidyverse)
test_data <- raw_data %>%
select(ASA = S03AsaPsClass,
OpUrgency = S02OperativeUrgency,
OpSeverity = S02PlannedProcSeverity)
## End(Not run)
test_data <- patients
test_output <- gen.SRS(test_data)
head(test_output)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.