case study csv

g <- read.csv("GMPH_1K_final_2.csv", header = TRUE, sep = ",")
g %>% dim()
## [1] 1000   31
# g %>% names()


- data is simulated, based on hospital admin data - original paper = https://www.ncbi.nlm.nih.gov/books/NBK513479/ - emergency admission for heart failure (ICD10 code I50)

variables

    "los"                   length of hospital stay
    "gender"                1=male; 2=female
    "cabg"                  previous heart bypass
    "crt"                   cardiac resynchronisation device - a treatment for heart failure
    "defib"                 defibrillator implanted
    "diabetes"              any type
    "ihd"                   ischaemic heart disease
    "mental_health"         any
    "copd"                  chronic obstructive lung disease
    "pvd"                   peripheral vascular disease
    "valvular_disease"      heart valve disease
    "prior_appts_attended"  num of outpatient appointments last year
    "prior_dnas"            num of outpatient appointments missed last year
    "pci"                   percutaneous coronary intervention
    "stroke"                any history
    "quintile"              socio-economic status (1=affluent to 5=poor)
    "ethnicgroup"           1=white; 2=black; 3=indian; 8=not known; 9=other
    "fu_time"               follow-up time (days since admission to hospital)

EOF