gen.SRS: A function to compute SRS scores

Description Usage Arguments Value Converting to probability scale References Examples

Description

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.

Usage

1

Arguments

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):

ASA

categorical variable, can be "I"; "II"; "III"; "IV"; "V"

OpUrgency

categorical variable, NCEPOD classifications, can be "Ele" = Elective; "Exp" = Expedited; "U" = Urgent; "I" = Immediate

OpSeverity

categorical variable, can be "Min" = Minor; "Int" = Intermediate; "Maj" = Major; "Xma" = Xmajor; "Com" = Complex

Value

A dataframe (or tbl), which you can assign to an object, with the following variables:

SRS

The SRS score

SRS_mortLogit

The log-odds for mortality as calculated according to the equation SRS_mortLogit = 0.84 * SRS - 9.81. See reference below, page 765.

Converting to probability scale

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.

References

Examples

 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)

dannyjnwong/HSRC documentation built on May 18, 2019, 2:37 a.m.