R/stranded_patient_model.R
stranded_data.Rd
This model is to be used as a machine learning classification model, for supervised learning. The binary outcome is stranded vs not stranded patients.
data(stranded_data)
Tibble with nine columns (1 x outcome and 8 predictors)
Outcome variable - whether the patient is stranded or not
Patient age on admission
Whether than have been referred from a care home
Medically safe for discharge - means the patient is assessed as safe, but has not been discharged yet
Indicates whether they have been triaged from a Health Care for Older People specialty
Flag to indicate whether they need mental health support and care
Count of the number of previous spells of care
Date they were admitted to hospital
An initial index assessment to say if the patient is frail or not. This is needed for alignment of service provision.
Synthetically generated by Gary Hutson, Mar-2021.
library(dplyr)
data(stranded_data)
stranded_data |>
glimpse()
#> Rows: 768
#> Columns: 9
#> $ stranded.label <chr> "Not Stranded", "Not Stranded", "Not Stranded…
#> $ age <int> 50, 31, 32, 69, 33, 75, 26, 64, 53, 63, 30, 7…
#> $ care.home.referral <int> 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, …
#> $ medicallysafe <int> 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, …
#> $ hcop <int> 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, …
#> $ mental_health_care <int> 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, …
#> $ periods_of_previous_care <int> 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 4, …
#> $ admit_date <chr> "29/12/2020", "11/12/2020", "19/01/2021", "07…
#> $ frailty_index <chr> "No index item", "No index item", "No index i…