## [1] "C:/Users/User/Documents/RStudio/BreastDivePort_PatientsDetail"
## [1] "C:/Users/User/Documents/RStudio/BreastDivePort_PatientsDetail"
## Warning: package 'stringr' was built under R version 4.3.2
## Warning: package 'readr' was built under R version 4.3.2
## Warning: package 'tidyverse' was built under R version 4.3.2
## Warning: package 'ggplot2' was built under R version 4.3.2
## Warning: package 'tibble' was built under R version 4.3.2
## Warning: package 'tidyr' was built under R version 4.3.2
## Warning: package 'purrr' was built under R version 4.3.2
## Warning: package 'dplyr' was built under R version 4.3.2
## Warning: package 'forcats' was built under R version 4.3.2
## Warning: package 'lubridate' was built under R version 4.3.2
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ purrr 1.0.2
## ✔ forcats 1.0.0 ✔ tibble 3.2.1
## ✔ ggplot2 3.4.4 ✔ tidyr 1.3.0
## ✔ lubridate 1.9.3
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## Warning: package 'qcc' was built under R version 4.3.2
## Package 'qcc' version 2.7
## Type 'citation("qcc")' for citing this R package in publications.
## Warning: package 'sqldf' was built under R version 4.3.2
## Loading required package: gsubfn
## Warning: package 'gsubfn' was built under R version 4.3.2
## Loading required package: proto
## Warning: package 'proto' was built under R version 4.3.2
## Loading required package: RSQLite
## Warning: package 'RSQLite' was built under R version 4.3.2
## Warning: package 'gridExtra' was built under R version 4.3.2
##
## Attaching package: 'gridExtra'
##
## The following object is masked from 'package:dplyr':
##
## combine
## Warning: package 'Hmisc' was built under R version 4.3.2
##
## Attaching package: 'Hmisc'
##
## The following objects are masked from 'package:dplyr':
##
## src, summarize
##
## The following objects are masked from 'package:base':
##
## format.pval, units
## Warning: package 'psych' was built under R version 4.3.2
##
## Attaching package: 'psych'
##
## The following object is masked from 'package:Hmisc':
##
## describe
##
## The following objects are masked from 'package:ggplot2':
##
## %+%, alpha
## Warning: package 'plyr' was built under R version 4.3.2
## ------------------------------------------------------------------------------
## You have loaded plyr after dplyr - this is likely to cause problems.
## If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
## library(plyr); library(dplyr)
## ------------------------------------------------------------------------------
##
## Attaching package: 'plyr'
##
## The following objects are masked from 'package:Hmisc':
##
## is.discrete, summarize
##
## The following objects are masked from 'package:dplyr':
##
## arrange, count, desc, failwith, id, mutate, rename, summarise,
## summarize
##
## The following object is masked from 'package:purrr':
##
## compact
## Warning: package 'pastecs' was built under R version 4.3.2
##
## Attaching package: 'pastecs'
##
## The following objects are masked from 'package:dplyr':
##
## first, last
##
## The following object is masked from 'package:tidyr':
##
## extract
## Warning: package 'semTools' was built under R version 4.3.2
## Loading required package: lavaan
## Warning: package 'lavaan' was built under R version 4.3.2
## This is lavaan 0.6-17
## lavaan is FREE software! Please report any bugs.
##
## Attaching package: 'lavaan'
##
## The following object is masked from 'package:psych':
##
## cor2cov
##
##
## ###############################################################################
## This is semTools 0.5-6
## All users of R (or SEM) are invited to submit functions or ideas for functions.
## ###############################################################################
##
## Attaching package: 'semTools'
##
## The following object is masked from 'package:moments':
##
## kurtosis
##
## The following objects are masked from 'package:psych':
##
## reliability, skew
##
## The following object is masked from 'package:readr':
##
## clipboard
## Warning: package 'car' was built under R version 4.3.2
## Loading required package: carData
## Warning: package 'carData' was built under R version 4.3.2
##
## Attaching package: 'car'
##
## The following object is masked from 'package:psych':
##
## logit
##
## The following object is masked from 'package:dplyr':
##
## recode
##
## The following object is masked from 'package:purrr':
##
## some
## Warning: package 'PerformanceAnalytics' was built under R version 4.3.2
## Loading required package: xts
## Warning: package 'xts' was built under R version 4.3.2
## Loading required package: zoo
## Warning: package 'zoo' was built under R version 4.3.2
##
## Attaching package: 'zoo'
##
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
##
##
## ######################### Warning from 'xts' package ##########################
## # #
## # The dplyr lag() function breaks how base R's lag() function is supposed to #
## # work, which breaks lag(my_xts). Calls to lag(my_xts) that you type or #
## # source() into this session won't work correctly. #
## # #
## # Use stats::lag() to make sure you're not using dplyr::lag(), or you can add #
## # conflictRules('dplyr', exclude = 'lag') to your .Rprofile to stop #
## # dplyr from breaking base R's lag() function. #
## # #
## # Code in packages is not affected. It's protected by R's namespace mechanism #
## # Set `options(xts.warn_dplyr_breaks_lag = FALSE)` to suppress this warning. #
## # #
## ###############################################################################
##
## Attaching package: 'xts'
##
## The following objects are masked from 'package:pastecs':
##
## first, last
##
## The following objects are masked from 'package:dplyr':
##
## first, last
##
##
## Attaching package: 'PerformanceAnalytics'
##
## The following object is masked from 'package:semTools':
##
## kurtosis
##
## The following objects are masked from 'package:moments':
##
## kurtosis, skewness
##
## The following object is masked from 'package:graphics':
##
## legend
## Warning: package 'caret' was built under R version 4.3.2
## Loading required package: lattice
##
## Attaching package: 'caret'
##
## The following object is masked from 'package:purrr':
##
## lift
## Warning: package 'rcompanion' was built under R version 4.3.2
##
## Attaching package: 'rcompanion'
##
## The following object is masked from 'package:psych':
##
## phi
## Warning: package 'regclass' was built under R version 4.3.2
## Loading required package: bestglm
## Warning: package 'bestglm' was built under R version 4.3.2
## Loading required package: leaps
## Warning: package 'leaps' was built under R version 4.3.2
## Loading required package: VGAM
## Warning: package 'VGAM' was built under R version 4.3.2
## Loading required package: stats4
## Loading required package: splines
##
## Attaching package: 'VGAM'
##
## The following object is masked from 'package:caret':
##
## predictors
##
## The following object is masked from 'package:car':
##
## logit
##
## The following objects are masked from 'package:psych':
##
## fisherz, logistic, logit
##
## Loading required package: rpart
## Warning: package 'rpart' was built under R version 4.3.2
## Loading required package: randomForest
## Warning: package 'randomForest' was built under R version 4.3.2
## randomForest 4.7-1.1
## Type rfNews() to see new features/changes/bug fixes.
##
## Attaching package: 'randomForest'
##
## The following object is masked from 'package:psych':
##
## outlier
##
## The following object is masked from 'package:gridExtra':
##
## combine
##
## The following object is masked from 'package:dplyr':
##
## combine
##
## The following object is masked from 'package:ggplot2':
##
## margin
##
## Important regclass change from 1.3:
## All functions that had a . in the name now have an _
## all.correlations -> all_correlations, cor.demo -> cor_demo, etc.
##
##
## Attaching package: 'regclass'
##
## The following object is masked from 'package:lattice':
##
## qq
## Warning: package 'AppliedPredictiveModeling' was built under R version 4.3.2
## Warning: package 'rpart.plot' was built under R version 4.3.2
## Warning: package 'pROC' was built under R version 4.3.2
## Type 'citation("pROC")' for a citation.
##
## Attaching package: 'pROC'
##
## The following objects are masked from 'package:stats':
##
## cov, smooth, var
## Warning: package 'gmodels' was built under R version 4.3.2
## Registered S3 method overwritten by 'gdata':
## method from
## reorder.factor DescTools
##
## Attaching package: 'gmodels'
##
## The following object is masked from 'package:pROC':
##
## ci
## Warning: package 'epiDisplay' was built under R version 4.3.2
## Loading required package: foreign
## Loading required package: survival
##
## Attaching package: 'survival'
##
## The following object is masked from 'package:caret':
##
## cluster
##
## Loading required package: MASS
##
## Attaching package: 'MASS'
##
## The following object is masked from 'package:dplyr':
##
## select
##
## Loading required package: nnet
##
## Attaching package: 'epiDisplay'
##
## The following object is masked from 'package:gmodels':
##
## ci
##
## The following object is masked from 'package:pROC':
##
## ci
##
## The following object is masked from 'package:VGAM':
##
## lrtest
##
## The following object is masked from 'package:lattice':
##
## dotplot
##
## The following objects are masked from 'package:psych':
##
## alpha, cs, lookup
##
## The following object is masked from 'package:ggplot2':
##
## alpha
## Warning: package 'survey' was built under R version 4.3.2
## Loading required package: grid
## Loading required package: Matrix
## Warning: package 'Matrix' was built under R version 4.3.2
##
## Attaching package: 'Matrix'
##
## The following objects are masked from 'package:tidyr':
##
## expand, pack, unpack
##
##
## Attaching package: 'survey'
##
## The following object is masked from 'package:VGAM':
##
## calibrate
##
## The following object is masked from 'package:Hmisc':
##
## deff
##
## The following object is masked from 'package:graphics':
##
## dotchart
## Warning: package 'rattle' was built under R version 4.3.2
## Loading required package: bitops
##
## Attaching package: 'bitops'
##
## The following object is masked from 'package:Matrix':
##
## %&%
##
## Rattle: A free graphical interface for data science with R.
## Version 5.5.1 Copyright (c) 2006-2021 Togaware Pty Ltd.
## Type 'rattle()' to shake, rattle, and roll your data.
##
## Attaching package: 'rattle'
##
## The following object is masked from 'package:randomForest':
##
## importance
##
## The following object is masked from 'package:VGAM':
##
## wine
main <- read.csv("BreastPatientsDetail_Clinic.csv")
main <- subset(main, Attendance.Year < 2024)
## View variable types
main %>% glimpse() #glimpse from library(dplyr)
## Rows: 91,169
## Columns: 45
## $ Record.Type <chr> "Attendance", "Attendance", "Cancellation…
## $ Clinic.Code <int> 932, 757, 757, 757, 771, 527, 757, 757, 7…
## $ Clinic.Type <chr> "MED : MEDICAL", "SBC : SYMPTOMATIC BREAS…
## $ NurseFlag <chr> "N", "N", "N", "N", "N", "N", "N", "N", "…
## $ Medical.Record.Number <int> 177, 527, 527, 527, 527, 2194, 2329, 2329…
## $ Gender <chr> "Male", "Female", "Female", "Female", "Fe…
## $ Patient.Name <chr> "CLAVIN JOHN", "PHELAN MAUREEN", "PHELAN …
## $ Attendance.Day <chr> "Monday", "Tuesday", "Tuesday", "Tuesday"…
## $ Attendance.MonthYear <chr> "07-2022", "07-2023", "11-2023", "11-2023…
## $ Attendance.Date <chr> "11/07/2022", "25/07/2023", "07/11/2023",…
## $ Attendance.Type.Description <chr> "NEW", "NEW", "RETURN", "RETURN", "NEW", …
## $ Referral.Source <chr> "G : GP", "W : WARD", "C : CLINIC", "C : …
## $ Clinical.Specialty.Group <chr> "Cancer", "Cancer", "Cancer", "Cancer", "…
## $ Specialty.Description.Mater <chr> "General Surgery: Breast", "General Surge…
## $ Consultant <chr> "BARRYM : BARRY MR. MITCHELL JOHN", "BARR…
## $ Insurance.Scheme <chr> "U : UNKNOWN", "D : MEDICAL CARD HOLDER",…
## $ Eligibility <chr> "01 : CAT 1 (MEDICAL CARD)", "01 : CAT 1 …
## $ Age.at.Attendance <int> 83, 87, 87, 87, 86, 75, 83, 83, 83, 84, 8…
## $ Referring.Hospital <chr> ":", ":", ":", ":", ":", ":", ":", ":", "…
## $ Area.of.Residence <chr> "0109 : DUBLIN 9", "0109 : DUBLIN 9", "01…
## $ Attendance.Year <int> 2022, 2023, 2023, 2023, 2023, 2021, 2020,…
## $ Attendance.Month <chr> "July", "July", "November", "November", "…
## $ Age.at.Attendance.Cat.HSE <chr> "75 - 84", "85 >=", "85 >=", "85 >=", "85…
## $ Pathway.Number <int> 56683148, 57193702, 77706400, 57193702, 5…
## $ Present.Address <chr> "174 GRACEPARK HTS., DRUMCONDRA, DUBLIN 9…
## $ Home.Address <chr> "174 GRACEPARK HEIGHTS, DRUMCONDRA, DUBLI…
## $ Home.Phone.No <chr> "087 6193827", "8309505", "8309505", "830…
## $ Mobile.Phone.No <chr> "087 6193837", "085 8597622", "085 859762…
## $ Appointment.Date...Time <chr> "", "", "20231107 12:00:00", "", "", "", …
## $ X <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ Booking.Type <chr> "N : NEW", "W : WARD", "R : RETURN", "R :…
## $ Booked.Date <chr> "2022/06/23", "2023/06/28", "2023/07/25",…
## $ Booked.Time <chr> "7:22:00", "11:14:00", "12:39:00", "10:16…
## $ Cancelled.Indicator <chr> "", "", "Rescheduled Appt", "", "", "", "…
## $ Cancellation.Group <chr> "N/A", "N/A", "Patient", "N/A", "N/A", "N…
## $ Reason.For.Cancellation <chr> "", "", "PF : PERSONAL/FAMILY REASONS", "…
## $ Reason.for.Cancellation.Desc <chr> "", "", "PERSONAL/FAMILY REASONS", "", ""…
## $ Reason.for.Cancel.Text <chr> "", "", "3 months as per loop", "", "", "…
## $ Rebooked.Indicator..HIS. <chr> "", "", "Yes", "", "", "", "", "Yes", "Ye…
## $ Hospital.Catchment <chr> "Mater Catchment", "Mater Catchment", "Ma…
## $ No.Attendances <int> 1, 1, NA, 1, 1, 1, 1, NA, NA, NA, 1, NA, …
## $ No.New.Attendances <int> 1, 1, NA, 0, 1, 1, 0, NA, NA, NA, 1, NA, …
## $ No.Return.Attendances <int> 0, 0, NA, 1, 0, 0, 1, NA, NA, NA, 0, NA, …
## $ No.DNAs <int> NA, NA, 0, NA, NA, NA, NA, 0, 0, 1, NA, 0…
## $ No.Cancels <int> NA, NA, 1, NA, NA, NA, NA, 1, 1, 0, NA, 1…
head(main)
## Record.Type Clinic.Code Clinic.Type NurseFlag
## 1 Attendance 932 MED : MEDICAL N
## 2 Attendance 757 SBC : SYMPTOMATIC BREAST CLINIC N
## 3 Cancellation 757 SBC : SYMPTOMATIC BREAST CLINIC N
## 4 Attendance 757 SBC : SYMPTOMATIC BREAST CLINIC N
## 6 Attendance 771 TRI : TRIPLE ASSESSMENT CLINIC N
## 7 Attendance 527 TRI : TRIPLE ASSESSMENT CLINIC N
## Medical.Record.Number Gender Patient.Name Attendance.Day
## 1 177 Male CLAVIN JOHN Monday
## 2 527 Female PHELAN MAUREEN Tuesday
## 3 527 Female PHELAN MAUREEN Tuesday
## 4 527 Female PHELAN MAUREEN Tuesday
## 6 527 Female PHELAN MAUREEN Tuesday
## 7 2194 Female O BRIEN DEIRDRE Thursday
## Attendance.MonthYear Attendance.Date Attendance.Type.Description
## 1 07-2022 11/07/2022 NEW
## 2 07-2023 25/07/2023 NEW
## 3 11-2023 07/11/2023 RETURN
## 4 11-2023 28/11/2023 RETURN
## 6 06-2023 27/06/2023 NEW
## 7 02-2021 18/02/2021 NEW
## Referral.Source Clinical.Specialty.Group Specialty.Description.Mater
## 1 G : GP Cancer General Surgery: Breast
## 2 W : WARD Cancer General Surgery: Breast
## 3 C : CLINIC Cancer General Surgery: Breast
## 4 C : CLINIC Cancer General Surgery: Breast
## 6 W : WARD Cancer General Surgery: Breast
## 7 G : GP Cancer General Surgery: Breast
## Consultant Insurance.Scheme
## 1 BARRYM : BARRY MR. MITCHELL JOHN U : UNKNOWN
## 2 BARRYM : BARRY MR. MITCHELL JOHN D : MEDICAL CARD HOLDER
## 3 BARRYM : BARRY MR. MITCHELL JOHN D : MEDICAL CARD HOLDER
## 4 BARRYM : BARRY MR. MITCHELL JOHN D : MEDICAL CARD HOLDER
## 6 BARRYM : BARRY MR. MITCHELL JOHN D : MEDICAL CARD HOLDER
## 7 KELLM : KELL PROFESSOR MALCOLM D : MEDICAL CARD HOLDER
## Eligibility Age.at.Attendance Referring.Hospital
## 1 01 : CAT 1 (MEDICAL CARD) 83 :
## 2 01 : CAT 1 (MEDICAL CARD) 87 :
## 3 01 : CAT 1 (MEDICAL CARD) 87 :
## 4 01 : CAT 1 (MEDICAL CARD) 87 :
## 6 01 : CAT 1 (MEDICAL CARD) 86 :
## 7 02 : CAT 2 (NON MEDICAL CARD) 75 :
## Area.of.Residence Attendance.Year Attendance.Month Age.at.Attendance.Cat.HSE
## 1 0109 : DUBLIN 9 2022 July 75 - 84
## 2 0109 : DUBLIN 9 2023 July 85 >=
## 3 0109 : DUBLIN 9 2023 November 85 >=
## 4 0109 : DUBLIN 9 2023 November 85 >=
## 6 0109 : DUBLIN 9 2023 June 85 >=
## 7 0109 : DUBLIN 9 2021 February 75 - 84
## Pathway.Number Present.Address
## 1 56683148 174 GRACEPARK HTS., DRUMCONDRA, DUBLIN 9
## 2 57193702 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9
## 3 77706400 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9
## 4 57193702 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9
## 6 57154091 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9
## 7 56054716 41 COULTRY DRIVE, SANTRY, DUBLIN 9
## Home.Address Home.Phone.No Mobile.Phone.No
## 1 174 GRACEPARK HEIGHTS, DRUMCONDRA, DUBLIN 9 087 6193827 087 6193837
## 2 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9 8309505 085 8597622
## 3 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9 8309505 085 8597622
## 4 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9 8309505 085 8597622
## 6 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9 8309505 085 8597622
## 7 41 COULTRY DRIVE, SANTRY, DUBLIN 9 NO LANDLINE 089 6144182
## Appointment.Date...Time X Booking.Type Booked.Date Booked.Time
## 1 NA N : NEW 2022/06/23 7:22:00
## 2 NA W : WARD 2023/06/28 11:14:00
## 3 20231107 12:00:00 NA R : RETURN 2023/07/25 12:39:00
## 4 NA R : RETURN 2023/10/26 10:16:00
## 6 NA W : WARD 2023/06/26 11:43:00
## 7 NA N : NEW 2021/02/08 10:32:00
## Cancelled.Indicator Cancellation.Group Reason.For.Cancellation
## 1 N/A
## 2 N/A
## 3 Rescheduled Appt Patient PF : PERSONAL/FAMILY REASONS
## 4 N/A
## 6 N/A
## 7 N/A
## Reason.for.Cancellation.Desc Reason.for.Cancel.Text Rebooked.Indicator..HIS.
## 1
## 2
## 3 PERSONAL/FAMILY REASONS 3 months as per loop Yes
## 4
## 6
## 7
## Hospital.Catchment No.Attendances No.New.Attendances No.Return.Attendances
## 1 Mater Catchment 1 1 0
## 2 Mater Catchment 1 1 0
## 3 Mater Catchment NA NA NA
## 4 Mater Catchment 1 0 1
## 6 Mater Catchment 1 1 0
## 7 Mater Catchment 1 1 0
## No.DNAs No.Cancels
## 1 NA NA
## 2 NA NA
## 3 0 1
## 4 NA NA
## 6 NA NA
## 7 NA NA
#sample <- main %>% group_by(main$Record.Type)
#samplePatients <- sample_frac(main,0.1,replace = F)
## Remove NAs or impute NAs if necessary
allMissing = is.na(main)
counts = colSums(allMissing)
counts [counts>0]
## Home.Phone.No X No.Attendances
## 6 91169 35872
## No.New.Attendances No.Return.Attendances No.DNAs
## 35872 35872 55297
## No.Cancels
## 55297
# main <- na.omit(main)
print(is.data.frame(main))
## [1] TRUE
## Transforming data
# main_group <- main_processed %>% group_by(main_processed$Medical.Record.Number) #library(moments)
# main_group$freq_MRN_recode <- ifelse(count(main_group$Medical.Record.Number >= 34)==1,1,0)
#library(plyr)
main$Clinic.Type_recode <- mapvalues(main$Clinic.Type, from = c("SBC : SYMPTOMATIC BREAST CLINIC","TRI : TRIPLE ASSESSMENT CLINIC","MED : MEDICAL","FRA : FAMILY RISK ASSESSMENT","GEN : GENERAL"), to = c("SBC","TRI","MED","FRA","GEN"))
main$Consultant_recode <- mapvalues(main$Consultant, from = c("WALSSI : WALSH MS SIUN","BARRYM : BARRY MR. MITCHELL JOHN","KELLM : KELL PROFESSOR MALCOLM","STOKES : STOKES PROF. MAURICE","HEENEY : HEENEY MS. ANNA"), to = c("WALSSI","BARRYM","KELLM","STOKES","HEENEY"))
main$Insurance.Scheme_recode <- mapvalues(main$Insurance.Scheme, from = c("U : UNKNOWN","D : MEDICAL CARD HOLDER","V : VHI","G : GARDA SCHEME","I : IRISH LIFE HEALTH","S : SELF","B : LAYA HEALTHCARE","O : OTHER","J : GLOHEALTH","E : E.S.B. SCHEME","C : BLUE CROSS","P : PRISON OFFICERS","H : HOSPITAL SATURDAY FUND","A : ARMY SCHEME","M : MEDISHIELD"), to = c("U","D","V","G","I","S","B","O","J","E","C","P","H","A","M"))
main$Hospital.Catchment_recode <- mapvalues(main$Hospital.Catchment, from = c("Mater Catchment","National Catchment","Connolly Catchment","James Catchment","Tallaght Catchment","Beaumont Catchment","International Catchment","Vincents Catchment"), to = c("Mater","National","Connolly","James","Tallaght","Beaumont","International","Vincents"))
main$Attendance.Type_recode <- mapvalues(main$Attendance.Type.Description, from = c("WALK IN - NEW","ADD ON - NEW","WALK IN - RETURN","ADD ON - RETURN","Return Home Visit","Return Virtual Phone","VIRTUAL NEW","New Virtual Phone","New Virtual Video","Return Virtual Video"), to = c("NEW","NEW","RETURN","RETURN","RETURN","VIRTUAL(New_Return)","VIRTUAL(New_Return)","VIRTUAL(New_Return)","VIRTUAL(New_Return)","VIRTUAL(New_Return)"))
main$Referral.Source_recode <- mapvalues(main$Referral.Source, from = c("C : CLINIC","G : GP","W : WARD","N : BREAST CHECK (NBSP)","H : OTHER HOSPITAL","S : SELF","O : OTHER CONSULTANT","R : ROOMS","A : EMERGENCY DEPT","B : HEALTH BOARD REFERRAL","F : FAMILY PLANNING","K : ED SMITHFIELD","V : VASCULAR LAB","X : HEALTH CENTRE REFERRAL","Q : REFERRED FROM CAWT INITIATIVE","D : DENTIST"), to = c("CLINIC","GP","WARD","BREAST CHECK","Elsew outside Mater","Elsew outside Mater","OTHER CONSULTANT","Elsew of Mater","EMERGENCY DEPT","Elsew outside Mater","Elsew of Mater","Elsew of Mater","Elsew of Mater","Elsew outside Mater","Elsew outside Mater","Elsew of Mater"))
main$Eligibility_recode <- mapvalues(main$Eligibility, from = c("02 : CAT 2 (NON MEDICAL CARD)","01 : CAT 1 (MEDICAL CARD)","08 : ELIGIBILITY UNKNOWN","12 : DAY CASE - EXEMPT STAT. CHG.","19 : STAFF EXEMPT-STATUTORY CHARGE","35 : INFECTIOUS OR SUSPECTED INFECT","11 : ANTI D/RESEARCH/TRIAL","23 : NATIONAL COLORECTAL SCREENING","16 : NTPF - EXEMPT STAT. CHG.","06 : NON EU-VISITOR","24 : DIABETIC RETINA TREATMENT","07 : RTA","17 : ARMY - EXEMPT STAT. CHG.","10 : UK/NI - EXEMPT STAT.CHG.","21 : THE GOVERNOR - PRISONERS","13 : LONG STAY - EXEMPT STAT. CHG.","25 : UKRAINIAN CITIZEN","20 : HAA CARD HEALTH AMENDMENT ACT","18 : EHIC - EXEMPT STAT. CHG.","05 : EU-VISITOR NO EHIC","26 : U16 EXEMPT STAT. CHARGE","30 : PENDING PATIENT DETAILS"), to = c("NON MEDICAL CARD","MEDICAL CARD","ELIGIBILITY UNKNOWN","EXEMPT","EXEMPT","ACUTE UNCLASSIFIED","RESEARCH/NATIONAL PROG.","RESEARCH/NATIONAL PROG.","EXEMPT","NON MEDICAL CARD","NON ACUTE UNCLASSIFIED","ACUTE UNCLASSIFIED","EXEMPT","EXEMPT","EXEMPT","EXEMPT","EXEMPT","RESEARCH/NATIONAL PROG.","EXEMPT","NON MEDICAL CARD","EXEMPT","NON MEDICAL CARD"))
dublin_nth <- c("0100","0101","0103","0105","0107","0109","0111","0113","0115","0117")
dublin_sth <- c("0200","0202","0204","0206","0208","0210","0212","0214","0216","0218","0220","0222","0224")
outside_irl <- c("3303","3310","3350","3501","3600")
other_eastern.midland_region <- c("2300","3100","2200","2400","0300","0500","2500","0400")
northern.western_region <- c("2900","3000","2600","2000","2700","1900","2800","2100")
southern_region <- c("0700","0600","1000","1700","1200","1300","1500","1600","0800","1101")
main <- main %>% #library(plyr)
mutate(Area.of.Residence_recode = case_when(
substring(main$Area.of.Residence,0,4) %in% dublin_nth ~ "DUBLIN NTH",
substring(main$Area.of.Residence,0,4) %in% dublin_sth ~ "DUBLIN STH",
substring(main$Area.of.Residence,0,4) %in% other_eastern.midland_region ~ "EASTERN & MIDLAND REGION (excl.Dublin,Meath)",
substring(main$Area.of.Residence,0,4) %in% northern.western_region ~ "NORTHERN WESTERN REGION",
substring(main$Area.of.Residence,0,4) %in% southern_region ~ "SOUTHERN REGION",
substring(main$Area.of.Residence,0,4) %in% outside_irl ~ "OUTSIDE IRELAND",
substring(main$Area.of.Residence,0,4) == "3200" ~ "Meath",
substring(main$Area.of.Residence,0,4) == "0000" ~ "UNKNOWN",
TRUE ~ "Other counties"
))
head (main$Area.of.Residence_recode,10)
## [1] "DUBLIN NTH" "DUBLIN NTH" "DUBLIN NTH" "DUBLIN NTH" "DUBLIN NTH"
## [6] "DUBLIN NTH" "DUBLIN NTH" "DUBLIN NTH" "DUBLIN NTH" "DUBLIN NTH"
table(main$Area.of.Residence_recode)
##
## DUBLIN NTH
## 41299
## DUBLIN STH
## 2338
## EASTERN & MIDLAND REGION (excl.Dublin,Meath)
## 21068
## Meath
## 14424
## NORTHERN WESTERN REGION
## 9766
## OUTSIDE IRELAND
## 24
## SOUTHERN REGION
## 2063
## UNKNOWN
## 187
main$Booking.Type_recode <- ifelse(main$Booking.Type == ":", ifelse(!duplicated(main$Medical.Record.Number), "N : NEW", "R : RETURN"), main$Booking.Type)
main$Booking.Type_recode <- mapvalues(main$Booking.Type_recode, from = c("N : NEW","R : RETURN","W : WARD"), to =c("NEW","RETURN","WARD"))
main$Reason.for.Cancellation_recode <- mapvalues(main$Reason.for.Cancellation.Desc, from = c("NO SHOW","Patient no longer requires A","TEMPLATE / BOOKING DIARY AMEND","Appt brought forward by Hosp","Clinic reduced on Cons Instru","PERSONAL/FAMILY REASONS","PATIENT CANCELLED APPOINTMENT","Covid 19 Outbreak Hosp Canc","Appt issued incorrectly by hosp","PATIENT ILL","APP CANCELLED - AWAIT RESULTS","PATIENT ON HOLIDAYS","Appt date time not suitable","appointment deferred as per ANP instruction","CONSULTANT ABSENT ANNUAL LEAVE","BOOKING DIARY MANAGEMENT","EARLIER PRIVATE APPOINTMENT","TIME BLOCKED OUT","Covid 19 Outbreak Pat Canc","PATIENT IN OTHER HEALTH CARE","Appointment deferred as per Consultant instruction","inappropriate appointment","Patient requested earlier appt","PATIENT CANCELLED NO REASON","Patient deceased","EARLIER APPOINTMENT IN OTHER PUBLIC HOSPITAL","PATIENT FORGOT APPOINTMENT","PT INDICATES APPT NO REQUIRED","PATIENT INPATIENT MMUH","DEATH IN FAMILY","Adverse weather","PAT ATTENDED OPD AT MMUH","transfer to new consultant","PATIENT ATTEND OPD AT MMUH","ED Requested earlier appointment","CONSULTANT ABSENT - SICK LEAVE","patient attends GP for care","tferred to family hx breast","Consultant on Secondment","GP REQUEST EARLIER APPOINTMENT","validation cancelled by pt","ANOTHER CLINIC SAME DAY","CHRISTMAS PERIOD CLOSURE","CONSULTANT AT MEET/CONFER/EXAM","CONSULTANT RETIREMENT"), to = c("No show","By Patient","By Hospital","By Hospital","By Consultant/Advanced Nurse","By Patient","By Patient","By Covid","By Hospital","By Patient-health conditions","By Hospital","By Patient","By Patient","By Consultant/Advanced Nurse","By Consultant/Advanced Nurse","By Hospital","By Patient","By Hospital","By Covid","By Patient-health conditions","By Consultant/Advanced Nurse","By Patient","By Patient","By Patient","By Patient-health conditions","By Patient-health conditions","By Patient","By Patient","By Patient-health conditions","By Patient","By Patient","By Patient-health conditions","By Consultant/Advanced Nurse","By Patient-health conditions","By Hospital","By Consultant/Advanced Nurse","By Patient-health conditions","By Patient-health conditions","By Consultant/Advanced Nurse","By Patient-health conditions","By Patient","By Patient-health conditions","By Hospital","By Consultant/Advanced Nurse","By Consultant/Advanced Nurse"))
# main$Referring.Hospital <-
### Date calculation from Appointment/ Booking to Attendance
main$Attendance.Date <- as.Date(main$Attendance.Date, format="%d/%m/%y")
main$Appointment.Date <- as.POSIXct(main$Appointment.Date...Time,format="%Y%m%d %H:%M:%S",tz=Sys.timezone())
main$Appointment.Date <- as.Date(main$Appointment.Date, format="%d/%m/%y")
main$appointmentMonthYear <- substring(main$Appointment.Date,0,7)
main$appointmentDay <- weekdays(main$Appointment.Date)
main$Booked.Date <- as.POSIXct(main$Booked.Date,format="%Y/%m/%d",tz=Sys.timezone())
main$Booked.Date_new <- as.Date(main$Booked.Date, format="%d/%m/%y")
main$bookedMonthYear <- substring(main$Booked.Date,0,7)
main$bookedDay <- weekdays(main$Booked.Date)
main$daysDiff_attendanceAppoint <- difftime(main$Appointment.Date,main$Attendance.Date,units="days")
main$daysDiff_attendanceBooked <- difftime(main$Booked.Date,main$Attendance.Date,units="days")
main$daysDiff_AppointBooked <- difftime(main$Appointment.Date,main$Booked.Date,units="days")
main$addressDiff <- ifelse(main$Present.Address == main$Home.Address, 0, 1)
main$Rebooked.Indicator <- main$Rebooked.Indicator..HIS.
## Create dataset for modelling
# main.df <- main %>% select(-rownames,-) #when there are multiple files to combine with same variables
write.csv(main[,c("Record.Type","Clinic.Code","Clinic.Type_recode","NurseFlag","Medical.Record.Number","Gender","Attendance.Day","Attendance.MonthYear","Attendance.Date","Attendance.Type_recode","Attendance.Year","Attendance.Month","Referral.Source_recode","Consultant_recode","Insurance.Scheme_recode","Eligibility_recode","Age.at.Attendance","Age.at.Attendance.Cat.HSE","Pathway.Number","Present.Address","Home.Address","Appointment.Date","appointmentMonthYear","appointmentDay","Area.of.Residence_recode","Referring.Hospital","Booking.Type_recode","Booked.Date_new","bookedMonthYear","bookedDay","Cancellation.Group","Reason.for.Cancellation_recode","Rebooked.Indicator","Hospital.Catchment_recode","No.Attendances","No.New.Attendances","No.Cancels","No.DNAs","daysDiff_attendanceAppoint","daysDiff_attendanceBooked","daysDiff_AppointBooked","addressDiff")],"breastDetails.csv")
main_processed <- read.csv("breastDetails.csv")
## Convert all character variables to factor
# main_processed <- main_processed %>% mutate_if(is.character,as.factor)
# main_processed_tibble <- as_tibble(main_processed) #library(tidyverse), tibble never changes [the type of the inputs, the names of variables], it only recycles inputs of length 1, and never creates row.names()
Inspecting new and re-coded variables
str(main_processed)
## 'data.frame': 91169 obs. of 43 variables:
## $ X : int 1 2 3 4 6 7 8 9 10 11 ...
## $ Record.Type : chr "Attendance" "Attendance" "Cancellation" "Attendance" ...
## $ Clinic.Code : int 932 757 757 757 771 527 757 757 757 757 ...
## $ Clinic.Type_recode : chr "MED" "SBC" "SBC" "SBC" ...
## $ NurseFlag : chr "N" "N" "N" "N" ...
## $ Medical.Record.Number : int 177 527 527 527 527 2194 2329 2329 2329 2329 ...
## $ Gender : chr "Male" "Female" "Female" "Female" ...
## $ Attendance.Day : chr "Monday" "Tuesday" "Tuesday" "Tuesday" ...
## $ Attendance.MonthYear : chr "07-2022" "07-2023" "11-2023" "11-2023" ...
## $ Attendance.Date : chr "2020-07-11" "2020-07-25" "2020-11-07" "2020-11-28" ...
## $ Attendance.Type_recode : chr "NEW" "NEW" "RETURN" "RETURN" ...
## $ Attendance.Year : int 2022 2023 2023 2023 2023 2021 2020 2020 2020 2021 ...
## $ Attendance.Month : chr "July" "July" "November" "November" ...
## $ Referral.Source_recode : chr "GP" "WARD" "CLINIC" "CLINIC" ...
## $ Consultant_recode : chr "BARRYM" "BARRYM" "BARRYM" "BARRYM" ...
## $ Insurance.Scheme_recode : chr "U" "D" "D" "D" ...
## $ Eligibility_recode : chr "MEDICAL CARD" "MEDICAL CARD" "MEDICAL CARD" "MEDICAL CARD" ...
## $ Age.at.Attendance : int 83 87 87 87 86 75 83 83 83 84 ...
## $ Age.at.Attendance.Cat.HSE : chr "75 - 84" "85 >=" "85 >=" "85 >=" ...
## $ Pathway.Number : int 56683148 57193702 77706400 57193702 57154091 56054716 53722951 76605449 76606058 76503073 ...
## $ Present.Address : chr "174 GRACEPARK HTS., DRUMCONDRA, DUBLIN 9" "11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9" "11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9" "11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9" ...
## $ Home.Address : chr "174 GRACEPARK HEIGHTS, DRUMCONDRA, DUBLIN 9" "11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9" "11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9" "11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9" ...
## $ Appointment.Date : chr NA NA "2023-11-07" NA ...
## $ appointmentMonthYear : chr NA NA "2023-11" NA ...
## $ appointmentDay : chr NA NA "Tuesday" NA ...
## $ Area.of.Residence_recode : chr "DUBLIN NTH" "DUBLIN NTH" "DUBLIN NTH" "DUBLIN NTH" ...
## $ Referring.Hospital : chr ":" ":" ":" ":" ...
## $ Booking.Type_recode : chr "NEW" "WARD" "RETURN" "RETURN" ...
## $ Booked.Date_new : chr "2022-06-22" "2023-06-27" "2023-07-24" "2023-10-25" ...
## $ bookedMonthYear : chr "2022-06" "2023-06" "2023-07" "2023-10" ...
## $ bookedDay : chr "Thursday" "Wednesday" "Tuesday" "Thursday" ...
## $ Cancellation.Group : chr "N/A" "N/A" "Patient" "N/A" ...
## $ Reason.for.Cancellation_recode: chr "" "" "By Patient" "" ...
## $ Rebooked.Indicator : chr "" "" "Yes" "" ...
## $ Hospital.Catchment_recode : chr "Mater" "Mater" "Mater" "Mater" ...
## $ No.Attendances : int 1 1 NA 1 1 1 1 NA NA NA ...
## $ No.New.Attendances : int 1 1 NA 0 1 1 0 NA NA NA ...
## $ No.Cancels : int NA NA 1 NA NA NA NA 1 1 0 ...
## $ No.DNAs : int NA NA 0 NA NA NA NA 0 0 1 ...
## $ daysDiff_attendanceAppoint : int NA NA 1095 NA NA NA NA 0 0 365 ...
## $ daysDiff_attendanceBooked : num 712 1068 990 1062 1094 ...
## $ daysDiff_AppointBooked : num NA NA 105 NA NA ...
## $ addressDiff : int 1 0 0 0 0 0 0 0 0 0 ...
summary(main_processed)
## X Record.Type Clinic.Code Clinic.Type_recode
## Min. : 1 Length:91169 Min. : 424.0 Length:91169
## 1st Qu.:23157 Class :character 1st Qu.: 526.0 Class :character
## Median :46297 Mode :character Median : 771.0 Mode :character
## Mean :46278 Mean : 803.8
## 3rd Qu.:69384 3rd Qu.:1133.0
## Max. :92713 Max. :1335.0
##
## NurseFlag Medical.Record.Number Gender Attendance.Day
## Length:91169 Min. : 177 Length:91169 Length:91169
## Class :character 1st Qu.: 802073 Class :character Class :character
## Mode :character Median :1089184 Mode :character Mode :character
## Mean :1144338
## 3rd Qu.:1251444
## Max. :9999896
##
## Attendance.MonthYear Attendance.Date Attendance.Type_recode Attendance.Year
## Length:91169 Length:91169 Length:91169 Min. :2020
## Class :character Class :character Class :character 1st Qu.:2021
## Mode :character Mode :character Mode :character Median :2022
## Mean :2022
## 3rd Qu.:2023
## Max. :2023
##
## Attendance.Month Referral.Source_recode Consultant_recode
## Length:91169 Length:91169 Length:91169
## Class :character Class :character Class :character
## Mode :character Mode :character Mode :character
##
##
##
##
## Insurance.Scheme_recode Eligibility_recode Age.at.Attendance
## Length:91169 Length:91169 Min. : 0.00
## Class :character Class :character 1st Qu.: 40.00
## Mode :character Mode :character Median : 51.00
## Mean : 51.31
## 3rd Qu.: 62.00
## Max. :105.00
##
## Age.at.Attendance.Cat.HSE Pathway.Number Present.Address
## Length:91169 Min. :51392528 Length:91169
## Class :character 1st Qu.:56100157 Class :character
## Mode :character Median :56937195 Mode :character
## Mean :64424672
## 3rd Qu.:76844763
## Max. :77878693
##
## Home.Address Appointment.Date appointmentMonthYear appointmentDay
## Length:91169 Length:91169 Length:91169 Length:91169
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
##
## Area.of.Residence_recode Referring.Hospital Booking.Type_recode
## Length:91169 Length:91169 Length:91169
## Class :character Class :character Class :character
## Mode :character Mode :character Mode :character
##
##
##
##
## Booked.Date_new bookedMonthYear bookedDay Cancellation.Group
## Length:91169 Length:91169 Length:91169 Length:91169
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
##
## Reason.for.Cancellation_recode Rebooked.Indicator Hospital.Catchment_recode
## Length:91169 Length:91169 Length:91169
## Class :character Class :character Class :character
## Mode :character Mode :character Mode :character
##
##
##
##
## No.Attendances No.New.Attendances No.Cancels No.DNAs
## Min. :1 Min. :0.00 Min. :0.00 Min. :0.00
## 1st Qu.:1 1st Qu.:0.00 1st Qu.:1.00 1st Qu.:0.00
## Median :1 Median :1.00 Median :1.00 Median :0.00
## Mean :1 Mean :0.55 Mean :0.77 Mean :0.23
## 3rd Qu.:1 3rd Qu.:1.00 3rd Qu.:1.00 3rd Qu.:0.00
## Max. :2 Max. :1.00 Max. :1.00 Max. :1.00
## NA's :35872 NA's :35872 NA's :55297 NA's :55297
## daysDiff_attendanceAppoint daysDiff_attendanceBooked daysDiff_AppointBooked
## Min. : 0.0 Min. :-1055.0 Min. : 0.00
## 1st Qu.: 365.0 1st Qu.: 169.0 1st Qu.: 11.04
## Median : 730.0 Median : 366.0 Median : 25.04
## Mean : 580.1 Mean : 505.9 Mean : 90.63
## 3rd Qu.: 731.0 3rd Qu.: 729.0 3rd Qu.:150.00
## Max. :1096.0 Max. : 1112.0 Max. :672.00
## NA's :55297 NA's :2310 NA's :55297
## addressDiff
## Min. :0.0000
## 1st Qu.:0.0000
## Median :0.0000
## Mean :0.1789
## 3rd Qu.:0.0000
## Max. :1.0000
##
head(main_processed)
## X Record.Type Clinic.Code Clinic.Type_recode NurseFlag Medical.Record.Number
## 1 1 Attendance 932 MED N 177
## 2 2 Attendance 757 SBC N 527
## 3 3 Cancellation 757 SBC N 527
## 4 4 Attendance 757 SBC N 527
## 5 6 Attendance 771 TRI N 527
## 6 7 Attendance 527 TRI N 2194
## Gender Attendance.Day Attendance.MonthYear Attendance.Date
## 1 Male Monday 07-2022 2020-07-11
## 2 Female Tuesday 07-2023 2020-07-25
## 3 Female Tuesday 11-2023 2020-11-07
## 4 Female Tuesday 11-2023 2020-11-28
## 5 Female Tuesday 06-2023 2020-06-27
## 6 Female Thursday 02-2021 2020-02-18
## Attendance.Type_recode Attendance.Year Attendance.Month
## 1 NEW 2022 July
## 2 NEW 2023 July
## 3 RETURN 2023 November
## 4 RETURN 2023 November
## 5 NEW 2023 June
## 6 NEW 2021 February
## Referral.Source_recode Consultant_recode Insurance.Scheme_recode
## 1 GP BARRYM U
## 2 WARD BARRYM D
## 3 CLINIC BARRYM D
## 4 CLINIC BARRYM D
## 5 WARD BARRYM D
## 6 GP KELLM D
## Eligibility_recode Age.at.Attendance Age.at.Attendance.Cat.HSE Pathway.Number
## 1 MEDICAL CARD 83 75 - 84 56683148
## 2 MEDICAL CARD 87 85 >= 57193702
## 3 MEDICAL CARD 87 85 >= 77706400
## 4 MEDICAL CARD 87 85 >= 57193702
## 5 MEDICAL CARD 86 85 >= 57154091
## 6 NON MEDICAL CARD 75 75 - 84 56054716
## Present.Address
## 1 174 GRACEPARK HTS., DRUMCONDRA, DUBLIN 9
## 2 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9
## 3 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9
## 4 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9
## 5 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9
## 6 41 COULTRY DRIVE, SANTRY, DUBLIN 9
## Home.Address Appointment.Date
## 1 174 GRACEPARK HEIGHTS, DRUMCONDRA, DUBLIN 9 <NA>
## 2 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9 <NA>
## 3 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9 2023-11-07
## 4 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9 <NA>
## 5 11 BOTANIC ROAD, GLASNEVIN, DUBLIN 9 <NA>
## 6 41 COULTRY DRIVE, SANTRY, DUBLIN 9 <NA>
## appointmentMonthYear appointmentDay Area.of.Residence_recode
## 1 <NA> <NA> DUBLIN NTH
## 2 <NA> <NA> DUBLIN NTH
## 3 2023-11 Tuesday DUBLIN NTH
## 4 <NA> <NA> DUBLIN NTH
## 5 <NA> <NA> DUBLIN NTH
## 6 <NA> <NA> DUBLIN NTH
## Referring.Hospital Booking.Type_recode Booked.Date_new bookedMonthYear
## 1 : NEW 2022-06-22 2022-06
## 2 : WARD 2023-06-27 2023-06
## 3 : RETURN 2023-07-24 2023-07
## 4 : RETURN 2023-10-25 2023-10
## 5 : WARD 2023-06-25 2023-06
## 6 : NEW 2021-02-08 2021-02
## bookedDay Cancellation.Group Reason.for.Cancellation_recode
## 1 Thursday N/A
## 2 Wednesday N/A
## 3 Tuesday Patient By Patient
## 4 Thursday N/A
## 5 Monday N/A
## 6 Monday N/A
## Rebooked.Indicator Hospital.Catchment_recode No.Attendances
## 1 Mater 1
## 2 Mater 1
## 3 Yes Mater NA
## 4 Mater 1
## 5 Mater 1
## 6 Mater 1
## No.New.Attendances No.Cancels No.DNAs daysDiff_attendanceAppoint
## 1 1 NA NA NA
## 2 1 NA NA NA
## 3 NA 1 0 1095
## 4 0 NA NA NA
## 5 1 NA NA NA
## 6 1 NA NA NA
## daysDiff_attendanceBooked daysDiff_AppointBooked addressDiff
## 1 711.9583 NA 1
## 2 1067.9583 NA 0
## 3 989.9583 105.0417 0
## 4 1061.9583 NA 0
## 5 1093.9583 NA 0
## 6 356.0000 NA 0
any(is.na(main_processed))
## [1] TRUE
colSums(is.na(main_processed))
## X Record.Type
## 0 0
## Clinic.Code Clinic.Type_recode
## 0 0
## NurseFlag Medical.Record.Number
## 0 0
## Gender Attendance.Day
## 0 0
## Attendance.MonthYear Attendance.Date
## 0 0
## Attendance.Type_recode Attendance.Year
## 0 0
## Attendance.Month Referral.Source_recode
## 0 0
## Consultant_recode Insurance.Scheme_recode
## 0 0
## Eligibility_recode Age.at.Attendance
## 0 0
## Age.at.Attendance.Cat.HSE Pathway.Number
## 0 0
## Present.Address Home.Address
## 0 0
## Appointment.Date appointmentMonthYear
## 55297 55297
## appointmentDay Area.of.Residence_recode
## 55297 0
## Referring.Hospital Booking.Type_recode
## 0 0
## Booked.Date_new bookedMonthYear
## 2310 2310
## bookedDay Cancellation.Group
## 2310 0
## Reason.for.Cancellation_recode Rebooked.Indicator
## 0 0
## Hospital.Catchment_recode No.Attendances
## 0 35872
## No.New.Attendances No.Cancels
## 35872 55297
## No.DNAs daysDiff_attendanceAppoint
## 55297 55297
## daysDiff_attendanceBooked daysDiff_AppointBooked
## 2310 55297
## addressDiff
## 0
Attendance Day: Tuesday (26.6%)
Attendance Month-Year: 2021-09 (2.96%)
Attendance Month: September (10.2%)
Attendance Year: 2021 (27%)
Attendance Type: Return (49.64%)
Appointment Day: Tuesday (27.8%)
Appointment Month-Year: 2021-08 (3.42%)
Booked Day: Tuesday (22.57%)
Booked Month-Year: 2022-10 (2.78%)
Days difference between Attendance and Appointment: Mean 580, Median 730 [0-1096]
Days difference between Attendance and Booked day: Mean 506, Median 366 [<0,1112]
Days difference between Booked day and Appointment: Mean 91, Median 25 [0-672]
## Outcome description
### Convert dependent variable (outcome, response var.) to factor type if not yet
unique(main_processed$Record.Type)
## [1] "Attendance" "Cancellation" "DNA"
cbind(sort(table(main_processed$Record.Type),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Record.Type=="Attendance")),5),deparse.level=2,decreasing=TRUE))
## Warning in cbind(sort(table(main_processed$Record.Type), decreasing = TRUE), :
## number of rows of result is not a multiple of vector length (arg 2)
## [,1] [,2]
## Attendance 55297 60.653
## Cancellation 27610 39.347
## DNA 8262 60.653
cbind(sort(table(main_processed$Record.Type=="Attendance"),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Record.Type=="Attendance")),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## TRUE 55297 60.653
## FALSE 35872 39.347
cbind(sort(table(main_processed$Record.Type=="Cancellation"),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Record.Type=="Cancellation")),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## FALSE 63559 69.716
## TRUE 27610 30.284
cbind(sort(table(main_processed$Record.Type=="DNA"),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Record.Type=="DNA")),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## FALSE 82907 90.938
## TRUE 8262 9.062
table(main_processed$Record.Type,main_processed$Attendance.MonthYear)
##
## 01-2020 01-2021 01-2022 01-2023 02-2020 02-2021 02-2022 02-2023
## Attendance 1403 976 1020 1304 1280 1117 1026 1163
## Cancellation 113 508 505 575 265 414 620 547
## DNA 46 186 253 165 96 215 262 104
##
## 03-2020 03-2021 03-2022 03-2023 04-2020 04-2021 04-2022 04-2023
## Attendance 690 1332 1071 1205 290 1164 1074 1005
## Cancellation 686 525 671 562 562 450 446 573
## DNA 67 174 247 139 14 187 273 98
##
## 05-2020 05-2021 05-2022 05-2023 06-2020 06-2021 06-2022 06-2023
## Attendance 564 1109 1215 1390 1132 1200 1033 1180
## Cancellation 250 448 640 665 420 504 750 614
## DNA 33 227 271 120 43 281 220 100
##
## 07-2020 07-2021 07-2022 07-2023 08-2020 08-2021 08-2022 08-2023
## Attendance 1472 1198 991 1038 1336 1412 1225 1267
## Cancellation 478 641 636 657 491 993 594 799
## DNA 148 327 181 97 112 235 234 112
##
## 09-2020 09-2021 09-2022 09-2023 10-2020 10-2021 10-2022 10-2023
## Attendance 1496 1475 1419 1206 1224 1251 1170 1226
## Cancellation 547 859 558 774 657 615 600 564
## DNA 164 365 261 133 133 265 225 118
##
## 11-2020 11-2021 11-2022 11-2023 12-2020 12-2021 12-2022 12-2023
## Attendance 1307 1299 1451 1180 1026 887 919 879
## Cancellation 671 700 699 683 546 523 430 582
## DNA 99 300 255 94 111 239 167 66
## Predictor description (categorical)
### Data frame for nominal/ binary values of variables
unique(main_processed$Clinic.Code)
## [1] 932 757 771 527 1134 1132 424 441 526 1333 934 1133 1334 1335 933
## [16] 1187 768 440
unique(main_processed$Clinic.Type_recode)
## [1] "MED" "SBC" "TRI" "FRA" "GEN"
unique(main_processed$NurseFlag)
## [1] "N" "Y"
#unique(main_processed$Medical.Record.Number)
unique(main_processed$Gender)
## [1] "Male" "Female" "Unknown"
unique(main_processed$Attendance.Day)
## [1] "Monday" "Tuesday" "Thursday" "Friday" "Wednesday" "Sunday"
## [7] "Saturday"
unique(main_processed$Attendance.MonthYear)
## [1] "07-2022" "07-2023" "11-2023" "06-2023" "02-2021" "06-2020" "09-2020"
## [8] "06-2021" "10-2021" "12-2021" "11-2020" "07-2020" "08-2021" "08-2022"
## [15] "01-2023" "05-2021" "02-2023" "03-2023" "10-2023" "09-2022" "04-2023"
## [22] "06-2022" "02-2020" "10-2022" "10-2020" "01-2020" "07-2021" "09-2021"
## [29] "08-2023" "11-2022" "02-2022" "09-2023" "01-2022" "11-2021" "03-2022"
## [36] "12-2022" "05-2023" "12-2023" "05-2022" "04-2021" "04-2022" "08-2020"
## [43] "05-2020" "04-2020" "01-2021" "03-2021" "03-2020" "12-2020"
unique(main_processed$Attendance.Type_recode)
## [1] "NEW" "RETURN" "VIRTUAL RETURN"
## [4] "VIRTUAL(New_Return)"
unique(main_processed$Attendance.Year)
## [1] 2022 2023 2021 2020
unique(main_processed$Attendance.Month)
## [1] "July" "November" "June" "February" "September" "October"
## [7] "December" "August" "January" "May" "March" "April"
unique(main_processed$Referral.Source_recode)
## [1] "GP" "WARD" "CLINIC"
## [4] "BREAST CHECK" "Elsew outside Mater" "Elsew of Mater"
## [7] "EMERGENCY DEPT" "OTHER CONSULTANT"
unique(main_processed$Consultant_recode)
## [1] "BARRYM" "KELLM" "WALSSI" "STOKES" "HEENEY"
unique(main_processed$Insurance.Scheme_recode)
## [1] "U" "D" "V" "G" "I" "S" "B" "O" "J" "E" "C" "P" "H" "A" "M"
unique(main_processed$Eligibility_recode)
## [1] "MEDICAL CARD" "NON MEDICAL CARD"
## [3] "ACUTE UNCLASSIFIED" "NON ACUTE UNCLASSIFIED"
## [5] "EXEMPT" "ELIGIBILITY UNKNOWN"
## [7] "RESEARCH/NATIONAL PROG."
unique(main_processed$Age.at.Attendance.Cat.HSE)
## [1] "75 - 84" "85 >=" "65 - 74" "55 - 64" "45 - 54" "35 - 44" "25 - 34"
## [8] "15 - 24" "10 - 14" "0 - 4"
unique(main_processed$Area.of.Residence_recode)
## [1] "DUBLIN NTH"
## [2] "EASTERN & MIDLAND REGION (excl.Dublin,Meath)"
## [3] "Meath"
## [4] "DUBLIN STH"
## [5] "SOUTHERN REGION"
## [6] "NORTHERN WESTERN REGION"
## [7] "UNKNOWN"
## [8] "OUTSIDE IRELAND"
unique(main_processed$Referring.Hospital)
## [1] ":"
## [2] "1111 : MATER PRIVATE HOSPITAL"
## [3] "0100 : ST MARYS HOSPITAL"
## [4] "0908 : MATER MISERICORDIAE UNIVERSITY"
## [5] "0403 : OUR LADYS HOSPITAL"
## [6] "0202 : MULLINGAR MIDLAND REGIONAL"
## [7] "0932 : ROTUNDA HOSPITAL"
## [8] "0947 : ST LUKES HOSPITAL"
## [9] "0923 : BEAUMONT HOSPITAL"
## [10] "0203 : TULLAMORE MIDLAND REGIONAL"
## [11] "0108 : CONNOLLY HOSPITAL"
## [12] "0904 : ST JAMES HOSPITAL"
## [13] "1290 : VHI SWIFTCARE CLINIC SWORDS"
## [14] "0402 : CAVAN GENERAL HOSPITAL"
## [15] "9060 : PRIVATE HOSPITAL"
## [16] "0922 : OUR LADY OF LOURDES HOSPITAL"
## [17] "0102 : NAAS GENERAL HOSPITAL"
## [18] "9061 : BONS SECOURS PRIVATE HOSPITAL"
## [19] "0930 : COOMBE WOMENS AND INFANTS"
## [20] "0600 : WATERFORD UNIVERSITY HOSPITAL"
## [21] "0601 : ST LUKES GENERAL HOSPITAL"
## [22] "9099 : OTHER ACUTE HOSPITAL"
## [23] "1307 : BEACON HOSPITAL"
## [24] "0941 : CRUMLIN OUR LADYS CHILDRENS"
## [25] "9067 : HERMITAGE MEDICAL CLINIC"
## [26] "1291 : VHI SWIFTCARE CLINIC DUNDRUM"
## [27] "0954 : CLONTARF HOSPITAL"
## [28] "0910 : ST VINCENTS UNIVERSITY"
## [29] "0931 : NATIONAL MATERNITY HOSPITAL"
## [30] "0940 : TEMPLE STREET CHILDRENS"
## [31] "0800 : GALWAY UNIVERSITY HOSPITAL"
## [32] "0605 : WEXFORD GENERAL HOSPITAL"
## [33] "0201 : PORTLAOISE MIDLAND REGIONAL"
## [34] "1270 : TALLAGHT HOSPITAL AMNCH"
## [35] "9063 : ST VINCENTS PRIVATE HOSPITAL"
## [36] "9092 : ST VINCENTS HOSPITAL"
## [37] "0300 : LIMERICK UNIVERSITY HOSPITAL"
## [38] "9082 : BEAUMONT PRIVATE CLINIC"
unique(main_processed$Booking.Type_recode)
## [1] "NEW" "WARD" "RETURN"
unique(main_processed$Cancellation.Group)
## [1] "N/A" "Patient" "Hospital" "DNA" "Validation"
unique(main_processed$Reason.for.Cancellation_recode)
## [1] "" "By Patient"
## [3] "By Hospital" "No show"
## [5] "By Consultant/Advanced Nurse" "By Patient-health conditions"
## [7] "By Covid"
unique(main_processed$Rebooked.Indicator)
## [1] "" "Yes" "No"
unique(main_processed$Hospital.Catchment_recode)
## [1] "Mater" "National" "Connolly" "James"
## [5] "Tallaght" "Beaumont" "International" "Vincents"
options(digits=2)
cbind(sort(table(main_processed$Clinic.Type_recode),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Clinic.Type_recode)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## SBC 44365 48.662
## TRI 33896 37.179
## MED 12744 13.978
## FRA 140 0.154
## GEN 24 0.026
cbind(sort(table(main_processed$Clinic.Code),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Clinic.Code)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 757 11656 12.785
## 1134 11592 12.715
## 441 11255 12.345
## 424 10396 11.403
## 1133 9120 10.003
## 771 8645 9.482
## 527 7262 7.965
## 526 4020 4.409
## 1132 3592 3.940
## 932 2956 3.242
## 933 2941 3.226
## 1334 2377 2.607
## 934 2070 2.271
## 1333 1938 2.126
## 1335 1185 1.300
## 1187 115 0.126
## 768 25 0.027
## 440 24 0.026
cbind(sort(table(main_processed$NurseFlag),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$NurseFlag)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## N 91144 99.973
## Y 25 0.027
head(cbind(sort(table(main_processed$Medical.Record.Number),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Medical.Record.Number)),5),deparse.level=2,decreasing=TRUE)),10) #group freq of MRN at 34
## [,1] [,2]
## 305504 51 0.056
## 1045718 51 0.056
## 805761 48 0.053
## 522374 46 0.050
## 247389 43 0.047
## 995525 41 0.045
## 1225996 41 0.045
## 1228628 40 0.044
## 331885 39 0.043
## 802696 39 0.043
cbind(sort(table(main_processed$Referral.Source_recode),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Referral.Source_recode)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## CLINIC 48054 52.709
## GP 31775 34.853
## WARD 7806 8.562
## BREAST CHECK 1805 1.980
## Elsew outside Mater 1339 1.469
## OTHER CONSULTANT 251 0.275
## Elsew of Mater 79 0.087
## EMERGENCY DEPT 60 0.066
#cbind(sort(table(main_processed$Referring.Hospital),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Referring.Hospital)),5),deparse.level=2,decreasing=TRUE))
cbind(sort(table(main_processed$Consultant_recode),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Consultant_recode)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## WALSSI 24419 27
## BARRYM 23257 26
## KELLM 20599 23
## STOKES 17394 19
## HEENEY 5500 6
cbind(sort(table(main_processed$Insurance.Scheme_recode),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Insurance.Scheme_recode)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## U 33336 36.565
## D 24765 27.164
## V 15664 17.181
## B 6705 7.354
## I 6133 6.727
## S 2695 2.956
## G 619 0.679
## O 509 0.558
## E 207 0.227
## P 195 0.214
## J 136 0.149
## H 102 0.112
## A 71 0.078
## C 25 0.027
## M 7 0.008
cbind(sort(table(main_processed$Eligibility_recode),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Eligibility_recode)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## NON MEDICAL CARD 48391 53.078
## MEDICAL CARD 36394 39.919
## ELIGIBILITY UNKNOWN 3378 3.705
## EXEMPT 2409 2.642
## RESEARCH/NATIONAL PROG. 313 0.343
## ACUTE UNCLASSIFIED 247 0.271
## NON ACUTE UNCLASSIFIED 37 0.041
cbind(sort(table(main_processed$Booking.Type_recode),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Booking.Type_recode)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## RETURN 52302 57.4
## NEW 33029 36.2
## WARD 5838 6.4
cbind(sort(table(main_processed$bookedDay),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$bookedDay)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## Tuesday 20059 22.574
## Monday 19961 22.464
## Wednesday 17863 20.103
## Thursday 16775 18.878
## Friday 13938 15.686
## Saturday 248 0.279
## Sunday 15 0.017
cbind(sort(table(main_processed$bookedMonthYear),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$bookedMonthYear)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 2022-10 2470 2.780
## 2021-09 2409 2.711
## 2020-11 2406 2.708
## 2020-08 2391 2.691
## 2020-07 2354 2.649
## 2021-08 2330 2.622
## 2022-05 2322 2.613
## 2020-09 2243 2.524
## 2021-03 2241 2.522
## 2020-01 2142 2.411
## 2022-06 2138 2.406
## 2020-02 2067 2.326
## 2022-03 2058 2.316
## 2020-10 2055 2.313
## 2021-07 2043 2.299
## 2022-07 2037 2.292
## 2022-09 2032 2.287
## 2021-10 2030 2.285
## 2020-06 2023 2.277
## 2021-04 2007 2.259
## 2021-02 1969 2.216
## 2023-05 1943 2.187
## 2021-06 1938 2.181
## 2023-01 1914 2.154
## 2023-04 1902 2.140
## 2023-03 1891 2.128
## 2022-02 1867 2.101
## 2021-05 1850 2.082
## 2022-11 1842 2.073
## 2021-11 1822 2.050
## 2023-06 1791 2.016
## 2023-07 1791 2.016
## 2021-12 1738 1.956
## 2022-04 1713 1.928
## 2022-01 1710 1.924
## 2023-02 1685 1.896
## 2022-08 1607 1.808
## 2023-08 1591 1.790
## 2020-12 1577 1.775
## 2022-12 1437 1.617
## 2023-09 1398 1.573
## 2023-11 1334 1.501
## 2021-01 1251 1.408
## 2023-10 1223 1.376
## 2020-05 1111 1.250
## 2020-03 835 0.940
## 2019-12 523 0.589
## 2020-04 501 0.564
## 2023-12 230 0.259
## 2019-11 210 0.236
## 2019-08 156 0.176
## 2019-07 151 0.170
## 2019-10 148 0.167
## 2019-09 104 0.117
## 2019-01 89 0.100
## 2019-02 66 0.074
## 2019-06 64 0.072
## 2019-03 40 0.045
## 2019-05 33 0.037
## 2019-04 15 0.017
## 2017-08 1 0.001
cbind(sort(table(main_processed$appointmentDay),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$appointmentDay)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## Tuesday 9971 27.8
## Friday 8555 23.8
## Monday 7543 21.0
## Thursday 6825 19.0
## Wednesday 2978 8.3
cbind(sort(table(main_processed$appointmentMonthYear),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$appointmentMonthYear)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 2021-08 1228 3.42
## 2021-09 1224 3.41
## 2021-11 1000 2.79
## 2022-06 970 2.70
## 2021-07 968 2.70
## 2022-11 954 2.66
## 2022-03 918 2.56
## 2022-05 911 2.54
## 2023-08 911 2.54
## 2023-09 907 2.53
## 2022-02 882 2.46
## 2021-10 880 2.45
## 2022-08 828 2.31
## 2022-10 825 2.30
## 2022-09 819 2.28
## 2022-07 817 2.28
## 2020-10 790 2.20
## 2021-06 785 2.19
## 2023-05 785 2.19
## 2023-11 777 2.17
## 2020-11 770 2.15
## 2021-12 762 2.12
## 2022-01 758 2.11
## 2023-07 754 2.10
## 2020-03 753 2.10
## 2023-01 740 2.06
## 2022-04 719 2.00
## 2023-06 714 1.99
## 2020-09 711 1.98
## 2023-03 701 1.95
## 2021-03 699 1.95
## 2021-01 694 1.93
## 2023-10 682 1.90
## 2021-05 675 1.88
## 2023-04 671 1.87
## 2020-12 657 1.83
## 2023-02 651 1.81
## 2023-12 648 1.81
## 2021-04 637 1.78
## 2021-02 629 1.75
## 2020-07 626 1.75
## 2020-08 603 1.68
## 2022-12 597 1.66
## 2020-04 576 1.61
## 2020-06 463 1.29
## 2020-02 361 1.01
## 2020-05 283 0.79
## 2020-01 159 0.44
cbind(sort(table(main_processed$Attendance.Type_recode),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Attendance.Type_recode)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## RETURN 45770 50.20
## NEW 41788 45.84
## VIRTUAL RETURN 3001 3.29
## VIRTUAL(New_Return) 610 0.67
cbind(sort(table(main_processed$Attendance.Day),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Attendance.Day)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## Tuesday 24254 26.603
## Friday 20068 22.012
## Thursday 18942 20.777
## Monday 17732 19.450
## Wednesday 10169 11.154
## Saturday 3 0.003
## Sunday 1 0.001
cbind(sort(table(main_processed$Attendance.MonthYear),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Attendance.MonthYear)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 09-2021 2699 2.96
## 08-2021 2640 2.90
## 11-2022 2405 2.64
## 11-2021 2299 2.52
## 09-2022 2238 2.46
## 09-2020 2207 2.42
## 08-2023 2178 2.39
## 05-2023 2175 2.39
## 07-2021 2166 2.38
## 10-2021 2131 2.34
## 05-2022 2126 2.33
## 09-2023 2113 2.32
## 07-2020 2098 2.30
## 11-2020 2077 2.28
## 08-2022 2053 2.25
## 01-2023 2044 2.24
## 03-2021 2031 2.23
## 10-2020 2014 2.21
## 06-2022 2003 2.20
## 10-2022 1995 2.19
## 03-2022 1989 2.18
## 06-2021 1985 2.18
## 11-2023 1957 2.15
## 08-2020 1939 2.13
## 02-2022 1908 2.09
## 10-2023 1908 2.09
## 03-2023 1906 2.09
## 06-2023 1894 2.08
## 02-2023 1814 1.99
## 07-2022 1808 1.98
## 04-2021 1801 1.98
## 04-2022 1793 1.97
## 07-2023 1792 1.97
## 05-2021 1784 1.96
## 01-2022 1778 1.95
## 02-2021 1746 1.92
## 12-2020 1683 1.85
## 04-2023 1676 1.84
## 01-2021 1670 1.83
## 12-2021 1649 1.81
## 02-2020 1641 1.80
## 06-2020 1595 1.75
## 01-2020 1562 1.71
## 12-2023 1527 1.68
## 12-2022 1516 1.66
## 03-2020 1443 1.58
## 04-2020 866 0.95
## 05-2020 847 0.93
cbind(sort(table(main_processed$Attendance.Month),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Attendance.Month)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## September 9257 10.2
## August 8810 9.7
## November 8738 9.6
## October 8048 8.8
## July 7864 8.6
## June 7477 8.2
## March 7369 8.1
## February 7109 7.8
## January 7054 7.7
## May 6932 7.6
## December 6375 7.0
## April 6136 6.7
cbind(sort(table(main_processed$Attendance.Year),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Attendance.Year)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 2021 24601 27
## 2022 23612 26
## 2023 22984 25
## 2020 19972 22
cbind(sort(table(main_processed$No.Attendances),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$No.Attendances)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 1 55289 99.986
## 2 8 0.014
cbind(sort(table(main_processed$No.New.Attendances),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$No.New.Attendances)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 1 30512 55
## 0 24785 45
cbind(sort(table(main_processed$No.Cancels),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$No.Cancels)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 1 27610 77
## 0 8262 23
cbind(sort(table(main_processed$Cancellation.Group),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Cancellation.Group)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## N/A 55297 60.7
## Hospital 15883 17.4
## Patient 10311 11.3
## DNA 8262 9.1
## Validation 1416 1.6
cbind(sort(table(main_processed$Reason.for.Cancellation_recode),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Reason.for.Cancellation_recode)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 55297 60.7
## By Hospital 10662 11.7
## By Patient 10466 11.5
## No show 8262 9.1
## By Consultant/Advanced Nurse 4125 4.5
## By Patient-health conditions 1203 1.3
## By Covid 1154 1.3
cbind(sort(table(main_processed$Rebooked.Indicator),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Rebooked.Indicator)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 55297 61
## Yes 20570 23
## No 15302 17
cbind(sort(table(main_processed$Hospital.Catchment_recode),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Hospital.Catchment_recode)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## National 52799 57.91
## Mater 22205 24.36
## Connolly 9963 10.93
## Beaumont 3673 4.03
## James 970 1.06
## Vincents 966 1.06
## Tallaght 397 0.43
## International 196 0.21
cbind(sort(table(main_processed$Gender),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Gender)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## Female 89511 98.181
## Male 1653 1.813
## Unknown 5 0.005
cbind(sort(table(main_processed$Area.of.Residence_recode),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Area.of.Residence_recode)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## DUBLIN NTH 41299 45.299
## EASTERN & MIDLAND REGION (excl.Dublin,Meath) 21068 23.109
## Meath 14424 15.821
## NORTHERN WESTERN REGION 9766 10.712
## DUBLIN STH 2338 2.564
## SOUTHERN REGION 2063 2.263
## UNKNOWN 187 0.205
## OUTSIDE IRELAND 24 0.026
cbind(sort(table(main_processed$addressDiff),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$addressDiff)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 0 74857 82
## 1 16312 18
cbind(sort(table(main_processed$Age.at.Attendance.Cat.HSE),decreasing=TRUE),sort(100*round(prop.table(table(main_processed$Age.at.Attendance.Cat.HSE)),5),deparse.level=2,decreasing=TRUE))
## [,1] [,2]
## 45 - 54 21611 23.704
## 35 - 44 19035 20.879
## 55 - 64 18151 19.909
## 65 - 74 12557 13.773
## 25 - 34 9617 10.549
## 75 - 84 5340 5.857
## 15 - 24 3257 3.572
## 85 >= 1437 1.576
## 10 - 14 152 0.167
## 0 - 4 12 0.013
## Predictor description (numeric)
summary(main_processed$Age.at.Attendance)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0 40 51 51 62 105
stat.desc(main_processed$Age.at.Attendance, basic=F)
## median mean SE.mean CI.mean.0.95 var std.dev
## 51.000 51.305 0.051 0.100 239.451 15.474
## coef.var
## 0.302
skew(main_processed$Age.at.Attendance)
## skew (g1) se z p
## 0.1184 0.0081 14.5943 0.0000
kurtosis(main_processed$Age.at.Attendance)
## [1] -0.43
summary(main_processed$daysDiff_attendanceAppoint)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0 365 730 580 731 1096 55297
stat.desc(main_processed$daysDiff_attendanceAppoint, basic=F)
## median mean SE.mean CI.mean.0.95 var std.dev
## 7.3e+02 5.8e+02 2.0e+00 4.0e+00 1.5e+05 3.9e+02
## coef.var
## 6.7e-01
skew(main_processed$daysDiff_attendanceAppoint)
## Warning in skew(main_processed$daysDiff_attendanceAppoint): Missing
## observations are removed from a vector.
## skew (g1) se z p
## -8.0e-02 1.3e-02 -6.1e+00 7.9e-10
kurtosis(main_processed$daysDiff_attendanceAppoint)
## [1] -1.2
summary(main_processed$daysDiff_attendanceBooked)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## -1055 169 366 506 729 1112 2310
stat.desc(main_processed$daysDiff_attendanceBooked, basic=F)
## median mean SE.mean CI.mean.0.95 var std.dev
## 3.7e+02 5.1e+02 1.3e+00 2.6e+00 1.6e+05 4.0e+02
## coef.var
## 7.9e-01
skew(main_processed$daysDiff_attendanceBooked)
## Warning in skew(main_processed$daysDiff_attendanceBooked): Missing observations
## are removed from a vector.
## skew (g1) se z p
## -0.0163 0.0082 -1.9809 0.0476
kurtosis(main_processed$daysDiff_attendanceBooked)
## [1] -1.2
summary(main_processed$daysDiff_AppointBooked)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0 11 25 91 150 672 55297
stat.desc(main_processed$daysDiff_AppointBooked, basic=F)
## median mean SE.mean CI.mean.0.95 var std.dev
## 2.5e+01 9.1e+01 6.4e-01 1.3e+00 1.5e+04 1.2e+02
## coef.var
## 1.3e+00
skew(main_processed$daysDiff_AppointBooked)
## Warning in skew(main_processed$daysDiff_AppointBooked): Missing observations
## are removed from a vector.
## skew (g1) se z p
## 1.470 0.013 113.660 0.000
kurtosis(main_processed$daysDiff_AppointBooked)
## [1] 0.74
## Warning: The dot-dot notation (`..density..`) was deprecated in ggplot2 3.4.0.
## ℹ Please use `after_stat(density)` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Warning: Use of `main_processed$Age.at.Attendance` is discouraged.
## ℹ Use `Age.at.Attendance` instead.
## Use of `main_processed$Age.at.Attendance` is discouraged.
## ℹ Use `Age.at.Attendance` instead.
## Warning: Use of `main_processed$Record.Type` is discouraged.
## ℹ Use `Record.Type` instead.
## Warning: Removed 35872 rows containing non-finite values (`stat_count()`).
## <ggproto object: Class ScaleDiscrete, Scale, gg>
## aesthetics: fill
## axis_order: function
## break_info: function
## break_positions: function
## breaks: waiver
## call: call
## clone: function
## dimension: function
## drop: TRUE
## expand: waiver
## get_breaks: function
## get_breaks_minor: function
## get_labels: function
## get_limits: function
## guide: legend
## is_discrete: function
## is_empty: function
## labels: Symptomatic Breast Clinic Triple Assessment Clinic Medic ...
## limits: NULL
## make_sec_title: function
## make_title: function
## map: function
## map_df: function
## n.breaks.cache: NULL
## na.translate: TRUE
## na.value: grey50
## name: waiver
## palette: function
## palette.cache: NULL
## position: left
## range: environment
## rescale: function
## reset: function
## scale_name: hue
## train: function
## train_df: function
## transform: function
## transform_df: function
## super: <ggproto object: Class ScaleDiscrete, Scale, gg>
## Warning: Removed 2310 rows containing non-finite values (`stat_count()`).
## Warning: Removed 55297 rows containing non-finite values (`stat_count()`).
## Warning: Removed 3001 rows containing non-finite values (`stat_count()`).
## [1] "character"
## List of 11
## $ call : language qcc(data = bookedMonthYear_tb$freq, type = "u", sizes = bookedMonthYear_tb$freq, labels = bookedMonthYear_tb| __truncated__
## $ type : chr "u"
## $ data.name : chr "bookedMonthYear_tb$freq"
## $ data : int [1:61, 1] 1 89 66 40 15 33 64 151 156 104 ...
## ..- attr(*, "dimnames")=List of 2
## $ statistics: Named num [1:61] 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "names")= chr [1:61] "2017-08" "2019-01" "2019-02" "2019-03" ...
## $ sizes : int [1:61] 1 89 66 40 15 33 64 151 156 104 ...
## $ center : num 1
## $ std.dev : num 1
## $ nsigmas : num 3
## $ limits : num [1:61, 1:2] 0 0.682 0.631 0.526 0.225 ...
## ..- attr(*, "dimnames")=List of 2
## $ violations:List of 2
## - attr(*, "class")= chr "qcc"
## List of 11
## $ call : language qcc(data = bookedMonthYear_tb$freq, type = "c", labels = bookedMonthYear_tb$month, plot = T)
## $ type : chr "c"
## $ data.name : chr "bookedMonthYear_tb$freq"
## $ data : int [1:61, 1] 1 89 66 40 15 33 64 151 156 104 ...
## ..- attr(*, "dimnames")=List of 2
## $ statistics: Named int [1:61] 1 89 66 40 15 33 64 151 156 104 ...
## ..- attr(*, "names")= chr [1:61] "2017-08" "2019-01" "2019-02" "2019-03" ...
## $ sizes : int [1:61] 1 1 1 1 1 1 1 1 1 1 ...
## $ center : num 1457
## $ std.dev : num 38.2
## $ nsigmas : num 3
## $ limits : num [1, 1:2] 1342 1571
## ..- attr(*, "dimnames")=List of 2
## $ violations:List of 2
## - attr(*, "class")= chr "qcc"
## Warning: package 'qicharts' was built under R version 4.3.2
## qicharts will no longer be maintained. Please consider moving to qicharts2: https://anhoej.github.io/qicharts2/.
## List of 11
## $ call : language qcc(data = appointmentMonthYear_tb$freq, type = "u", sizes = appointmentMonthYear_tb$freq, labels = appointm| __truncated__
## $ type : chr "u"
## $ data.name : chr "appointmentMonthYear_tb$freq"
## $ data : int [1:48, 1] 159 361 753 576 283 463 626 603 711 790 ...
## ..- attr(*, "dimnames")=List of 2
## $ statistics: Named num [1:48] 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "names")= chr [1:48] "2020-01" "2020-02" "2020-03" "2020-04" ...
## $ sizes : int [1:48] 159 361 753 576 283 463 626 603 711 790 ...
## $ center : num 1
## $ std.dev : num 1
## $ nsigmas : num 3
## $ limits : num [1:48, 1:2] 0.762 0.842 0.891 0.875 0.822 ...
## ..- attr(*, "dimnames")=List of 2
## $ violations:List of 2
## - attr(*, "class")= chr "qcc"
## List of 11
## $ call : language qcc(data = appointmentMonthYear_tb$freq, type = "c", labels = appointmentMonthYear_tb$month, plot = T)
## $ type : chr "c"
## $ data.name : chr "appointmentMonthYear_tb$freq"
## $ data : int [1:48, 1] 159 361 753 576 283 463 626 603 711 790 ...
## ..- attr(*, "dimnames")=List of 2
## $ statistics: Named int [1:48] 159 361 753 576 283 463 626 603 711 790 ...
## ..- attr(*, "names")= chr [1:48] "2020-01" "2020-02" "2020-03" "2020-04" ...
## $ sizes : int [1:48] 1 1 1 1 1 1 1 1 1 1 ...
## $ center : num 747
## $ std.dev : num 27.3
## $ nsigmas : num 3
## $ limits : num [1, 1:2] 665 829
## ..- attr(*, "dimnames")=List of 2
## $ violations:List of 2
## - attr(*, "class")= chr "qcc"
## List of 11
## $ call : language qcc(data = attendanceMonthYear_tb$freq, type = "u", sizes = attendanceMonthYear_tb$freq, labels = attendance| __truncated__
## $ type : chr "u"
## $ data.name : chr "attendanceMonthYear_tb$freq"
## $ data : int [1:48, 1] 1562 1670 1778 2044 1641 1746 1908 1814 1443 2031 ...
## ..- attr(*, "dimnames")=List of 2
## $ statistics: Named num [1:48] 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "names")= chr [1:48] "01-2020" "01-2021" "01-2022" "01-2023" ...
## $ sizes : int [1:48] 1562 1670 1778 2044 1641 1746 1908 1814 1443 2031 ...
## $ center : num 1
## $ std.dev : num 1
## $ nsigmas : num 3
## $ limits : num [1:48, 1:2] 0.924 0.927 0.929 0.934 0.926 ...
## ..- attr(*, "dimnames")=List of 2
## $ violations:List of 2
## - attr(*, "class")= chr "qcc"
## List of 11
## $ call : language qcc(data = attendanceMonthYear_tb$freq, type = "c", labels = attendanceMonthYear_tb$month, plot = T)
## $ type : chr "c"
## $ data.name : chr "attendanceMonthYear_tb$freq"
## $ data : int [1:48, 1] 1562 1670 1778 2044 1641 1746 1908 1814 1443 2031 ...
## ..- attr(*, "dimnames")=List of 2
## $ statistics: Named int [1:48] 1562 1670 1778 2044 1641 1746 1908 1814 1443 2031 ...
## ..- attr(*, "names")= chr [1:48] "01-2020" "01-2021" "01-2022" "01-2023" ...
## $ sizes : int [1:48] 1 1 1 1 1 1 1 1 1 1 ...
## $ center : num 1899
## $ std.dev : num 43.6
## $ nsigmas : num 3
## $ limits : num [1, 1:2] 1769 2030
## ..- attr(*, "dimnames")=List of 2
## $ violations:List of 2
## - attr(*, "class")= chr "qcc"
## List of 11
## $ call : language qcc(data = cancelledMonthYear_tb$Freq, type = "u", sizes = cancelledMonthYear_tb$Freq, labels = cancelledMon| __truncated__
## $ type : chr "u"
## $ data.name : chr "cancelledMonthYear_tb$Freq"
## $ data : int [1:48, 1] 113 265 686 562 250 420 478 491 547 657 ...
## ..- attr(*, "dimnames")=List of 2
## $ statistics: Named num [1:48] 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "names")= chr [1:48] "2020-01" "2020-02" "2020-03" "2020-04" ...
## $ sizes : int [1:48] 113 265 686 562 250 420 478 491 547 657 ...
## $ center : num 1
## $ std.dev : num 1
## $ nsigmas : num 3
## $ limits : num [1:48, 1:2] 0.718 0.816 0.885 0.873 0.81 ...
## ..- attr(*, "dimnames")=List of 2
## $ violations:List of 2
## - attr(*, "class")= chr "qcc"
## List of 11
## $ call : language qcc(data = cancelledMonthYear_tb$Freq, type = "c", labels = cancelledMonthYear_tb$month, plot = T)
## $ type : chr "c"
## $ data.name : chr "cancelledMonthYear_tb$Freq"
## $ data : int [1:48, 1] 113 265 686 562 250 420 478 491 547 657 ...
## ..- attr(*, "dimnames")=List of 2
## $ statistics: Named int [1:48] 113 265 686 562 250 420 478 491 547 657 ...
## ..- attr(*, "names")= chr [1:48] "2020-01" "2020-02" "2020-03" "2020-04" ...
## $ sizes : int [1:48] 1 1 1 1 1 1 1 1 1 1 ...
## $ center : num 575
## $ std.dev : num 24
## $ nsigmas : num 3
## $ limits : num [1, 1:2] 503 647
## ..- attr(*, "dimnames")=List of 2
## $ violations:List of 2
## - attr(*, "class")= chr "qcc"
## List of 11
## $ call : language qcc(data = dnaMonthYear_tb$Freq, type = "u", sizes = dnaMonthYear_tb$Freq, labels = dnaMonthYear_tb$month, plot = T)
## $ type : chr "u"
## $ data.name : chr "dnaMonthYear_tb$Freq"
## $ data : int [1:48, 1] 46 96 67 14 33 43 148 112 164 133 ...
## ..- attr(*, "dimnames")=List of 2
## $ statistics: Named num [1:48] 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "names")= chr [1:48] "2020-01" "2020-02" "2020-03" "2020-04" ...
## $ sizes : int [1:48] 46 96 67 14 33 43 148 112 164 133 ...
## $ center : num 1
## $ std.dev : num 1
## $ nsigmas : num 3
## $ limits : num [1:48, 1:2] 0.558 0.694 0.633 0.198 0.478 ...
## ..- attr(*, "dimnames")=List of 2
## $ violations:List of 2
## - attr(*, "class")= chr "qcc"
## List of 11
## $ call : language qcc(data = dnaMonthYear_tb$Freq, type = "c", labels = dnaMonthYear_tb$month, plot = T)
## $ type : chr "c"
## $ data.name : chr "dnaMonthYear_tb$Freq"
## $ data : int [1:48, 1] 46 96 67 14 33 43 148 112 164 133 ...
## ..- attr(*, "dimnames")=List of 2
## $ statistics: Named int [1:48] 46 96 67 14 33 43 148 112 164 133 ...
## ..- attr(*, "names")= chr [1:48] "2020-01" "2020-02" "2020-03" "2020-04" ...
## $ sizes : int [1:48] 1 1 1 1 1 1 1 1 1 1 ...
## $ center : num 172
## $ std.dev : num 13.1
## $ nsigmas : num 3
## $ limits : num [1, 1:2] 133 211
## ..- attr(*, "dimnames")=List of 2
## $ violations:List of 2
## - attr(*, "class")= chr "qcc"
## Record Type & Clinic relevance
#library(dplyr)
CrossTable(main_processed$Clinic.Type_recode, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Clinic.Type_recode | Attendance | Cancellation | DNA | Row Total |
## ----------------------------------|--------------|--------------|--------------|--------------|
## FRA | 62 | 65 | 13 | 140 |
## | 84.91 | 42.40 | 12.69 | |
## | 6.18 | 12.05 | 0.01 | |
## | 0.44 | 0.46 | 0.09 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## GEN | 14 | 1 | 9 | 24 |
## | 14.56 | 7.27 | 2.17 | |
## | 0.02 | 5.41 | 21.42 | |
## | 0.58 | 0.04 | 0.38 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## MED | 8523 | 2288 | 1933 | 12744 |
## | 7729.66 | 3859.45 | 1154.90 | |
## | 81.43 | 639.84 | 524.24 | |
## | 0.67 | 0.18 | 0.15 | 0.14 |
## | 0.15 | 0.08 | 0.23 | |
## | 0.09 | 0.03 | 0.02 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## SBC | 21852 | 19214 | 3299 | 44365 |
## | 26908.83 | 13435.68 | 4020.49 | |
## | 950.30 | 2485.10 | 129.47 | |
## | 0.49 | 0.43 | 0.07 | 0.49 |
## | 0.40 | 0.70 | 0.40 | |
## | 0.24 | 0.21 | 0.04 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## TRI | 24846 | 6042 | 3008 | 33896 |
## | 20559.04 | 10265.21 | 3071.75 | |
## | 893.91 | 1737.47 | 1.32 | |
## | 0.73 | 0.18 | 0.09 | 0.37 |
## | 0.45 | 0.22 | 0.36 | |
## | 0.27 | 0.07 | 0.03 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 7488 d.f. = 8 p = 0
##
##
##
CrossTable(main_processed$Clinic.Code, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Clinic.Code | Attendance | Cancellation | DNA | Row Total |
## ---------------------------|--------------|--------------|--------------|--------------|
## 424 | 5728 | 3758 | 910 | 10396 |
## | 6305.52 | 3148.37 | 942.12 | |
## | 52.89 | 118.05 | 1.09 | |
## | 0.55 | 0.36 | 0.09 | 0.11 |
## | 0.10 | 0.14 | 0.11 | |
## | 0.06 | 0.04 | 0.01 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 440 | 14 | 1 | 9 | 24 |
## | 14.56 | 7.27 | 2.17 | |
## | 0.02 | 5.41 | 21.42 | |
## | 0.58 | 0.04 | 0.38 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 441 | 5508 | 4725 | 1022 | 11255 |
## | 6826.53 | 3408.51 | 1019.96 | |
## | 254.67 | 508.48 | 0.00 | |
## | 0.49 | 0.42 | 0.09 | 0.12 |
## | 0.10 | 0.17 | 0.12 | |
## | 0.06 | 0.05 | 0.01 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 526 | 3089 | 526 | 405 | 4020 |
## | 2438.26 | 1217.43 | 364.30 | |
## | 173.67 | 392.70 | 4.55 | |
## | 0.77 | 0.13 | 0.10 | 0.04 |
## | 0.06 | 0.02 | 0.05 | |
## | 0.03 | 0.01 | 0.00 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 527 | 5295 | 1408 | 559 | 7262 |
## | 4404.64 | 2199.25 | 658.10 | |
## | 179.98 | 284.68 | 14.92 | |
## | 0.73 | 0.19 | 0.08 | 0.08 |
## | 0.10 | 0.05 | 0.07 | |
## | 0.06 | 0.02 | 0.01 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 757 | 5527 | 5477 | 652 | 11656 |
## | 7069.75 | 3529.95 | 1056.30 | |
## | 336.66 | 1073.95 | 154.75 | |
## | 0.47 | 0.47 | 0.06 | 0.13 |
## | 0.10 | 0.20 | 0.08 | |
## | 0.06 | 0.06 | 0.01 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 768 | 17 | 7 | 1 | 25 |
## | 15.16 | 7.57 | 2.27 | |
## | 0.22 | 0.04 | 0.71 | |
## | 0.68 | 0.28 | 0.04 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 771 | 6228 | 1658 | 759 | 8645 |
## | 5243.48 | 2618.09 | 783.44 | |
## | 184.86 | 352.08 | 0.76 | |
## | 0.72 | 0.19 | 0.09 | 0.09 |
## | 0.11 | 0.06 | 0.09 | |
## | 0.07 | 0.02 | 0.01 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 932 | 1994 | 581 | 381 | 2956 |
## | 1792.91 | 895.21 | 267.88 | |
## | 22.55 | 110.28 | 47.77 | |
## | 0.67 | 0.20 | 0.13 | 0.03 |
## | 0.04 | 0.02 | 0.05 | |
## | 0.02 | 0.01 | 0.00 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 933 | 1976 | 565 | 400 | 2941 |
## | 1783.81 | 890.66 | 266.52 | |
## | 20.71 | 119.08 | 66.85 | |
## | 0.67 | 0.19 | 0.14 | 0.03 |
## | 0.04 | 0.02 | 0.05 | |
## | 0.02 | 0.01 | 0.00 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 934 | 1374 | 361 | 335 | 2070 |
## | 1255.52 | 626.89 | 187.59 | |
## | 11.18 | 112.77 | 115.84 | |
## | 0.66 | 0.17 | 0.16 | 0.02 |
## | 0.02 | 0.01 | 0.04 | |
## | 0.02 | 0.00 | 0.00 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 1132 | 2420 | 621 | 551 | 3592 |
## | 2178.67 | 1087.82 | 325.52 | |
## | 26.73 | 200.33 | 156.19 | |
## | 0.67 | 0.17 | 0.15 | 0.04 |
## | 0.04 | 0.02 | 0.07 | |
## | 0.03 | 0.01 | 0.01 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 1133 | 3835 | 4704 | 581 | 9120 |
## | 5531.58 | 2761.94 | 826.48 | |
## | 520.35 | 1365.56 | 72.91 | |
## | 0.42 | 0.52 | 0.06 | 0.10 |
## | 0.07 | 0.17 | 0.07 | |
## | 0.04 | 0.05 | 0.01 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 1134 | 8406 | 2154 | 1032 | 11592 |
## | 7030.93 | 3510.57 | 1050.50 | |
## | 268.93 | 524.21 | 0.33 | |
## | 0.73 | 0.19 | 0.09 | 0.13 |
## | 0.15 | 0.08 | 0.12 | |
## | 0.09 | 0.02 | 0.01 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 1187 | 45 | 58 | 12 | 115 |
## | 69.75 | 34.83 | 10.42 | |
## | 8.78 | 15.42 | 0.24 | |
## | 0.39 | 0.50 | 0.10 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 1333 | 1254 | 550 | 134 | 1938 |
## | 1175.46 | 586.91 | 175.63 | |
## | 5.25 | 2.32 | 9.87 | |
## | 0.65 | 0.28 | 0.07 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 1334 | 1828 | 296 | 253 | 2377 |
## | 1441.73 | 719.86 | 215.41 | |
## | 103.49 | 249.57 | 6.56 | |
## | 0.77 | 0.12 | 0.11 | 0.03 |
## | 0.03 | 0.01 | 0.03 | |
## | 0.02 | 0.00 | 0.00 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 1335 | 759 | 160 | 266 | 1185 |
## | 718.74 | 358.87 | 107.39 | |
## | 2.25 | 110.21 | 234.27 | |
## | 0.64 | 0.14 | 0.22 | 0.01 |
## | 0.01 | 0.01 | 0.03 | |
## | 0.01 | 0.00 | 0.00 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## ---------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 8627 d.f. = 34 p = 0
##
##
##
CrossTable(main_processed$NurseFlag, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$NurseFlag | Attendance | Cancellation | DNA | Row Total |
## -------------------------|--------------|--------------|--------------|--------------|
## N | 55280 | 27603 | 8261 | 91144 |
## | 55281.84 | 27602.43 | 8259.73 | |
## | 0.00 | 0.00 | 0.00 | |
## | 0.61 | 0.30 | 0.09 | 1.00 |
## | 1.00 | 1.00 | 1.00 | |
## | 0.61 | 0.30 | 0.09 | |
## -------------------------|--------------|--------------|--------------|--------------|
## Y | 17 | 7 | 1 | 25 |
## | 15.16 | 7.57 | 2.27 | |
## | 0.22 | 0.04 | 0.71 | |
## | 0.68 | 0.28 | 0.04 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## -------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 0.97 d.f. = 2 p = 0.61
##
##
##
CrossTable(main_processed$Referral.Source_recode, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Referral.Source_recode | Attendance | Cancellation | DNA | Row Total |
## --------------------------------------|--------------|--------------|--------------|--------------|
## BREAST CHECK | 948 | 801 | 56 | 1805 |
## | 1094.79 | 546.63 | 163.57 | |
## | 19.68 | 118.36 | 70.75 | |
## | 0.53 | 0.44 | 0.03 | 0.02 |
## | 0.02 | 0.03 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## CLINIC | 25225 | 18845 | 3984 | 48054 |
## | 29146.33 | 14552.87 | 4354.79 | |
## | 527.57 | 1265.89 | 31.57 | |
## | 0.52 | 0.39 | 0.08 | 0.53 |
## | 0.46 | 0.68 | 0.48 | |
## | 0.28 | 0.21 | 0.04 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## Elsew of Mater | 57 | 18 | 4 | 79 |
## | 47.92 | 23.92 | 7.16 | |
## | 1.72 | 1.47 | 1.39 | |
## | 0.72 | 0.23 | 0.05 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## Elsew outside Mater | 1052 | 212 | 75 | 1339 |
## | 812.15 | 405.51 | 121.34 | |
## | 70.84 | 92.34 | 17.70 | |
## | 0.79 | 0.16 | 0.06 | 0.01 |
## | 0.02 | 0.01 | 0.01 | |
## | 0.01 | 0.00 | 0.00 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## EMERGENCY DEPT | 54 | 3 | 3 | 60 |
## | 36.39 | 18.17 | 5.44 | |
## | 8.52 | 12.67 | 1.09 | |
## | 0.90 | 0.05 | 0.05 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## GP | 23181 | 4917 | 3677 | 31775 |
## | 19272.58 | 9622.87 | 2879.54 | |
## | 792.61 | 2301.31 | 220.85 | |
## | 0.73 | 0.15 | 0.12 | 0.35 |
## | 0.42 | 0.18 | 0.45 | |
## | 0.25 | 0.05 | 0.04 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## OTHER CONSULTANT | 182 | 57 | 12 | 251 |
## | 152.24 | 76.01 | 22.75 | |
## | 5.82 | 4.76 | 5.08 | |
## | 0.73 | 0.23 | 0.05 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## WARD | 4598 | 2757 | 451 | 7806 |
## | 4734.60 | 2364.00 | 707.40 | |
## | 3.94 | 65.33 | 92.93 | |
## | 0.59 | 0.35 | 0.06 | 0.09 |
## | 0.08 | 0.10 | 0.05 | |
## | 0.05 | 0.03 | 0.00 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 5734 d.f. = 14 p = 0
##
##
##
#CrossTable(main_processed$Referring.Hospital, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
CrossTable(main_processed$Consultant_recode, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Consultant_recode | Attendance | Cancellation | DNA | Row Total |
## ---------------------------------|--------------|--------------|--------------|--------------|
## BARRYM | 13749 | 7716 | 1792 | 23257 |
## | 14106.14 | 7043.25 | 2107.62 | |
## | 9.04 | 64.26 | 47.26 | |
## | 0.59 | 0.33 | 0.08 | 0.26 |
## | 0.25 | 0.28 | 0.22 | |
## | 0.15 | 0.08 | 0.02 | |
## ---------------------------------|--------------|--------------|--------------|--------------|
## HEENEY | 3841 | 1006 | 653 | 5500 |
## | 3335.93 | 1665.64 | 498.43 | |
## | 76.47 | 261.24 | 47.94 | |
## | 0.70 | 0.18 | 0.12 | 0.06 |
## | 0.07 | 0.04 | 0.08 | |
## | 0.04 | 0.01 | 0.01 | |
## ---------------------------------|--------------|--------------|--------------|--------------|
## KELLM | 12999 | 5731 | 1869 | 20599 |
## | 12493.97 | 6238.29 | 1866.74 | |
## | 20.41 | 41.25 | 0.00 | |
## | 0.63 | 0.28 | 0.09 | 0.23 |
## | 0.24 | 0.21 | 0.23 | |
## | 0.14 | 0.06 | 0.02 | |
## ---------------------------------|--------------|--------------|--------------|--------------|
## STOKES | 10002 | 5620 | 1772 | 17394 |
## | 10550.03 | 5267.67 | 1576.29 | |
## | 28.47 | 23.57 | 24.30 | |
## | 0.58 | 0.32 | 0.10 | 0.19 |
## | 0.18 | 0.20 | 0.21 | |
## | 0.11 | 0.06 | 0.02 | |
## ---------------------------------|--------------|--------------|--------------|--------------|
## WALSSI | 14706 | 7537 | 2176 | 24419 |
## | 14810.93 | 7395.15 | 2212.92 | |
## | 0.74 | 2.72 | 0.62 | |
## | 0.60 | 0.31 | 0.09 | 0.27 |
## | 0.27 | 0.27 | 0.26 | |
## | 0.16 | 0.08 | 0.02 | |
## ---------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## ---------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 648 d.f. = 8 p = 9.6e-135
##
##
##
CrossTable(main_processed$Insurance.Scheme_recode, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Insurance.Scheme_recode | Attendance | Cancellation | DNA | Row Total |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## A | 43 | 23 | 5 | 71 |
## | 43.06 | 21.50 | 6.43 | |
## | 0.00 | 0.10 | 0.32 | |
## | 0.61 | 0.32 | 0.07 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## B | 4152 | 2139 | 414 | 6705 |
## | 4066.80 | 2030.57 | 607.63 | |
## | 1.78 | 5.79 | 61.70 | |
## | 0.62 | 0.32 | 0.06 | 0.07 |
## | 0.08 | 0.08 | 0.05 | |
## | 0.05 | 0.02 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## C | 16 | 7 | 2 | 25 |
## | 15.16 | 7.57 | 2.27 | |
## | 0.05 | 0.04 | 0.03 | |
## | 0.64 | 0.28 | 0.08 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## D | 14801 | 7711 | 2253 | 24765 |
## | 15020.79 | 7499.94 | 2244.28 | |
## | 3.22 | 5.94 | 0.03 | |
## | 0.60 | 0.31 | 0.09 | 0.27 |
## | 0.27 | 0.28 | 0.27 | |
## | 0.16 | 0.08 | 0.02 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## E | 126 | 67 | 14 | 207 |
## | 125.55 | 62.69 | 18.76 | |
## | 0.00 | 0.30 | 1.21 | |
## | 0.61 | 0.32 | 0.07 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## G | 372 | 191 | 56 | 619 |
## | 375.44 | 187.46 | 56.10 | |
## | 0.03 | 0.07 | 0.00 | |
## | 0.60 | 0.31 | 0.09 | 0.01 |
## | 0.01 | 0.01 | 0.01 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## H | 64 | 33 | 5 | 102 |
## | 61.87 | 30.89 | 9.24 | |
## | 0.07 | 0.14 | 1.95 | |
## | 0.63 | 0.32 | 0.05 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## I | 3742 | 2006 | 385 | 6133 |
## | 3719.87 | 1857.34 | 555.79 | |
## | 0.13 | 11.90 | 52.48 | |
## | 0.61 | 0.33 | 0.06 | 0.07 |
## | 0.07 | 0.07 | 0.05 | |
## | 0.04 | 0.02 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## J | 75 | 54 | 7 | 136 |
## | 82.49 | 41.19 | 12.32 | |
## | 0.68 | 3.99 | 2.30 | |
## | 0.55 | 0.40 | 0.05 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## M | 4 | 1 | 2 | 7 |
## | 4.25 | 2.12 | 0.63 | |
## | 0.01 | 0.59 | 2.94 | |
## | 0.57 | 0.14 | 0.29 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## O | 358 | 110 | 41 | 509 |
## | 308.73 | 154.15 | 46.13 | |
## | 7.86 | 12.64 | 0.57 | |
## | 0.70 | 0.22 | 0.08 | 0.01 |
## | 0.01 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## P | 121 | 59 | 15 | 195 |
## | 118.27 | 59.05 | 17.67 | |
## | 0.06 | 0.00 | 0.40 | |
## | 0.62 | 0.30 | 0.08 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## S | 1712 | 824 | 159 | 2695 |
## | 1634.61 | 816.17 | 244.23 | |
## | 3.66 | 0.08 | 29.74 | |
## | 0.64 | 0.31 | 0.06 | 0.03 |
## | 0.03 | 0.03 | 0.02 | |
## | 0.02 | 0.01 | 0.00 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## U | 20245 | 9306 | 3785 | 33336 |
## | 20219.38 | 10095.61 | 3021.01 | |
## | 0.03 | 61.76 | 193.21 | |
## | 0.61 | 0.28 | 0.11 | 0.37 |
## | 0.37 | 0.34 | 0.46 | |
## | 0.22 | 0.10 | 0.04 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## V | 9466 | 5079 | 1119 | 15664 |
## | 9500.73 | 4743.75 | 1419.52 | |
## | 0.13 | 23.69 | 63.62 | |
## | 0.60 | 0.32 | 0.07 | 0.17 |
## | 0.17 | 0.18 | 0.14 | |
## | 0.10 | 0.06 | 0.01 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## ---------------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 555 d.f. = 28 p = 2.6e-99
##
##
##
CrossTable(main_processed$Eligibility_recode, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Eligibility_recode | Attendance | Cancellation | DNA | Row Total |
## ----------------------------------|--------------|--------------|--------------|--------------|
## ACUTE UNCLASSIFIED | 136 | 78 | 33 | 247 |
## | 149.81 | 74.80 | 22.38 | |
## | 1.27 | 0.14 | 5.03 | |
## | 0.55 | 0.32 | 0.13 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## ELIGIBILITY UNKNOWN | 1000 | 1108 | 1270 | 3378 |
## | 2048.87 | 1023.01 | 306.12 | |
## | 536.94 | 7.06 | 3034.90 | |
## | 0.30 | 0.33 | 0.38 | 0.04 |
## | 0.02 | 0.04 | 0.15 | |
## | 0.01 | 0.01 | 0.01 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## EXEMPT | 1425 | 768 | 216 | 2409 |
## | 1461.14 | 729.55 | 218.31 | |
## | 0.89 | 2.03 | 0.02 | |
## | 0.59 | 0.32 | 0.09 | 0.03 |
## | 0.03 | 0.03 | 0.03 | |
## | 0.02 | 0.01 | 0.00 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## MEDICAL CARD | 22233 | 11064 | 3097 | 36394 |
## | 22074.16 | 11021.71 | 3298.13 | |
## | 1.14 | 0.16 | 12.27 | |
## | 0.61 | 0.30 | 0.09 | 0.40 |
## | 0.40 | 0.40 | 0.37 | |
## | 0.24 | 0.12 | 0.03 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## NON ACUTE UNCLASSIFIED | 21 | 14 | 2 | 37 |
## | 22.44 | 11.21 | 3.35 | |
## | 0.09 | 0.70 | 0.55 | |
## | 0.57 | 0.38 | 0.05 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## NON MEDICAL CARD | 30302 | 14468 | 3621 | 48391 |
## | 29350.73 | 14654.93 | 4385.33 | |
## | 30.83 | 2.38 | 133.22 | |
## | 0.63 | 0.30 | 0.07 | 0.53 |
## | 0.55 | 0.52 | 0.44 | |
## | 0.33 | 0.16 | 0.04 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## RESEARCH/NATIONAL PROG. | 180 | 110 | 23 | 313 |
## | 189.84 | 94.79 | 28.36 | |
## | 0.51 | 2.44 | 1.01 | |
## | 0.58 | 0.35 | 0.07 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## ----------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 3774 d.f. = 12 p = 0
##
##
##
CrossTable(main_processed$Booking.Type_recode, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Booking.Type_recode | Attendance | Cancellation | DNA | Row Total |
## -----------------------------------|--------------|--------------|--------------|--------------|
## NEW | 24236 | 5013 | 3780 | 33029 |
## | 20033.18 | 10002.64 | 2993.18 | |
## | 881.72 | 2488.99 | 206.83 | |
## | 0.73 | 0.15 | 0.11 | 0.36 |
## | 0.44 | 0.18 | 0.46 | |
## | 0.27 | 0.05 | 0.04 | |
## -----------------------------------|--------------|--------------|--------------|--------------|
## RETURN | 27715 | 20419 | 4168 | 52302 |
## | 31722.88 | 15839.36 | 4739.76 | |
## | 506.36 | 1324.12 | 68.97 | |
## | 0.53 | 0.39 | 0.08 | 0.57 |
## | 0.50 | 0.74 | 0.50 | |
## | 0.30 | 0.22 | 0.05 | |
## -----------------------------------|--------------|--------------|--------------|--------------|
## WARD | 3346 | 2178 | 314 | 5838 |
## | 3540.94 | 1768.00 | 529.06 | |
## | 10.73 | 95.08 | 87.42 | |
## | 0.57 | 0.37 | 0.05 | 0.06 |
## | 0.06 | 0.08 | 0.04 | |
## | 0.04 | 0.02 | 0.00 | |
## -----------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## -----------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 5670 d.f. = 4 p = 0
##
##
##
CrossTable(main_processed$Hospital.Catchment_recode, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Hospital.Catchment_recode | Attendance | Cancellation | DNA | Row Total |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## Beaumont | 2098 | 1258 | 317 | 3673 |
## | 2227.80 | 1112.35 | 332.86 | |
## | 7.56 | 19.07 | 0.76 | |
## | 0.57 | 0.34 | 0.09 | 0.04 |
## | 0.04 | 0.05 | 0.04 | |
## | 0.02 | 0.01 | 0.00 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## Connolly | 6237 | 2806 | 920 | 9963 |
## | 6042.89 | 3017.24 | 902.88 | |
## | 6.24 | 14.79 | 0.32 | |
## | 0.63 | 0.28 | 0.09 | 0.11 |
## | 0.11 | 0.10 | 0.11 | |
## | 0.07 | 0.03 | 0.01 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## International | 108 | 60 | 28 | 196 |
## | 118.88 | 59.36 | 17.76 | |
## | 1.00 | 0.01 | 5.90 | |
## | 0.55 | 0.31 | 0.14 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## James | 593 | 266 | 111 | 970 |
## | 588.34 | 293.76 | 87.90 | |
## | 0.04 | 2.62 | 6.07 | |
## | 0.61 | 0.27 | 0.11 | 0.01 |
## | 0.01 | 0.01 | 0.01 | |
## | 0.01 | 0.00 | 0.00 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## Mater | 13697 | 6299 | 2209 | 22205 |
## | 13468.06 | 6724.65 | 2012.28 | |
## | 3.89 | 26.94 | 19.23 | |
## | 0.62 | 0.28 | 0.10 | 0.24 |
## | 0.25 | 0.23 | 0.27 | |
## | 0.15 | 0.07 | 0.02 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## National | 31787 | 16527 | 4485 | 52799 |
## | 32024.33 | 15989.87 | 4784.80 | |
## | 1.76 | 18.04 | 18.78 | |
## | 0.60 | 0.31 | 0.08 | 0.58 |
## | 0.57 | 0.60 | 0.54 | |
## | 0.35 | 0.18 | 0.05 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## Tallaght | 240 | 96 | 61 | 397 |
## | 240.79 | 120.23 | 35.98 | |
## | 0.00 | 4.88 | 17.40 | |
## | 0.60 | 0.24 | 0.15 | 0.00 |
## | 0.00 | 0.00 | 0.01 | |
## | 0.00 | 0.00 | 0.00 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## Vincents | 537 | 298 | 131 | 966 |
## | 585.91 | 292.55 | 87.54 | |
## | 4.08 | 0.10 | 21.57 | |
## | 0.56 | 0.31 | 0.14 | 0.01 |
## | 0.01 | 0.01 | 0.02 | |
## | 0.01 | 0.00 | 0.00 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 201 d.f. = 14 p = 3.3e-35
##
##
##
CrossTable(main_processed$bookedDay, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 88859
##
##
## | main_processed$Record.Type
## main_processed$bookedDay | Attendance | Cancellation | DNA | Row Total |
## -------------------------|--------------|--------------|--------------|--------------|
## Friday | 8390 | 4345 | 1203 | 13938 |
## | 8311.29 | 4330.77 | 1295.94 | |
## | 0.75 | 0.05 | 6.67 | |
## | 0.60 | 0.31 | 0.09 | 0.16 |
## | 0.16 | 0.16 | 0.15 | |
## | 0.09 | 0.05 | 0.01 | |
## -------------------------|--------------|--------------|--------------|--------------|
## Monday | 11561 | 6484 | 1916 | 19961 |
## | 11902.83 | 6202.22 | 1855.95 | |
## | 9.82 | 12.80 | 1.94 | |
## | 0.58 | 0.32 | 0.10 | 0.22 |
## | 0.22 | 0.23 | 0.23 | |
## | 0.13 | 0.07 | 0.02 | |
## -------------------------|--------------|--------------|--------------|--------------|
## Saturday | 153 | 65 | 30 | 248 |
## | 147.88 | 77.06 | 23.06 | |
## | 0.18 | 1.89 | 2.09 | |
## | 0.62 | 0.26 | 0.12 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------|--------------|--------------|--------------|--------------|
## Sunday | 10 | 4 | 1 | 15 |
## | 8.94 | 4.66 | 1.39 | |
## | 0.12 | 0.09 | 0.11 | |
## | 0.67 | 0.27 | 0.07 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------|--------------|--------------|--------------|--------------|
## Thursday | 10226 | 4935 | 1614 | 16775 |
## | 10003.00 | 5212.28 | 1559.72 | |
## | 4.97 | 14.75 | 1.89 | |
## | 0.61 | 0.29 | 0.10 | 0.19 |
## | 0.19 | 0.18 | 0.20 | |
## | 0.12 | 0.06 | 0.02 | |
## -------------------------|--------------|--------------|--------------|--------------|
## Tuesday | 11838 | 6367 | 1854 | 20059 |
## | 11961.27 | 6232.67 | 1865.06 | |
## | 1.27 | 2.90 | 0.07 | |
## | 0.59 | 0.32 | 0.09 | 0.23 |
## | 0.22 | 0.23 | 0.22 | |
## | 0.13 | 0.07 | 0.02 | |
## -------------------------|--------------|--------------|--------------|--------------|
## Wednesday | 10809 | 5410 | 1644 | 17863 |
## | 10651.78 | 5550.34 | 1660.88 | |
## | 2.32 | 3.55 | 0.17 | |
## | 0.61 | 0.30 | 0.09 | 0.20 |
## | 0.20 | 0.20 | 0.20 | |
## | 0.12 | 0.06 | 0.02 | |
## -------------------------|--------------|--------------|--------------|--------------|
## Column Total | 52987 | 27610 | 8262 | 88859 |
## | 0.60 | 0.31 | 0.09 | |
## -------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 68 d.f. = 12 p = 6.4e-10
##
##
##
CrossTable(main_processed$bookedMonthYear, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 88859
##
##
## | main_processed$Record.Type
## main_processed$bookedMonthYear | Attendance | Cancellation | DNA | Row Total |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2017-08 | 1 | 0 | 0 | 1 |
## | 0.60 | 0.31 | 0.09 | |
## | 0.27 | 0.31 | 0.09 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-01 | 89 | 0 | 0 | 89 |
## | 53.07 | 27.65 | 8.28 | |
## | 24.32 | 27.65 | 8.28 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-02 | 66 | 0 | 0 | 66 |
## | 39.36 | 20.51 | 6.14 | |
## | 18.04 | 20.51 | 6.14 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-03 | 40 | 0 | 0 | 40 |
## | 23.85 | 12.43 | 3.72 | |
## | 10.93 | 12.43 | 3.72 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-04 | 15 | 0 | 0 | 15 |
## | 8.94 | 4.66 | 1.39 | |
## | 4.10 | 4.66 | 1.39 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-05 | 33 | 0 | 0 | 33 |
## | 19.68 | 10.25 | 3.07 | |
## | 9.02 | 10.25 | 3.07 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-06 | 64 | 0 | 0 | 64 |
## | 38.16 | 19.89 | 5.95 | |
## | 17.49 | 19.89 | 5.95 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-07 | 151 | 0 | 0 | 151 |
## | 90.04 | 46.92 | 14.04 | |
## | 41.27 | 46.92 | 14.04 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-08 | 156 | 0 | 0 | 156 |
## | 93.02 | 48.47 | 14.50 | |
## | 42.63 | 48.47 | 14.50 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-09 | 104 | 0 | 0 | 104 |
## | 62.02 | 32.31 | 9.67 | |
## | 28.42 | 32.31 | 9.67 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-10 | 148 | 0 | 0 | 148 |
## | 88.25 | 45.99 | 13.76 | |
## | 40.45 | 45.99 | 13.76 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-11 | 210 | 0 | 0 | 210 |
## | 125.22 | 65.25 | 19.53 | |
## | 57.39 | 65.25 | 19.53 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2019-12 | 523 | 0 | 0 | 523 |
## | 311.87 | 162.50 | 48.63 | |
## | 142.94 | 162.50 | 48.63 | |
## | 1.00 | 0.00 | 0.00 | 0.01 |
## | 0.01 | 0.00 | 0.00 | |
## | 0.01 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-01 | 1318 | 689 | 135 | 2142 |
## | 1277.28 | 665.56 | 199.16 | |
## | 1.30 | 0.83 | 20.67 | |
## | 0.62 | 0.32 | 0.06 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-02 | 999 | 932 | 136 | 2067 |
## | 1232.56 | 642.25 | 192.19 | |
## | 44.26 | 130.72 | 16.43 | |
## | 0.48 | 0.45 | 0.07 | 0.02 |
## | 0.02 | 0.03 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-03 | 281 | 486 | 68 | 835 |
## | 497.91 | 259.45 | 77.64 | |
## | 94.50 | 197.83 | 1.20 | |
## | 0.34 | 0.58 | 0.08 | 0.01 |
## | 0.01 | 0.02 | 0.01 | |
## | 0.00 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-04 | 300 | 178 | 23 | 501 |
## | 298.75 | 155.67 | 46.58 | |
## | 0.01 | 3.20 | 11.94 | |
## | 0.60 | 0.36 | 0.05 | 0.01 |
## | 0.01 | 0.01 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-05 | 661 | 388 | 62 | 1111 |
## | 662.49 | 345.21 | 103.30 | |
## | 0.00 | 5.30 | 16.51 | |
## | 0.59 | 0.35 | 0.06 | 0.01 |
## | 0.01 | 0.01 | 0.01 | |
## | 0.01 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-06 | 1271 | 613 | 139 | 2023 |
## | 1206.32 | 628.58 | 188.10 | |
## | 3.47 | 0.39 | 12.81 | |
## | 0.63 | 0.30 | 0.07 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-07 | 1411 | 647 | 296 | 2354 |
## | 1403.70 | 731.43 | 218.87 | |
## | 0.04 | 9.75 | 27.18 | |
## | 0.60 | 0.27 | 0.13 | 0.03 |
## | 0.03 | 0.02 | 0.04 | |
## | 0.02 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-08 | 1503 | 717 | 171 | 2391 |
## | 1425.76 | 742.92 | 222.31 | |
## | 4.18 | 0.90 | 11.84 | |
## | 0.63 | 0.30 | 0.07 | 0.03 |
## | 0.03 | 0.03 | 0.02 | |
## | 0.02 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-09 | 1345 | 688 | 210 | 2243 |
## | 1337.51 | 696.94 | 208.55 | |
## | 0.04 | 0.11 | 0.01 | |
## | 0.60 | 0.31 | 0.09 | 0.03 |
## | 0.03 | 0.02 | 0.03 | |
## | 0.02 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-10 | 1191 | 686 | 178 | 2055 |
## | 1225.41 | 638.52 | 191.07 | |
## | 0.97 | 3.53 | 0.89 | |
## | 0.58 | 0.33 | 0.09 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-11 | 1413 | 833 | 160 | 2406 |
## | 1434.71 | 747.59 | 223.71 | |
## | 0.33 | 9.76 | 18.14 | |
## | 0.59 | 0.35 | 0.07 | 0.03 |
## | 0.03 | 0.03 | 0.02 | |
## | 0.02 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020-12 | 902 | 470 | 205 | 1577 |
## | 940.37 | 490.00 | 146.63 | |
## | 1.57 | 0.82 | 23.24 | |
## | 0.57 | 0.30 | 0.13 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-01 | 686 | 434 | 131 | 1251 |
## | 745.98 | 388.71 | 116.32 | |
## | 4.82 | 5.28 | 1.85 | |
## | 0.55 | 0.35 | 0.10 | 0.01 |
## | 0.01 | 0.02 | 0.02 | |
## | 0.01 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-02 | 989 | 794 | 186 | 1969 |
## | 1174.12 | 611.80 | 183.08 | |
## | 29.19 | 54.26 | 0.05 | |
## | 0.50 | 0.40 | 0.09 | 0.02 |
## | 0.02 | 0.03 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-03 | 1317 | 736 | 188 | 2241 |
## | 1336.32 | 696.32 | 208.37 | |
## | 0.28 | 2.26 | 1.99 | |
## | 0.59 | 0.33 | 0.08 | 0.03 |
## | 0.02 | 0.03 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-04 | 1114 | 662 | 231 | 2007 |
## | 1196.78 | 623.61 | 186.61 | |
## | 5.73 | 2.36 | 10.56 | |
## | 0.56 | 0.33 | 0.12 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-05 | 1013 | 622 | 215 | 1850 |
## | 1103.16 | 574.83 | 172.01 | |
## | 7.37 | 3.87 | 10.74 | |
## | 0.55 | 0.34 | 0.12 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-06 | 947 | 766 | 225 | 1938 |
## | 1155.64 | 602.17 | 180.19 | |
## | 37.67 | 44.57 | 11.14 | |
## | 0.49 | 0.40 | 0.12 | 0.02 |
## | 0.02 | 0.03 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-07 | 1099 | 733 | 211 | 2043 |
## | 1218.25 | 634.79 | 189.96 | |
## | 11.67 | 15.19 | 2.33 | |
## | 0.54 | 0.36 | 0.10 | 0.02 |
## | 0.02 | 0.03 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-08 | 1270 | 786 | 274 | 2330 |
## | 1389.39 | 723.97 | 216.64 | |
## | 10.26 | 5.31 | 15.19 | |
## | 0.55 | 0.34 | 0.12 | 0.03 |
## | 0.02 | 0.03 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-09 | 1402 | 631 | 376 | 2409 |
## | 1436.50 | 748.52 | 223.99 | |
## | 0.83 | 18.45 | 103.17 | |
## | 0.58 | 0.26 | 0.16 | 0.03 |
## | 0.03 | 0.02 | 0.05 | |
## | 0.02 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-10 | 1211 | 572 | 247 | 2030 |
## | 1210.50 | 630.76 | 188.75 | |
## | 0.00 | 5.47 | 17.98 | |
## | 0.60 | 0.28 | 0.12 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-11 | 975 | 576 | 271 | 1822 |
## | 1086.47 | 566.13 | 169.41 | |
## | 11.44 | 0.17 | 60.92 | |
## | 0.54 | 0.32 | 0.15 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021-12 | 953 | 510 | 275 | 1738 |
## | 1036.38 | 540.03 | 161.60 | |
## | 6.71 | 1.67 | 79.58 | |
## | 0.55 | 0.29 | 0.16 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-01 | 992 | 546 | 172 | 1710 |
## | 1019.68 | 531.33 | 158.99 | |
## | 0.75 | 0.41 | 1.06 | |
## | 0.58 | 0.32 | 0.10 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-02 | 1057 | 583 | 227 | 1867 |
## | 1113.30 | 580.11 | 173.59 | |
## | 2.85 | 0.01 | 16.43 | |
## | 0.57 | 0.31 | 0.12 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-03 | 1177 | 598 | 283 | 2058 |
## | 1227.19 | 639.46 | 191.35 | |
## | 2.05 | 2.69 | 43.90 | |
## | 0.57 | 0.29 | 0.14 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-04 | 1000 | 514 | 199 | 1713 |
## | 1021.47 | 532.26 | 159.27 | |
## | 0.45 | 0.63 | 9.91 | |
## | 0.58 | 0.30 | 0.12 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-05 | 1242 | 841 | 239 | 2322 |
## | 1384.62 | 721.48 | 215.90 | |
## | 14.69 | 19.80 | 2.47 | |
## | 0.53 | 0.36 | 0.10 | 0.03 |
## | 0.02 | 0.03 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-06 | 1234 | 674 | 230 | 2138 |
## | 1274.90 | 664.31 | 198.79 | |
## | 1.31 | 0.14 | 4.90 | |
## | 0.58 | 0.32 | 0.11 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-07 | 1249 | 575 | 213 | 2037 |
## | 1214.67 | 632.93 | 189.40 | |
## | 0.97 | 5.30 | 2.94 | |
## | 0.61 | 0.28 | 0.10 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-08 | 964 | 490 | 153 | 1607 |
## | 958.26 | 499.32 | 149.42 | |
## | 0.03 | 0.17 | 0.09 | |
## | 0.60 | 0.30 | 0.10 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-09 | 1267 | 564 | 201 | 2032 |
## | 1211.69 | 631.38 | 188.93 | |
## | 2.52 | 7.19 | 0.77 | |
## | 0.62 | 0.28 | 0.10 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-10 | 1497 | 721 | 252 | 2470 |
## | 1472.87 | 767.47 | 229.66 | |
## | 0.40 | 2.81 | 2.17 | |
## | 0.61 | 0.29 | 0.10 | 0.03 |
## | 0.03 | 0.03 | 0.03 | |
## | 0.02 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-11 | 1115 | 537 | 190 | 1842 |
## | 1098.39 | 572.34 | 171.27 | |
## | 0.25 | 2.18 | 2.05 | |
## | 0.61 | 0.29 | 0.10 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022-12 | 828 | 494 | 115 | 1437 |
## | 856.89 | 446.50 | 133.61 | |
## | 0.97 | 5.05 | 2.59 | |
## | 0.58 | 0.34 | 0.08 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-01 | 1252 | 551 | 111 | 1914 |
## | 1141.33 | 594.71 | 177.96 | |
## | 10.73 | 3.21 | 25.20 | |
## | 0.65 | 0.29 | 0.06 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-02 | 1014 | 577 | 94 | 1685 |
## | 1004.77 | 523.56 | 156.67 | |
## | 0.08 | 5.46 | 25.07 | |
## | 0.60 | 0.34 | 0.06 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-03 | 1161 | 589 | 141 | 1891 |
## | 1127.61 | 587.57 | 175.82 | |
## | 0.99 | 0.00 | 6.90 | |
## | 0.61 | 0.31 | 0.07 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-04 | 1217 | 578 | 107 | 1902 |
## | 1134.17 | 590.98 | 176.85 | |
## | 6.05 | 0.29 | 27.59 | |
## | 0.64 | 0.30 | 0.06 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-05 | 1276 | 562 | 105 | 1943 |
## | 1158.62 | 603.72 | 180.66 | |
## | 11.89 | 2.88 | 31.68 | |
## | 0.66 | 0.29 | 0.05 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-06 | 1192 | 482 | 117 | 1791 |
## | 1067.98 | 556.49 | 166.52 | |
## | 14.40 | 9.97 | 14.73 | |
## | 0.67 | 0.27 | 0.07 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-07 | 1191 | 470 | 130 | 1791 |
## | 1067.98 | 556.49 | 166.52 | |
## | 14.17 | 13.44 | 8.01 | |
## | 0.66 | 0.26 | 0.07 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-08 | 1002 | 492 | 97 | 1591 |
## | 948.72 | 494.35 | 147.93 | |
## | 2.99 | 0.01 | 17.53 | |
## | 0.63 | 0.31 | 0.06 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-09 | 929 | 358 | 111 | 1398 |
## | 833.63 | 434.38 | 129.98 | |
## | 10.91 | 13.43 | 2.77 | |
## | 0.66 | 0.26 | 0.08 | 0.02 |
## | 0.02 | 0.01 | 0.01 | |
## | 0.01 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-10 | 823 | 337 | 63 | 1223 |
## | 729.28 | 380.01 | 113.71 | |
## | 12.04 | 4.87 | 22.62 | |
## | 0.67 | 0.28 | 0.05 | 0.01 |
## | 0.02 | 0.01 | 0.01 | |
## | 0.01 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-11 | 959 | 284 | 91 | 1334 |
## | 795.47 | 414.50 | 124.03 | |
## | 33.62 | 41.08 | 8.80 | |
## | 0.72 | 0.21 | 0.07 | 0.02 |
## | 0.02 | 0.01 | 0.01 | |
## | 0.01 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023-12 | 178 | 44 | 8 | 230 |
## | 137.15 | 71.46 | 21.39 | |
## | 12.17 | 10.56 | 8.38 | |
## | 0.77 | 0.19 | 0.03 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 52987 | 27610 | 8262 | 88859 |
## | 0.60 | 0.31 | 0.09 | |
## -------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 2956 d.f. = 120 p = 0
##
##
##
## Record Type & Attendance relevance
CrossTable(main_processed$Attendance.Day, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Attendance.Day | Attendance | Cancellation | DNA | Row Total |
## ------------------------------|--------------|--------------|--------------|--------------|
## Friday | 11513 | 6862 | 1693 | 20068 |
## | 12171.90 | 6077.48 | 1818.62 | |
## | 35.67 | 101.27 | 8.68 | |
## | 0.57 | 0.34 | 0.08 | 0.22 |
## | 0.21 | 0.25 | 0.20 | |
## | 0.13 | 0.08 | 0.02 | |
## ------------------------------|--------------|--------------|--------------|--------------|
## Monday | 10189 | 5532 | 2011 | 17732 |
## | 10755.04 | 5370.03 | 1606.93 | |
## | 29.79 | 4.89 | 101.61 | |
## | 0.57 | 0.31 | 0.11 | 0.19 |
## | 0.18 | 0.20 | 0.24 | |
## | 0.11 | 0.06 | 0.02 | |
## ------------------------------|--------------|--------------|--------------|--------------|
## Saturday | 3 | 0 | 0 | 3 |
## | 1.82 | 0.91 | 0.27 | |
## | 0.77 | 0.91 | 0.27 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ------------------------------|--------------|--------------|--------------|--------------|
## Sunday | 1 | 0 | 0 | 1 |
## | 0.61 | 0.30 | 0.09 | |
## | 0.26 | 0.30 | 0.09 | |
## | 1.00 | 0.00 | 0.00 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ------------------------------|--------------|--------------|--------------|--------------|
## Thursday | 12117 | 5229 | 1596 | 18942 |
## | 11488.95 | 5736.47 | 1716.58 | |
## | 34.33 | 44.89 | 8.47 | |
## | 0.64 | 0.28 | 0.08 | 0.21 |
## | 0.22 | 0.19 | 0.19 | |
## | 0.13 | 0.06 | 0.02 | |
## ------------------------------|--------------|--------------|--------------|--------------|
## Tuesday | 14283 | 7958 | 2013 | 24254 |
## | 14710.85 | 7345.18 | 2197.97 | |
## | 12.44 | 51.13 | 15.57 | |
## | 0.59 | 0.33 | 0.08 | 0.27 |
## | 0.26 | 0.29 | 0.24 | |
## | 0.16 | 0.09 | 0.02 | |
## ------------------------------|--------------|--------------|--------------|--------------|
## Wednesday | 7191 | 2029 | 949 | 10169 |
## | 6167.83 | 3079.62 | 921.54 | |
## | 169.73 | 358.42 | 0.82 | |
## | 0.71 | 0.20 | 0.09 | 0.11 |
## | 0.13 | 0.07 | 0.11 | |
## | 0.08 | 0.02 | 0.01 | |
## ------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## ------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 980 d.f. = 12 p = 3.2e-202
##
##
##
CrossTable(main_processed$Attendance.Month, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Attendance.Month | Attendance | Cancellation | DNA | Row Total |
## --------------------------------|--------------|--------------|--------------|--------------|
## April | 3533 | 2031 | 572 | 6136 |
## | 3721.69 | 1858.25 | 556.06 | |
## | 9.57 | 16.06 | 0.46 | |
## | 0.58 | 0.33 | 0.09 | 0.07 |
## | 0.06 | 0.07 | 0.07 | |
## | 0.04 | 0.02 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## August | 5240 | 2877 | 693 | 8810 |
## | 5343.56 | 2668.06 | 798.39 | |
## | 2.01 | 16.36 | 13.91 | |
## | 0.59 | 0.33 | 0.08 | 0.10 |
## | 0.09 | 0.10 | 0.08 | |
## | 0.06 | 0.03 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## December | 3711 | 2081 | 583 | 6375 |
## | 3866.65 | 1930.63 | 577.72 | |
## | 6.27 | 11.71 | 0.05 | |
## | 0.58 | 0.33 | 0.09 | 0.07 |
## | 0.07 | 0.08 | 0.07 | |
## | 0.04 | 0.02 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## February | 4586 | 1846 | 677 | 7109 |
## | 4311.84 | 2152.92 | 644.24 | |
## | 17.43 | 43.75 | 1.67 | |
## | 0.65 | 0.26 | 0.10 | 0.08 |
## | 0.08 | 0.07 | 0.08 | |
## | 0.05 | 0.02 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## January | 4703 | 1701 | 650 | 7054 |
## | 4278.48 | 2136.26 | 639.25 | |
## | 42.12 | 88.68 | 0.18 | |
## | 0.67 | 0.24 | 0.09 | 0.08 |
## | 0.09 | 0.06 | 0.08 | |
## | 0.05 | 0.02 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## July | 4699 | 2412 | 753 | 7864 |
## | 4769.77 | 2381.57 | 712.66 | |
## | 1.05 | 0.39 | 2.28 | |
## | 0.60 | 0.31 | 0.10 | 0.09 |
## | 0.08 | 0.09 | 0.09 | |
## | 0.05 | 0.03 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## June | 4545 | 2288 | 644 | 7477 |
## | 4535.05 | 2264.37 | 677.59 | |
## | 0.02 | 0.25 | 1.66 | |
## | 0.61 | 0.31 | 0.09 | 0.08 |
## | 0.08 | 0.08 | 0.08 | |
## | 0.05 | 0.03 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## March | 4298 | 2444 | 627 | 7369 |
## | 4469.54 | 2231.66 | 667.80 | |
## | 6.58 | 20.20 | 2.49 | |
## | 0.58 | 0.33 | 0.09 | 0.08 |
## | 0.08 | 0.09 | 0.08 | |
## | 0.05 | 0.03 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## May | 4278 | 2003 | 651 | 6932 |
## | 4204.49 | 2099.32 | 628.20 | |
## | 1.29 | 4.42 | 0.83 | |
## | 0.62 | 0.29 | 0.09 | 0.08 |
## | 0.08 | 0.07 | 0.08 | |
## | 0.05 | 0.02 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## November | 5237 | 2753 | 748 | 8738 |
## | 5299.88 | 2646.25 | 791.86 | |
## | 0.75 | 4.31 | 2.43 | |
## | 0.60 | 0.32 | 0.09 | 0.10 |
## | 0.09 | 0.10 | 0.09 | |
## | 0.06 | 0.03 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## October | 4871 | 2436 | 741 | 8048 |
## | 4881.38 | 2437.29 | 729.33 | |
## | 0.02 | 0.00 | 0.19 | |
## | 0.61 | 0.30 | 0.09 | 0.09 |
## | 0.09 | 0.09 | 0.09 | |
## | 0.05 | 0.03 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## September | 5596 | 2738 | 923 | 9257 |
## | 5614.68 | 2803.43 | 838.90 | |
## | 0.06 | 1.53 | 8.43 | |
## | 0.60 | 0.30 | 0.10 | 0.10 |
## | 0.10 | 0.10 | 0.11 | |
## | 0.06 | 0.03 | 0.01 | |
## --------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## --------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 329 d.f. = 22 p = 1.3e-56
##
##
##
CrossTable(main_processed$Attendance.Year, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Attendance.Year | Attendance | Cancellation | DNA | Row Total |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2020 | 13220 | 5686 | 1066 | 19972 |
## | 12113.68 | 6048.40 | 1809.92 | |
## | 101.04 | 21.71 | 305.77 | |
## | 0.66 | 0.28 | 0.05 | 0.22 |
## | 0.24 | 0.21 | 0.13 | |
## | 0.15 | 0.06 | 0.01 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2021 | 14420 | 7180 | 3001 | 24601 |
## | 14921.32 | 7450.27 | 2229.41 | |
## | 16.84 | 9.80 | 267.04 | |
## | 0.59 | 0.29 | 0.12 | 0.27 |
## | 0.26 | 0.26 | 0.36 | |
## | 0.16 | 0.08 | 0.03 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2022 | 13614 | 7149 | 2849 | 23612 |
## | 14321.46 | 7150.76 | 2139.79 | |
## | 34.95 | 0.00 | 235.06 | |
## | 0.58 | 0.30 | 0.12 | 0.26 |
## | 0.25 | 0.26 | 0.34 | |
## | 0.15 | 0.08 | 0.03 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## 2023 | 14043 | 7595 | 1346 | 22984 |
## | 13940.55 | 6960.57 | 2082.88 | |
## | 0.75 | 57.83 | 260.69 | |
## | 0.61 | 0.33 | 0.06 | 0.25 |
## | 0.25 | 0.28 | 0.16 | |
## | 0.15 | 0.08 | 0.01 | |
## -------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## -------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1311 d.f. = 6 p = 3.5e-280
##
##
##
CrossTable(main_processed$Attendance.MonthYear, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Attendance.MonthYear | Attendance | Cancellation | DNA | Row Total |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 01-2020 | 1403 | 113 | 46 | 1562 |
## | 947.40 | 473.04 | 141.55 | |
## | 219.09 | 274.04 | 64.50 | |
## | 0.90 | 0.07 | 0.03 | 0.02 |
## | 0.03 | 0.00 | 0.01 | |
## | 0.02 | 0.00 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 01-2021 | 976 | 508 | 186 | 1670 |
## | 1012.91 | 505.75 | 151.34 | |
## | 1.34 | 0.01 | 7.94 | |
## | 0.58 | 0.30 | 0.11 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 01-2022 | 1020 | 505 | 253 | 1778 |
## | 1078.42 | 538.46 | 161.13 | |
## | 3.16 | 2.08 | 52.38 | |
## | 0.57 | 0.28 | 0.14 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 01-2023 | 1304 | 575 | 165 | 2044 |
## | 1239.75 | 619.01 | 185.23 | |
## | 3.33 | 3.13 | 2.21 | |
## | 0.64 | 0.28 | 0.08 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 02-2020 | 1280 | 265 | 96 | 1641 |
## | 995.32 | 496.97 | 148.71 | |
## | 81.42 | 108.27 | 18.68 | |
## | 0.78 | 0.16 | 0.06 | 0.02 |
## | 0.02 | 0.01 | 0.01 | |
## | 0.01 | 0.00 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 02-2021 | 1117 | 414 | 215 | 1746 |
## | 1059.01 | 528.77 | 158.23 | |
## | 3.18 | 24.91 | 20.37 | |
## | 0.64 | 0.24 | 0.12 | 0.02 |
## | 0.02 | 0.01 | 0.03 | |
## | 0.01 | 0.00 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 02-2022 | 1026 | 620 | 262 | 1908 |
## | 1157.26 | 577.83 | 172.91 | |
## | 14.89 | 3.08 | 45.90 | |
## | 0.54 | 0.32 | 0.14 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 02-2023 | 1163 | 547 | 104 | 1814 |
## | 1100.25 | 549.36 | 164.39 | |
## | 3.58 | 0.01 | 22.18 | |
## | 0.64 | 0.30 | 0.06 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 03-2020 | 690 | 686 | 67 | 1443 |
## | 875.23 | 437.00 | 130.77 | |
## | 39.20 | 141.87 | 31.10 | |
## | 0.48 | 0.48 | 0.05 | 0.02 |
## | 0.01 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 03-2021 | 1332 | 525 | 174 | 2031 |
## | 1231.87 | 615.08 | 184.06 | |
## | 8.14 | 13.19 | 0.55 | |
## | 0.66 | 0.26 | 0.09 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 03-2022 | 1071 | 671 | 247 | 1989 |
## | 1206.39 | 602.36 | 180.25 | |
## | 15.20 | 7.82 | 24.72 | |
## | 0.54 | 0.34 | 0.12 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 03-2023 | 1205 | 562 | 139 | 1906 |
## | 1156.05 | 577.22 | 172.73 | |
## | 2.07 | 0.40 | 6.59 | |
## | 0.63 | 0.29 | 0.07 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 04-2020 | 290 | 562 | 14 | 866 |
## | 525.26 | 262.26 | 78.48 | |
## | 105.37 | 342.57 | 52.98 | |
## | 0.33 | 0.65 | 0.02 | 0.01 |
## | 0.01 | 0.02 | 0.00 | |
## | 0.00 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 04-2021 | 1164 | 450 | 187 | 1801 |
## | 1092.37 | 545.42 | 163.21 | |
## | 4.70 | 16.69 | 3.47 | |
## | 0.65 | 0.25 | 0.10 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.00 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 04-2022 | 1074 | 446 | 273 | 1793 |
## | 1087.51 | 543.00 | 162.49 | |
## | 0.17 | 17.33 | 75.16 | |
## | 0.60 | 0.25 | 0.15 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.00 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 04-2023 | 1005 | 573 | 98 | 1676 |
## | 1016.55 | 507.57 | 151.88 | |
## | 0.13 | 8.44 | 19.12 | |
## | 0.60 | 0.34 | 0.06 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 05-2020 | 564 | 250 | 33 | 847 |
## | 513.73 | 256.51 | 76.76 | |
## | 4.92 | 0.17 | 24.95 | |
## | 0.67 | 0.30 | 0.04 | 0.01 |
## | 0.01 | 0.01 | 0.00 | |
## | 0.01 | 0.00 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 05-2021 | 1109 | 448 | 227 | 1784 |
## | 1082.05 | 540.27 | 161.67 | |
## | 0.67 | 15.76 | 26.40 | |
## | 0.62 | 0.25 | 0.13 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.00 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 05-2022 | 1215 | 640 | 271 | 2126 |
## | 1289.49 | 643.85 | 192.66 | |
## | 4.30 | 0.02 | 31.85 | |
## | 0.57 | 0.30 | 0.13 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 05-2023 | 1390 | 665 | 120 | 2175 |
## | 1319.21 | 658.69 | 197.10 | |
## | 3.80 | 0.06 | 30.16 | |
## | 0.64 | 0.31 | 0.06 | 0.02 |
## | 0.03 | 0.02 | 0.01 | |
## | 0.02 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 06-2020 | 1132 | 420 | 43 | 1595 |
## | 967.42 | 483.04 | 144.54 | |
## | 28.00 | 8.23 | 71.34 | |
## | 0.71 | 0.26 | 0.03 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.00 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 06-2021 | 1200 | 504 | 281 | 1985 |
## | 1203.97 | 601.15 | 179.89 | |
## | 0.01 | 15.70 | 56.84 | |
## | 0.60 | 0.25 | 0.14 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 06-2022 | 1033 | 750 | 220 | 2003 |
## | 1214.89 | 606.60 | 181.52 | |
## | 27.23 | 33.90 | 8.16 | |
## | 0.52 | 0.37 | 0.11 | 0.02 |
## | 0.02 | 0.03 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 06-2023 | 1180 | 614 | 100 | 1894 |
## | 1148.77 | 573.59 | 171.64 | |
## | 0.85 | 2.85 | 29.90 | |
## | 0.62 | 0.32 | 0.05 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 07-2020 | 1472 | 478 | 148 | 2098 |
## | 1272.51 | 635.37 | 190.13 | |
## | 31.28 | 38.98 | 9.33 | |
## | 0.70 | 0.23 | 0.07 | 0.02 |
## | 0.03 | 0.02 | 0.02 | |
## | 0.02 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 07-2021 | 1198 | 641 | 327 | 2166 |
## | 1313.75 | 655.96 | 196.29 | |
## | 10.20 | 0.34 | 87.04 | |
## | 0.55 | 0.30 | 0.15 | 0.02 |
## | 0.02 | 0.02 | 0.04 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 07-2022 | 991 | 636 | 181 | 1808 |
## | 1096.61 | 547.54 | 163.85 | |
## | 10.17 | 14.29 | 1.80 | |
## | 0.55 | 0.35 | 0.10 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 07-2023 | 1038 | 657 | 97 | 1792 |
## | 1086.91 | 542.70 | 162.40 | |
## | 2.20 | 24.07 | 26.33 | |
## | 0.58 | 0.37 | 0.05 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 08-2020 | 1336 | 491 | 112 | 1939 |
## | 1176.07 | 587.21 | 175.72 | |
## | 21.75 | 15.76 | 23.11 | |
## | 0.69 | 0.25 | 0.06 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 08-2021 | 1412 | 993 | 235 | 2640 |
## | 1601.25 | 799.51 | 239.24 | |
## | 22.37 | 46.83 | 0.08 | |
## | 0.53 | 0.38 | 0.09 | 0.03 |
## | 0.03 | 0.04 | 0.03 | |
## | 0.02 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 08-2022 | 1225 | 594 | 234 | 2053 |
## | 1245.21 | 621.74 | 186.05 | |
## | 0.33 | 1.24 | 12.36 | |
## | 0.60 | 0.29 | 0.11 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 08-2023 | 1267 | 799 | 112 | 2178 |
## | 1321.03 | 659.59 | 197.38 | |
## | 2.21 | 29.46 | 36.93 | |
## | 0.58 | 0.37 | 0.05 | 0.02 |
## | 0.02 | 0.03 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 09-2020 | 1496 | 547 | 164 | 2207 |
## | 1338.62 | 668.38 | 200.00 | |
## | 18.50 | 22.04 | 6.48 | |
## | 0.68 | 0.25 | 0.07 | 0.02 |
## | 0.03 | 0.02 | 0.02 | |
## | 0.02 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 09-2021 | 1475 | 859 | 365 | 2699 |
## | 1637.03 | 817.38 | 244.59 | |
## | 16.04 | 2.12 | 59.28 | |
## | 0.55 | 0.32 | 0.14 | 0.03 |
## | 0.03 | 0.03 | 0.04 | |
## | 0.02 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 09-2022 | 1419 | 558 | 261 | 2238 |
## | 1357.42 | 677.77 | 202.81 | |
## | 2.79 | 21.16 | 16.69 | |
## | 0.63 | 0.25 | 0.12 | 0.02 |
## | 0.03 | 0.02 | 0.03 | |
## | 0.02 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 09-2023 | 1206 | 774 | 133 | 2113 |
## | 1281.60 | 639.91 | 191.49 | |
## | 4.46 | 28.10 | 17.86 | |
## | 0.57 | 0.37 | 0.06 | 0.02 |
## | 0.02 | 0.03 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 10-2020 | 1224 | 657 | 133 | 2014 |
## | 1221.56 | 609.93 | 182.51 | |
## | 0.00 | 3.63 | 13.43 | |
## | 0.61 | 0.33 | 0.07 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 10-2021 | 1251 | 615 | 265 | 2131 |
## | 1292.52 | 645.36 | 193.12 | |
## | 1.33 | 1.43 | 26.76 | |
## | 0.59 | 0.29 | 0.12 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 10-2022 | 1170 | 600 | 225 | 1995 |
## | 1210.03 | 604.17 | 180.79 | |
## | 1.32 | 0.03 | 10.81 | |
## | 0.59 | 0.30 | 0.11 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 10-2023 | 1226 | 564 | 118 | 1908 |
## | 1157.26 | 577.83 | 172.91 | |
## | 4.08 | 0.33 | 17.44 | |
## | 0.64 | 0.30 | 0.06 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 11-2020 | 1307 | 671 | 99 | 2077 |
## | 1259.77 | 629.01 | 188.22 | |
## | 1.77 | 2.80 | 42.29 | |
## | 0.63 | 0.32 | 0.05 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 11-2021 | 1299 | 700 | 300 | 2299 |
## | 1394.42 | 696.24 | 208.34 | |
## | 6.53 | 0.02 | 40.32 | |
## | 0.57 | 0.30 | 0.13 | 0.03 |
## | 0.02 | 0.03 | 0.04 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 11-2022 | 1451 | 699 | 255 | 2405 |
## | 1458.71 | 728.34 | 217.95 | |
## | 0.04 | 1.18 | 6.30 | |
## | 0.60 | 0.29 | 0.11 | 0.03 |
## | 0.03 | 0.03 | 0.03 | |
## | 0.02 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 11-2023 | 1180 | 683 | 94 | 1957 |
## | 1186.98 | 592.67 | 177.35 | |
## | 0.04 | 13.77 | 39.17 | |
## | 0.60 | 0.35 | 0.05 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 12-2020 | 1026 | 546 | 111 | 1683 |
## | 1020.79 | 509.69 | 152.52 | |
## | 0.03 | 2.59 | 11.30 | |
## | 0.61 | 0.32 | 0.07 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 12-2021 | 887 | 523 | 239 | 1649 |
## | 1000.17 | 499.39 | 149.44 | |
## | 12.81 | 1.12 | 53.68 | |
## | 0.54 | 0.32 | 0.14 | 0.02 |
## | 0.02 | 0.02 | 0.03 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 12-2022 | 919 | 430 | 167 | 1516 |
## | 919.50 | 459.11 | 137.38 | |
## | 0.00 | 1.85 | 6.38 | |
## | 0.61 | 0.28 | 0.11 | 0.02 |
## | 0.02 | 0.02 | 0.02 | |
## | 0.01 | 0.00 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## 12-2023 | 879 | 582 | 66 | 1527 |
## | 926.18 | 462.44 | 138.38 | |
## | 2.40 | 30.91 | 37.86 | |
## | 0.58 | 0.38 | 0.04 | 0.02 |
## | 0.02 | 0.02 | 0.01 | |
## | 0.01 | 0.01 | 0.00 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## ------------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 3422 d.f. = 94 p = 0
##
##
##
CrossTable(main_processed$Attendance.Type_recode, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Attendance.Type_recode | Attendance | Cancellation | DNA | Row Total |
## --------------------------------------|--------------|--------------|--------------|--------------|
## NEW | 30503 | 7191 | 4094 | 41788 |
## | 25345.80 | 12655.25 | 3786.95 | |
## | 1049.35 | 2359.34 | 24.90 | |
## | 0.73 | 0.17 | 0.10 | 0.46 |
## | 0.55 | 0.26 | 0.50 | |
## | 0.33 | 0.08 | 0.04 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## RETURN | 21183 | 20419 | 4168 | 45770 |
## | 27761.01 | 13861.18 | 4147.81 | |
## | 1558.67 | 3102.55 | 0.10 | |
## | 0.46 | 0.45 | 0.09 | 0.50 |
## | 0.38 | 0.74 | 0.50 | |
## | 0.23 | 0.22 | 0.05 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## VIRTUAL RETURN | 3001 | 0 | 0 | 3001 |
## | 1820.21 | 908.84 | 271.96 | |
## | 766.00 | 908.84 | 271.96 | |
## | 1.00 | 0.00 | 0.00 | 0.03 |
## | 0.05 | 0.00 | 0.00 | |
## | 0.03 | 0.00 | 0.00 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## VIRTUAL(New_Return) | 610 | 0 | 0 | 610 |
## | 369.99 | 184.73 | 55.28 | |
## | 155.70 | 184.73 | 55.28 | |
## | 1.00 | 0.00 | 0.00 | 0.01 |
## | 0.01 | 0.00 | 0.00 | |
## | 0.01 | 0.00 | 0.00 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## --------------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 10437 d.f. = 6 p = 0
##
##
##
## Record Type & difference of days
bartlett.test(main_processed$daysDiff_attendanceAppoint,main_processed$Record.Type)
##
## Bartlett test of homogeneity of variances
##
## data: main_processed$daysDiff_attendanceAppoint and main_processed$Record.Type
## Bartlett's K-squared = 400, df = 1, p-value <2e-16
kruskal.test(main_processed$daysDiff_attendanceAppoint ~ main_processed$Record.Type, data=main_processed)
##
## Kruskal-Wallis rank sum test
##
## data: main_processed$daysDiff_attendanceAppoint by main_processed$Record.Type
## Kruskal-Wallis chi-squared = 21, df = 1, p-value = 4e-06
dunn_result <- dunn.test(main_processed$daysDiff_attendanceAppoint, g=main_processed$Record.Type, method="bonferroni")
## Kruskal-Wallis rank sum test
##
## data: x and group
## Kruskal-Wallis chi-squared = 21.4254, df = 1, p-value = 0
##
##
## Comparison of x by group
## (Bonferroni)
## Col Mean-|
## Row Mean | Cancella
## ---------+-----------
## DNA | 4.628757
## | 0.0000*
##
## alpha = 0.05
## Reject Ho if p <= alpha/2
bartlett.test(main_processed$daysDiff_attendanceBooked,main_processed$Record.Type)
##
## Bartlett test of homogeneity of variances
##
## data: main_processed$daysDiff_attendanceBooked and main_processed$Record.Type
## Bartlett's K-squared = 396, df = 2, p-value <2e-16
kruskal.test(main_processed$daysDiff_attendanceBooked ~ main_processed$Record.Type, data=main_processed)
##
## Kruskal-Wallis rank sum test
##
## data: main_processed$daysDiff_attendanceBooked by main_processed$Record.Type
## Kruskal-Wallis chi-squared = 393, df = 2, p-value <2e-16
dunn_result <- dunn.test(main_processed$daysDiff_attendanceBooked, g=main_processed$Record.Type, method="bonferroni")
## Kruskal-Wallis rank sum test
##
## data: x and group
## Kruskal-Wallis chi-squared = 392.5006, df = 2, p-value = 0
##
##
## Comparison of x by group
## (Bonferroni)
## Col Mean-|
## Row Mean | Attendan Cancella
## ---------+----------------------
## Cancella | 19.77196
## | 0.0000*
## |
## DNA | 5.473924 -6.539591
## | 0.0000* 0.0000*
##
## alpha = 0.05
## Reject Ho if p <= alpha/2
## Record Type & Patient characteristics relevance
CrossTable(main_processed$Gender, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Gender | Attendance | Cancellation | DNA | Row Total |
## ----------------------|--------------|--------------|--------------|--------------|
## Female | 54247 | 27241 | 8023 | 89511 |
## | 54291.37 | 27107.88 | 8111.75 | |
## | 0.04 | 0.65 | 0.97 | |
## | 0.61 | 0.30 | 0.09 | 0.98 |
## | 0.98 | 0.99 | 0.97 | |
## | 0.60 | 0.30 | 0.09 | |
## ----------------------|--------------|--------------|--------------|--------------|
## Male | 1048 | 367 | 238 | 1653 |
## | 1002.60 | 500.60 | 149.80 | |
## | 2.06 | 35.66 | 51.93 | |
## | 0.63 | 0.22 | 0.14 | 0.02 |
## | 0.02 | 0.01 | 0.03 | |
## | 0.01 | 0.00 | 0.00 | |
## ----------------------|--------------|--------------|--------------|--------------|
## Unknown | 2 | 2 | 1 | 5 |
## | 3.03 | 1.51 | 0.45 | |
## | 0.35 | 0.16 | 0.66 | |
## | 0.40 | 0.40 | 0.20 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ----------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## ----------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 92 d.f. = 4 p = 3.9e-19
##
##
##
CrossTable(main_processed$Age.at.Attendance.Cat.HSE, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE) #age group
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Age.at.Attendance.Cat.HSE | Attendance | Cancellation | DNA | Row Total |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## 0 - 4 | 0 | 7 | 5 | 12 |
## | 7.28 | 3.63 | 1.09 | |
## | 7.28 | 3.12 | 14.08 | |
## | 0.00 | 0.58 | 0.42 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## 10 - 14 | 103 | 38 | 11 | 152 |
## | 92.19 | 46.03 | 13.77 | |
## | 1.27 | 1.40 | 0.56 | |
## | 0.68 | 0.25 | 0.07 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## 15 - 24 | 2035 | 742 | 480 | 3257 |
## | 1975.48 | 986.36 | 295.16 | |
## | 1.79 | 60.54 | 115.76 | |
## | 0.62 | 0.23 | 0.15 | 0.04 |
## | 0.04 | 0.03 | 0.06 | |
## | 0.02 | 0.01 | 0.01 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## 25 - 34 | 5909 | 2318 | 1390 | 9617 |
## | 5833.03 | 2912.45 | 871.52 | |
## | 0.99 | 121.33 | 308.45 | |
## | 0.61 | 0.24 | 0.14 | 0.11 |
## | 0.11 | 0.08 | 0.17 | |
## | 0.06 | 0.03 | 0.02 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## 35 - 44 | 11825 | 5368 | 1842 | 19035 |
## | 11545.35 | 5764.64 | 1725.01 | |
## | 6.77 | 27.29 | 7.93 | |
## | 0.62 | 0.28 | 0.10 | 0.21 |
## | 0.21 | 0.19 | 0.22 | |
## | 0.13 | 0.06 | 0.02 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## 45 - 54 | 13179 | 6739 | 1693 | 21611 |
## | 13107.78 | 6544.77 | 1958.45 | |
## | 0.39 | 5.76 | 35.98 | |
## | 0.61 | 0.31 | 0.08 | 0.24 |
## | 0.24 | 0.24 | 0.20 | |
## | 0.14 | 0.07 | 0.02 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## 55 - 64 | 10736 | 6065 | 1350 | 18151 |
## | 11009.18 | 5496.92 | 1644.90 | |
## | 6.78 | 58.71 | 52.87 | |
## | 0.59 | 0.33 | 0.07 | 0.20 |
## | 0.19 | 0.22 | 0.16 | |
## | 0.12 | 0.07 | 0.01 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## 65 - 74 | 7540 | 4130 | 887 | 12557 |
## | 7616.23 | 3802.81 | 1137.95 | |
## | 0.76 | 28.15 | 55.34 | |
## | 0.60 | 0.33 | 0.07 | 0.14 |
## | 0.14 | 0.15 | 0.11 | |
## | 0.08 | 0.05 | 0.01 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## 75 - 84 | 3259 | 1647 | 434 | 5340 |
## | 3238.89 | 1617.19 | 483.93 | |
## | 0.12 | 0.55 | 5.15 | |
## | 0.61 | 0.31 | 0.08 | 0.06 |
## | 0.06 | 0.06 | 0.05 | |
## | 0.04 | 0.02 | 0.00 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## 85 >= | 711 | 556 | 170 | 1437 |
## | 871.59 | 435.19 | 130.23 | |
## | 29.59 | 33.54 | 12.15 | |
## | 0.49 | 0.39 | 0.12 | 0.02 |
## | 0.01 | 0.02 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## -----------------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1004 d.f. = 18 p = 8e-202
##
##
##
bartlett.test(main_processed$Age.at.Attendance,main_processed$Record.Type) # unequal variances
##
## Bartlett test of homogeneity of variances
##
## data: main_processed$Age.at.Attendance and main_processed$Record.Type
## Bartlett's K-squared = 121, df = 2, p-value <2e-16
kruskal.test(main_processed$Age.at.Attendance ~ main_processed$Record.Type, data=main_processed)
##
## Kruskal-Wallis rank sum test
##
## data: main_processed$Age.at.Attendance by main_processed$Record.Type
## Kruskal-Wallis chi-squared = 629, df = 2, p-value <2e-16
dunn_result <- dunn.test(main_processed$Age.at.Attendance, g=main_processed$Record.Type, method="bonferroni") #run library(dunn.test) for this test
## Kruskal-Wallis rank sum test
##
## data: x and group
## Kruskal-Wallis chi-squared = 629.039, df = 2, p-value = 0
##
##
## Comparison of x by group
## (Bonferroni)
## Col Mean-|
## Row Mean | Attendan Cancella
## ---------+----------------------
## Cancella | -15.87345
## | 0.0000*
## |
## DNA | 15.69074 24.08614
## | 0.0000* 0.0000*
##
## alpha = 0.05
## Reject Ho if p <= alpha/2
CrossTable(main_processed$Area.of.Residence_recode, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$Area.of.Residence_recode | Attendance | Cancellation | DNA | Row Total |
## ---------------------------------------------|--------------|--------------|--------------|--------------|
## DUBLIN NTH | 25186 | 12203 | 3910 | 41299 |
## | 25049.20 | 12507.16 | 3742.64 | |
## | 0.75 | 7.40 | 7.48 | |
## | 0.61 | 0.30 | 0.09 | 0.45 |
## | 0.46 | 0.44 | 0.47 | |
## | 0.28 | 0.13 | 0.04 | |
## ---------------------------------------------|--------------|--------------|--------------|--------------|
## DUBLIN STH | 1374 | 661 | 303 | 2338 |
## | 1418.07 | 708.05 | 211.88 | |
## | 1.37 | 3.13 | 39.19 | |
## | 0.59 | 0.28 | 0.13 | 0.03 |
## | 0.02 | 0.02 | 0.04 | |
## | 0.02 | 0.01 | 0.00 | |
## ---------------------------------------------|--------------|--------------|--------------|--------------|
## EASTERN & MIDLAND REGION (excl.Dublin,Meath) | 12594 | 6689 | 1785 | 21068 |
## | 12778.44 | 6380.32 | 1909.24 | |
## | 2.66 | 14.93 | 8.09 | |
## | 0.60 | 0.32 | 0.08 | 0.23 |
## | 0.23 | 0.24 | 0.22 | |
## | 0.14 | 0.07 | 0.02 | |
## ---------------------------------------------|--------------|--------------|--------------|--------------|
## Meath | 8955 | 4223 | 1246 | 14424 |
## | 8748.63 | 4368.22 | 1307.14 | |
## | 4.87 | 4.83 | 2.86 | |
## | 0.62 | 0.29 | 0.09 | 0.16 |
## | 0.16 | 0.15 | 0.15 | |
## | 0.10 | 0.05 | 0.01 | |
## ---------------------------------------------|--------------|--------------|--------------|--------------|
## NORTHERN WESTERN REGION | 5948 | 3002 | 816 | 9766 |
## | 5923.40 | 2957.58 | 885.02 | |
## | 0.10 | 0.67 | 5.38 | |
## | 0.61 | 0.31 | 0.08 | 0.11 |
## | 0.11 | 0.11 | 0.10 | |
## | 0.07 | 0.03 | 0.01 | |
## ---------------------------------------------|--------------|--------------|--------------|--------------|
## OUTSIDE IRELAND | 10 | 13 | 1 | 24 |
## | 14.56 | 7.27 | 2.17 | |
## | 1.43 | 4.52 | 0.63 | |
## | 0.42 | 0.54 | 0.04 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------------------------|--------------|--------------|--------------|--------------|
## SOUTHERN REGION | 1127 | 762 | 174 | 2063 |
## | 1251.28 | 624.77 | 186.96 | |
## | 12.34 | 30.14 | 0.90 | |
## | 0.55 | 0.37 | 0.08 | 0.02 |
## | 0.02 | 0.03 | 0.02 | |
## | 0.01 | 0.01 | 0.00 | |
## ---------------------------------------------|--------------|--------------|--------------|--------------|
## UNKNOWN | 103 | 57 | 27 | 187 |
## | 113.42 | 56.63 | 16.95 | |
## | 0.96 | 0.00 | 5.96 | |
## | 0.55 | 0.30 | 0.14 | 0.00 |
## | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.00 | |
## ---------------------------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## ---------------------------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 161 d.f. = 14 p = 5.4e-27
##
##
##
CrossTable(main_processed$addressDiff, main_processed$Record.Type, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Record.Type
## main_processed$addressDiff | Attendance | Cancellation | DNA | Row Total |
## ---------------------------|--------------|--------------|--------------|--------------|
## 0 | 45893 | 22567 | 6397 | 74857 |
## | 45403.23 | 22670.01 | 6783.76 | |
## | 5.28 | 0.47 | 22.05 | |
## | 0.61 | 0.30 | 0.09 | 0.82 |
## | 0.83 | 0.82 | 0.77 | |
## | 0.50 | 0.25 | 0.07 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## 1 | 9404 | 5043 | 1865 | 16312 |
## | 9893.77 | 4939.99 | 1478.24 | |
## | 24.24 | 2.15 | 101.19 | |
## | 0.58 | 0.31 | 0.11 | 0.18 |
## | 0.17 | 0.18 | 0.23 | |
## | 0.10 | 0.06 | 0.02 | |
## ---------------------------|--------------|--------------|--------------|--------------|
## Column Total | 55297 | 27610 | 8262 | 91169 |
## | 0.61 | 0.30 | 0.09 | |
## ---------------------------|--------------|--------------|--------------|--------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 155 d.f. = 2 p = 1.8e-34
##
##
##
# cancellation (No.Cancels=1) & DNA (No.Cancels=0)
## clinic relevance
CrossTable(main_processed$Clinic.Type_recode, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Clinic.Type_recode | 0 | 1 | Row Total |
## ----------------------------------|-----------|-----------|-----------|
## FRA | 13 | 65 | 78 |
## | 17.96 | 60.04 | |
## | 1.37 | 0.41 | |
## | 0.17 | 0.83 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|
## GEN | 9 | 1 | 10 |
## | 2.30 | 7.70 | |
## | 19.47 | 5.83 | |
## | 0.90 | 0.10 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|
## MED | 1933 | 2288 | 4221 |
## | 972.18 | 3248.82 | |
## | 949.60 | 284.16 | |
## | 0.46 | 0.54 | 0.12 |
## | 0.23 | 0.08 | |
## | 0.05 | 0.06 | |
## ----------------------------------|-----------|-----------|-----------|
## SBC | 3299 | 19214 | 22513 |
## | 5185.17 | 17327.83 | |
## | 686.12 | 205.31 | |
## | 0.15 | 0.85 | 0.63 |
## | 0.40 | 0.70 | |
## | 0.09 | 0.54 | |
## ----------------------------------|-----------|-----------|-----------|
## TRI | 3008 | 6042 | 9050 |
## | 2084.39 | 6965.61 | |
## | 409.26 | 122.47 | |
## | 0.33 | 0.67 | 0.25 |
## | 0.36 | 0.22 | |
## | 0.08 | 0.17 | |
## ----------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## ----------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 2684 d.f. = 4 p = 0
##
##
##
CrossTable(main_processed$Clinic.Code, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Clinic.Code | 0 | 1 | Row Total |
## ---------------------------|-----------|-----------|-----------|
## 424 | 910 | 3758 | 4668 |
## | 1075.13 | 3592.87 | |
## | 25.36 | 7.59 | |
## | 0.19 | 0.81 | 0.13 |
## | 0.11 | 0.14 | |
## | 0.03 | 0.10 | |
## ---------------------------|-----------|-----------|-----------|
## 440 | 9 | 1 | 10 |
## | 2.30 | 7.70 | |
## | 19.47 | 5.83 | |
## | 0.90 | 0.10 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------|-----------|-----------|-----------|
## 441 | 1022 | 4725 | 5747 |
## | 1323.64 | 4423.36 | |
## | 68.74 | 20.57 | |
## | 0.18 | 0.82 | 0.16 |
## | 0.12 | 0.17 | |
## | 0.03 | 0.13 | |
## ---------------------------|-----------|-----------|-----------|
## 526 | 405 | 526 | 931 |
## | 214.43 | 716.57 | |
## | 169.37 | 50.68 | |
## | 0.44 | 0.56 | 0.03 |
## | 0.05 | 0.02 | |
## | 0.01 | 0.01 | |
## ---------------------------|-----------|-----------|-----------|
## 527 | 559 | 1408 | 1967 |
## | 453.04 | 1513.96 | |
## | 24.78 | 7.42 | |
## | 0.28 | 0.72 | 0.05 |
## | 0.07 | 0.05 | |
## | 0.02 | 0.04 | |
## ---------------------------|-----------|-----------|-----------|
## 757 | 652 | 5477 | 6129 |
## | 1411.62 | 4717.38 | |
## | 408.77 | 122.32 | |
## | 0.11 | 0.89 | 0.17 |
## | 0.08 | 0.20 | |
## | 0.02 | 0.15 | |
## ---------------------------|-----------|-----------|-----------|
## 768 | 1 | 7 | 8 |
## | 1.84 | 6.16 | |
## | 0.39 | 0.12 | |
## | 0.12 | 0.88 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------|-----------|-----------|-----------|
## 771 | 759 | 1658 | 2417 |
## | 556.68 | 1860.32 | |
## | 73.53 | 22.00 | |
## | 0.31 | 0.69 | 0.07 |
## | 0.09 | 0.06 | |
## | 0.02 | 0.05 | |
## ---------------------------|-----------|-----------|-----------|
## 932 | 381 | 581 | 962 |
## | 221.57 | 740.43 | |
## | 114.72 | 34.33 | |
## | 0.40 | 0.60 | 0.03 |
## | 0.05 | 0.02 | |
## | 0.01 | 0.02 | |
## ---------------------------|-----------|-----------|-----------|
## 933 | 400 | 565 | 965 |
## | 222.26 | 742.74 | |
## | 142.14 | 42.53 | |
## | 0.41 | 0.59 | 0.03 |
## | 0.05 | 0.02 | |
## | 0.01 | 0.02 | |
## ---------------------------|-----------|-----------|-----------|
## 934 | 335 | 361 | 696 |
## | 160.30 | 535.70 | |
## | 190.39 | 56.97 | |
## | 0.48 | 0.52 | 0.02 |
## | 0.04 | 0.01 | |
## | 0.01 | 0.01 | |
## ---------------------------|-----------|-----------|-----------|
## 1132 | 551 | 621 | 1172 |
## | 269.93 | 902.07 | |
## | 292.66 | 87.57 | |
## | 0.47 | 0.53 | 0.03 |
## | 0.07 | 0.02 | |
## | 0.02 | 0.02 | |
## ---------------------------|-----------|-----------|-----------|
## 1133 | 581 | 4704 | 5285 |
## | 1217.24 | 4067.76 | |
## | 332.55 | 99.51 | |
## | 0.11 | 0.89 | 0.15 |
## | 0.07 | 0.17 | |
## | 0.02 | 0.13 | |
## ---------------------------|-----------|-----------|-----------|
## 1134 | 1032 | 2154 | 3186 |
## | 733.80 | 2452.20 | |
## | 121.19 | 36.26 | |
## | 0.32 | 0.68 | 0.09 |
## | 0.12 | 0.08 | |
## | 0.03 | 0.06 | |
## ---------------------------|-----------|-----------|-----------|
## 1187 | 12 | 58 | 70 |
## | 16.12 | 53.88 | |
## | 1.05 | 0.32 | |
## | 0.17 | 0.83 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------|-----------|-----------|-----------|
## 1333 | 134 | 550 | 684 |
## | 157.54 | 526.46 | |
## | 3.52 | 1.05 | |
## | 0.20 | 0.80 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.02 | |
## ---------------------------|-----------|-----------|-----------|
## 1334 | 253 | 296 | 549 |
## | 126.45 | 422.55 | |
## | 126.66 | 37.90 | |
## | 0.46 | 0.54 | 0.02 |
## | 0.03 | 0.01 | |
## | 0.01 | 0.01 | |
## ---------------------------|-----------|-----------|-----------|
## 1335 | 266 | 160 | 426 |
## | 98.12 | 327.88 | |
## | 287.26 | 85.96 | |
## | 0.62 | 0.38 | 0.01 |
## | 0.03 | 0.01 | |
## | 0.01 | 0.00 | |
## ---------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## ---------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 3122 d.f. = 17 p = 0
##
##
##
CrossTable(main_processed$NurseFlag, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = TRUE, ...): Chi-squared approximation may be
## incorrect
## Warning in chisq.test(t, correct = TRUE, ...): Chi-squared approximation may be
## incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$NurseFlag | 0 | 1 | Row Total |
## -------------------------|-----------|-----------|-----------|
## N | 8261 | 27603 | 35864 |
## | 8260.16 | 27603.84 | |
## | 0.00 | 0.00 | |
## | 0.23 | 0.77 | 1.00 |
## | 1.00 | 1.00 | |
## | 0.23 | 0.77 | |
## -------------------------|-----------|-----------|-----------|
## Y | 1 | 7 | 8 |
## | 1.84 | 6.16 | |
## | 0.39 | 0.12 | |
## | 0.12 | 0.88 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## -------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 0.5 d.f. = 1 p = 0.48
##
## Pearson's Chi-squared test with Yates' continuity correction
## ------------------------------------------------------------
## Chi^2 = 0.083 d.f. = 1 p = 0.77
##
##
CrossTable(main_processed$Referral.Source_recode, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Referral.Source_recode | 0 | 1 | Row Total |
## --------------------------------------|-----------|-----------|-----------|
## BREAST CHECK | 56 | 801 | 857 |
## | 197.38 | 659.62 | |
## | 101.27 | 30.30 | |
## | 0.07 | 0.93 | 0.02 |
## | 0.01 | 0.03 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## CLINIC | 3984 | 18845 | 22829 |
## | 5257.95 | 17571.05 | |
## | 308.67 | 92.36 | |
## | 0.17 | 0.83 | 0.64 |
## | 0.48 | 0.68 | |
## | 0.11 | 0.53 | |
## --------------------------------------|-----------|-----------|-----------|
## Elsew of Mater | 4 | 18 | 22 |
## | 5.07 | 16.93 | |
## | 0.22 | 0.07 | |
## | 0.18 | 0.82 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## --------------------------------------|-----------|-----------|-----------|
## Elsew outside Mater | 75 | 212 | 287 |
## | 66.10 | 220.90 | |
## | 1.20 | 0.36 | |
## | 0.26 | 0.74 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## EMERGENCY DEPT | 3 | 3 | 6 |
## | 1.38 | 4.62 | |
## | 1.89 | 0.57 | |
## | 0.50 | 0.50 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## --------------------------------------|-----------|-----------|-----------|
## GP | 3677 | 4917 | 8594 |
## | 1979.36 | 6614.64 | |
## | 1456.02 | 435.70 | |
## | 0.43 | 0.57 | 0.24 |
## | 0.45 | 0.18 | |
## | 0.10 | 0.14 | |
## --------------------------------------|-----------|-----------|-----------|
## OTHER CONSULTANT | 12 | 57 | 69 |
## | 15.89 | 53.11 | |
## | 0.95 | 0.29 | |
## | 0.17 | 0.83 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## --------------------------------------|-----------|-----------|-----------|
## WARD | 451 | 2757 | 3208 |
## | 738.86 | 2469.14 | |
## | 112.15 | 33.56 | |
## | 0.14 | 0.86 | 0.09 |
## | 0.05 | 0.10 | |
## | 0.01 | 0.08 | |
## --------------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## --------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 2576 d.f. = 7 p = 0
##
##
##
# CrossTable(main_processed$Referring.Hospital, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
CrossTable(main_processed$Consultant_recode, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Consultant_recode | 0 | 1 | Row Total |
## ---------------------------------|-----------|-----------|-----------|
## BARRYM | 1792 | 7716 | 9508 |
## | 2189.87 | 7318.13 | |
## | 72.29 | 21.63 | |
## | 0.19 | 0.81 | 0.27 |
## | 0.22 | 0.28 | |
## | 0.05 | 0.22 | |
## ---------------------------------|-----------|-----------|-----------|
## HEENEY | 653 | 1006 | 1659 |
## | 382.10 | 1276.90 | |
## | 192.06 | 57.47 | |
## | 0.39 | 0.61 | 0.05 |
## | 0.08 | 0.04 | |
## | 0.02 | 0.03 | |
## ---------------------------------|-----------|-----------|-----------|
## KELLM | 1869 | 5731 | 7600 |
## | 1750.42 | 5849.58 | |
## | 8.03 | 2.40 | |
## | 0.25 | 0.75 | 0.21 |
## | 0.23 | 0.21 | |
## | 0.05 | 0.16 | |
## ---------------------------------|-----------|-----------|-----------|
## STOKES | 1772 | 5620 | 7392 |
## | 1702.52 | 5689.48 | |
## | 2.84 | 0.85 | |
## | 0.24 | 0.76 | 0.21 |
## | 0.21 | 0.20 | |
## | 0.05 | 0.16 | |
## ---------------------------------|-----------|-----------|-----------|
## WALSSI | 2176 | 7537 | 9713 |
## | 2237.09 | 7475.91 | |
## | 1.67 | 0.50 | |
## | 0.22 | 0.78 | 0.27 |
## | 0.26 | 0.27 | |
## | 0.06 | 0.21 | |
## ---------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## ---------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 360 d.f. = 4 p = 1.4e-76
##
##
##
CrossTable(main_processed$Insurance.Scheme_recode, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Insurance.Scheme_recode | 0 | 1 | Row Total |
## ---------------------------------------|-----------|-----------|-----------|
## A | 5 | 23 | 28 |
## | 6.45 | 21.55 | |
## | 0.33 | 0.10 | |
## | 0.18 | 0.82 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## B | 414 | 2139 | 2553 |
## | 588.00 | 1965.00 | |
## | 51.49 | 15.41 | |
## | 0.16 | 0.84 | 0.07 |
## | 0.05 | 0.08 | |
## | 0.01 | 0.06 | |
## ---------------------------------------|-----------|-----------|-----------|
## C | 2 | 7 | 9 |
## | 2.07 | 6.93 | |
## | 0.00 | 0.00 | |
## | 0.22 | 0.78 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## D | 2253 | 7711 | 9964 |
## | 2294.90 | 7669.10 | |
## | 0.76 | 0.23 | |
## | 0.23 | 0.77 | 0.28 |
## | 0.27 | 0.28 | |
## | 0.06 | 0.21 | |
## ---------------------------------------|-----------|-----------|-----------|
## E | 14 | 67 | 81 |
## | 18.66 | 62.34 | |
## | 1.16 | 0.35 | |
## | 0.17 | 0.83 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## G | 56 | 191 | 247 |
## | 56.89 | 190.11 | |
## | 0.01 | 0.00 | |
## | 0.23 | 0.77 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.01 | |
## ---------------------------------------|-----------|-----------|-----------|
## H | 5 | 33 | 38 |
## | 8.75 | 29.25 | |
## | 1.61 | 0.48 | |
## | 0.13 | 0.87 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## I | 385 | 2006 | 2391 |
## | 550.69 | 1840.31 | |
## | 49.85 | 14.92 | |
## | 0.16 | 0.84 | 0.07 |
## | 0.05 | 0.07 | |
## | 0.01 | 0.06 | |
## ---------------------------------------|-----------|-----------|-----------|
## J | 7 | 54 | 61 |
## | 14.05 | 46.95 | |
## | 3.54 | 1.06 | |
## | 0.11 | 0.89 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## M | 2 | 1 | 3 |
## | 0.69 | 2.31 | |
## | 2.48 | 0.74 | |
## | 0.67 | 0.33 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## O | 41 | 110 | 151 |
## | 34.78 | 116.22 | |
## | 1.11 | 0.33 | |
## | 0.27 | 0.73 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## P | 15 | 59 | 74 |
## | 17.04 | 56.96 | |
## | 0.25 | 0.07 | |
## | 0.20 | 0.80 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## S | 159 | 824 | 983 |
## | 226.40 | 756.60 | |
## | 20.07 | 6.00 | |
## | 0.16 | 0.84 | 0.03 |
## | 0.02 | 0.03 | |
## | 0.00 | 0.02 | |
## ---------------------------------------|-----------|-----------|-----------|
## U | 3785 | 9306 | 13091 |
## | 3015.10 | 10075.90 | |
## | 196.59 | 58.83 | |
## | 0.29 | 0.71 | 0.36 |
## | 0.46 | 0.34 | |
## | 0.11 | 0.26 | |
## ---------------------------------------|-----------|-----------|-----------|
## V | 1119 | 5079 | 6198 |
## | 1427.52 | 4770.48 | |
## | 66.68 | 19.95 | |
## | 0.18 | 0.82 | 0.17 |
## | 0.14 | 0.18 | |
## | 0.03 | 0.14 | |
## ---------------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## ---------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 514 d.f. = 14 p = 8.2e-101
##
##
##
CrossTable(main_processed$Eligibility_recode, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Eligibility_recode | 0 | 1 | Row Total |
## ----------------------------------|-----------|-----------|-----------|
## ACUTE UNCLASSIFIED | 33 | 78 | 111 |
## | 25.57 | 85.43 | |
## | 2.16 | 0.65 | |
## | 0.30 | 0.70 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|
## ELIGIBILITY UNKNOWN | 1270 | 1108 | 2378 |
## | 547.70 | 1830.30 | |
## | 952.57 | 285.05 | |
## | 0.53 | 0.47 | 0.07 |
## | 0.15 | 0.04 | |
## | 0.04 | 0.03 | |
## ----------------------------------|-----------|-----------|-----------|
## EXEMPT | 216 | 768 | 984 |
## | 226.63 | 757.37 | |
## | 0.50 | 0.15 | |
## | 0.22 | 0.78 | 0.03 |
## | 0.03 | 0.03 | |
## | 0.01 | 0.02 | |
## ----------------------------------|-----------|-----------|-----------|
## MEDICAL CARD | 3097 | 11064 | 14161 |
## | 3261.55 | 10899.45 | |
## | 8.30 | 2.48 | |
## | 0.22 | 0.78 | 0.39 |
## | 0.37 | 0.40 | |
## | 0.09 | 0.31 | |
## ----------------------------------|-----------|-----------|-----------|
## NON ACUTE UNCLASSIFIED | 2 | 14 | 16 |
## | 3.69 | 12.31 | |
## | 0.77 | 0.23 | |
## | 0.12 | 0.88 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|
## NON MEDICAL CARD | 3621 | 14468 | 18089 |
## | 4166.24 | 13922.76 | |
## | 71.36 | 21.35 | |
## | 0.20 | 0.80 | 0.50 |
## | 0.44 | 0.52 | |
## | 0.10 | 0.40 | |
## ----------------------------------|-----------|-----------|-----------|
## RESEARCH/NATIONAL PROG. | 23 | 110 | 133 |
## | 30.63 | 102.37 | |
## | 1.90 | 0.57 | |
## | 0.17 | 0.83 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## ----------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1348 d.f. = 6 p = 4.3e-288
##
##
##
CrossTable(main_processed$Booking.Type_recode, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Booking.Type_recode | 0 | 1 | Row Total |
## -----------------------------------|-----------|-----------|-----------|
## NEW | 3780 | 5013 | 8793 |
## | 2025.19 | 6767.81 | |
## | 1520.52 | 455.00 | |
## | 0.43 | 0.57 | 0.25 |
## | 0.46 | 0.18 | |
## | 0.11 | 0.14 | |
## -----------------------------------|-----------|-----------|-----------|
## RETURN | 4168 | 20419 | 24587 |
## | 5662.85 | 18924.15 | |
## | 394.60 | 118.08 | |
## | 0.17 | 0.83 | 0.69 |
## | 0.50 | 0.74 | |
## | 0.12 | 0.57 | |
## -----------------------------------|-----------|-----------|-----------|
## WARD | 314 | 2178 | 2492 |
## | 573.95 | 1918.05 | |
## | 117.74 | 35.23 | |
## | 0.13 | 0.87 | 0.07 |
## | 0.04 | 0.08 | |
## | 0.01 | 0.06 | |
## -----------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## -----------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 2641 d.f. = 2 p = 0
##
##
##
CrossTable(main_processed$Hospital.Catchment_recode, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Hospital.Catchment_recode | 0 | 1 | Row Total |
## -----------------------------------------|-----------|-----------|-----------|
## Beaumont | 317 | 1258 | 1575 |
## | 362.75 | 1212.25 | |
## | 5.77 | 1.73 | |
## | 0.20 | 0.80 | 0.04 |
## | 0.04 | 0.05 | |
## | 0.01 | 0.04 | |
## -----------------------------------------|-----------|-----------|-----------|
## Connolly | 920 | 2806 | 3726 |
## | 858.17 | 2867.83 | |
## | 4.46 | 1.33 | |
## | 0.25 | 0.75 | 0.10 |
## | 0.11 | 0.10 | |
## | 0.03 | 0.08 | |
## -----------------------------------------|-----------|-----------|-----------|
## International | 28 | 60 | 88 |
## | 20.27 | 67.73 | |
## | 2.95 | 0.88 | |
## | 0.32 | 0.68 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -----------------------------------------|-----------|-----------|-----------|
## James | 111 | 266 | 377 |
## | 86.83 | 290.17 | |
## | 6.73 | 2.01 | |
## | 0.29 | 0.71 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.01 | |
## -----------------------------------------|-----------|-----------|-----------|
## Mater | 2209 | 6299 | 8508 |
## | 1959.55 | 6548.45 | |
## | 31.75 | 9.50 | |
## | 0.26 | 0.74 | 0.24 |
## | 0.27 | 0.23 | |
## | 0.06 | 0.18 | |
## -----------------------------------------|-----------|-----------|-----------|
## National | 4485 | 16527 | 21012 |
## | 4839.46 | 16172.54 | |
## | 25.96 | 7.77 | |
## | 0.21 | 0.79 | 0.59 |
## | 0.54 | 0.60 | |
## | 0.13 | 0.46 | |
## -----------------------------------------|-----------|-----------|-----------|
## Tallaght | 61 | 96 | 157 |
## | 36.16 | 120.84 | |
## | 17.06 | 5.11 | |
## | 0.39 | 0.61 | 0.00 |
## | 0.01 | 0.00 | |
## | 0.00 | 0.00 | |
## -----------------------------------------|-----------|-----------|-----------|
## Vincents | 131 | 298 | 429 |
## | 98.81 | 330.19 | |
## | 10.49 | 3.14 | |
## | 0.31 | 0.69 | 0.01 |
## | 0.02 | 0.01 | |
## | 0.00 | 0.01 | |
## -----------------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## -----------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 137 d.f. = 7 p = 2.6e-26
##
##
##
CrossTable(main_processed$bookedDay, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$bookedDay | 0 | 1 | Row Total |
## -------------------------|-----------|-----------|-----------|
## Friday | 1203 | 4345 | 5548 |
## | 1277.81 | 4270.19 | |
## | 4.38 | 1.31 | |
## | 0.22 | 0.78 | 0.15 |
## | 0.15 | 0.16 | |
## | 0.03 | 0.12 | |
## -------------------------|-----------|-----------|-----------|
## Monday | 1916 | 6484 | 8400 |
## | 1934.68 | 6465.32 | |
## | 0.18 | 0.05 | |
## | 0.23 | 0.77 | 0.23 |
## | 0.23 | 0.23 | |
## | 0.05 | 0.18 | |
## -------------------------|-----------|-----------|-----------|
## Saturday | 30 | 65 | 95 |
## | 21.88 | 73.12 | |
## | 3.01 | 0.90 | |
## | 0.32 | 0.68 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------|-----------|-----------|-----------|
## Sunday | 1 | 4 | 5 |
## | 1.15 | 3.85 | |
## | 0.02 | 0.01 | |
## | 0.20 | 0.80 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------|-----------|-----------|-----------|
## Thursday | 1614 | 4935 | 6549 |
## | 1508.36 | 5040.64 | |
## | 7.40 | 2.21 | |
## | 0.25 | 0.75 | 0.18 |
## | 0.20 | 0.18 | |
## | 0.04 | 0.14 | |
## -------------------------|-----------|-----------|-----------|
## Tuesday | 1854 | 6367 | 8221 |
## | 1893.45 | 6327.55 | |
## | 0.82 | 0.25 | |
## | 0.23 | 0.77 | 0.23 |
## | 0.22 | 0.23 | |
## | 0.05 | 0.18 | |
## -------------------------|-----------|-----------|-----------|
## Wednesday | 1644 | 5410 | 7054 |
## | 1624.67 | 5429.33 | |
## | 0.23 | 0.07 | |
## | 0.23 | 0.77 | 0.20 |
## | 0.20 | 0.20 | |
## | 0.05 | 0.15 | |
## -------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## -------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 21 d.f. = 6 p = 0.002
##
##
##
main_processed_subset <- subset(main_processed, year(main_processed$Booked.Date_new) > 2019) #create the subset for cancellations (from the hospital) have started since CoVID
CrossTable(main_processed_subset$bookedMonthYear, main_processed_subset$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed_subset$No.Cancels
## main_processed_subset$bookedMonthYear | 0 | 1 | Row Total |
## --------------------------------------|-----------|-----------|-----------|
## 2020-01 | 135 | 689 | 824 |
## | 189.78 | 634.22 | |
## | 15.81 | 4.73 | |
## | 0.16 | 0.84 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2020-02 | 136 | 932 | 1068 |
## | 245.98 | 822.02 | |
## | 49.17 | 14.71 | |
## | 0.13 | 0.87 | 0.03 |
## | 0.02 | 0.03 | |
## | 0.00 | 0.03 | |
## --------------------------------------|-----------|-----------|-----------|
## 2020-03 | 68 | 486 | 554 |
## | 127.60 | 426.40 | |
## | 27.84 | 8.33 | |
## | 0.12 | 0.88 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2020-04 | 23 | 178 | 201 |
## | 46.29 | 154.71 | |
## | 11.72 | 3.51 | |
## | 0.11 | 0.89 | 0.01 |
## | 0.00 | 0.01 | |
## | 0.00 | 0.00 | |
## --------------------------------------|-----------|-----------|-----------|
## 2020-05 | 62 | 388 | 450 |
## | 103.64 | 346.36 | |
## | 16.73 | 5.01 | |
## | 0.14 | 0.86 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2020-06 | 139 | 613 | 752 |
## | 173.20 | 578.80 | |
## | 6.75 | 2.02 | |
## | 0.18 | 0.82 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2020-07 | 296 | 647 | 943 |
## | 217.19 | 725.81 | |
## | 28.60 | 8.56 | |
## | 0.31 | 0.69 | 0.03 |
## | 0.04 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2020-08 | 171 | 717 | 888 |
## | 204.52 | 683.48 | |
## | 5.49 | 1.64 | |
## | 0.19 | 0.81 | 0.02 |
## | 0.02 | 0.03 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2020-09 | 210 | 688 | 898 |
## | 206.83 | 691.17 | |
## | 0.05 | 0.01 | |
## | 0.23 | 0.77 | 0.03 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2020-10 | 178 | 686 | 864 |
## | 199.00 | 665.00 | |
## | 2.22 | 0.66 | |
## | 0.21 | 0.79 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2020-11 | 160 | 833 | 993 |
## | 228.71 | 764.29 | |
## | 20.64 | 6.18 | |
## | 0.16 | 0.84 | 0.03 |
## | 0.02 | 0.03 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2020-12 | 205 | 470 | 675 |
## | 155.47 | 519.53 | |
## | 15.78 | 4.72 | |
## | 0.30 | 0.70 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-01 | 131 | 434 | 565 |
## | 130.13 | 434.87 | |
## | 0.01 | 0.00 | |
## | 0.23 | 0.77 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-02 | 186 | 794 | 980 |
## | 225.71 | 754.29 | |
## | 6.99 | 2.09 | |
## | 0.19 | 0.81 | 0.03 |
## | 0.02 | 0.03 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-03 | 188 | 736 | 924 |
## | 212.81 | 711.19 | |
## | 2.89 | 0.87 | |
## | 0.20 | 0.80 | 0.03 |
## | 0.02 | 0.03 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-04 | 231 | 662 | 893 |
## | 205.67 | 687.33 | |
## | 3.12 | 0.93 | |
## | 0.26 | 0.74 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-05 | 215 | 622 | 837 |
## | 192.78 | 644.22 | |
## | 2.56 | 0.77 | |
## | 0.26 | 0.74 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-06 | 225 | 766 | 991 |
## | 228.25 | 762.75 | |
## | 0.05 | 0.01 | |
## | 0.23 | 0.77 | 0.03 |
## | 0.03 | 0.03 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-07 | 211 | 733 | 944 |
## | 217.42 | 726.58 | |
## | 0.19 | 0.06 | |
## | 0.22 | 0.78 | 0.03 |
## | 0.03 | 0.03 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-08 | 274 | 786 | 1060 |
## | 244.14 | 815.86 | |
## | 3.65 | 1.09 | |
## | 0.26 | 0.74 | 0.03 |
## | 0.03 | 0.03 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-09 | 376 | 631 | 1007 |
## | 231.93 | 775.07 | |
## | 89.49 | 26.78 | |
## | 0.37 | 0.63 | 0.03 |
## | 0.05 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-10 | 247 | 572 | 819 |
## | 188.63 | 630.37 | |
## | 18.06 | 5.40 | |
## | 0.30 | 0.70 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-11 | 271 | 576 | 847 |
## | 195.08 | 651.92 | |
## | 29.55 | 8.84 | |
## | 0.32 | 0.68 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2021-12 | 275 | 510 | 785 |
## | 180.80 | 604.20 | |
## | 49.08 | 14.69 | |
## | 0.35 | 0.65 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-01 | 172 | 546 | 718 |
## | 165.37 | 552.63 | |
## | 0.27 | 0.08 | |
## | 0.24 | 0.76 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-02 | 227 | 583 | 810 |
## | 186.56 | 623.44 | |
## | 8.77 | 2.62 | |
## | 0.28 | 0.72 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-03 | 283 | 598 | 881 |
## | 202.91 | 678.09 | |
## | 31.61 | 9.46 | |
## | 0.32 | 0.68 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-04 | 199 | 514 | 713 |
## | 164.22 | 548.78 | |
## | 7.37 | 2.20 | |
## | 0.28 | 0.72 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-05 | 239 | 841 | 1080 |
## | 248.74 | 831.26 | |
## | 0.38 | 0.11 | |
## | 0.22 | 0.78 | 0.03 |
## | 0.03 | 0.03 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-06 | 230 | 674 | 904 |
## | 208.21 | 695.79 | |
## | 2.28 | 0.68 | |
## | 0.25 | 0.75 | 0.03 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-07 | 213 | 575 | 788 |
## | 181.49 | 606.51 | |
## | 5.47 | 1.64 | |
## | 0.27 | 0.73 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-08 | 153 | 490 | 643 |
## | 148.10 | 494.90 | |
## | 0.16 | 0.05 | |
## | 0.24 | 0.76 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-09 | 201 | 564 | 765 |
## | 176.19 | 588.81 | |
## | 3.49 | 1.05 | |
## | 0.26 | 0.74 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-10 | 252 | 721 | 973 |
## | 224.10 | 748.90 | |
## | 3.47 | 1.04 | |
## | 0.26 | 0.74 | 0.03 |
## | 0.03 | 0.03 | |
## | 0.01 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-11 | 190 | 537 | 727 |
## | 167.44 | 559.56 | |
## | 3.04 | 0.91 | |
## | 0.26 | 0.74 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2022-12 | 115 | 494 | 609 |
## | 140.26 | 468.74 | |
## | 4.55 | 1.36 | |
## | 0.19 | 0.81 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-01 | 111 | 551 | 662 |
## | 152.47 | 509.53 | |
## | 11.28 | 3.38 | |
## | 0.17 | 0.83 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-02 | 94 | 577 | 671 |
## | 154.54 | 516.46 | |
## | 23.72 | 7.10 | |
## | 0.14 | 0.86 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-03 | 141 | 589 | 730 |
## | 168.13 | 561.87 | |
## | 4.38 | 1.31 | |
## | 0.19 | 0.81 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-04 | 107 | 578 | 685 |
## | 157.77 | 527.23 | |
## | 16.34 | 4.89 | |
## | 0.16 | 0.84 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-05 | 105 | 562 | 667 |
## | 153.62 | 513.38 | |
## | 15.39 | 4.61 | |
## | 0.16 | 0.84 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-06 | 117 | 482 | 599 |
## | 137.96 | 461.04 | |
## | 3.18 | 0.95 | |
## | 0.20 | 0.80 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-07 | 130 | 470 | 600 |
## | 138.19 | 461.81 | |
## | 0.49 | 0.15 | |
## | 0.22 | 0.78 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-08 | 97 | 492 | 589 |
## | 135.66 | 453.34 | |
## | 11.02 | 3.30 | |
## | 0.16 | 0.84 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-09 | 111 | 358 | 469 |
## | 108.02 | 360.98 | |
## | 0.08 | 0.02 | |
## | 0.24 | 0.76 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-10 | 63 | 337 | 400 |
## | 92.13 | 307.87 | |
## | 9.21 | 2.76 | |
## | 0.16 | 0.84 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-11 | 91 | 284 | 375 |
## | 86.37 | 288.63 | |
## | 0.25 | 0.07 | |
## | 0.24 | 0.76 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## 2023-12 | 8 | 44 | 52 |
## | 11.98 | 40.02 | |
## | 1.32 | 0.40 | |
## | 0.15 | 0.85 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## --------------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## --------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 746 d.f. = 47 p = 1.7e-126
##
##
##
CrossTable(main_processed$appointmentDay, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$appointmentDay | 0 | 1 | Row Total |
## ------------------------------|-----------|-----------|-----------|
## Friday | 1693 | 6862 | 8555 |
## | 1970.38 | 6584.62 | |
## | 39.05 | 11.68 | |
## | 0.20 | 0.80 | 0.24 |
## | 0.20 | 0.25 | |
## | 0.05 | 0.19 | |
## ------------------------------|-----------|-----------|-----------|
## Monday | 2011 | 5532 | 7543 |
## | 1737.30 | 5805.70 | |
## | 43.12 | 12.90 | |
## | 0.27 | 0.73 | 0.21 |
## | 0.24 | 0.20 | |
## | 0.06 | 0.15 | |
## ------------------------------|-----------|-----------|-----------|
## Thursday | 1596 | 5229 | 6825 |
## | 1571.93 | 5253.07 | |
## | 0.37 | 0.11 | |
## | 0.23 | 0.77 | 0.19 |
## | 0.19 | 0.19 | |
## | 0.04 | 0.15 | |
## ------------------------------|-----------|-----------|-----------|
## Tuesday | 2013 | 7958 | 9971 |
## | 2296.51 | 7674.49 | |
## | 35.00 | 10.47 | |
## | 0.20 | 0.80 | 0.28 |
## | 0.24 | 0.29 | |
## | 0.06 | 0.22 | |
## ------------------------------|-----------|-----------|-----------|
## Wednesday | 949 | 2029 | 2978 |
## | 685.89 | 2292.11 | |
## | 100.93 | 30.20 | |
## | 0.32 | 0.68 | 0.08 |
## | 0.11 | 0.07 | |
## | 0.03 | 0.06 | |
## ------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## ------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 284 d.f. = 4 p = 3.3e-60
##
##
##
CrossTable(main_processed$appointmentMonthYear, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$appointmentMonthYear | 0 | 1 | Row Total |
## ------------------------------------|-----------|-----------|-----------|
## 2020-01 | 46 | 113 | 159 |
## | 36.62 | 122.38 | |
## | 2.40 | 0.72 | |
## | 0.29 | 0.71 | 0.00 |
## | 0.01 | 0.00 | |
## | 0.00 | 0.00 | |
## ------------------------------------|-----------|-----------|-----------|
## 2020-02 | 96 | 265 | 361 |
## | 83.15 | 277.85 | |
## | 1.99 | 0.59 | |
## | 0.27 | 0.73 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2020-03 | 67 | 686 | 753 |
## | 173.43 | 579.57 | |
## | 65.31 | 19.54 | |
## | 0.09 | 0.91 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2020-04 | 14 | 562 | 576 |
## | 132.66 | 443.34 | |
## | 106.14 | 31.76 | |
## | 0.02 | 0.98 | 0.02 |
## | 0.00 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2020-05 | 33 | 250 | 283 |
## | 65.18 | 217.82 | |
## | 15.89 | 4.75 | |
## | 0.12 | 0.88 | 0.01 |
## | 0.00 | 0.01 | |
## | 0.00 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2020-06 | 43 | 420 | 463 |
## | 106.64 | 356.36 | |
## | 37.98 | 11.36 | |
## | 0.09 | 0.91 | 0.01 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2020-07 | 148 | 478 | 626 |
## | 144.18 | 481.82 | |
## | 0.10 | 0.03 | |
## | 0.24 | 0.76 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2020-08 | 112 | 491 | 603 |
## | 138.88 | 464.12 | |
## | 5.20 | 1.56 | |
## | 0.19 | 0.81 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2020-09 | 164 | 547 | 711 |
## | 163.76 | 547.24 | |
## | 0.00 | 0.00 | |
## | 0.23 | 0.77 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2020-10 | 133 | 657 | 790 |
## | 181.95 | 608.05 | |
## | 13.17 | 3.94 | |
## | 0.17 | 0.83 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2020-11 | 99 | 671 | 770 |
## | 177.35 | 592.65 | |
## | 34.61 | 10.36 | |
## | 0.13 | 0.87 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2020-12 | 111 | 546 | 657 |
## | 151.32 | 505.68 | |
## | 10.74 | 3.21 | |
## | 0.17 | 0.83 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-01 | 186 | 508 | 694 |
## | 159.84 | 534.16 | |
## | 4.28 | 1.28 | |
## | 0.27 | 0.73 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-02 | 215 | 414 | 629 |
## | 144.87 | 484.13 | |
## | 33.95 | 10.16 | |
## | 0.34 | 0.66 | 0.02 |
## | 0.03 | 0.01 | |
## | 0.01 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-03 | 174 | 525 | 699 |
## | 160.99 | 538.01 | |
## | 1.05 | 0.31 | |
## | 0.25 | 0.75 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-04 | 187 | 450 | 637 |
## | 146.71 | 490.29 | |
## | 11.06 | 3.31 | |
## | 0.29 | 0.71 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-05 | 227 | 448 | 675 |
## | 155.47 | 519.53 | |
## | 32.92 | 9.85 | |
## | 0.34 | 0.66 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-06 | 281 | 504 | 785 |
## | 180.80 | 604.20 | |
## | 55.53 | 16.62 | |
## | 0.36 | 0.64 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-07 | 327 | 641 | 968 |
## | 222.95 | 745.05 | |
## | 48.56 | 14.53 | |
## | 0.34 | 0.66 | 0.03 |
## | 0.04 | 0.02 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-08 | 235 | 993 | 1228 |
## | 282.83 | 945.17 | |
## | 8.09 | 2.42 | |
## | 0.19 | 0.81 | 0.03 |
## | 0.03 | 0.04 | |
## | 0.01 | 0.03 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-09 | 365 | 859 | 1224 |
## | 281.91 | 942.09 | |
## | 24.49 | 7.33 | |
## | 0.30 | 0.70 | 0.03 |
## | 0.04 | 0.03 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-10 | 265 | 615 | 880 |
## | 202.68 | 677.32 | |
## | 19.16 | 5.73 | |
## | 0.30 | 0.70 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-11 | 300 | 700 | 1000 |
## | 230.32 | 769.68 | |
## | 21.08 | 6.31 | |
## | 0.30 | 0.70 | 0.03 |
## | 0.04 | 0.03 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2021-12 | 239 | 523 | 762 |
## | 175.50 | 586.50 | |
## | 22.97 | 6.87 | |
## | 0.31 | 0.69 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-01 | 253 | 505 | 758 |
## | 174.58 | 583.42 | |
## | 35.22 | 10.54 | |
## | 0.33 | 0.67 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-02 | 262 | 620 | 882 |
## | 203.14 | 678.86 | |
## | 17.05 | 5.10 | |
## | 0.30 | 0.70 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-03 | 247 | 671 | 918 |
## | 211.43 | 706.57 | |
## | 5.98 | 1.79 | |
## | 0.27 | 0.73 | 0.03 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-04 | 273 | 446 | 719 |
## | 165.60 | 553.40 | |
## | 69.66 | 20.84 | |
## | 0.38 | 0.62 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-05 | 271 | 640 | 911 |
## | 209.82 | 701.18 | |
## | 17.84 | 5.34 | |
## | 0.30 | 0.70 | 0.03 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-06 | 220 | 750 | 970 |
## | 223.41 | 746.59 | |
## | 0.05 | 0.02 | |
## | 0.23 | 0.77 | 0.03 |
## | 0.03 | 0.03 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-07 | 181 | 636 | 817 |
## | 188.17 | 628.83 | |
## | 0.27 | 0.08 | |
## | 0.22 | 0.78 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-08 | 234 | 594 | 828 |
## | 190.70 | 637.30 | |
## | 9.83 | 2.94 | |
## | 0.28 | 0.72 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-09 | 261 | 558 | 819 |
## | 188.63 | 630.37 | |
## | 27.76 | 8.31 | |
## | 0.32 | 0.68 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-10 | 225 | 600 | 825 |
## | 190.01 | 634.99 | |
## | 6.44 | 1.93 | |
## | 0.27 | 0.73 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-11 | 255 | 699 | 954 |
## | 219.72 | 734.28 | |
## | 5.66 | 1.69 | |
## | 0.27 | 0.73 | 0.03 |
## | 0.03 | 0.03 | |
## | 0.01 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2022-12 | 167 | 430 | 597 |
## | 137.50 | 459.50 | |
## | 6.33 | 1.89 | |
## | 0.28 | 0.72 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.01 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-01 | 165 | 575 | 740 |
## | 170.44 | 569.56 | |
## | 0.17 | 0.05 | |
## | 0.22 | 0.78 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-02 | 104 | 547 | 651 |
## | 149.94 | 501.06 | |
## | 14.07 | 4.21 | |
## | 0.16 | 0.84 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-03 | 139 | 562 | 701 |
## | 161.45 | 539.55 | |
## | 3.12 | 0.93 | |
## | 0.20 | 0.80 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-04 | 98 | 573 | 671 |
## | 154.54 | 516.46 | |
## | 20.69 | 6.19 | |
## | 0.15 | 0.85 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-05 | 120 | 665 | 785 |
## | 180.80 | 604.20 | |
## | 20.45 | 6.12 | |
## | 0.15 | 0.85 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-06 | 100 | 614 | 714 |
## | 164.45 | 549.55 | |
## | 25.26 | 7.56 | |
## | 0.14 | 0.86 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-07 | 97 | 657 | 754 |
## | 173.66 | 580.34 | |
## | 33.84 | 10.13 | |
## | 0.13 | 0.87 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-08 | 112 | 799 | 911 |
## | 209.82 | 701.18 | |
## | 45.60 | 13.65 | |
## | 0.12 | 0.88 | 0.03 |
## | 0.01 | 0.03 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-09 | 133 | 774 | 907 |
## | 208.90 | 698.10 | |
## | 27.58 | 8.25 | |
## | 0.15 | 0.85 | 0.03 |
## | 0.02 | 0.03 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-10 | 118 | 564 | 682 |
## | 157.08 | 524.92 | |
## | 9.72 | 2.91 | |
## | 0.17 | 0.83 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-11 | 94 | 683 | 777 |
## | 178.96 | 598.04 | |
## | 40.33 | 12.07 | |
## | 0.12 | 0.88 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## 2023-12 | 66 | 582 | 648 |
## | 149.25 | 498.75 | |
## | 46.43 | 13.89 | |
## | 0.10 | 0.90 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.00 | 0.02 | |
## ------------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## ------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1385 d.f. = 47 p = 2.7e-259
##
##
##
## booking relevance
### difference between Booked and Appointment factors in Cancellation
CrossTable(main_processed$Rebooked.Indicator, main_processed$No.Cancels, digits=2, fisher=T, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Rebooked.Indicator | 0 | 1 | Row Total |
## ----------------------------------|-----------|-----------|-----------|
## | 0 | 0 | 0 |
## | 0.00 | 0.00 | |
## | NaN | NaN | |
## | NaN | NaN | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|
## No | 8262 | 7040 | 15302 |
## | 3524.34 | 11777.66 | |
## | 6368.69 | 1905.76 | |
## | 0.54 | 0.46 | 0.43 |
## | 1.00 | 0.25 | |
## | 0.23 | 0.20 | |
## ----------------------------------|-----------|-----------|-----------|
## Yes | 0 | 20570 | 20570 |
## | 4737.66 | 15832.34 | |
## | 4737.66 | 1417.69 | |
## | 0.00 | 1.00 | 0.57 |
## | 0.00 | 0.75 | |
## | 0.00 | 0.57 | |
## ----------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## ----------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = NaN d.f. = 2 p = NaN
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0
##
##
leveneTest(daysDiff_AppointBooked ~ as.factor(No.Cancels), data=main_processed) #leveneTest is Ha
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 1 516 <2e-16 ***
## 35870
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
t.test(daysDiff_AppointBooked ~ No.Cancels, var.equal=F, data=main_processed)
##
## Welch Two Sample t-test
##
## data: daysDiff_AppointBooked by No.Cancels
## t = -27, df = 15525, p-value <2e-16
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
## -40 -35
## sample estimates:
## mean in group 0 mean in group 1
## 62 99
## patient characteristics relevance
CrossTable(main_processed$Gender, main_processed$No.Cancels, digits=2, fisher=TRUE, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Gender | 0 | 1 | Row Total |
## ----------------------|-----------|-----------|-----------|
## Female | 8023 | 27241 | 35264 |
## | 8121.97 | 27142.03 | |
## | 1.21 | 0.36 | |
## | 0.23 | 0.77 | 0.98 |
## | 0.97 | 0.99 | |
## | 0.22 | 0.76 | |
## ----------------------|-----------|-----------|-----------|
## Male | 238 | 367 | 605 |
## | 139.34 | 465.66 | |
## | 69.85 | 20.90 | |
## | 0.39 | 0.61 | 0.02 |
## | 0.03 | 0.01 | |
## | 0.01 | 0.01 | |
## ----------------------|-----------|-----------|-----------|
## Unknown | 1 | 2 | 3 |
## | 0.69 | 2.31 | |
## | 0.14 | 0.04 | |
## | 0.33 | 0.67 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## ----------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 92 d.f. = 2 p = 8.2e-21
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 2e-19
##
##
CrossTable(main_processed$Age.at.Attendance.Cat.HSE, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE) # age group
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Age.at.Attendance.Cat.HSE | 0 | 1 | Row Total |
## -----------------------------------------|-----------|-----------|-----------|
## 0 - 4 | 5 | 7 | 12 |
## | 2.76 | 9.24 | |
## | 1.81 | 0.54 | |
## | 0.42 | 0.58 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -----------------------------------------|-----------|-----------|-----------|
## 10 - 14 | 11 | 38 | 49 |
## | 11.29 | 37.71 | |
## | 0.01 | 0.00 | |
## | 0.22 | 0.78 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -----------------------------------------|-----------|-----------|-----------|
## 15 - 24 | 480 | 742 | 1222 |
## | 281.45 | 940.55 | |
## | 140.07 | 41.91 | |
## | 0.39 | 0.61 | 0.03 |
## | 0.06 | 0.03 | |
## | 0.01 | 0.02 | |
## -----------------------------------------|-----------|-----------|-----------|
## 25 - 34 | 1390 | 2318 | 3708 |
## | 854.02 | 2853.98 | |
## | 336.38 | 100.66 | |
## | 0.37 | 0.63 | 0.10 |
## | 0.17 | 0.08 | |
## | 0.04 | 0.06 | |
## -----------------------------------------|-----------|-----------|-----------|
## 35 - 44 | 1842 | 5368 | 7210 |
## | 1660.60 | 5549.40 | |
## | 19.82 | 5.93 | |
## | 0.26 | 0.74 | 0.20 |
## | 0.22 | 0.19 | |
## | 0.05 | 0.15 | |
## -----------------------------------------|-----------|-----------|-----------|
## 45 - 54 | 1693 | 6739 | 8432 |
## | 1942.05 | 6489.95 | |
## | 31.94 | 9.56 | |
## | 0.20 | 0.80 | 0.24 |
## | 0.20 | 0.24 | |
## | 0.05 | 0.19 | |
## -----------------------------------------|-----------|-----------|-----------|
## 55 - 64 | 1350 | 6065 | 7415 |
## | 1707.81 | 5707.19 | |
## | 74.97 | 22.43 | |
## | 0.18 | 0.82 | 0.21 |
## | 0.16 | 0.22 | |
## | 0.04 | 0.17 | |
## -----------------------------------------|-----------|-----------|-----------|
## 65 - 74 | 887 | 4130 | 5017 |
## | 1155.51 | 3861.49 | |
## | 62.39 | 18.67 | |
## | 0.18 | 0.82 | 0.14 |
## | 0.11 | 0.15 | |
## | 0.02 | 0.12 | |
## -----------------------------------------|-----------|-----------|-----------|
## 75 - 84 | 434 | 1647 | 2081 |
## | 479.29 | 1601.71 | |
## | 4.28 | 1.28 | |
## | 0.21 | 0.79 | 0.06 |
## | 0.05 | 0.06 | |
## | 0.01 | 0.05 | |
## -----------------------------------------|-----------|-----------|-----------|
## 85 >= | 170 | 556 | 726 |
## | 167.21 | 558.79 | |
## | 0.05 | 0.01 | |
## | 0.23 | 0.77 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.00 | 0.02 | |
## -----------------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## -----------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 873 d.f. = 9 p = 4.7e-182
##
##
##
leveneTest(Age.at.Attendance ~ as.factor(No.Cancels), data=main_processed)
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 1 147 <2e-16 ***
## 35870
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
t.test(Age.at.Attendance ~ No.Cancels, var.equal=FALSE, data=main_processed) #leveneTest is Ha
##
## Welch Two Sample t-test
##
## data: Age.at.Attendance by No.Cancels
## t = -22, df = 12624, p-value <2e-16
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
## -4.9 -4.1
## sample estimates:
## mean in group 0 mean in group 1
## 48 53
CrossTable(main_processed$Area.of.Residence_recode, main_processed$No.Cancels, digits=2, fisher=F, chisq=TRUE, expected=TRUE) # remove Na or impute where no residence
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$Area.of.Residence_recode | 0 | 1 | Row Total |
## ---------------------------------------------|-----------|-----------|-----------|
## DUBLIN NTH | 3910 | 12203 | 16113 |
## | 3711.13 | 12401.87 | |
## | 10.66 | 3.19 | |
## | 0.24 | 0.76 | 0.45 |
## | 0.47 | 0.44 | |
## | 0.11 | 0.34 | |
## ---------------------------------------------|-----------|-----------|-----------|
## DUBLIN STH | 303 | 661 | 964 |
## | 222.03 | 741.97 | |
## | 29.53 | 8.84 | |
## | 0.31 | 0.69 | 0.03 |
## | 0.04 | 0.02 | |
## | 0.01 | 0.02 | |
## ---------------------------------------------|-----------|-----------|-----------|
## EASTERN & MIDLAND REGION (excl.Dublin,Meath) | 1785 | 6689 | 8474 |
## | 1951.72 | 6522.28 | |
## | 14.24 | 4.26 | |
## | 0.21 | 0.79 | 0.24 |
## | 0.22 | 0.24 | |
## | 0.05 | 0.19 | |
## ---------------------------------------------|-----------|-----------|-----------|
## Meath | 1246 | 4223 | 5469 |
## | 1259.61 | 4209.39 | |
## | 0.15 | 0.04 | |
## | 0.23 | 0.77 | 0.15 |
## | 0.15 | 0.15 | |
## | 0.03 | 0.12 | |
## ---------------------------------------------|-----------|-----------|-----------|
## NORTHERN WESTERN REGION | 816 | 3002 | 3818 |
## | 879.36 | 2938.64 | |
## | 4.56 | 1.37 | |
## | 0.21 | 0.79 | 0.11 |
## | 0.10 | 0.11 | |
## | 0.02 | 0.08 | |
## ---------------------------------------------|-----------|-----------|-----------|
## OUTSIDE IRELAND | 1 | 13 | 14 |
## | 3.22 | 10.78 | |
## | 1.53 | 0.46 | |
## | 0.07 | 0.93 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------------|-----------|-----------|-----------|
## SOUTHERN REGION | 174 | 762 | 936 |
## | 215.58 | 720.42 | |
## | 8.02 | 2.40 | |
## | 0.19 | 0.81 | 0.03 |
## | 0.02 | 0.03 | |
## | 0.00 | 0.02 | |
## ---------------------------------------------|-----------|-----------|-----------|
## UNKNOWN | 27 | 57 | 84 |
## | 19.35 | 64.65 | |
## | 3.03 | 0.91 | |
## | 0.32 | 0.68 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## ---------------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 93 d.f. = 7 p = 2.7e-17
##
##
##
CrossTable(main_processed$addressDiff, main_processed$No.Cancels, digits=2, fisher=TRUE, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 35872
##
##
## | main_processed$No.Cancels
## main_processed$addressDiff | 0 | 1 | Row Total |
## ---------------------------|-----------|-----------|-----------|
## 0 | 6397 | 22567 | 28964 |
## | 6670.96 | 22293.04 | |
## | 11.25 | 3.37 | |
## | 0.22 | 0.78 | 0.81 |
## | 0.77 | 0.82 | |
## | 0.18 | 0.63 | |
## ---------------------------|-----------|-----------|-----------|
## 1 | 1865 | 5043 | 6908 |
## | 1591.04 | 5316.96 | |
## | 47.17 | 14.12 | |
## | 0.27 | 0.73 | 0.19 |
## | 0.23 | 0.18 | |
## | 0.05 | 0.14 | |
## ---------------------------|-----------|-----------|-----------|
## Column Total | 8262 | 27610 | 35872 |
## | 0.23 | 0.77 | |
## ---------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 76 d.f. = 1 p = 3e-18
##
## Pearson's Chi-squared test with Yates' continuity correction
## ------------------------------------------------------------
## Chi^2 = 76 d.f. = 1 p = 3.4e-18
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Sample estimate odds ratio: 0.77
##
## Alternative hypothesis: true odds ratio is not equal to 1
## p = 8.4e-18
## 95% confidence interval: 0.72 0.81
##
## Alternative hypothesis: true odds ratio is less than 1
## p = 4.9e-18
## 95% confidence interval: 0 0.81
##
## Alternative hypothesis: true odds ratio is greater than 1
## p = 1
## 95% confidence interval: 0.73 Inf
##
##
##
CrossTable(main_processed$Reason.for.Cancellation_recode, main_processed$Cancellation.Group, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Cancellation.Group
## main_processed$Reason.for.Cancellation_recode | DNA | Hospital | N/A | Patient | Validation | Row Total |
## ----------------------------------------------|------------|------------|------------|------------|------------|------------|
## | 0 | 0 | 55297 | 0 | 0 | 55297 |
## | 5011.18 | 9633.56 | 33539.45 | 6253.96 | 858.85 | |
## | 5011.18 | 9633.56 | 14114.45 | 6253.96 | 858.85 | |
## | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.61 |
## | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | |
## | 0.00 | 0.00 | 0.61 | 0.00 | 0.00 | |
## ----------------------------------------------|------------|------------|------------|------------|------------|------------|
## By Consultant/Advanced Nurse | 0 | 4125 | 0 | 0 | 0 | 4125 |
## | 373.82 | 718.64 | 2501.95 | 466.53 | 64.07 | |
## | 373.82 | 16146.29 | 2501.95 | 466.53 | 64.07 | |
## | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.05 |
## | 0.00 | 0.26 | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.05 | 0.00 | 0.00 | 0.00 | |
## ----------------------------------------------|------------|------------|------------|------------|------------|------------|
## By Covid | 0 | 957 | 0 | 197 | 0 | 1154 |
## | 104.58 | 201.04 | 699.94 | 130.51 | 17.92 | |
## | 104.58 | 2842.51 | 699.94 | 33.87 | 17.92 | |
## | 0.00 | 0.83 | 0.00 | 0.17 | 0.00 | 0.01 |
## | 0.00 | 0.06 | 0.00 | 0.02 | 0.00 | |
## | 0.00 | 0.01 | 0.00 | 0.00 | 0.00 | |
## ----------------------------------------------|------------|------------|------------|------------|------------|------------|
## By Hospital | 0 | 10662 | 0 | 0 | 0 | 10662 |
## | 966.22 | 1857.48 | 6466.85 | 1205.85 | 165.60 | |
## | 966.22 | 41733.75 | 6466.85 | 1205.85 | 165.60 | |
## | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.12 |
## | 0.00 | 0.67 | 0.00 | 0.00 | 0.00 | |
## | 0.00 | 0.12 | 0.00 | 0.00 | 0.00 | |
## ----------------------------------------------|------------|------------|------------|------------|------------|------------|
## By Patient | 0 | 132 | 0 | 8939 | 1395 | 10466 |
## | 948.46 | 1823.33 | 6347.97 | 1183.68 | 162.55 | |
## | 948.46 | 1568.89 | 6347.97 | 50811.86 | 9344.14 | |
## | 0.00 | 0.01 | 0.00 | 0.85 | 0.13 | 0.11 |
## | 0.00 | 0.01 | 0.00 | 0.87 | 0.99 | |
## | 0.00 | 0.00 | 0.00 | 0.10 | 0.02 | |
## ----------------------------------------------|------------|------------|------------|------------|------------|------------|
## By Patient-health conditions | 0 | 7 | 0 | 1175 | 21 | 1203 |
## | 109.02 | 209.58 | 729.66 | 136.06 | 18.68 | |
## | 109.02 | 195.81 | 729.66 | 7933.50 | 0.29 | |
## | 0.00 | 0.01 | 0.00 | 0.98 | 0.02 | 0.01 |
## | 0.00 | 0.00 | 0.00 | 0.11 | 0.01 | |
## | 0.00 | 0.00 | 0.00 | 0.01 | 0.00 | |
## ----------------------------------------------|------------|------------|------------|------------|------------|------------|
## No show | 8262 | 0 | 0 | 0 | 0 | 8262 |
## | 748.73 | 1439.36 | 5011.18 | 934.41 | 128.32 | |
## | 75393.73 | 1439.36 | 5011.18 | 934.41 | 128.32 | |
## | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.09 |
## | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | |
## | 0.09 | 0.00 | 0.00 | 0.00 | 0.00 | |
## ----------------------------------------------|------------|------------|------------|------------|------------|------------|
## Column Total | 8262 | 15883 | 55297 | 10311 | 1416 | 91169 |
## | 0.09 | 0.17 | 0.61 | 0.11 | 0.02 | |
## ----------------------------------------------|------------|------------|------------|------------|------------|------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 270558 d.f. = 24 p = 0
##
##
##
CrossTable(main_processed$Cancellation.Group, main_processed$Rebooked.Indicator, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Rebooked.Indicator
## main_processed$Cancellation.Group | | No | Yes | Row Total |
## ----------------------------------|-----------|-----------|-----------|-----------|
## DNA | 0 | 8262 | 0 | 8262 |
## | 5011.18 | 1386.71 | 1864.11 | |
## | 5011.18 | 34087.54 | 1864.11 | |
## | 0.00 | 1.00 | 0.00 | 0.09 |
## | 0.00 | 0.54 | 0.00 | |
## | 0.00 | 0.09 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|-----------|
## Hospital | 0 | 2338 | 13545 | 15883 |
## | 9633.56 | 2665.84 | 3583.60 | |
## | 9633.56 | 40.32 | 27689.88 | |
## | 0.00 | 0.15 | 0.85 | 0.17 |
## | 0.00 | 0.15 | 0.66 | |
## | 0.00 | 0.03 | 0.15 | |
## ----------------------------------|-----------|-----------|-----------|-----------|
## N/A | 55297 | 0 | 0 | 55297 |
## | 33539.45 | 9281.17 | 12476.38 | |
## | 14114.45 | 9281.17 | 12476.38 | |
## | 1.00 | 0.00 | 0.00 | 0.61 |
## | 1.00 | 0.00 | 0.00 | |
## | 0.61 | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|-----------|
## Patient | 0 | 4023 | 6288 | 10311 |
## | 6253.96 | 1730.62 | 2326.42 | |
## | 6253.96 | 3036.49 | 6746.05 | |
## | 0.00 | 0.39 | 0.61 | 0.11 |
## | 0.00 | 0.26 | 0.31 | |
## | 0.00 | 0.04 | 0.07 | |
## ----------------------------------|-----------|-----------|-----------|-----------|
## Validation | 0 | 679 | 737 | 1416 |
## | 858.85 | 237.66 | 319.48 | |
## | 858.85 | 819.55 | 545.62 | |
## | 0.00 | 0.48 | 0.52 | 0.02 |
## | 0.00 | 0.04 | 0.04 | |
## | 0.00 | 0.01 | 0.01 | |
## ----------------------------------|-----------|-----------|-----------|-----------|
## Column Total | 55297 | 15302 | 20570 | 91169 |
## | 0.61 | 0.17 | 0.23 | |
## ----------------------------------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 132459 d.f. = 8 p = 0
##
##
##
CrossTable(main_processed$Reason.for.Cancellation_recode, main_processed$Rebooked.Indicator, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 91169
##
##
## | main_processed$Rebooked.Indicator
## main_processed$Reason.for.Cancellation_recode | | No | Yes | Row Total |
## ----------------------------------------------|-----------|-----------|-----------|-----------|
## | 55297 | 0 | 0 | 55297 |
## | 33539.45 | 9281.17 | 12476.38 | |
## | 14114.45 | 9281.17 | 12476.38 | |
## | 1.00 | 0.00 | 0.00 | 0.61 |
## | 1.00 | 0.00 | 0.00 | |
## | 0.61 | 0.00 | 0.00 | |
## ----------------------------------------------|-----------|-----------|-----------|-----------|
## By Consultant/Advanced Nurse | 0 | 140 | 3985 | 4125 |
## | 2501.95 | 692.35 | 930.70 | |
## | 2501.95 | 440.66 | 10023.32 | |
## | 0.00 | 0.03 | 0.97 | 0.05 |
## | 0.00 | 0.01 | 0.19 | |
## | 0.00 | 0.00 | 0.04 | |
## ----------------------------------------------|-----------|-----------|-----------|-----------|
## By Covid | 0 | 1030 | 124 | 1154 |
## | 699.94 | 193.69 | 260.37 | |
## | 699.94 | 3611.00 | 71.43 | |
## | 0.00 | 0.89 | 0.11 | 0.01 |
## | 0.00 | 0.07 | 0.01 | |
## | 0.00 | 0.01 | 0.00 | |
## ----------------------------------------------|-----------|-----------|-----------|-----------|
## By Hospital | 0 | 1258 | 9404 | 10662 |
## | 6466.85 | 1789.53 | 2405.61 | |
## | 6466.85 | 157.88 | 20359.64 | |
## | 0.00 | 0.12 | 0.88 | 0.12 |
## | 0.00 | 0.08 | 0.46 | |
## | 0.00 | 0.01 | 0.10 | |
## ----------------------------------------------|-----------|-----------|-----------|-----------|
## By Patient | 0 | 4140 | 6326 | 10466 |
## | 6347.97 | 1756.64 | 2361.39 | |
## | 6347.97 | 3233.70 | 6656.30 | |
## | 0.00 | 0.40 | 0.60 | 0.11 |
## | 0.00 | 0.27 | 0.31 | |
## | 0.00 | 0.05 | 0.07 | |
## ----------------------------------------------|-----------|-----------|-----------|-----------|
## By Patient-health conditions | 0 | 472 | 731 | 1203 |
## | 729.66 | 201.91 | 271.43 | |
## | 729.66 | 361.27 | 778.14 | |
## | 0.00 | 0.39 | 0.61 | 0.01 |
## | 0.00 | 0.03 | 0.04 | |
## | 0.00 | 0.01 | 0.01 | |
## ----------------------------------------------|-----------|-----------|-----------|-----------|
## No show | 0 | 8262 | 0 | 8262 |
## | 5011.18 | 1386.71 | 1864.11 | |
## | 5011.18 | 34087.54 | 1864.11 | |
## | 0.00 | 1.00 | 0.00 | 0.09 |
## | 0.00 | 0.54 | 0.00 | |
## | 0.00 | 0.09 | 0.00 | |
## ----------------------------------------------|-----------|-----------|-----------|-----------|
## Column Total | 55297 | 15302 | 20570 | 91169 |
## | 0.61 | 0.17 | 0.23 | |
## ----------------------------------------------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 139275 d.f. = 12 p = 0
##
##
##
## clinic relevance
CrossTable(main_processed$Clinic.Type_recode, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$Clinic.Type_recode | 0 | 1 | Row Total |
## ----------------------------------|-----------|-----------|-----------|
## FRA | 6 | 56 | 62 |
## | 27.79 | 34.21 | |
## | 17.08 | 13.88 | |
## | 0.10 | 0.90 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|
## GEN | 2 | 12 | 14 |
## | 6.28 | 7.72 | |
## | 2.91 | 2.37 | |
## | 0.14 | 0.86 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|
## MED | 76 | 8447 | 8523 |
## | 3820.14 | 4702.86 | |
## | 3669.66 | 2980.87 | |
## | 0.01 | 0.99 | 0.15 |
## | 0.00 | 0.28 | |
## | 0.00 | 0.15 | |
## ----------------------------------|-----------|-----------|-----------|
## SBC | 17003 | 4849 | 21852 |
## | 9794.42 | 12057.58 | |
## | 5305.44 | 4309.63 | |
## | 0.78 | 0.22 | 0.40 |
## | 0.69 | 0.16 | |
## | 0.31 | 0.09 | |
## ----------------------------------|-----------|-----------|-----------|
## TRI | 7698 | 17148 | 24846 |
## | 11136.37 | 13709.63 | |
## | 1061.60 | 862.34 | |
## | 0.31 | 0.69 | 0.45 |
## | 0.31 | 0.56 | |
## | 0.14 | 0.31 | |
## ----------------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## ----------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 18226 d.f. = 4 p = 0
##
##
##
CrossTable(main_processed$Clinic.Code, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$Clinic.Code | 0 | 1 | Row Total |
## ---------------------------|-----------|-----------|-----------|
## 424 | 4345 | 1383 | 5728 |
## | 2567.38 | 3160.62 | |
## | 1230.80 | 999.78 | |
## | 0.76 | 0.24 | 0.10 |
## | 0.18 | 0.05 | |
## | 0.08 | 0.03 | |
## ---------------------------|-----------|-----------|-----------|
## 440 | 2 | 12 | 14 |
## | 6.28 | 7.72 | |
## | 2.91 | 2.37 | |
## | 0.14 | 0.86 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------|-----------|-----------|-----------|
## 441 | 4766 | 742 | 5508 |
## | 2468.77 | 3039.23 | |
## | 2137.60 | 1736.38 | |
## | 0.87 | 0.13 | 0.10 |
## | 0.19 | 0.02 | |
## | 0.09 | 0.01 | |
## ---------------------------|-----------|-----------|-----------|
## 526 | 834 | 2255 | 3089 |
## | 1384.54 | 1704.46 | |
## | 218.91 | 177.82 | |
## | 0.27 | 0.73 | 0.06 |
## | 0.03 | 0.07 | |
## | 0.02 | 0.04 | |
## ---------------------------|-----------|-----------|-----------|
## 527 | 2151 | 3144 | 5295 |
## | 2373.30 | 2921.70 | |
## | 20.82 | 16.91 | |
## | 0.41 | 0.59 | 0.10 |
## | 0.09 | 0.10 | |
## | 0.04 | 0.06 | |
## ---------------------------|-----------|-----------|-----------|
## 757 | 4317 | 1210 | 5527 |
## | 2477.29 | 3049.71 | |
## | 1366.22 | 1109.79 | |
## | 0.78 | 0.22 | 0.10 |
## | 0.17 | 0.04 | |
## | 0.08 | 0.02 | |
## ---------------------------|-----------|-----------|-----------|
## 768 | 1 | 16 | 17 |
## | 7.62 | 9.38 | |
## | 5.75 | 4.67 | |
## | 0.06 | 0.94 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------|-----------|-----------|-----------|
## 771 | 1747 | 4481 | 6228 |
## | 2791.49 | 3436.51 | |
## | 390.82 | 317.46 | |
## | 0.28 | 0.72 | 0.11 |
## | 0.07 | 0.15 | |
## | 0.03 | 0.08 | |
## ---------------------------|-----------|-----------|-----------|
## 932 | 10 | 1984 | 1994 |
## | 893.74 | 1100.26 | |
## | 873.85 | 709.84 | |
## | 0.01 | 0.99 | 0.04 |
## | 0.00 | 0.07 | |
## | 0.00 | 0.04 | |
## ---------------------------|-----------|-----------|-----------|
## 933 | 18 | 1958 | 1976 |
## | 885.67 | 1090.33 | |
## | 850.04 | 690.49 | |
## | 0.01 | 0.99 | 0.04 |
## | 0.00 | 0.06 | |
## | 0.00 | 0.04 | |
## ---------------------------|-----------|-----------|-----------|
## 934 | 10 | 1364 | 1374 |
## | 615.85 | 758.15 | |
## | 596.01 | 484.14 | |
## | 0.01 | 0.99 | 0.02 |
## | 0.00 | 0.04 | |
## | 0.00 | 0.02 | |
## ---------------------------|-----------|-----------|-----------|
## 1132 | 28 | 2392 | 2420 |
## | 1084.68 | 1335.32 | |
## | 1029.41 | 836.19 | |
## | 0.01 | 0.99 | 0.04 |
## | 0.00 | 0.08 | |
## | 0.00 | 0.04 | |
## ---------------------------|-----------|-----------|-----------|
## 1133 | 2504 | 1331 | 3835 |
## | 1718.91 | 2116.09 | |
## | 358.58 | 291.28 | |
## | 0.65 | 0.35 | 0.07 |
## | 0.10 | 0.04 | |
## | 0.05 | 0.02 | |
## ---------------------------|-----------|-----------|-----------|
## 1134 | 2920 | 5486 | 8406 |
## | 3767.70 | 4638.30 | |
## | 190.73 | 154.93 | |
## | 0.35 | 0.65 | 0.15 |
## | 0.12 | 0.18 | |
## | 0.05 | 0.10 | |
## ---------------------------|-----------|-----------|-----------|
## 1187 | 5 | 40 | 45 |
## | 20.17 | 24.83 | |
## | 11.41 | 9.27 | |
## | 0.11 | 0.89 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------|-----------|-----------|-----------|
## 1333 | 1071 | 183 | 1254 |
## | 562.06 | 691.94 | |
## | 460.83 | 374.34 | |
## | 0.85 | 0.15 | 0.02 |
## | 0.04 | 0.01 | |
## | 0.02 | 0.00 | |
## ---------------------------|-----------|-----------|-----------|
## 1334 | 46 | 1782 | 1828 |
## | 819.34 | 1008.66 | |
## | 729.92 | 592.92 | |
## | 0.03 | 0.97 | 0.03 |
## | 0.00 | 0.06 | |
## | 0.00 | 0.03 | |
## ---------------------------|-----------|-----------|-----------|
## 1335 | 10 | 749 | 759 |
## | 340.20 | 418.80 | |
## | 320.49 | 260.34 | |
## | 0.01 | 0.99 | 0.01 |
## | 0.00 | 0.02 | |
## | 0.00 | 0.01 | |
## ---------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## ---------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 19564 d.f. = 17 p = 0
##
##
##
CrossTable(main_processed$NurseFlag, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$NurseFlag | 0 | 1 | Row Total |
## -------------------------|-----------|-----------|-----------|
## N | 24784 | 30496 | 55280 |
## | 24777.38 | 30502.62 | |
## | 0.00 | 0.00 | |
## | 0.45 | 0.55 | 1.00 |
## | 1.00 | 1.00 | |
## | 0.45 | 0.55 | |
## -------------------------|-----------|-----------|-----------|
## Y | 1 | 16 | 17 |
## | 7.62 | 9.38 | |
## | 5.75 | 4.67 | |
## | 0.06 | 0.94 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## -------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 10 d.f. = 1 p = 0.0012
##
## Pearson's Chi-squared test with Yates' continuity correction
## ------------------------------------------------------------
## Chi^2 = 8.9 d.f. = 1 p = 0.0028
##
##
CrossTable(main_processed$Referral.Source_recode, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$Referral.Source_recode | 0 | 1 | Row Total |
## --------------------------------------|-----------|-----------|-----------|
## BREAST CHECK | 348 | 600 | 948 |
## | 424.91 | 523.09 | |
## | 13.92 | 11.31 | |
## | 0.37 | 0.63 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.01 | 0.01 | |
## --------------------------------------|-----------|-----------|-----------|
## CLINIC | 20534 | 4691 | 25225 |
## | 11306.25 | 13918.75 | |
## | 7531.36 | 6117.75 | |
## | 0.81 | 0.19 | 0.46 |
## | 0.83 | 0.15 | |
## | 0.37 | 0.08 | |
## --------------------------------------|-----------|-----------|-----------|
## Elsew of Mater | 20 | 37 | 57 |
## | 25.55 | 31.45 | |
## | 1.20 | 0.98 | |
## | 0.35 | 0.65 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## --------------------------------------|-----------|-----------|-----------|
## Elsew outside Mater | 156 | 896 | 1052 |
## | 471.52 | 580.48 | |
## | 211.13 | 171.51 | |
## | 0.15 | 0.85 | 0.02 |
## | 0.01 | 0.03 | |
## | 0.00 | 0.02 | |
## --------------------------------------|-----------|-----------|-----------|
## EMERGENCY DEPT | 8 | 46 | 54 |
## | 24.20 | 29.80 | |
## | 10.85 | 8.81 | |
## | 0.15 | 0.85 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## --------------------------------------|-----------|-----------|-----------|
## GP | 514 | 22667 | 23181 |
## | 10390.10 | 12790.90 | |
## | 9387.52 | 7625.52 | |
## | 0.02 | 0.98 | 0.42 |
## | 0.02 | 0.74 | |
## | 0.01 | 0.41 | |
## --------------------------------------|-----------|-----------|-----------|
## OTHER CONSULTANT | 25 | 157 | 182 |
## | 81.58 | 100.42 | |
## | 39.24 | 31.87 | |
## | 0.14 | 0.86 | 0.00 |
## | 0.00 | 0.01 | |
## | 0.00 | 0.00 | |
## --------------------------------------|-----------|-----------|-----------|
## WARD | 3180 | 1418 | 4598 |
## | 2060.90 | 2537.10 | |
## | 607.69 | 493.63 | |
## | 0.69 | 0.31 | 0.08 |
## | 0.13 | 0.05 | |
## | 0.06 | 0.03 | |
## --------------------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## --------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 32264 d.f. = 7 p = 0
##
##
##
#CrossTable(main_processed$Referring.Hospital, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
CrossTable(main_processed$Consultant_recode, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$Consultant_recode | 0 | 1 | Row Total |
## ---------------------------------|-----------|-----------|-----------|
## BARRYM | 6074 | 7675 | 13749 |
## | 6162.52 | 7586.48 | |
## | 1.27 | 1.03 | |
## | 0.44 | 0.56 | 0.25 |
## | 0.25 | 0.25 | |
## | 0.11 | 0.14 | |
## ---------------------------------|-----------|-----------|-----------|
## HEENEY | 1127 | 2714 | 3841 |
## | 1721.60 | 2119.40 | |
## | 205.36 | 166.81 | |
## | 0.29 | 0.71 | 0.07 |
## | 0.05 | 0.09 | |
## | 0.02 | 0.05 | |
## ---------------------------------|-----------|-----------|-----------|
## KELLM | 6514 | 6485 | 12999 |
## | 5826.36 | 7172.64 | |
## | 81.16 | 65.92 | |
## | 0.50 | 0.50 | 0.24 |
## | 0.26 | 0.21 | |
## | 0.12 | 0.12 | |
## ---------------------------------|-----------|-----------|-----------|
## STOKES | 5613 | 4389 | 10002 |
## | 4483.06 | 5518.94 | |
## | 284.80 | 231.34 | |
## | 0.56 | 0.44 | 0.18 |
## | 0.23 | 0.14 | |
## | 0.10 | 0.08 | |
## ---------------------------------|-----------|-----------|-----------|
## WALSSI | 5457 | 9249 | 14706 |
## | 6591.46 | 8114.54 | |
## | 195.25 | 158.61 | |
## | 0.37 | 0.63 | 0.27 |
## | 0.22 | 0.30 | |
## | 0.10 | 0.17 | |
## ---------------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## ---------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1392 d.f. = 4 p = 4.7e-300
##
##
##
CrossTable(main_processed$Insurance.Scheme_recode, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$Insurance.Scheme_recode | 0 | 1 | Row Total |
## ---------------------------------------|-----------|-----------|-----------|
## A | 23 | 20 | 43 |
## | 19.27 | 23.73 | |
## | 0.72 | 0.59 | |
## | 0.53 | 0.47 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## B | 2065 | 2087 | 4152 |
## | 1860.99 | 2291.01 | |
## | 22.36 | 18.17 | |
## | 0.50 | 0.50 | 0.08 |
## | 0.08 | 0.07 | |
## | 0.04 | 0.04 | |
## ---------------------------------------|-----------|-----------|-----------|
## C | 10 | 6 | 16 |
## | 7.17 | 8.83 | |
## | 1.12 | 0.91 | |
## | 0.62 | 0.38 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## D | 7843 | 6958 | 14801 |
## | 6634.04 | 8166.96 | |
## | 220.31 | 178.96 | |
## | 0.53 | 0.47 | 0.27 |
## | 0.32 | 0.23 | |
## | 0.14 | 0.13 | |
## ---------------------------------------|-----------|-----------|-----------|
## E | 80 | 46 | 126 |
## | 56.48 | 69.52 | |
## | 9.80 | 7.96 | |
## | 0.63 | 0.37 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## G | 176 | 196 | 372 |
## | 166.74 | 205.26 | |
## | 0.51 | 0.42 | |
## | 0.47 | 0.53 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## H | 38 | 26 | 64 |
## | 28.69 | 35.31 | |
## | 3.02 | 2.46 | |
## | 0.59 | 0.41 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## I | 1822 | 1920 | 3742 |
## | 1677.22 | 2064.78 | |
## | 12.50 | 10.15 | |
## | 0.49 | 0.51 | 0.07 |
## | 0.07 | 0.06 | |
## | 0.03 | 0.03 | |
## ---------------------------------------|-----------|-----------|-----------|
## J | 49 | 26 | 75 |
## | 33.62 | 41.38 | |
## | 7.04 | 5.72 | |
## | 0.65 | 0.35 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## M | 0 | 4 | 4 |
## | 1.79 | 2.21 | |
## | 1.79 | 1.46 | |
## | 0.00 | 1.00 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## O | 148 | 210 | 358 |
## | 160.46 | 197.54 | |
## | 0.97 | 0.79 | |
## | 0.41 | 0.59 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## P | 76 | 45 | 121 |
## | 54.23 | 66.77 | |
## | 8.74 | 7.10 | |
## | 0.63 | 0.37 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------|-----------|-----------|-----------|
## S | 822 | 890 | 1712 |
## | 767.35 | 944.65 | |
## | 3.89 | 3.16 | |
## | 0.48 | 0.52 | 0.03 |
## | 0.03 | 0.03 | |
## | 0.01 | 0.02 | |
## ---------------------------------------|-----------|-----------|-----------|
## U | 6768 | 13477 | 20245 |
## | 9074.13 | 11170.87 | |
## | 586.09 | 476.08 | |
## | 0.33 | 0.67 | 0.37 |
## | 0.27 | 0.44 | |
## | 0.12 | 0.24 | |
## ---------------------------------------|-----------|-----------|-----------|
## V | 4865 | 4601 | 9466 |
## | 4242.81 | 5223.19 | |
## | 91.24 | 74.12 | |
## | 0.51 | 0.49 | 0.17 |
## | 0.20 | 0.15 | |
## | 0.09 | 0.08 | |
## ---------------------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## ---------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1758 d.f. = 14 p = 0
##
##
##
CrossTable(main_processed$Eligibility_recode, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$Eligibility_recode | 0 | 1 | Row Total |
## ----------------------------------|-----------|-----------|-----------|
## ACUTE UNCLASSIFIED | 58 | 78 | 136 |
## | 60.96 | 75.04 | |
## | 0.14 | 0.12 | |
## | 0.43 | 0.57 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|
## ELIGIBILITY UNKNOWN | 282 | 718 | 1000 |
## | 448.22 | 551.78 | |
## | 61.64 | 50.07 | |
## | 0.28 | 0.72 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.01 | 0.01 | |
## ----------------------------------|-----------|-----------|-----------|
## EXEMPT | 726 | 699 | 1425 |
## | 638.71 | 786.29 | |
## | 11.93 | 9.69 | |
## | 0.51 | 0.49 | 0.03 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.01 | |
## ----------------------------------|-----------|-----------|-----------|
## MEDICAL CARD | 10861 | 11372 | 22233 |
## | 9965.19 | 12267.81 | |
## | 80.53 | 65.41 | |
## | 0.49 | 0.51 | 0.40 |
## | 0.44 | 0.37 | |
## | 0.20 | 0.21 | |
## ----------------------------------|-----------|-----------|-----------|
## NON ACUTE UNCLASSIFIED | 12 | 9 | 21 |
## | 9.41 | 11.59 | |
## | 0.71 | 0.58 | |
## | 0.57 | 0.43 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|
## NON MEDICAL CARD | 12719 | 17583 | 30302 |
## | 13581.84 | 16720.16 | |
## | 54.82 | 44.53 | |
## | 0.42 | 0.58 | 0.55 |
## | 0.51 | 0.58 | |
## | 0.23 | 0.32 | |
## ----------------------------------|-----------|-----------|-----------|
## RESEARCH/NATIONAL PROG. | 127 | 53 | 180 |
## | 80.68 | 99.32 | |
## | 26.59 | 21.60 | |
## | 0.71 | 0.29 | 0.00 |
## | 0.01 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## ----------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 428 d.f. = 6 p = 2.2e-89
##
##
##
CrossTable(main_processed$Booking.Type_recode, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$Booking.Type_recode | 0 | 1 | Row Total |
## -----------------------------------|-----------|-----------|-----------|
## NEW | 637 | 23599 | 24236 |
## | 10862.96 | 13373.04 | |
## | 9626.32 | 7819.49 | |
## | 0.03 | 0.97 | 0.44 |
## | 0.03 | 0.77 | |
## | 0.01 | 0.43 | |
## -----------------------------------|-----------|-----------|-----------|
## RETURN | 21771 | 5944 | 27715 |
## | 12422.31 | 15292.69 | |
## | 7035.58 | 5715.02 | |
## | 0.79 | 0.21 | 0.50 |
## | 0.88 | 0.19 | |
## | 0.39 | 0.11 | |
## -----------------------------------|-----------|-----------|-----------|
## WARD | 2377 | 969 | 3346 |
## | 1499.73 | 1846.27 | |
## | 513.16 | 416.84 | |
## | 0.71 | 0.29 | 0.06 |
## | 0.10 | 0.03 | |
## | 0.04 | 0.02 | |
## -----------------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## -----------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 31126 d.f. = 2 p = 0
##
##
##
CrossTable(main_processed$Hospital.Catchment_recode, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$Hospital.Catchment_recode | 0 | 1 | Row Total |
## -----------------------------------------|-----------|-----------|-----------|
## Beaumont | 1194 | 904 | 2098 |
## | 940.36 | 1157.64 | |
## | 68.42 | 55.57 | |
## | 0.57 | 0.43 | 0.04 |
## | 0.05 | 0.03 | |
## | 0.02 | 0.02 | |
## -----------------------------------------|-----------|-----------|-----------|
## Connolly | 2495 | 3742 | 6237 |
## | 2795.52 | 3441.48 | |
## | 32.31 | 26.24 | |
## | 0.40 | 0.60 | 0.11 |
## | 0.10 | 0.12 | |
## | 0.05 | 0.07 | |
## -----------------------------------------|-----------|-----------|-----------|
## International | 54 | 54 | 108 |
## | 48.41 | 59.59 | |
## | 0.65 | 0.52 | |
## | 0.50 | 0.50 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -----------------------------------------|-----------|-----------|-----------|
## James | 242 | 351 | 593 |
## | 265.79 | 327.21 | |
## | 2.13 | 1.73 | |
## | 0.41 | 0.59 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.01 | |
## -----------------------------------------|-----------|-----------|-----------|
## Mater | 5676 | 8021 | 13697 |
## | 6139.21 | 7557.79 | |
## | 34.95 | 28.39 | |
## | 0.41 | 0.59 | 0.25 |
## | 0.23 | 0.26 | |
## | 0.10 | 0.15 | |
## -----------------------------------------|-----------|-----------|-----------|
## National | 14797 | 16990 | 31787 |
## | 14247.44 | 17539.56 | |
## | 21.20 | 17.22 | |
## | 0.47 | 0.53 | 0.57 |
## | 0.60 | 0.56 | |
## | 0.27 | 0.31 | |
## -----------------------------------------|-----------|-----------|-----------|
## Tallaght | 78 | 162 | 240 |
## | 107.57 | 132.43 | |
## | 8.13 | 6.60 | |
## | 0.32 | 0.68 | 0.00 |
## | 0.00 | 0.01 | |
## | 0.00 | 0.00 | |
## -----------------------------------------|-----------|-----------|-----------|
## Vincents | 249 | 288 | 537 |
## | 240.69 | 296.31 | |
## | 0.29 | 0.23 | |
## | 0.46 | 0.54 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.01 | |
## -----------------------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## -----------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 305 d.f. = 7 p = 6.4e-62
##
##
##
CrossTable(main_processed$bookedDay, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 52987
##
##
## | main_processed$No.New.Attendances
## main_processed$bookedDay | 0 | 1 | Row Total |
## -------------------------|-----------|-----------|-----------|
## Friday | 3327 | 5063 | 8390 |
## | 3721.64 | 4668.36 | |
## | 41.85 | 33.36 | |
## | 0.40 | 0.60 | 0.16 |
## | 0.14 | 0.17 | |
## | 0.06 | 0.10 | |
## -------------------------|-----------|-----------|-----------|
## Monday | 5569 | 5992 | 11561 |
## | 5128.23 | 6432.77 | |
## | 37.88 | 30.20 | |
## | 0.48 | 0.52 | 0.22 |
## | 0.24 | 0.20 | |
## | 0.11 | 0.11 | |
## -------------------------|-----------|-----------|-----------|
## Saturday | 16 | 137 | 153 |
## | 67.87 | 85.13 | |
## | 39.64 | 31.60 | |
## | 0.10 | 0.90 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------|-----------|-----------|-----------|
## Sunday | 9 | 1 | 10 |
## | 4.44 | 5.56 | |
## | 4.70 | 3.74 | |
## | 0.90 | 0.10 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------|-----------|-----------|-----------|
## Thursday | 4270 | 5956 | 10226 |
## | 4536.05 | 5689.95 | |
## | 15.60 | 12.44 | |
## | 0.42 | 0.58 | 0.19 |
## | 0.18 | 0.20 | |
## | 0.08 | 0.11 | |
## -------------------------|-----------|-----------|-----------|
## Tuesday | 5325 | 6513 | 11838 |
## | 5251.11 | 6586.89 | |
## | 1.04 | 0.83 | |
## | 0.45 | 0.55 | 0.22 |
## | 0.23 | 0.22 | |
## | 0.10 | 0.12 | |
## -------------------------|-----------|-----------|-----------|
## Wednesday | 4988 | 5821 | 10809 |
## | 4794.66 | 6014.34 | |
## | 7.80 | 6.22 | |
## | 0.46 | 0.54 | 0.20 |
## | 0.21 | 0.20 | |
## | 0.09 | 0.11 | |
## -------------------------|-----------|-----------|-----------|
## Column Total | 23504 | 29483 | 52987 |
## | 0.44 | 0.56 | |
## -------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 267 d.f. = 6 p = 1e-54
##
##
##
CrossTable(main_processed$bookedMonthYear, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 52987
##
##
## | main_processed$No.New.Attendances
## main_processed$bookedMonthYear | 0 | 1 | Row Total |
## -------------------------------|-----------|-----------|-----------|
## 2017-08 | 0 | 1 | 1 |
## | 0.44 | 0.56 | |
## | 0.44 | 0.35 | |
## | 0.00 | 1.00 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-01 | 82 | 7 | 89 |
## | 39.48 | 49.52 | |
## | 45.80 | 36.51 | |
## | 0.92 | 0.08 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-02 | 58 | 8 | 66 |
## | 29.28 | 36.72 | |
## | 28.18 | 22.47 | |
## | 0.88 | 0.12 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-03 | 38 | 2 | 40 |
## | 17.74 | 22.26 | |
## | 23.13 | 18.44 | |
## | 0.95 | 0.05 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-04 | 11 | 4 | 15 |
## | 6.65 | 8.35 | |
## | 2.84 | 2.26 | |
## | 0.73 | 0.27 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-05 | 31 | 2 | 33 |
## | 14.64 | 18.36 | |
## | 18.29 | 14.58 | |
## | 0.94 | 0.06 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-06 | 59 | 5 | 64 |
## | 28.39 | 35.61 | |
## | 33.01 | 26.31 | |
## | 0.92 | 0.08 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-07 | 136 | 15 | 151 |
## | 66.98 | 84.02 | |
## | 71.12 | 56.70 | |
## | 0.90 | 0.10 | 0.00 |
## | 0.01 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-08 | 147 | 9 | 156 |
## | 69.20 | 86.80 | |
## | 87.47 | 69.73 | |
## | 0.94 | 0.06 | 0.00 |
## | 0.01 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-09 | 92 | 12 | 104 |
## | 46.13 | 57.87 | |
## | 45.60 | 36.36 | |
## | 0.88 | 0.12 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-10 | 130 | 18 | 148 |
## | 65.65 | 82.35 | |
## | 63.08 | 50.28 | |
## | 0.88 | 0.12 | 0.00 |
## | 0.01 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-11 | 146 | 64 | 210 |
## | 93.15 | 116.85 | |
## | 29.98 | 23.90 | |
## | 0.70 | 0.30 | 0.00 |
## | 0.01 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2019-12 | 160 | 363 | 523 |
## | 231.99 | 291.01 | |
## | 22.34 | 17.81 | |
## | 0.31 | 0.69 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.00 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-01 | 479 | 839 | 1318 |
## | 584.64 | 733.36 | |
## | 19.09 | 15.22 | |
## | 0.36 | 0.64 | 0.02 |
## | 0.02 | 0.03 | |
## | 0.01 | 0.02 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-02 | 394 | 605 | 999 |
## | 443.14 | 555.86 | |
## | 5.45 | 4.34 | |
## | 0.39 | 0.61 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-03 | 165 | 116 | 281 |
## | 124.65 | 156.35 | |
## | 13.06 | 10.42 | |
## | 0.59 | 0.41 | 0.01 |
## | 0.01 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-04 | 83 | 217 | 300 |
## | 133.07 | 166.93 | |
## | 18.84 | 15.02 | |
## | 0.28 | 0.72 | 0.01 |
## | 0.00 | 0.01 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-05 | 341 | 320 | 661 |
## | 293.21 | 367.79 | |
## | 7.79 | 6.21 | |
## | 0.52 | 0.48 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-06 | 869 | 402 | 1271 |
## | 563.79 | 707.21 | |
## | 165.23 | 131.72 | |
## | 0.68 | 0.32 | 0.02 |
## | 0.04 | 0.01 | |
## | 0.02 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-07 | 817 | 594 | 1411 |
## | 625.89 | 785.11 | |
## | 58.35 | 46.52 | |
## | 0.58 | 0.42 | 0.03 |
## | 0.03 | 0.02 | |
## | 0.02 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-08 | 853 | 650 | 1503 |
## | 666.70 | 836.30 | |
## | 52.06 | 41.50 | |
## | 0.57 | 0.43 | 0.03 |
## | 0.04 | 0.02 | |
## | 0.02 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-09 | 568 | 777 | 1345 |
## | 596.62 | 748.38 | |
## | 1.37 | 1.09 | |
## | 0.42 | 0.58 | 0.03 |
## | 0.02 | 0.03 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-10 | 503 | 688 | 1191 |
## | 528.30 | 662.70 | |
## | 1.21 | 0.97 | |
## | 0.42 | 0.58 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-11 | 644 | 769 | 1413 |
## | 626.78 | 786.22 | |
## | 0.47 | 0.38 | |
## | 0.46 | 0.54 | 0.03 |
## | 0.03 | 0.03 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2020-12 | 438 | 464 | 902 |
## | 400.11 | 501.89 | |
## | 3.59 | 2.86 | |
## | 0.49 | 0.51 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-01 | 352 | 334 | 686 |
## | 304.30 | 381.70 | |
## | 7.48 | 5.96 | |
## | 0.51 | 0.49 | 0.01 |
## | 0.01 | 0.01 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-02 | 426 | 563 | 989 |
## | 438.70 | 550.30 | |
## | 0.37 | 0.29 | |
## | 0.43 | 0.57 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-03 | 468 | 849 | 1317 |
## | 584.20 | 732.80 | |
## | 23.11 | 18.42 | |
## | 0.36 | 0.64 | 0.02 |
## | 0.02 | 0.03 | |
## | 0.01 | 0.02 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-04 | 422 | 692 | 1114 |
## | 494.15 | 619.85 | |
## | 10.53 | 8.40 | |
## | 0.38 | 0.62 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-05 | 376 | 637 | 1013 |
## | 449.35 | 563.65 | |
## | 11.97 | 9.54 | |
## | 0.37 | 0.63 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-06 | 331 | 616 | 947 |
## | 420.07 | 526.93 | |
## | 18.89 | 15.06 | |
## | 0.35 | 0.65 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-07 | 434 | 665 | 1099 |
## | 487.49 | 611.51 | |
## | 5.87 | 4.68 | |
## | 0.39 | 0.61 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-08 | 653 | 617 | 1270 |
## | 563.35 | 706.65 | |
## | 14.27 | 11.37 | |
## | 0.51 | 0.49 | 0.02 |
## | 0.03 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-09 | 547 | 855 | 1402 |
## | 621.90 | 780.10 | |
## | 9.02 | 7.19 | |
## | 0.39 | 0.61 | 0.03 |
## | 0.02 | 0.03 | |
## | 0.01 | 0.02 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-10 | 584 | 627 | 1211 |
## | 537.18 | 673.82 | |
## | 4.08 | 3.25 | |
## | 0.48 | 0.52 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-11 | 412 | 563 | 975 |
## | 432.49 | 542.51 | |
## | 0.97 | 0.77 | |
## | 0.42 | 0.58 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2021-12 | 365 | 588 | 953 |
## | 422.73 | 530.27 | |
## | 7.88 | 6.29 | |
## | 0.38 | 0.62 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-01 | 428 | 564 | 992 |
## | 440.03 | 551.97 | |
## | 0.33 | 0.26 | |
## | 0.43 | 0.57 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-02 | 452 | 605 | 1057 |
## | 468.86 | 588.14 | |
## | 0.61 | 0.48 | |
## | 0.43 | 0.57 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-03 | 515 | 662 | 1177 |
## | 522.09 | 654.91 | |
## | 0.10 | 0.08 | |
## | 0.44 | 0.56 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-04 | 432 | 568 | 1000 |
## | 443.58 | 556.42 | |
## | 0.30 | 0.24 | |
## | 0.43 | 0.57 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-05 | 470 | 772 | 1242 |
## | 550.93 | 691.07 | |
## | 11.89 | 9.48 | |
## | 0.38 | 0.62 | 0.02 |
## | 0.02 | 0.03 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-06 | 474 | 760 | 1234 |
## | 547.38 | 686.62 | |
## | 9.84 | 7.84 | |
## | 0.38 | 0.62 | 0.02 |
## | 0.02 | 0.03 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-07 | 524 | 725 | 1249 |
## | 554.03 | 694.97 | |
## | 1.63 | 1.30 | |
## | 0.42 | 0.58 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-08 | 434 | 530 | 964 |
## | 427.61 | 536.39 | |
## | 0.10 | 0.08 | |
## | 0.45 | 0.55 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-09 | 561 | 706 | 1267 |
## | 562.02 | 704.98 | |
## | 0.00 | 0.00 | |
## | 0.44 | 0.56 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-10 | 702 | 795 | 1497 |
## | 664.04 | 832.96 | |
## | 2.17 | 1.73 | |
## | 0.47 | 0.53 | 0.03 |
## | 0.03 | 0.03 | |
## | 0.01 | 0.02 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-11 | 466 | 649 | 1115 |
## | 494.59 | 620.41 | |
## | 1.65 | 1.32 | |
## | 0.42 | 0.58 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2022-12 | 360 | 468 | 828 |
## | 367.28 | 460.72 | |
## | 0.14 | 0.12 | |
## | 0.43 | 0.57 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-01 | 536 | 716 | 1252 |
## | 555.36 | 696.64 | |
## | 0.68 | 0.54 | |
## | 0.43 | 0.57 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-02 | 460 | 554 | 1014 |
## | 449.79 | 564.21 | |
## | 0.23 | 0.18 | |
## | 0.45 | 0.55 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-03 | 501 | 660 | 1161 |
## | 515.00 | 646.00 | |
## | 0.38 | 0.30 | |
## | 0.43 | 0.57 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-04 | 529 | 688 | 1217 |
## | 539.84 | 677.16 | |
## | 0.22 | 0.17 | |
## | 0.43 | 0.57 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-05 | 515 | 761 | 1276 |
## | 566.01 | 709.99 | |
## | 4.60 | 3.66 | |
## | 0.40 | 0.60 | 0.02 |
## | 0.02 | 0.03 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-06 | 522 | 670 | 1192 |
## | 528.75 | 663.25 | |
## | 0.09 | 0.07 | |
## | 0.44 | 0.56 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-07 | 533 | 658 | 1191 |
## | 528.30 | 662.70 | |
## | 0.04 | 0.03 | |
## | 0.45 | 0.55 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-08 | 420 | 582 | 1002 |
## | 444.47 | 557.53 | |
## | 1.35 | 1.07 | |
## | 0.42 | 0.58 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-09 | 302 | 627 | 929 |
## | 412.09 | 516.91 | |
## | 29.41 | 23.44 | |
## | 0.33 | 0.67 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-10 | 339 | 484 | 823 |
## | 365.07 | 457.93 | |
## | 1.86 | 1.48 | |
## | 0.41 | 0.59 | 0.02 |
## | 0.01 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-11 | 354 | 605 | 959 |
## | 425.39 | 533.61 | |
## | 11.98 | 9.55 | |
## | 0.37 | 0.63 | 0.02 |
## | 0.02 | 0.02 | |
## | 0.01 | 0.01 | |
## -------------------------------|-----------|-----------|-----------|
## 2023-12 | 61 | 117 | 178 |
## | 78.96 | 99.04 | |
## | 4.08 | 3.26 | |
## | 0.34 | 0.66 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -------------------------------|-----------|-----------|-----------|
## Column Total | 23504 | 29483 | 52987 |
## | 0.44 | 0.56 | |
## -------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1826 d.f. = 60 p = 0
##
##
##
## difference between New Attendance and booking
leveneTest(daysDiff_attendanceBooked ~ as.factor(No.New.Attendances), data=main_processed) #leveneTest is Ha
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 1 59.1 1.6e-14 ***
## 52985
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
t.test(daysDiff_attendanceBooked ~ No.New.Attendances, var.equal=F, data=main_processed)
##
## Welch Two Sample t-test
##
## data: daysDiff_attendanceBooked by No.New.Attendances
## t = -18, df = 49014, p-value <2e-16
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
## -73 -59
## sample estimates:
## mean in group 0 mean in group 1
## 480 546
## patient characteristics relevance
CrossTable(main_processed$Gender, main_processed$No.New.Attendances, digits=2, fisher=TRUE, chisq=TRUE, expected=TRUE)
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$Gender | 0 | 1 | Row Total |
## ----------------------|-----------|-----------|-----------|
## Female | 24598 | 29649 | 54247 |
## | 24314.37 | 29932.63 | |
## | 3.31 | 2.69 | |
## | 0.45 | 0.55 | 0.98 |
## | 0.99 | 0.97 | |
## | 0.44 | 0.54 | |
## ----------------------|-----------|-----------|-----------|
## Male | 187 | 861 | 1048 |
## | 469.73 | 578.27 | |
## | 170.18 | 138.23 | |
## | 0.18 | 0.82 | 0.02 |
## | 0.01 | 0.03 | |
## | 0.00 | 0.02 | |
## ----------------------|-----------|-----------|-----------|
## Unknown | 0 | 2 | 2 |
## | 0.90 | 1.10 | |
## | 0.90 | 0.73 | |
## | 0.00 | 1.00 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ----------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## ----------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 316 d.f. = 2 p = 2.4e-69
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 2.7e-77
##
##
CrossTable(main_processed$Age.at.Attendance.Cat.HSE, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE) # age group
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$Age.at.Attendance.Cat.HSE | 0 | 1 | Row Total |
## -----------------------------------------|-----------|-----------|-----------|
## 0 - 4 | 0 | 0 | 0 |
## | 0.00 | 0.00 | |
## | NaN | NaN | |
## | NaN | NaN | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -----------------------------------------|-----------|-----------|-----------|
## 10 - 14 | 29 | 74 | 103 |
## | 46.17 | 56.83 | |
## | 6.38 | 5.18 | |
## | 0.28 | 0.72 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## -----------------------------------------|-----------|-----------|-----------|
## 15 - 24 | 333 | 1702 | 2035 |
## | 912.12 | 1122.88 | |
## | 367.69 | 298.68 | |
## | 0.16 | 0.84 | 0.04 |
## | 0.01 | 0.06 | |
## | 0.01 | 0.03 | |
## -----------------------------------------|-----------|-----------|-----------|
## 25 - 34 | 1157 | 4752 | 5909 |
## | 2648.51 | 3260.49 | |
## | 839.94 | 682.29 | |
## | 0.20 | 0.80 | 0.11 |
## | 0.05 | 0.16 | |
## | 0.02 | 0.09 | |
## -----------------------------------------|-----------|-----------|-----------|
## 35 - 44 | 4057 | 7768 | 11825 |
## | 5300.15 | 6524.85 | |
## | 291.58 | 236.85 | |
## | 0.34 | 0.66 | 0.21 |
## | 0.16 | 0.25 | |
## | 0.07 | 0.14 | |
## -----------------------------------------|-----------|-----------|-----------|
## 45 - 54 | 6114 | 7065 | 13179 |
## | 5907.04 | 7271.96 | |
## | 7.25 | 5.89 | |
## | 0.46 | 0.54 | 0.24 |
## | 0.25 | 0.23 | |
## | 0.11 | 0.13 | |
## -----------------------------------------|-----------|-----------|-----------|
## 55 - 64 | 6275 | 4461 | 10736 |
## | 4812.05 | 5923.95 | |
## | 444.77 | 361.28 | |
## | 0.58 | 0.42 | 0.19 |
## | 0.25 | 0.15 | |
## | 0.11 | 0.08 | |
## -----------------------------------------|-----------|-----------|-----------|
## 65 - 74 | 4466 | 3074 | 7540 |
## | 3379.55 | 4160.45 | |
## | 349.27 | 283.71 | |
## | 0.59 | 0.41 | 0.14 |
## | 0.18 | 0.10 | |
## | 0.08 | 0.06 | |
## -----------------------------------------|-----------|-----------|-----------|
## 75 - 84 | 1926 | 1333 | 3259 |
## | 1460.74 | 1798.26 | |
## | 148.19 | 120.38 | |
## | 0.59 | 0.41 | 0.06 |
## | 0.08 | 0.04 | |
## | 0.03 | 0.02 | |
## -----------------------------------------|-----------|-----------|-----------|
## 85 >= | 428 | 283 | 711 |
## | 318.68 | 392.32 | |
## | 37.50 | 30.46 | |
## | 0.60 | 0.40 | 0.01 |
## | 0.02 | 0.01 | |
## | 0.01 | 0.01 | |
## -----------------------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## -----------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = NaN d.f. = 9 p = NaN
##
##
##
leveneTest(Age.at.Attendance ~ as.factor(No.New.Attendances), data=main_processed)
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 1 203 <2e-16 ***
## 55295
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
t.test(Age.at.Attendance ~ No.New.Attendances, var.equal=FALSE, data=main_processed) #leveneTest is Ha
##
## Welch Two Sample t-test
##
## data: Age.at.Attendance by No.New.Attendances
## t = 67, df = 54558, p-value <2e-16
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
## 8.1 8.6
## sample estimates:
## mean in group 0 mean in group 1
## 56 47
wilcox.test(main_processed$Age.at.Attendance ~ main_processed$No.New.Attendances)
##
## Wilcoxon rank sum test with continuity correction
##
## data: main_processed$Age.at.Attendance by main_processed$No.New.Attendances
## W = 5e+08, p-value <2e-16
## alternative hypothesis: true location shift is not equal to 0
CrossTable(main_processed$Area.of.Residence_recode, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE) # remove Na or impute where no residence
## Warning in chisq.test(t, correct = FALSE, ...): Chi-squared approximation may
## be incorrect
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$Area.of.Residence_recode | 0 | 1 | Row Total |
## ---------------------------------------------|-----------|-----------|-----------|
## DUBLIN NTH | 11084 | 14102 | 25186 |
## | 11288.77 | 13897.23 | |
## | 3.71 | 3.02 | |
## | 0.44 | 0.56 | 0.46 |
## | 0.45 | 0.46 | |
## | 0.20 | 0.26 | |
## ---------------------------------------------|-----------|-----------|-----------|
## DUBLIN STH | 570 | 804 | 1374 |
## | 615.85 | 758.15 | |
## | 3.41 | 2.77 | |
## | 0.41 | 0.59 | 0.02 |
## | 0.02 | 0.03 | |
## | 0.01 | 0.01 | |
## ---------------------------------------------|-----------|-----------|-----------|
## EASTERN & MIDLAND REGION (excl.Dublin,Meath) | 5953 | 6641 | 12594 |
## | 5644.83 | 6949.17 | |
## | 16.82 | 13.67 | |
## | 0.47 | 0.53 | 0.23 |
## | 0.24 | 0.22 | |
## | 0.11 | 0.12 | |
## ---------------------------------------------|-----------|-----------|-----------|
## Meath | 3796 | 5159 | 8955 |
## | 4013.77 | 4941.23 | |
## | 11.82 | 9.60 | |
## | 0.42 | 0.58 | 0.16 |
## | 0.15 | 0.17 | |
## | 0.07 | 0.09 | |
## ---------------------------------------------|-----------|-----------|-----------|
## NORTHERN WESTERN REGION | 2560 | 3388 | 5948 |
## | 2665.99 | 3282.01 | |
## | 4.21 | 3.42 | |
## | 0.43 | 0.57 | 0.11 |
## | 0.10 | 0.11 | |
## | 0.05 | 0.06 | |
## ---------------------------------------------|-----------|-----------|-----------|
## OUTSIDE IRELAND | 6 | 4 | 10 |
## | 4.48 | 5.52 | |
## | 0.51 | 0.42 | |
## | 0.60 | 0.40 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------------|-----------|-----------|-----------|
## SOUTHERN REGION | 764 | 363 | 1127 |
## | 505.14 | 621.86 | |
## | 132.65 | 107.76 | |
## | 0.68 | 0.32 | 0.02 |
## | 0.03 | 0.01 | |
## | 0.01 | 0.01 | |
## ---------------------------------------------|-----------|-----------|-----------|
## UNKNOWN | 52 | 51 | 103 |
## | 46.17 | 56.83 | |
## | 0.74 | 0.60 | |
## | 0.50 | 0.50 | 0.00 |
## | 0.00 | 0.00 | |
## | 0.00 | 0.00 | |
## ---------------------------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## ---------------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 315 d.f. = 7 p = 3.5e-64
##
##
##
CrossTable(main_processed$addressDiff, main_processed$No.New.Attendances, digits=2, fisher=F, chisq=TRUE, expected=TRUE)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 55297
##
##
## | main_processed$No.New.Attendances
## main_processed$addressDiff | 0 | 1 | Row Total |
## ---------------------------|-----------|-----------|-----------|
## 0 | 20521 | 25372 | 45893 |
## | 20569.98 | 25323.02 | |
## | 0.12 | 0.09 | |
## | 0.45 | 0.55 | 0.83 |
## | 0.83 | 0.83 | |
## | 0.37 | 0.46 | |
## ---------------------------|-----------|-----------|-----------|
## 1 | 4264 | 5140 | 9404 |
## | 4215.02 | 5188.98 | |
## | 0.57 | 0.46 | |
## | 0.45 | 0.55 | 0.17 |
## | 0.17 | 0.17 | |
## | 0.08 | 0.09 | |
## ---------------------------|-----------|-----------|-----------|
## Column Total | 24785 | 30512 | 55297 |
## | 0.45 | 0.55 | |
## ---------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1.2 d.f. = 1 p = 0.26
##
## Pearson's Chi-squared test with Yates' continuity correction
## ------------------------------------------------------------
## Chi^2 = 1.2 d.f. = 1 p = 0.27
##
##
# convert the non-numeric variables to numeric values (the lower the number, the higher frequency)
main_processed$Referral.Source_numeric <- mapvalues(main_processed$Referral.Source_recode, from = c("CLINIC","GP","WARD","BREAST CHECK","Elsew outside Mater","OTHER CONSULTANT","Elsew of Mater","EMERGENCY DEPT"), to = c(1:8))
main_processed$Clinic.Type_numeric <- mapvalues(main_processed$Clinic.Type_recode, from = c("SBC","TRI","MED","FRA","GEN"), to = c(1:5))
main_processed$Consultant_numeric <- mapvalues(main_processed$Consultant_recode, from = c("WALSSI","BARRYM","KELLM","STOKES","HEENEY"), to = c(1:5))
main_processed$Insurance.Scheme_numeric <- mapvalues(main_processed$Insurance.Scheme_recode, from = c("U","D","V","B","I","S","G","O","E","P","J","H","A","C","M"), to = c(1:15))
main_processed$Eligibility_numeric <- mapvalues(main_processed$Eligibility_recode, from = c("NON MEDICAL CARD","MEDICAL CARD","ELIGIBILITY UNKNOWN","EXEMPT","RESEARCH/NATIONAL PROG.","ACUTE UNCLASSIFIED","NON ACUTE UNCLASSIFIED"), to = c(1:7))
main_processed$Booking.Type_numeric <- mapvalues(main_processed$Booking.Type_recode, from = c("RETURN","NEW","WARD"), to = c(1:3))
main_processed$Hospital.Catchment_numeric <- mapvalues(main_processed$Hospital.Catchment_recode, from = c("National","Mater","Connolly","Beaumont","James","Vincents","Tallaght","International"), to = c(1:8))
main_processed$appointmentDay_numeric <- mapvalues(main_processed$appointmentDay, from = c("Tuesday","Friday","Monday","Thursday","Wednesday"), to = c(1:5))
main_processed$appointmentMonthYear_numeric <- mapvalues(main_processed$appointmentMonthYear, from = c("2021-08","2021-09","2021-11","2022-06","2021-07","2022-11","2022-03","2022-05","2023-08","2023-09","2022-02","2021-10","2022-08","2022-10","2022-09","2022-07","2020-10","2021-06","2023-05","2023-11","2020-11","2021-12","2022-01","2023-07","2020-03","2023-01","2022-04","2023-06","2020-09","2023-03","2021-03","2021-01","2023-10","2021-05","2023-04","2020-12","2023-02","2023-12","2021-04","2021-02","2020-07","2020-08","2022-12","2020-04","2020-06","2020-02","2020-05","2020-01"), to = c(1:48))
main_processed$bookedDay_numeric <- mapvalues(main_processed$bookedDay, from = c("Tuesday","Monday","Wednesday","Thursday","Friday","Saturday","Sunday"), to = c(1:7))
main_processed$bookedMonthYear_numeric <- mapvalues(main_processed$bookedMonthYear, from = c("2022-10","2021-09","2020-11","2020-08","2020-07","2021-08","2022-05","2020-09","2021-03","2020-01","2022-06","2020-02","2022-03","2020-10","2021-07","2022-07","2022-09","2021-10","2020-06","2021-04","2021-02","2023-05","2021-06","2023-01","2023-04","2023-03","2022-02","2021-05","2022-11","2021-11","2023-06","2023-07","2021-12","2022-04","2022-01","2023-02","2022-08","2023-08","2020-12","2022-12","2023-09","2023-11","2021-01","2023-10","2020-05","2020-03","2019-12","2020-04","2023-12","2019-11","2019-08","2019-07","2019-10","2019-09","2019-01","2019-02","2019-06","2019-03","2019-05","2019-04","2017-08"), to = c(1:61))
main_processed$Gender_numeric <- mapvalues(main_processed$Gender, from = c("Male","Female","Unknown"), to = c(1:3))
main_processed$Area.of.Residence_numeric <- mapvalues(main_processed$Area.of.Residence_recode, from = c("DUBLIN NTH","EASTERN & MIDLAND REGION (excl.Dublin,Meath)","Meath","NORTHERN WESTERN REGION","DUBLIN STH","SOUTHERN REGION","UNKNOWN","OUTSIDE IRELAND"), to = c(1:8))
main_processed$Rebooked.Indicator_numeric <- mapvalues(main_processed$Rebooked.Indicator, from = c("Yes","No"), to = c(1,0))
main_processed$Cancellation.Group_numeric <- mapvalues(main_processed$Cancellation.Group, from = c("Hospital","Patient","DNA","Validation"), to = c(1:4))
main_processed$Reason.for.Cancellation_numeric <- mapvalues(main_processed$Reason.for.Cancellation_recode, from = c("By Hospital","By Patient","No show","By Consultant/Advanced Nurse","By Patient-health conditions","By Covid"), to = c(1:6))
write.csv(main_processed[,c("Gender_numeric","Age.at.Attendance","Area.of.Residence_numeric","addressDiff","No.Cancels","Referral.Source_numeric","Clinic.Code","Clinic.Type_numeric","Consultant_numeric","Insurance.Scheme_numeric","Eligibility_numeric","Hospital.Catchment_numeric","Booking.Type_numeric","Rebooked.Indicator_numeric","Cancellation.Group_numeric","Reason.for.Cancellation_numeric","appointmentDay_numeric","appointmentMonthYear_numeric","bookedDay_numeric","bookedMonthYear_numeric","daysDiff_AppointBooked")],"breastDetails_cancel.csv")
main_processed_cancel <- read.csv("breastDetails_cancel.csv")
main_processed_cancel <- subset(main_processed_cancel, is.na(main_processed_cancel$No.Cancels)==F)
main_processed_cancel <- main_processed_cancel %>% mutate_if(is.character,as.numeric)
cor(main_processed_cancel, method = "spearman")
## X Gender_numeric Age.at.Attendance
## X 1.00000 -0.0242 -0.378
## Gender_numeric -0.02424 1.0000 0.028
## Age.at.Attendance -0.37796 0.0279 1.000
## Area.of.Residence_numeric 0.21877 0.0110 0.031
## addressDiff -0.02171 -0.0033 -0.093
## No.Cancels -0.09434 0.0504 0.126
## Referral.Source_numeric 0.21168 -0.0733 -0.208
## Clinic.Code 0.16061 -0.0371 -0.209
## Clinic.Type_numeric 0.24422 -0.0740 -0.325
## Consultant_numeric -0.00092 -0.0098 0.010
## Insurance.Scheme_numeric -0.22355 0.0390 0.179
## Eligibility_numeric 0.00720 -0.0322 0.078
## Hospital.Catchment_numeric -0.18216 -0.0218 -0.086
## Booking.Type_numeric 0.23048 -0.0829 -0.276
## Rebooked.Indicator_numeric -0.13060 0.0512 0.181
## Cancellation.Group_numeric 0.13488 -0.0538 -0.176
## Reason.for.Cancellation_numeric 0.06132 -0.0225 -0.057
## appointmentDay_numeric 0.02286 -0.0044 -0.024
## appointmentMonthYear_numeric -0.01881 -0.0080 -0.018
## bookedDay_numeric 0.02477 -0.0131 -0.021
## bookedMonthYear_numeric 0.05792 -0.0039 -0.017
## daysDiff_AppointBooked -0.14693 0.0506 0.241
## Area.of.Residence_numeric addressDiff
## X 0.21877 -0.0217
## Gender_numeric 0.01102 -0.0033
## Age.at.Attendance 0.03133 -0.0933
## Area.of.Residence_numeric 1.00000 -0.0144
## addressDiff -0.01436 1.0000
## No.Cancels 0.01815 -0.0460
## Referral.Source_numeric -0.02079 0.0249
## Clinic.Code -0.01532 0.0125
## Clinic.Type_numeric -0.01260 0.0521
## Consultant_numeric 0.00209 -0.0061
## Insurance.Scheme_numeric -0.03622 -0.0380
## Eligibility_numeric 0.01106 0.0334
## Hospital.Catchment_numeric -0.60413 0.0337
## Booking.Type_numeric -0.01984 0.0389
## Rebooked.Indicator_numeric 0.00903 -0.0459
## Cancellation.Group_numeric 0.00265 0.0430
## Reason.for.Cancellation_numeric 0.01044 0.0224
## appointmentDay_numeric 0.00253 0.0034
## appointmentMonthYear_numeric 0.00063 0.0042
## bookedDay_numeric -0.00431 -0.0010
## bookedMonthYear_numeric 0.00919 -0.0044
## daysDiff_AppointBooked 0.02376 -0.0126
## No.Cancels Referral.Source_numeric Clinic.Code
## X -0.0943 0.212 0.161
## Gender_numeric 0.0504 -0.073 -0.037
## Age.at.Attendance 0.1258 -0.208 -0.209
## Area.of.Residence_numeric 0.0181 -0.021 -0.015
## addressDiff -0.0460 0.025 0.013
## No.Cancels 1.0000 -0.129 -0.081
## Referral.Source_numeric -0.1292 1.000 0.241
## Clinic.Code -0.0814 0.241 1.000
## Clinic.Type_numeric -0.2696 0.534 0.428
## Consultant_numeric -0.0546 -0.009 -0.580
## Insurance.Scheme_numeric 0.1154 -0.144 -0.139
## Eligibility_numeric -0.1040 0.066 0.043
## Hospital.Catchment_numeric -0.0441 0.028 0.032
## Booking.Type_numeric -0.1844 0.804 0.297
## Rebooked.Indicator_numeric 0.6342 -0.240 -0.117
## Cancellation.Group_numeric -0.6988 0.193 0.220
## Reason.for.Cancellation_numeric -0.4000 0.090 0.248
## appointmentDay_numeric -0.0689 -0.029 -0.378
## appointmentMonthYear_numeric 0.0529 0.014 0.005
## bookedDay_numeric -0.0043 0.024 0.024
## bookedMonthYear_numeric 0.0239 0.040 0.084
## daysDiff_AppointBooked 0.2011 -0.377 -0.227
## Clinic.Type_numeric Consultant_numeric
## X 0.2442 -0.00092
## Gender_numeric -0.0740 -0.00982
## Age.at.Attendance -0.3254 0.01007
## Area.of.Residence_numeric -0.0126 0.00209
## addressDiff 0.0521 -0.00610
## No.Cancels -0.2696 -0.05458
## Referral.Source_numeric 0.5345 -0.00904
## Clinic.Code 0.4285 -0.58024
## Clinic.Type_numeric 1.0000 -0.08266
## Consultant_numeric -0.0827 1.00000
## Insurance.Scheme_numeric -0.2023 0.03017
## Eligibility_numeric 0.1000 -0.00312
## Hospital.Catchment_numeric 0.0327 -0.01137
## Booking.Type_numeric 0.6542 -0.00297
## Rebooked.Indicator_numeric -0.4102 -0.05056
## Cancellation.Group_numeric 0.3613 -0.04320
## Reason.for.Cancellation_numeric 0.2019 -0.17123
## appointmentDay_numeric -0.0463 0.54905
## appointmentMonthYear_numeric -0.0131 -0.01525
## bookedDay_numeric 0.0284 -0.03638
## bookedMonthYear_numeric 0.0083 -0.03961
## daysDiff_AppointBooked -0.4915 0.01307
## Insurance.Scheme_numeric Eligibility_numeric
## X -0.2236 0.0072
## Gender_numeric 0.0390 -0.0322
## Age.at.Attendance 0.1785 0.0781
## Area.of.Residence_numeric -0.0362 0.0111
## addressDiff -0.0380 0.0334
## No.Cancels 0.1154 -0.1040
## Referral.Source_numeric -0.1443 0.0656
## Clinic.Code -0.1395 0.0434
## Clinic.Type_numeric -0.2023 0.1000
## Consultant_numeric 0.0302 -0.0031
## Insurance.Scheme_numeric 1.0000 -0.2713
## Eligibility_numeric -0.2713 1.0000
## Hospital.Catchment_numeric 0.0014 -0.0025
## Booking.Type_numeric -0.1707 0.0887
## Rebooked.Indicator_numeric 0.1299 -0.0851
## Cancellation.Group_numeric -0.1231 0.0808
## Reason.for.Cancellation_numeric -0.0774 0.0562
## appointmentDay_numeric 0.0176 0.0036
## appointmentMonthYear_numeric 0.0099 0.0195
## bookedDay_numeric -0.0125 0.0106
## bookedMonthYear_numeric -0.0244 -0.0049
## daysDiff_AppointBooked 0.1157 -0.0547
## Hospital.Catchment_numeric Booking.Type_numeric
## X -0.1822 0.2305
## Gender_numeric -0.0218 -0.0829
## Age.at.Attendance -0.0856 -0.2755
## Area.of.Residence_numeric -0.6041 -0.0198
## addressDiff 0.0337 0.0389
## No.Cancels -0.0441 -0.1844
## Referral.Source_numeric 0.0276 0.8037
## Clinic.Code 0.0319 0.2968
## Clinic.Type_numeric 0.0327 0.6542
## Consultant_numeric -0.0114 -0.0030
## Insurance.Scheme_numeric 0.0014 -0.1707
## Eligibility_numeric -0.0025 0.0887
## Hospital.Catchment_numeric 1.0000 0.0327
## Booking.Type_numeric 0.0327 1.0000
## Rebooked.Indicator_numeric -0.0307 -0.3027
## Cancellation.Group_numeric 0.0194 0.2653
## Reason.for.Cancellation_numeric 0.0070 0.1314
## appointmentDay_numeric -0.0169 0.0090
## appointmentMonthYear_numeric 0.0123 -0.0064
## bookedDay_numeric 0.0025 0.0287
## bookedMonthYear_numeric -0.0027 0.0377
## daysDiff_AppointBooked -0.0466 -0.4225
## Rebooked.Indicator_numeric
## X -0.1306
## Gender_numeric 0.0512
## Age.at.Attendance 0.1807
## Area.of.Residence_numeric 0.0090
## addressDiff -0.0459
## No.Cancels 0.6342
## Referral.Source_numeric -0.2397
## Clinic.Code -0.1174
## Clinic.Type_numeric -0.4102
## Consultant_numeric -0.0506
## Insurance.Scheme_numeric 0.1299
## Eligibility_numeric -0.0851
## Hospital.Catchment_numeric -0.0307
## Booking.Type_numeric -0.3027
## Rebooked.Indicator_numeric 1.0000
## Cancellation.Group_numeric -0.5996
## Reason.for.Cancellation_numeric -0.3580
## appointmentDay_numeric -0.0894
## appointmentMonthYear_numeric -0.0140
## bookedDay_numeric -0.0199
## bookedMonthYear_numeric 0.0073
## daysDiff_AppointBooked 0.3093
## Cancellation.Group_numeric
## X 0.1349
## Gender_numeric -0.0538
## Age.at.Attendance -0.1756
## Area.of.Residence_numeric 0.0026
## addressDiff 0.0430
## No.Cancels -0.6988
## Referral.Source_numeric 0.1927
## Clinic.Code 0.2204
## Clinic.Type_numeric 0.3613
## Consultant_numeric -0.0432
## Insurance.Scheme_numeric -0.1231
## Eligibility_numeric 0.0808
## Hospital.Catchment_numeric 0.0194
## Booking.Type_numeric 0.2653
## Rebooked.Indicator_numeric -0.5996
## Cancellation.Group_numeric 1.0000
## Reason.for.Cancellation_numeric 0.3849
## appointmentDay_numeric 0.0753
## appointmentMonthYear_numeric -0.0346
## bookedDay_numeric 0.0349
## bookedMonthYear_numeric 0.0122
## daysDiff_AppointBooked -0.3201
## Reason.for.Cancellation_numeric
## X 0.0613
## Gender_numeric -0.0225
## Age.at.Attendance -0.0572
## Area.of.Residence_numeric 0.0104
## addressDiff 0.0224
## No.Cancels -0.4000
## Referral.Source_numeric 0.0896
## Clinic.Code 0.2475
## Clinic.Type_numeric 0.2019
## Consultant_numeric -0.1712
## Insurance.Scheme_numeric -0.0774
## Eligibility_numeric 0.0562
## Hospital.Catchment_numeric 0.0070
## Booking.Type_numeric 0.1314
## Rebooked.Indicator_numeric -0.3580
## Cancellation.Group_numeric 0.3849
## Reason.for.Cancellation_numeric 1.0000
## appointmentDay_numeric -0.0778
## appointmentMonthYear_numeric -0.0076
## bookedDay_numeric -0.0027
## bookedMonthYear_numeric 0.0288
## daysDiff_AppointBooked -0.0300
## appointmentDay_numeric
## X 0.0229
## Gender_numeric -0.0044
## Age.at.Attendance -0.0241
## Area.of.Residence_numeric 0.0025
## addressDiff 0.0034
## No.Cancels -0.0689
## Referral.Source_numeric -0.0290
## Clinic.Code -0.3782
## Clinic.Type_numeric -0.0463
## Consultant_numeric 0.5490
## Insurance.Scheme_numeric 0.0176
## Eligibility_numeric 0.0036
## Hospital.Catchment_numeric -0.0169
## Booking.Type_numeric 0.0090
## Rebooked.Indicator_numeric -0.0894
## Cancellation.Group_numeric 0.0753
## Reason.for.Cancellation_numeric -0.0778
## appointmentDay_numeric 1.0000
## appointmentMonthYear_numeric 0.0238
## bookedDay_numeric 0.0763
## bookedMonthYear_numeric 0.0041
## daysDiff_AppointBooked -0.0770
## appointmentMonthYear_numeric bookedDay_numeric
## X -0.01881 0.0248
## Gender_numeric -0.00798 -0.0131
## Age.at.Attendance -0.01772 -0.0212
## Area.of.Residence_numeric 0.00063 -0.0043
## addressDiff 0.00424 -0.0010
## No.Cancels 0.05286 -0.0043
## Referral.Source_numeric 0.01375 0.0241
## Clinic.Code 0.00501 0.0241
## Clinic.Type_numeric -0.01306 0.0284
## Consultant_numeric -0.01525 -0.0364
## Insurance.Scheme_numeric 0.00988 -0.0125
## Eligibility_numeric 0.01946 0.0106
## Hospital.Catchment_numeric 0.01225 0.0025
## Booking.Type_numeric -0.00636 0.0287
## Rebooked.Indicator_numeric -0.01400 -0.0199
## Cancellation.Group_numeric -0.03461 0.0349
## Reason.for.Cancellation_numeric -0.00761 -0.0027
## appointmentDay_numeric 0.02383 0.0763
## appointmentMonthYear_numeric 1.00000 0.0306
## bookedDay_numeric 0.03059 1.0000
## bookedMonthYear_numeric 0.16667 0.0244
## daysDiff_AppointBooked -0.12315 0.0225
## bookedMonthYear_numeric daysDiff_AppointBooked
## X 0.0579 -0.147
## Gender_numeric -0.0039 0.051
## Age.at.Attendance -0.0169 0.241
## Area.of.Residence_numeric 0.0092 0.024
## addressDiff -0.0044 -0.013
## No.Cancels 0.0239 0.201
## Referral.Source_numeric 0.0404 -0.377
## Clinic.Code 0.0841 -0.227
## Clinic.Type_numeric 0.0083 -0.491
## Consultant_numeric -0.0396 0.013
## Insurance.Scheme_numeric -0.0244 0.116
## Eligibility_numeric -0.0049 -0.055
## Hospital.Catchment_numeric -0.0027 -0.047
## Booking.Type_numeric 0.0377 -0.423
## Rebooked.Indicator_numeric 0.0073 0.309
## Cancellation.Group_numeric 0.0122 -0.320
## Reason.for.Cancellation_numeric 0.0288 -0.030
## appointmentDay_numeric 0.0041 -0.077
## appointmentMonthYear_numeric 0.1667 -0.123
## bookedDay_numeric 0.0244 0.022
## bookedMonthYear_numeric 1.0000 -0.015
## daysDiff_AppointBooked -0.0150 1.000
library(corrplot)
## Warning: package 'corrplot' was built under R version 4.3.2
## corrplot 0.92 loaded
corrplot(cor(main_processed_cancel))
gg_cancellationGroup <- ggplot(main_processed,aes(x=Cancellation.Group)) +
labs(x = "Cancellation Group") +
scale_x_discrete(limits=c("Hospital","Patient","DNA","Validation")) +
geom_bar(colour="blue", fill="lightblue")
gg_cancellationGroup
## Warning: Removed 55297 rows containing non-finite values (`stat_count()`).
gg_cancelReason <- ggplot(main_processed,aes(x=Reason.for.Cancellation_recode)) +
labs(x = "Reason for Cancellation") +
scale_x_discrete(limits=c("By Hospital","By Patient","No show","By Consultant/Advanced Nurse","By Patient-health conditions","By Covid"), guide = guide_axis(n.dodge = 2)) +
geom_bar(colour="blue", fill="lightblue")
gg_cancelReason
## Warning: Removed 55297 rows containing non-finite values (`stat_count()`).
- AIC the smallest AIC provides the best model
- AUC (area under the ROC curve) the closer to 1 the more correct predictions
- predict: predict the values based on the previous data behaviors and thus by fitting that data to the model
- plogis: Logistic Cumulative Distribution Function
- Cox and Snell R square: Analysis_Survival_Cox Regression. The coefficients in a Cox regression relate to hazard; a positive coefficient indicates a worse prognosis and a negative coefficient indicates a protective effect of the variable with which it is associated
- nagelkerke: a measure of goodness of fit in logistic regression analysis, a modification of the Cox and Snell R Square. Ranges [0,1], a common rule of thumb (<= 0.2: weak relationship, 0.2-0.4: moderate, >= 0.4: strong relationship).
- confusionMatrix: matrix between actual and predicted values
- vif = 1/(1-Ri^2) = 1/tolerance. Vif >4 or tolearance <0.25: multicollinearity might exist; vif >10 or tolerance <0.1: signigicant multicollinearity that needs to be corrected. Vif interpret if model has problems estimating the coefficient
variables need to be recoded as numeric to run any regression
# Create training and test dataset samples
sample <- sample(c(TRUE,FALSE), nrow(main_processed_cancel), replace=TRUE, prob=c(0.7,0.3))
train <- main_processed_cancel[sample, ]
test <- main_processed_cancel[!sample, ]
# Fit the logistic regression model
## with Clinic relevance
# map probabilities to log-odds, predicted probabilities are within the [0, 1] range
logmodel1 <- glm(formula = No.Cancels ~ Clinic.Code + Clinic.Type_numeric + Referral.Source_numeric + Consultant_numeric + Insurance.Scheme_numeric + Eligibility_numeric + Booking.Type_numeric + Hospital.Catchment_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric, family = binomial(link = "logit"), data = train)
summary(logmodel1)
##
## Call:
## glm(formula = No.Cancels ~ Clinic.Code + Clinic.Type_numeric +
## Referral.Source_numeric + Consultant_numeric + Insurance.Scheme_numeric +
## Eligibility_numeric + Booking.Type_numeric + Hospital.Catchment_numeric +
## Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric,
## family = binomial(link = "logit"), data = train)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 7.83e-01 1.22e-01 6.44 1.2e-10 ***
## Clinic.Code -1.17e-04 7.89e-05 -1.48 0.13889
## Clinic.Type_numeric -5.41e-02 3.26e-02 -1.66 0.09671 .
## Referral.Source_numeric 1.12e-01 3.36e-02 3.34 0.00084 ***
## Consultant_numeric -9.01e-02 1.72e-02 -5.25 1.5e-07 ***
## Insurance.Scheme_numeric 8.42e-02 1.28e-02 6.60 4.2e-11 ***
## Eligibility_numeric -1.82e-01 2.44e-02 -7.46 8.8e-14 ***
## Booking.Type_numeric 1.99e-01 4.79e-02 4.16 3.2e-05 ***
## Hospital.Catchment_numeric -6.88e-02 1.72e-02 -3.99 6.6e-05 ***
## Rebooked.Indicator_numeric 2.06e+01 1.46e+02 0.14 0.88767
## Reason.for.Cancellation_numeric -2.71e-01 1.83e-02 -14.79 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 27092 on 25110 degrees of freedom
## Residual deviance: 14334 on 25100 degrees of freedom
## AIC: 14356
##
## Number of Fisher Scoring iterations: 19
exp(coefficients(logmodel1))
## (Intercept) Clinic.Code
## 2.2e+00 1.0e+00
## Clinic.Type_numeric Referral.Source_numeric
## 9.5e-01 1.1e+00
## Consultant_numeric Insurance.Scheme_numeric
## 9.1e-01 1.1e+00
## Eligibility_numeric Booking.Type_numeric
## 8.3e-01 1.2e+00
## Hospital.Catchment_numeric Rebooked.Indicator_numeric
## 9.3e-01 8.6e+08
## Reason.for.Cancellation_numeric
## 7.6e-01
# Assess Model Fit
nagelkerke(logmodel1) #library(rcompanion)
## $Models
##
## Model: "glm, No.Cancels ~ Clinic.Code + Clinic.Type_numeric + Referral.Source_numeric + Consultant_numeric + Insurance.Scheme_numeric + Eligibility_numeric + Booking.Type_numeric + Hospital.Catchment_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric, binomial(link = \"logit\"), train"
## Null: "glm, No.Cancels ~ 1, binomial(link = \"logit\"), train"
##
## $Pseudo.R.squared.for.model.vs.null
## Pseudo.R.squared
## McFadden 0.47
## Cox and Snell (ML) 0.40
## Nagelkerke (Cragg and Uhler) 0.60
##
## $Likelihood.ratio.test
## Df.diff LogLik.diff Chisq p.value
## -10 -6379 12758 0
##
## $Number.of.observations
##
## Model: 25111
## Null: 25111
##
## $Messages
## [1] "Note: For models fit with REML, these statistics are based on refitting with ML"
##
## $Warnings
## [1] "None"
# Calculate the VIF values of each variable to see if multicollinearity is a problem
vif(logmodel1) #library(regclass), library(car)
## Clinic.Code Clinic.Type_numeric
## 1.5 1.6
## Referral.Source_numeric Consultant_numeric
## 1.8 1.2
## Insurance.Scheme_numeric Eligibility_numeric
## 1.1 1.1
## Booking.Type_numeric Hospital.Catchment_numeric
## 2.2 1.0
## Rebooked.Indicator_numeric Reason.for.Cancellation_numeric
## 1.0 1.0
# Calculate probability of cancellation for each individual in test dataset
## Obtain predicted probabilities: continuous values (not factors)
predicted1 <- predict(logmodel1, test, type=c("response")) #library(rbenchmark)
## Find the optimal probability
# library(InformationValue)
# Warning in install.packages :
# unable to access index for repository https://cran.rstudio.com/src/contrib:
# cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
# Warning in install.packages :
# package ‘InformationValue’ is not available for this version of R
# optimal <-optimalCutoff(test$No.Cancels,predicted1)[1]
# optimal
## Convert predicted probabilities to binary predictions
binary_predicted1 <- ifelse(predicted1 >= 0.5, 1, 0) #threshold=0.5
## Create confusion matrix to show predictions compared to the actual defaults
confusionMatrix(factor(binary_predicted1), factor(test$No.Cancels)) #library(caret), test$No.Cancels represents the actual response variable, binary_predictions are the binary predictions based on the threshold
## Confusion Matrix and Statistics
##
## Reference
## Prediction 0 1
## 0 2032 986
## 1 451 7292
##
## Accuracy : 0.866
## 95% CI : (0.86, 0.873)
## No Information Rate : 0.769
## P-Value [Acc > NIR] : <2e-16
##
## Kappa : 0.65
##
## Mcnemar's Test P-Value : <2e-16
##
## Sensitivity : 0.818
## Specificity : 0.881
## Pos Pred Value : 0.673
## Neg Pred Value : 0.942
## Prevalence : 0.231
## Detection Rate : 0.189
## Detection Prevalence : 0.280
## Balanced Accuracy : 0.850
##
## 'Positive' Class : 0
##
confusion_matrix(logmodel1) #library(regclass)
## Predicted 0 Predicted 1 Total
## Actual 0 4721 1058 5779
## Actual 1 2374 16958 19332
## Total 7095 18016 25111
confusion_matrix(logmodel1, test) #library(regclass)
## Predicted 0 Predicted 1 Total
## Actual 0 2032 451 2483
## Actual 1 986 7292 8278
## Total 3018 7743 10761
## Calculate the sensitivity, specificity and total misclassification error if not shown in confusionMatrix
# sensitivity(factor(binary_predicted1), factor(test$No.Cancels))
# specificity(factor(binary_predicted1), factor(test$No.Cancels))
# misClassError(factor(binary_predicted1), factor(test$No.Cancels), threshold=optimal)
## Plot ROC curve which displays the % of True positivity predicted by the model as the prediction probability cutoff is [0,1]
# plot.roc(binary_predicted1, test$No.Cancels) #library(pROC) plot.ROC or plotROC
# lroc(logmodel1,graph=T) #for AUC but has a very loooong $diagnostic.table
## with Date relevance
logmodel2 <- glm(formula = No.Cancels ~ appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric + bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"), data = train)
summary(logmodel2)
##
## Call:
## glm(formula = No.Cancels ~ appointmentDay_numeric + appointmentMonthYear_numeric +
## bookedDay_numeric + bookedMonthYear_numeric + daysDiff_AppointBooked,
## family = binomial(link = "logit"), data = train)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 9.25e-01 5.59e-02 16.54 < 2e-16 ***
## appointmentDay_numeric -1.15e-01 1.16e-02 -9.97 < 2e-16 ***
## appointmentMonthYear_numeric 1.22e-02 1.16e-03 10.51 < 2e-16 ***
## bookedDay_numeric 6.28e-06 1.09e-02 0.00 0.99954
## bookedMonthYear_numeric 4.29e-03 1.19e-03 3.59 0.00033 ***
## daysDiff_AppointBooked 3.02e-03 1.49e-04 20.24 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 27092 on 25110 degrees of freedom
## Residual deviance: 26422 on 25105 degrees of freedom
## AIC: 26434
##
## Number of Fisher Scoring iterations: 4
# exp(coefficients(logmodel2))
nagelkerke(logmodel2)
## $Models
##
## Model: "glm, No.Cancels ~ appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric + bookedMonthYear_numeric + daysDiff_AppointBooked, binomial(link = \"logit\"), train"
## Null: "glm, No.Cancels ~ 1, binomial(link = \"logit\"), train"
##
## $Pseudo.R.squared.for.model.vs.null
## Pseudo.R.squared
## McFadden 0.025
## Cox and Snell (ML) 0.026
## Nagelkerke (Cragg and Uhler) 0.040
##
## $Likelihood.ratio.test
## Df.diff LogLik.diff Chisq p.value
## -5 -335 670 1.2e-142
##
## $Number.of.observations
##
## Model: 25111
## Null: 25111
##
## $Messages
## [1] "Note: For models fit with REML, these statistics are based on refitting with ML"
##
## $Warnings
## [1] "None"
# Obtain predicted probabilities: continuous values (not factors)
predicted2 <- predict(logmodel2, test, type=c("response")) #library(rbenchmark)
# Convert predicted probabilities to binary predictions
binary_predicted2 <- ifelse(predicted2 >= 0.5, 1, 0) #threshold=0.5
# Create confusion matrix, library(caret)
confusionMatrix(factor(binary_predicted2), factor(test$No.Cancels)) #test$No.Cancels represents the actual response variable, binary_predictions are the binary predictions based on the threshold
## Warning in confusionMatrix.default(factor(binary_predicted2),
## factor(test$No.Cancels)): Levels are not in the same order for reference and
## data. Refactoring data to match.
## Confusion Matrix and Statistics
##
## Reference
## Prediction 0 1
## 0 0 0
## 1 2483 8278
##
## Accuracy : 0.769
## 95% CI : (0.761, 0.777)
## No Information Rate : 0.769
## P-Value [Acc > NIR] : 0.505
##
## Kappa : 0
##
## Mcnemar's Test P-Value : <2e-16
##
## Sensitivity : 0.000
## Specificity : 1.000
## Pos Pred Value : NaN
## Neg Pred Value : 0.769
## Prevalence : 0.231
## Detection Rate : 0.000
## Detection Prevalence : 0.000
## Balanced Accuracy : 0.500
##
## 'Positive' Class : 0
##
confusion_matrix(logmodel2) #library(regclass)
## Predicted levels same as naive model (majority level)
## Predicted 1
## Actual 0 5779
## Actual 1 19332
confusion_matrix(logmodel2, test) #library(regclass)
## Predicted levels same as naive model (majority level)
## Predicted 1
## Actual 0 2483
## Actual 1 8278
vif(logmodel2)
## appointmentDay_numeric appointmentMonthYear_numeric
## 1 1
## bookedDay_numeric bookedMonthYear_numeric
## 1 1
## daysDiff_AppointBooked
## 1
## with Patient relevance
logmodel3 <- glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance + Area.of.Residence_numeric + addressDiff, family = binomial(link = "logit"), data = train)
summary(logmodel3)
##
## Call:
## glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff, family = binomial(link = "logit"),
## data = train)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.137027 0.206516 -5.51 3.7e-08 ***
## Gender_numeric 0.732635 0.101127 7.24 4.3e-13 ***
## Age.at.Attendance 0.018097 0.000992 18.24 < 2e-16 ***
## Area.of.Residence_numeric 0.010122 0.011550 0.88 0.38
## addressDiff -0.204957 0.037094 -5.53 3.3e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 27092 on 25110 degrees of freedom
## Residual deviance: 26641 on 25106 degrees of freedom
## AIC: 26651
##
## Number of Fisher Scoring iterations: 4
# exp(coefficients(logmodel3))
nagelkerke(logmodel3)
## $Models
##
## Model: "glm, No.Cancels ~ Gender_numeric + Age.at.Attendance + Area.of.Residence_numeric + addressDiff, binomial(link = \"logit\"), train"
## Null: "glm, No.Cancels ~ 1, binomial(link = \"logit\"), train"
##
## $Pseudo.R.squared.for.model.vs.null
## Pseudo.R.squared
## McFadden 0.017
## Cox and Snell (ML) 0.018
## Nagelkerke (Cragg and Uhler) 0.027
##
## $Likelihood.ratio.test
## Df.diff LogLik.diff Chisq p.value
## -4 -225 451 3.1e-96
##
## $Number.of.observations
##
## Model: 25111
## Null: 25111
##
## $Messages
## [1] "Note: For models fit with REML, these statistics are based on refitting with ML"
##
## $Warnings
## [1] "None"
# Obtain predicted probabilities: continuous values (not factors)
predicted3 <- predict(logmodel3, test, type=c("response")) #library(rbenchmark)
# Convert predicted probabilities to binary predictions
binary_predicted3 <- ifelse(predicted3 >= 0.5, 1, 0) #threshold=0.5
# Create confusion matrix, library(caret)
confusionMatrix(factor(binary_predicted3), factor(test$No.Cancels)) #test$No.Cancels represents the actual response variable, binary_predictions are the binary predictions based on the threshold
## Confusion Matrix and Statistics
##
## Reference
## Prediction 0 1
## 0 13 12
## 1 2470 8266
##
## Accuracy : 0.769
## 95% CI : (0.761, 0.777)
## No Information Rate : 0.769
## P-Value [Acc > NIR] : 0.496
##
## Kappa : 0.006
##
## Mcnemar's Test P-Value : <2e-16
##
## Sensitivity : 0.00524
## Specificity : 0.99855
## Pos Pred Value : 0.52000
## Neg Pred Value : 0.76993
## Prevalence : 0.23074
## Detection Rate : 0.00121
## Detection Prevalence : 0.00232
## Balanced Accuracy : 0.50189
##
## 'Positive' Class : 0
##
confusion_matrix(logmodel3) #library(regclass)
## Predicted 0 Predicted 1 Total
## Actual 0 29 5750 5779
## Actual 1 35 19297 19332
## Total 64 25047 25111
confusion_matrix(logmodel3, test) #library(regclass)
## Predicted 0 Predicted 1 Total
## Actual 0 13 2470 2483
## Actual 1 12 8266 8278
## Total 25 10736 10761
vif(logmodel3)
## Gender_numeric Age.at.Attendance Area.of.Residence_numeric
## 1 1 1
## addressDiff
## 1
## with all predictors
logmodel <- glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance + Area.of.Residence_numeric + addressDiff + Referral.Source_numeric + Clinic.Code + Clinic.Type_numeric + Consultant_numeric + Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric + Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric + appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric + bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"), data = train)
summary(logmodel)
##
## Call:
## glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -5.75e-01 3.18e-01 -1.81 0.07017 .
## Gender_numeric 4.29e-01 1.32e-01 3.25 0.00114 **
## Age.at.Attendance 3.94e-03 1.35e-03 2.93 0.00343 **
## Area.of.Residence_numeric 2.40e-02 1.55e-02 1.55 0.12115
## addressDiff -1.02e-01 4.98e-02 -2.05 0.03995 *
## Referral.Source_numeric 8.73e-02 3.42e-02 2.55 0.01075 *
## Clinic.Code -1.91e-04 8.17e-05 -2.34 0.01931 *
## Clinic.Type_numeric -3.62e-02 3.53e-02 -1.03 0.30386
## Consultant_numeric -7.84e-02 1.98e-02 -3.95 7.7e-05 ***
## Insurance.Scheme_numeric 8.09e-02 1.30e-02 6.23 4.7e-10 ***
## Eligibility_numeric -1.91e-01 2.50e-02 -7.66 1.9e-14 ***
## Hospital.Catchment_numeric -6.60e-02 1.75e-02 -3.77 0.00016 ***
## Booking.Type_numeric 2.07e-01 4.92e-02 4.20 2.7e-05 ***
## Rebooked.Indicator_numeric 2.07e+01 1.43e+02 0.14 0.88527
## Reason.for.Cancellation_numeric -3.24e-01 1.87e-02 -17.30 < 2e-16 ***
## appointmentDay_numeric 1.26e-02 1.81e-02 0.70 0.48479
## appointmentMonthYear_numeric 2.18e-02 1.54e-03 14.11 < 2e-16 ***
## bookedDay_numeric 2.01e-02 1.47e-02 1.37 0.17017
## bookedMonthYear_numeric 2.62e-04 1.58e-03 0.17 0.86893
## daysDiff_AppointBooked -1.40e-03 2.33e-04 -6.02 1.7e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 27092 on 25110 degrees of freedom
## Residual deviance: 14035 on 25091 degrees of freedom
## AIC: 14075
##
## Number of Fisher Scoring iterations: 19
exp(coefficients(logmodel))
## (Intercept) Gender_numeric
## 5.6e-01 1.5e+00
## Age.at.Attendance Area.of.Residence_numeric
## 1.0e+00 1.0e+00
## addressDiff Referral.Source_numeric
## 9.0e-01 1.1e+00
## Clinic.Code Clinic.Type_numeric
## 1.0e+00 9.6e-01
## Consultant_numeric Insurance.Scheme_numeric
## 9.2e-01 1.1e+00
## Eligibility_numeric Hospital.Catchment_numeric
## 8.3e-01 9.4e-01
## Booking.Type_numeric Rebooked.Indicator_numeric
## 1.2e+00 9.8e+08
## Reason.for.Cancellation_numeric appointmentDay_numeric
## 7.2e-01 1.0e+00
## appointmentMonthYear_numeric bookedDay_numeric
## 1.0e+00 1.0e+00
## bookedMonthYear_numeric daysDiff_AppointBooked
## 1.0e+00 1.0e+00
nagelkerke(logmodel)
## $Models
##
## Model: "glm, No.Cancels ~ Gender_numeric + Age.at.Attendance + Area.of.Residence_numeric + addressDiff + Referral.Source_numeric + Clinic.Code + Clinic.Type_numeric + Consultant_numeric + Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric + Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric + appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric + bookedMonthYear_numeric + daysDiff_AppointBooked, binomial(link = \"logit\"), train"
## Null: "glm, No.Cancels ~ 1, binomial(link = \"logit\"), train"
##
## $Pseudo.R.squared.for.model.vs.null
## Pseudo.R.squared
## McFadden 0.48
## Cox and Snell (ML) 0.41
## Nagelkerke (Cragg and Uhler) 0.61
##
## $Likelihood.ratio.test
## Df.diff LogLik.diff Chisq p.value
## -19 -6529 13057 0
##
## $Number.of.observations
##
## Model: 25111
## Null: 25111
##
## $Messages
## [1] "Note: For models fit with REML, these statistics are based on refitting with ML"
##
## $Warnings
## [1] "None"
# Obtain predicted probabilities: continuous values (not factors)
predicted <- predict(logmodel, test, type=c("response")) #library(rbenchmark)
# Convert predicted probabilities to binary predictions
binary_predicted <- ifelse(predicted >= 0.5, 1, 0) #threshold=0.5
# Create confusion matrix, library(caret)
confusionMatrix(factor(binary_predicted), factor(test$No.Cancels)) #test$No.Cancels represents the actual response variable, binary_predictions are the binary predictions based on the threshold
## Confusion Matrix and Statistics
##
## Reference
## Prediction 0 1
## 0 1878 973
## 1 605 7305
##
## Accuracy : 0.853
## 95% CI : (0.847, 0.86)
## No Information Rate : 0.769
## P-Value [Acc > NIR] : <2e-16
##
## Kappa : 0.607
##
## Mcnemar's Test P-Value : <2e-16
##
## Sensitivity : 0.756
## Specificity : 0.882
## Pos Pred Value : 0.659
## Neg Pred Value : 0.924
## Prevalence : 0.231
## Detection Rate : 0.175
## Detection Prevalence : 0.265
## Balanced Accuracy : 0.819
##
## 'Positive' Class : 0
##
confusion_matrix(logmodel) #library(regclass)
## Predicted 0 Predicted 1 Total
## Actual 0 4349 1430 5779
## Actual 1 2356 16976 19332
## Total 6705 18406 25111
confusion_matrix(logmodel, test) #library(regclass)
## Predicted 0 Predicted 1 Total
## Actual 0 1878 605 2483
## Actual 1 973 7305 8278
## Total 2851 7910 10761
vif(logmodel)
## Gender_numeric Age.at.Attendance
## 1.0 1.2
## Area.of.Residence_numeric addressDiff
## 1.0 1.0
## Referral.Source_numeric Clinic.Code
## 1.9 1.5
## Clinic.Type_numeric Consultant_numeric
## 1.9 1.5
## Insurance.Scheme_numeric Eligibility_numeric
## 1.1 1.1
## Hospital.Catchment_numeric Booking.Type_numeric
## 1.0 2.3
## Rebooked.Indicator_numeric Reason.for.Cancellation_numeric
## 1.0 1.1
## appointmentDay_numeric appointmentMonthYear_numeric
## 1.4 1.1
## bookedDay_numeric bookedMonthYear_numeric
## 1.0 1.1
## daysDiff_AppointBooked
## 1.3
#library(epiDisplay), give plot plus AUC
logistic.display(logmodel)
##
## Logistic regression predicting No.Cancels
##
## crude OR(95%CI)
## Gender_numeric (cont. var.) 2.21 (1.81,2.68)
##
## Age.at.Attendance (cont. var.) 1.019 (1.017,1.0209)
##
## Area.of.Residence_numeric (cont. var.) 1.01 (0.99,1.04)
##
## addressDiff: 1 vs 0 0.77 (0.72,0.83)
##
## Referral.Source_numeric (cont. var.) 0.85 (0.83,0.88)
##
## Clinic.Code (cont. var.) 0.9995 (0.9994,0.9996)
##
## Clinic.Type_numeric (cont. var.) 0.44 (0.42,0.46)
##
## Consultant_numeric (cont. var.) 0.89 (0.86,0.91)
##
## Insurance.Scheme_numeric (cont. var.) 1.18 (1.15,1.2)
##
## Eligibility_numeric (cont. var.) 0.77 (0.74,0.79)
##
## Hospital.Catchment_numeric (cont. var.) 0.93 (0.9,0.95)
##
## Booking.Type_numeric (cont. var.) 0.62 (0.59,0.65)
##
## Rebooked.Indicator_numeric: 1 vs 0 997648548.86 (0,7.00341769159113e+134)
##
## Reason.for.Cancellation_numeric (cont. var.) 0.63 (0.62,0.65)
##
## appointmentDay_numeric (cont. var.) 0.88 (0.86,0.9)
##
## appointmentMonthYear_numeric (cont. var.) 1.01 (1.01,1.01)
##
## bookedDay_numeric (cont. var.) 1 (0.98,1.02)
##
## bookedMonthYear_numeric (cont. var.) 1.0047 (1.0024,1.007)
##
## daysDiff_AppointBooked (cont. var.) 1.0029 (1.0026,1.0032)
##
## adj. OR(95%CI)
## Gender_numeric (cont. var.) 1.54 (1.19,1.99)
##
## Age.at.Attendance (cont. var.) 1.004 (1.0013,1.0066)
##
## Area.of.Residence_numeric (cont. var.) 1.02 (0.99,1.06)
##
## addressDiff: 1 vs 0 0.9 (0.82,1)
##
## Referral.Source_numeric (cont. var.) 1.09 (1.02,1.17)
##
## Clinic.Code (cont. var.) 0.9998 (0.9996,1)
##
## Clinic.Type_numeric (cont. var.) 0.96 (0.9,1.03)
##
## Consultant_numeric (cont. var.) 0.92 (0.89,0.96)
##
## Insurance.Scheme_numeric (cont. var.) 1.08 (1.06,1.11)
##
## Eligibility_numeric (cont. var.) 0.83 (0.79,0.87)
##
## Hospital.Catchment_numeric (cont. var.) 0.94 (0.9,0.97)
##
## Booking.Type_numeric (cont. var.) 1.23 (1.12,1.35)
##
## Rebooked.Indicator_numeric: 1 vs 0 977733851.95 (0,1.27547984100273e+131)
##
## Reason.for.Cancellation_numeric (cont. var.) 0.72 (0.7,0.75)
##
## appointmentDay_numeric (cont. var.) 1.01 (0.98,1.05)
##
## appointmentMonthYear_numeric (cont. var.) 1.02 (1.02,1.03)
##
## bookedDay_numeric (cont. var.) 1.02 (0.99,1.05)
##
## bookedMonthYear_numeric (cont. var.) 1.0003 (0.9972,1.0034)
##
## daysDiff_AppointBooked (cont. var.) 0.9986 (0.9981,0.9991)
##
## P(Wald's test) P(LR-test)
## Gender_numeric (cont. var.) 0.001 < 0.001
##
## Age.at.Attendance (cont. var.) 0.003 0.003
##
## Area.of.Residence_numeric (cont. var.) 0.121 0.121
##
## addressDiff: 1 vs 0 0.04 0.04
##
## Referral.Source_numeric (cont. var.) 0.011 0.011
##
## Clinic.Code (cont. var.) 0.019 0.019
##
## Clinic.Type_numeric (cont. var.) 0.304 0.304
##
## Consultant_numeric (cont. var.) < 0.001 < 0.001
##
## Insurance.Scheme_numeric (cont. var.) < 0.001 < 0.001
##
## Eligibility_numeric (cont. var.) < 0.001 < 0.001
##
## Hospital.Catchment_numeric (cont. var.) < 0.001 < 0.001
##
## Booking.Type_numeric (cont. var.) < 0.001 < 0.001
##
## Rebooked.Indicator_numeric: 1 vs 0 0.885 < 0.001
##
## Reason.for.Cancellation_numeric (cont. var.) < 0.001 < 0.001
##
## appointmentDay_numeric (cont. var.) 0.485 0.485
##
## appointmentMonthYear_numeric (cont. var.) < 0.001 < 0.001
##
## bookedDay_numeric (cont. var.) 0.17 0.17
##
## bookedMonthYear_numeric (cont. var.) 0.869 0.869
##
## daysDiff_AppointBooked (cont. var.) < 0.001 < 0.001
##
## Log-likelihood = -7017.3041
## No. of observations = 25111
## AIC value = 14074.6082
lroc <- lroc(logmodel, title=TRUE, cex.main=1, cex.lab=1, col.lab="blue", cex.axis=1,
lwd=3)
lroc1 <- lroc(logmodel1, add=TRUE, line.col="brown", lty=2)
lroc2 <- lroc(logmodel2, add=TRUE, line.col="darkgreen", lty=2)
lroc3 <- lroc(logmodel3, add=TRUE, line.col="purple", lty=2)
legend("bottomright",legend=c("all predictors", "clinic relevance", "date relevance", "patient relevance"),
lty=1:2, col=c("red","brown","darkgreen","purple"), bg="white")
lrtest(logmodel,logmodel1) #library(lmtest)
## Likelihood ratio test for MLE method
## Chi-squared 9 d.f. = 299 , P value = 3.7e-59
lrtest(logmodel,logmodel2)
## Likelihood ratio test for MLE method
## Chi-squared 14 d.f. = 12387 , P value = 0
lrtest(logmodel,logmodel3)
## Likelihood ratio test for MLE method
## Chi-squared 15 d.f. = 12607 , P value = 0
# anova(logmodel1, logmodel2, logmodel3, logmodel, test="Chisq") #run if there is other ML models
#library(survey)
regTermTest(logmodel,"Referral.Source_numeric")
## Wald test for Referral.Source_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 6.5 on 1 and 25091 df: p= 0.01
regTermTest(logmodel,"Clinic.Code")
## Wald test for Clinic.Code
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 5.5 on 1 and 25091 df: p= 0.02
regTermTest(logmodel,"Clinic.Type_numeric")
## Wald test for Clinic.Type_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 1.1 on 1 and 25091 df: p= 0.3
regTermTest(logmodel,"Consultant_numeric")
## Wald test for Consultant_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 16 on 1 and 25091 df: p= 8e-05
regTermTest(logmodel,"Insurance.Scheme_numeric")
## Wald test for Insurance.Scheme_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 39 on 1 and 25091 df: p= 5e-10
regTermTest(logmodel,"Eligibility_numeric")
## Wald test for Eligibility_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 59 on 1 and 25091 df: p= 2e-14
regTermTest(logmodel,"Booking.Type_numeric")
## Wald test for Booking.Type_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 18 on 1 and 25091 df: p= 3e-05
regTermTest(logmodel,"Hospital.Catchment_numeric")
## Wald test for Hospital.Catchment_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 14 on 1 and 25091 df: p= 2e-04
regTermTest(logmodel,"appointmentDay_numeric")
## Wald test for appointmentDay_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 0.49 on 1 and 25091 df: p= 0.5
regTermTest(logmodel,"appointmentMonthYear_numeric")
## Wald test for appointmentMonthYear_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 199 on 1 and 25091 df: p= <2e-16
regTermTest(logmodel,"bookedDay_numeric")
## Wald test for bookedDay_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 1.9 on 1 and 25091 df: p= 0.2
regTermTest(logmodel,"bookedMonthYear_numeric")
## Wald test for bookedMonthYear_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 0.027 on 1 and 25091 df: p= 0.9
regTermTest(logmodel,"Gender_numeric")
## Wald test for Gender_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 11 on 1 and 25091 df: p= 0.001
# regTermTest(logmodel,"Age.at.Attendance")
regTermTest(logmodel,"Area.of.Residence_numeric")
## Wald test for Area.of.Residence_numeric
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 2.4 on 1 and 25091 df: p= 0.1
regTermTest(logmodel,"addressDiff")
## Wald test for addressDiff
## in glm(formula = No.Cancels ~ Gender_numeric + Age.at.Attendance +
## Area.of.Residence_numeric + addressDiff + Referral.Source_numeric +
## Clinic.Code + Clinic.Type_numeric + Consultant_numeric +
## Insurance.Scheme_numeric + Eligibility_numeric + Hospital.Catchment_numeric +
## Booking.Type_numeric + Rebooked.Indicator_numeric + Reason.for.Cancellation_numeric +
## appointmentDay_numeric + appointmentMonthYear_numeric + bookedDay_numeric +
## bookedMonthYear_numeric + daysDiff_AppointBooked, family = binomial(link = "logit"),
## data = train)
## F = 4.2 on 1 and 25091 df: p= 0.04
# Find feature/ variable importance from the model
varImp(logmodel) #library(caret)
## Overall
## Gender_numeric 3.25
## Age.at.Attendance 2.93
## Area.of.Residence_numeric 1.55
## addressDiff 2.05
## Referral.Source_numeric 2.55
## Clinic.Code 2.34
## Clinic.Type_numeric 1.03
## Consultant_numeric 3.95
## Insurance.Scheme_numeric 6.23
## Eligibility_numeric 7.66
## Hospital.Catchment_numeric 3.77
## Booking.Type_numeric 4.20
## Rebooked.Indicator_numeric 0.14
## Reason.for.Cancellation_numeric 17.30
## appointmentDay_numeric 0.70
## appointmentMonthYear_numeric 14.11
## bookedDay_numeric 1.37
## bookedMonthYear_numeric 0.17
## daysDiff_AppointBooked 6.02
# Report model outcome
library(report)
## Warning: package 'report' was built under R version 4.3.2
report(logmodel)
## Registered S3 method overwritten by 'parameters':
## method from
## predict.kmeans rattle
## Profiled confidence intervals may take longer time to compute.
## Use `ci_method="wald"` for faster computation of CIs.
## Profiled confidence intervals may take longer time to compute.
## Use `ci_method="wald"` for faster computation of CIs.
## Profiled confidence intervals may take longer time to compute.
## Use `ci_method="wald"` for faster computation of CIs.
## Profiled confidence intervals may take longer time to compute.
## Use `ci_method="wald"` for faster computation of CIs.
## We fitted a logistic model (estimated using ML) to predict No.Cancels with
## Gender_numeric, Age.at.Attendance, Area.of.Residence_numeric, addressDiff,
## Referral.Source_numeric, Clinic.Code, Clinic.Type_numeric, Consultant_numeric,
## Insurance.Scheme_numeric, Eligibility_numeric, Hospital.Catchment_numeric,
## Booking.Type_numeric, Rebooked.Indicator_numeric,
## Reason.for.Cancellation_numeric, appointmentDay_numeric,
## appointmentMonthYear_numeric, bookedDay_numeric, bookedMonthYear_numeric and
## daysDiff_AppointBooked (formula: No.Cancels ~ Gender_numeric +
## Age.at.Attendance + Area.of.Residence_numeric + addressDiff +
## Referral.Source_numeric + Clinic.Code + Clinic.Type_numeric +
## Consultant_numeric + Insurance.Scheme_numeric + Eligibility_numeric +
## Hospital.Catchment_numeric + Booking.Type_numeric + Rebooked.Indicator_numeric
## + Reason.for.Cancellation_numeric + appointmentDay_numeric +
## appointmentMonthYear_numeric + bookedDay_numeric + bookedMonthYear_numeric +
## daysDiff_AppointBooked). The model's explanatory power is substantial (Tjur's
## R2 = 0.44). The model's intercept, corresponding to Gender_numeric = 0,
## Age.at.Attendance = 0, Area.of.Residence_numeric = 0, addressDiff = 0,
## Referral.Source_numeric = 0, Clinic.Code = 0, Clinic.Type_numeric = 0,
## Consultant_numeric = 0, Insurance.Scheme_numeric = 0, Eligibility_numeric = 0,
## Hospital.Catchment_numeric = 0, Booking.Type_numeric = 0,
## Rebooked.Indicator_numeric = 0, Reason.for.Cancellation_numeric = 0,
## appointmentDay_numeric = 0, appointmentMonthYear_numeric = 0, bookedDay_numeric
## = 0, bookedMonthYear_numeric = 0 and daysDiff_AppointBooked = 0, is at -0.58
## (95% CI [-1.20, 0.04], p = 0.070). Within this model:
##
## - The effect of Gender numeric is statistically significant and positive (beta
## = 0.43, 95% CI [0.17, 0.69], p = 0.001; Std. beta = 0.06, 95% CI [0.02, 0.09])
## - The effect of Age at Attendance is statistically significant and positive
## (beta = 3.94e-03, 95% CI [1.30e-03, 6.59e-03], p = 0.003; Std. beta = 0.06, 95%
## CI [0.02, 0.10])
## - The effect of Area of Residence numeric is statistically non-significant and
## positive (beta = 0.02, 95% CI [-6.37e-03, 0.05], p = 0.121; Std. beta = 0.03,
## 95% CI [-8.39e-03, 0.07])
## - The effect of addressDiff is statistically significant and negative (beta =
## -0.10, 95% CI [-0.20, -4.78e-03], p = 0.040; Std. beta = -0.04, 95% CI [-0.08,
## -1.88e-03])
## - The effect of Referral Source numeric is statistically significant and
## positive (beta = 0.09, 95% CI [0.02, 0.15], p = 0.011; Std. beta = 0.07, 95% CI
## [0.02, 0.13])
## - The effect of Clinic Code is statistically significant and negative (beta =
## -1.91e-04, 95% CI [-3.52e-04, -3.12e-05], p = 0.019; Std. beta = -0.06, 95% CI
## [-0.11, -9.36e-03])
## - The effect of Clinic Type numeric is statistically non-significant and
## negative (beta = -0.04, 95% CI [-0.11, 0.03], p = 0.304; Std. beta = -0.03, 95%
## CI [-0.07, 0.02])
## - The effect of Consultant numeric is statistically significant and negative
## (beta = -0.08, 95% CI [-0.12, -0.04], p < .001; Std. beta = -0.10, 95% CI
## [-0.14, -0.05])
## - The effect of Insurance Scheme numeric is statistically significant and
## positive (beta = 0.08, 95% CI [0.06, 0.11], p < .001; Std. beta = 0.13, 95% CI
## [0.09, 0.17])
## - The effect of Eligibility numeric is statistically significant and negative
## (beta = -0.19, 95% CI [-0.24, -0.14], p < .001; Std. beta = -0.16, 95% CI
## [-0.19, -0.12])
## - The effect of Hospital Catchment numeric is statistically significant and
## negative (beta = -0.07, 95% CI [-0.10, -0.03], p < .001; Std. beta = -0.07, 95%
## CI [-0.11, -0.04])
## - The effect of Booking Type numeric is statistically significant and positive
## (beta = 0.21, 95% CI [0.11, 0.30], p < .001; Std. beta = 0.13, 95% CI [0.07,
## 0.19])
## - The effect of Rebooked Indicator numeric is statistically non-significant and
## positive (beta = 20.70, 95% CI [204.71, 186.74], p = 0.885; Std. beta = 10.24,
## 95% CI [101.27, 92.38])
## - The effect of Reason for Cancellation numeric is statistically significant
## and negative (beta = -0.32, 95% CI [-0.36, -0.29], p < .001; Std. beta = -0.42,
## 95% CI [-0.46, -0.37])
## - The effect of appointmentDay numeric is statistically non-significant and
## positive (beta = 0.01, 95% CI [-0.02, 0.05], p = 0.485; Std. beta = 0.02, 95%
## CI [-0.03, 0.06])
## - The effect of appointmentMonthYear numeric is statistically significant and
## positive (beta = 0.02, 95% CI [0.02, 0.02], p < .001; Std. beta = 0.29, 95% CI
## [0.25, 0.33])
## - The effect of bookedDay numeric is statistically non-significant and positive
## (beta = 0.02, 95% CI [-8.63e-03, 0.05], p = 0.170; Std. beta = 0.03, 95% CI
## [-0.01, 0.07])
## - The effect of bookedMonthYear numeric is statistically non-significant and
## positive (beta = 2.61e-04, 95% CI [-2.85e-03, 3.37e-03], p = 0.869; Std. beta =
## 3.40e-03, 95% CI [-0.04, 0.04])
## - The effect of daysDiff AppointBooked is statistically significant and
## negative (beta = -1.40e-03, 95% CI [-1.86e-03, -9.47e-04], p < .001; Std. beta
## = -0.17, 95% CI [-0.23, -0.12])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald z-distribution approximation.
# Create training and test data
## Define the columns to exclude
cols_to_exclude <- c("Record.Type","NurseFlag","Medical.Record.Number","Attendance.Day","Attendance.MonthYear","Attendance.Date", "Attendance.Type_recode","Attendance.Year","Attendance.Month","Age.at.Attendance.Cat.HSE","Pathway.Number","Present.Address","Home.Address","Appointment.Date","Referring.Hospital","Booked.Date_new", "No.Attendances","No.New.Attendances","Cancellation.Group","Reason.for.Cancellation_recode","No.DNAs","daysDiff_attendanceAppoint","daysDiff_attendanceBooked")
## Subset the data frame by excluding the specified columns
main_processed_cancel_dt <- main_processed[, !names(main_processed) %in% cols_to_exclude]
main_processed_cancel_dt <- subset(main_processed_cancel_dt, is.na(main_processed_cancel_dt$No.Cancels)==F)
sample_dt <- sample(c(TRUE,FALSE), nrow(main_processed_cancel_dt), replace=TRUE, prob=c(0.7,0.3))
train_dt <- main_processed_cancel_dt[sample_dt, ]
test_dt <- main_processed_cancel_dt[!sample_dt, ]
# Train the model
X <- train_dt[, -which(names(train_dt) == "No.Cancels")]
y <- train_dt$No.Cancels
# Fit the decision tree model
cancel_dt <- rpart(y ~ ., data = X, method = "class",cp=0.05) #cp is the complexity parameter, split that not decreasing the overall lack of fit by a factor of cp is pruned, the default value of cp is 0.01
summary(cancel_dt)
## Call:
## rpart(formula = y ~ ., data = X, method = "class", cp = 0.05)
## n= 25084
##
## CP nsplit rel error xerror xstd
## 1 1.00 0 1 1 0.012
## 2 0.05 1 0 0 0.000
##
## Variable importance
## Cancellation.Group_numeric Rebooked.Indicator
## 73 10
## Rebooked.Indicator_numeric X
## 10 4
## Eligibility_numeric Eligibility_recode
## 1 1
##
## Node number 1: 25084 observations, complexity param=1
## predicted class=1 expected loss=0.23 P(node) =1
## class counts: 5761 19323
## probabilities: 0.230 0.770
## left son=2 (5761 obs) right son=3 (19323 obs)
## Primary splits:
## Cancellation.Group_numeric splits as RRLR, improve=8900, (0 missing)
## Reason.for.Cancellation_numeric splits as RRLRRR, improve=8900, (0 missing)
## Rebooked.Indicator splits as LR, improve=3600, (0 missing)
## Rebooked.Indicator_numeric splits as LR, improve=3600, (0 missing)
## Booking.Type_recode splits as LRR, improve= 630, (0 missing)
## Surrogate splits:
## Rebooked.Indicator splits as LR, agree=0.80, adj=0.144, (0 split)
## Rebooked.Indicator_numeric splits as LR, agree=0.80, adj=0.144, (0 split)
## X < 91000 to the right, agree=0.78, adj=0.055, (0 split)
## Eligibility_recode splits as RLRRRRR, agree=0.77, adj=0.016, (0 split)
## Eligibility_numeric splits as RRLRRRR, agree=0.77, adj=0.016, (0 split)
##
## Node number 2: 5761 observations
## predicted class=0 expected loss=0 P(node) =0.23
## class counts: 5761 0
## probabilities: 1.000 0.000
##
## Node number 3: 19323 observations
## predicted class=1 expected loss=0 P(node) =0.77
## class counts: 0 19323
## probabilities: 0.000 1.000
# Plot the decision tree
rpart.plot(cancel_dt)
cancel_dt$variable.importance
## Cancellation.Group_numeric Rebooked.Indicator
## 8876 1282
## Rebooked.Indicator_numeric X
## 1282 488
## Eligibility_numeric Eligibility_recode
## 142 142
# Predict the model with actual defaults in test data
cancel_pred_dt <- predict(cancel_dt, test_dt, type="class")
print(cancel_pred_dt)
## 13 37 43 50 66 76 78 80 91 113 116 117 131
## 1 1 1 0 1 1 1 1 1 0 1 0 1
## 140 147 155 156 162 173 195 196 208 217 227 244 262
## 0 0 1 1 1 1 1 1 1 1 1 1 1
## 263 291 292 302 333 334 341 356 359 360 367 379 381
## 1 1 1 1 0 0 1 1 0 0 1 0 0
## 382 391 395 397 402 408 417 421 425 426 432 442 455
## 0 1 0 0 1 1 0 1 1 1 1 1 0
## 467 470 475 485 487 497 500 504 509 532 539 561 563
## 1 1 0 0 0 1 1 1 1 0 1 1 1
## 569 576 580 584 585 587 592 595 598 600 604 611 632
## 1 1 1 0 1 1 1 1 1 1 1 1 1
## 642 645 648 653 662 667 669 687 695 696 703 708 710
## 1 1 1 1 0 1 0 1 1 1 1 1 1
## 720 732 746 750 752 756 761 765 766 770 779 781 783
## 0 1 1 0 1 1 1 0 1 0 1 1 0
## 790 798 808 824 830 839 842 843 847 852 855 861 862
## 0 0 0 1 1 1 1 1 1 1 1 1 1
## 864 890 902 904 918 920 929 949 952 954 990 993 997
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 1010 1032 1033 1035 1042 1045 1049 1054 1055 1071 1075 1082 1090
## 1 1 1 0 1 1 0 1 1 0 0 1 0
## 1094 1099 1105 1107 1126 1133 1134 1150 1155 1156 1158 1165 1167
## 0 1 1 1 1 1 1 1 1 0 1 1 0
## 1171 1182 1187 1196 1200 1201 1204 1214 1272 1280 1285 1288 1290
## 1 1 0 1 1 1 1 1 1 1 1 1 1
## 1314 1316 1337 1348 1350 1360 1362 1373 1376 1387 1423 1424 1426
## 1 1 0 0 1 1 0 1 1 1 1 1 1
## 1436 1442 1449 1459 1482 1487 1492 1498 1515 1517 1529 1538 1540
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 1545 1567 1572 1592 1593 1595 1621 1630 1671 1686 1690 1712 1738
## 0 0 0 1 1 1 1 1 1 0 1 1 1
## 1747 1748 1767 1794 1802 1805 1808 1819 1821 1827 1831 1843 1845
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 1850 1853 1865 1867 1872 1891 1920 1943 1952 1956 1965 1969 1986
## 0 0 0 1 1 0 1 1 0 1 0 1 1
## 1992 1995 1998 2004 2016 2020 2022 2031 2041 2057 2077 2079 2086
## 1 1 1 1 1 1 0 1 1 1 0 1 1
## 2090 2116 2119 2149 2151 2160 2161 2162 2165 2177 2179 2184 2187
## 1 1 1 1 0 1 1 0 0 1 0 0 1
## 2195 2201 2202 2207 2236 2256 2278 2291 2306 2307 2313 2347 2372
## 0 1 1 1 1 0 1 1 1 1 1 1 1
## 2376 2387 2395 2409 2442 2444 2447 2450 2453 2469 2478 2480 2489
## 1 1 1 1 1 0 0 1 0 1 1 1 1
## 2491 2504 2506 2516 2518 2539 2543 2588 2594 2604 2608 2609 2621
## 1 1 1 1 1 1 1 1 1 1 0 1 1
## 2627 2647 2682 2688 2703 2706 2719 2733 2740 2764 2778 2792 2797
## 1 1 1 0 1 1 1 1 1 1 0 1 0
## 2801 2804 2823 2828 2860 2882 2886 2893 2907 2914 2915 2933 2935
## 1 1 1 1 0 1 0 1 1 1 1 1 1
## 2937 2938 2944 2956 2961 2968 2990 3007 3009 3014 3019 3032 3036
## 1 1 1 1 1 0 1 1 1 1 1 1 0
## 3058 3063 3064 3068 3075 3076 3083 3090 3098 3106 3110 3132 3137
## 1 1 0 1 1 1 0 0 1 1 1 1 1
## 3147 3159 3172 3175 3177 3189 3190 3200 3209 3235 3250 3260 3264
## 1 1 0 1 1 1 1 1 1 1 1 1 1
## 3268 3270 3272 3275 3287 3292 3313 3323 3326 3328 3338 3343 3361
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 3368 3380 3405 3413 3415 3419 3434 3437 3447 3456 3511 3516 3518
## 0 0 0 1 1 1 1 1 1 1 1 1 0
## 3524 3548 3549 3550 3555 3560 3567 3571 3574 3575 3576 3581 3589
## 1 0 1 1 1 1 1 1 1 1 1 1 1
## 3592 3614 3635 3638 3640 3645 3647 3655 3670 3678 3682 3694 3697
## 0 1 1 0 0 0 0 0 1 1 1 1 0
## 3720 3721 3734 3743 3750 3769 3778 3785 3788 3831 3861 3866 3871
## 1 0 0 0 1 1 1 1 1 1 1 0 1
## 3873 3887 3888 3890 3892 3909 3912 3913 3916 3917 3921 3935 3938
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 3944 3949 3954 3960 3966 3971 3980 3983 3991 4012 4013 4017 4025
## 1 0 1 0 1 1 1 1 1 1 1 0 1
## 4034 4041 4043 4048 4064 4066 4068 4080 4081 4087 4100 4103 4122
## 0 0 0 0 1 0 0 1 1 0 1 1 1
## 4140 4145 4166 4172 4179 4184 4186 4193 4211 4214 4293 4301 4316
## 1 1 1 1 0 1 1 1 1 1 1 1 0
## 4319 4330 4358 4380 4399 4410 4419 4435 4442 4506 4509 4510 4511
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 4518 4525 4534 4537 4545 4569 4596 4606 4609 4614 4630 4633 4637
## 1 1 1 0 1 1 1 1 1 1 1 1 1
## 4639 4671 4682 4685 4706 4710 4729 4748 4749 4754 4756 4766 4790
## 1 0 1 1 1 1 1 0 1 1 0 1 1
## 4808 4817 4820 4826 4827 4829 4840 4842 4843 4848 4852 4878 4905
## 1 1 1 1 1 1 1 1 0 1 1 1 0
## 4912 4917 4930 4933 4948 4949 4959 4971 4976 4988 4995 4996 4998
## 1 0 1 1 1 1 1 0 1 0 1 1 0
## 5000 5008 5021 5035 5039 5043 5044 5048 5055 5073 5080 5093 5104
## 1 1 1 0 0 1 1 1 1 1 1 1 0
## 5114 5117 5126 5131 5135 5138 5149 5152 5155 5159 5166 5169 5181
## 1 0 1 1 1 1 1 0 1 1 1 1 1
## 5182 5183 5186 5194 5197 5198 5203 5205 5216 5222 5227 5241 5248
## 1 1 1 1 1 1 0 0 1 1 1 1 1
## 5255 5267 5270 5276 5300 5302 5304 5307 5310 5312 5331 5332 5337
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 5352 5360 5361 5374 5376 5392 5400 5428 5431 5433 5434 5448 5467
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 5468 5472 5475 5476 5490 5496 5518 5524 5527 5549 5552 5557 5561
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 5568 5578 5583 5603 5605 5611 5619 5634 5649 5658 5661 5662 5665
## 0 1 0 1 1 1 1 1 1 1 0 1 1
## 5670 5695 5706 5710 5720 5721 5724 5744 5748 5752 5762 5764 5770
## 1 0 1 1 1 1 1 1 1 1 0 1 1
## 5782 5788 5801 5828 5839 5840 5865 5870 5874 5876 5893 5913 5915
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 5917 5924 5931 5938 5951 5954 5960 5964 5990 5999 6008 6028 6037
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 6044 6053 6057 6070 6073 6078 6083 6091 6107 6120 6121 6139 6144
## 1 1 1 1 1 0 0 1 1 1 1 0 1
## 6163 6164 6171 6189 6191 6200 6201 6243 6251 6262 6267 6286 6289
## 1 0 1 0 1 1 1 1 0 1 1 0 1
## 6320 6327 6334 6337 6341 6342 6347 6351 6354 6356 6361 6365 6391
## 1 1 1 0 1 1 1 1 1 1 1 1 1
## 6397 6431 6444 6451 6462 6464 6467 6483 6498 6504 6534 6540 6548
## 1 1 0 1 1 0 1 1 1 0 0 0 1
## 6552 6565 6578 6580 6588 6604 6608 6615 6643 6648 6649 6665 6677
## 1 1 1 1 1 1 1 1 0 1 1 1 1
## 6684 6694 6699 6701 6712 6714 6726 6734 6739 6744 6746 6749 6751
## 1 1 1 0 1 1 0 1 1 1 1 1 1
## 6754 6759 6787 6791 6805 6823 6825 6829 6840 6842 6844 6851 6876
## 1 1 1 0 1 1 1 1 1 1 1 1 1
## 6879 6881 6894 6905 6906 6926 6935 6953 6955 6964 6988 6990 6991
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 6992 6994 7014 7027 7035 7040 7041 7050 7065 7066 7067 7074 7076
## 1 1 0 1 1 1 1 1 1 0 0 1 1
## 7103 7113 7124 7148 7153 7155 7157 7161 7168 7184 7192 7196 7200
## 0 1 1 0 1 1 1 1 1 1 1 1 1
## 7222 7226 7228 7238 7251 7255 7259 7264 7268 7269 7274 7282 7292
## 1 0 1 1 0 1 0 1 1 0 1 1 1
## 7296 7305 7332 7343 7344 7347 7357 7374 7384 7385 7391 7393 7399
## 1 0 0 1 1 1 0 0 0 0 0 1 1
## 7401 7406 7407 7435 7469 7471 7475 7478 7500 7510 7514 7520 7523
## 1 1 1 1 1 1 0 1 0 1 1 0 1
## 7535 7538 7542 7556 7566 7567 7568 7576 7606 7654 7657 7659 7665
## 1 1 1 1 0 1 1 1 0 0 0 1 1
## 7669 7682 7683 7712 7727 7736 7738 7754 7756 7760 7773 7791 7796
## 1 0 1 1 1 1 1 1 1 1 0 0 1
## 7797 7800 7808 7814 7821 7823 7825 7836 7841 7843 7850 7851 7853
## 1 1 1 1 1 1 1 1 1 0 1 0 0
## 7860 7883 7887 7926 7927 7941 7942 7946 7959 7964 7973 7977 7982
## 0 0 0 1 1 0 1 1 1 1 1 1 1
## 7992 7998 8007 8010 8013 8017 8023 8031 8032 8037 8068 8080 8102
## 1 1 1 1 1 1 1 1 1 0 0 1 1
## 8106 8116 8129 8134 8142 8149 8161 8171 8180 8186 8191 8193 8203
## 1 1 0 1 1 1 1 1 0 1 1 0 1
## 8204 8206 8207 8210 8212 8221 8222 8263 8268 8274 8276 8279 8286
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 8288 8294 8304 8324 8329 8344 8347 8352 8354 8359 8361 8366 8368
## 1 0 0 1 1 1 1 1 1 0 1 0 1
## 8369 8371 8382 8385 8386 8392 8401 8408 8428 8432 8445 8449 8453
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 8474 8476 8488 8508 8511 8526 8547 8554 8559 8581 8597 8603 8618
## 1 1 1 1 1 0 0 1 1 1 0 1 1
## 8631 8632 8635 8636 8638 8646 8648 8649 8651 8654 8660 8664 8679
## 1 1 0 1 1 1 1 1 1 1 1 1 1
## 8684 8688 8698 8713 8728 8729 8734 8737 8743 8751 8754 8755 8760
## 1 1 0 1 1 1 0 1 1 0 0 0 0
## 8771 8786 8794 8795 8797 8798 8800 8801 8803 8812 8813 8815 8816
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 8832 8843 8845 8856 8858 8889 8891 8893 8902 8911 8969 8976 9000
## 1 1 1 0 1 1 1 1 1 1 1 0 1
## 9006 9013 9040 9045 9058 9074 9080 9090 9094 9099 9100 9114 9118
## 0 1 1 1 1 0 1 1 1 1 1 1 1
## 9130 9131 9142 9143 9170 9180 9198 9201 9207 9220 9223 9235 9250
## 1 0 1 1 1 1 1 1 1 1 0 1 0
## 9252 9254 9262 9269 9273 9281 9282 9303 9308 9318 9321 9334 9346
## 1 0 1 1 0 1 1 1 1 0 1 1 1
## 9353 9374 9375 9376 9388 9404 9412 9414 9423 9425 9429 9430 9448
## 1 1 1 1 1 0 1 0 1 1 1 0 1
## 9454 9468 9469 9470 9473 9487 9499 9507 9510 9514 9528 9540 9543
## 1 1 1 1 1 1 0 1 1 0 1 1 1
## 9551 9556 9567 9573 9591 9599 9640 9654 9660 9665 9679 9692 9697
## 0 1 0 1 1 1 1 0 1 0 1 1 0
## 9701 9720 9721 9737 9745 9756 9761 9765 9771 9783 9788 9793 9796
## 1 1 0 0 1 1 0 1 1 1 1 1 1
## 9799 9802 9806 9818 9823 9830 9851 9853 9854 9867 9872 9892 9897
## 1 1 1 1 1 1 1 1 1 1 0 1 1
## 9903 9904 9908 9913 9916 9919 9922 9938 9942 9956 9960 9964 9967
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 9986 9990 9997 10010 10012 10026 10034 10040 10047 10060 10065 10067 10076
## 1 1 1 1 0 1 1 1 1 1 0 0 1
## 10080 10081 10082 10130 10141 10152 10154 10162 10170 10176 10181 10185 10188
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 10196 10240 10254 10263 10266 10269 10281 10317 10330 10333 10336 10338 10345
## 1 1 0 0 1 1 1 0 1 1 1 1 1
## 10353 10356 10362 10363 10368 10373 10383 10394 10403 10410 10423 10426 10429
## 1 1 1 1 1 1 0 1 1 1 1 1 1
## 10454 10458 10470 10477 10478 10496 10512 10522 10532 10540 10564 10568 10573
## 1 1 0 1 1 1 1 1 1 1 0 1 1
## 10581 10587 10595 10605 10622 10649 10654 10660 10667 10668 10677 10684 10698
## 0 1 1 0 1 0 1 1 1 1 1 1 1
## 10733 10734 10742 10748 10751 10766 10783 10786 10795 10814 10819 10821 10829
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 10835 10836 10837 10847 10850 10856 10862 10867 10869 10877 10887 10902 10912
## 1 1 0 1 1 0 1 1 1 1 1 1 1
## 10923 10925 10936 10942 10948 10950 10955 10984 10993 10997 11001 11002 11020
## 0 0 1 1 1 1 1 1 1 1 1 0 1
## 11022 11032 11034 11047 11053 11079 11081 11096 11099 11107 11109 11110 11125
## 1 1 0 1 0 1 0 1 1 1 0 1 1
## 11135 11140 11157 11161 11162 11165 11175 11177 11185 11196 11197 11198 11203
## 1 1 1 0 1 1 1 1 1 1 1 0 1
## 11204 11205 11250 11255 11256 11264 11267 11286 11289 11296 11305 11322 11341
## 1 1 0 1 1 1 1 1 1 1 1 1 1
## 11353 11359 11374 11393 11394 11395 11403 11414 11455 11496 11501 11508 11521
## 1 1 0 1 1 1 0 1 1 1 1 0 1
## 11522 11541 11552 11565 11566 11569 11572 11610 11626 11656 11661 11669 11680
## 1 1 0 1 1 1 1 1 1 0 1 1 1
## 11682 11683 11685 11688 11692 11695 11700 11710 11719 11729 11730 11733 11758
## 1 1 1 1 1 1 1 0 1 0 1 1 1
## 11765 11775 11778 11786 11798 11809 11814 11816 11819 11824 11840 11844 11861
## 1 1 1 0 1 1 1 1 1 1 0 1 1
## 11870 11871 11873 11880 11884 11892 11905 11919 11923 11927 11928 11934 11942
## 1 1 1 1 1 1 0 1 0 1 0 0 1
## 11954 11960 11973 11979 11987 11988 11994 11995 11998 12022 12029 12034 12038
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 12039 12040 12053 12078 12086 12087 12089 12091 12095 12116 12117 12126 12143
## 1 1 0 1 1 1 1 1 1 0 1 1 0
## 12147 12150 12174 12187 12208 12224 12229 12239 12242 12247 12255 12271 12280
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 12284 12302 12312 12356 12361 12364 12371 12382 12392 12396 12397 12427 12431
## 0 1 0 1 1 1 1 1 1 1 1 0 0
## 12442 12444 12451 12468 12471 12491 12509 12518 12524 12528 12544 12554 12555
## 1 1 1 0 0 0 1 0 1 0 1 1 1
## 12563 12578 12589 12595 12598 12608 12624 12627 12636 12638 12640 12655 12678
## 1 1 0 0 0 0 1 1 1 1 0 1 0
## 12680 12705 12709 12723 12743 12746 12747 12751 12754 12755 12759 12774 12803
## 0 1 1 1 0 1 1 0 0 0 0 1 1
## 12809 12826 12836 12863 12868 12873 12879 12881 12887 12889 12893 12908 12911
## 0 1 1 1 1 1 1 1 1 1 0 1 1
## 12924 12929 12943 12948 12970 12972 12973 12979 12982 12987 12990 13008 13024
## 0 0 0 1 1 1 1 1 0 1 0 0 0
## 13033 13045 13068 13074 13075 13088 13092 13114 13141 13158 13167 13175 13209
## 1 0 1 0 1 0 1 1 0 1 0 0 1
## 13217 13220 13221 13234 13264 13280 13283 13284 13285 13305 13307 13312 13317
## 1 1 1 1 1 1 0 1 1 1 1 0 1
## 13334 13343 13345 13351 13367 13371 13386 13405 13413 13418 13424 13426 13448
## 1 1 1 0 1 1 0 1 0 1 1 1 1
## 13464 13468 13474 13475 13488 13489 13503 13517 13522 13546 13549 13550 13552
## 0 1 1 1 1 1 0 1 0 1 1 1 0
## 13555 13557 13559 13572 13582 13591 13606 13608 13609 13613 13623 13641 13666
## 1 1 1 1 1 1 0 1 0 0 0 1 1
## 13674 13685 13689 13690 13692 13693 13702 13705 13712 13713 13717 13725 13728
## 0 1 1 1 1 1 1 1 1 1 1 1 0
## 13740 13764 13769 13773 13779 13782 13813 13816 13832 13833 13840 13843 13844
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 13845 13848 13886 13891 13907 13930 13931 13939 13942 13947 13948 13961 13969
## 1 1 0 0 1 1 1 1 1 1 1 1 1
## 13979 13981 13992 13993 14000 14003 14007 14011 14013 14023 14028 14030 14051
## 1 0 1 0 1 1 1 1 1 1 1 1 1
## 14063 14068 14077 14078 14100 14117 14133 14151 14181 14193 14198 14200 14204
## 1 1 1 1 1 0 1 1 0 1 1 0 0
## 14224 14243 14251 14273 14276 14294 14299 14301 14302 14309 14315 14317 14341
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 14347 14353 14358 14368 14371 14372 14377 14379 14382 14390 14403 14406 14409
## 1 1 0 1 1 1 1 1 0 1 1 1 0
## 14414 14419 14420 14437 14445 14447 14454 14463 14487 14519 14527 14532 14539
## 1 0 0 1 1 1 1 1 1 1 0 1 0
## 14542 14545 14562 14564 14568 14569 14582 14606 14614 14636 14637 14640 14643
## 0 0 1 1 1 1 1 1 1 1 0 1 0
## 14647 14651 14654 14664 14667 14684 14688 14689 14690 14701 14702 14704 14706
## 0 1 1 1 1 1 0 1 1 1 1 1 1
## 14725 14726 14742 14763 14771 14777 14781 14787 14798 14808 14812 14830 14835
## 1 1 1 1 1 1 1 0 0 1 1 0 1
## 14837 14848 14856 14864 14876 14877 14884 14910 14915 14920 14924 14927 14930
## 0 1 0 1 1 0 0 0 1 1 0 1 1
## 14941 14942 14947 14952 14978 14993 14998 15000 15008 15029 15046 15054 15056
## 1 1 1 1 0 0 0 0 1 1 1 1 1
## 15069 15070 15079 15084 15096 15106 15108 15109 15116 15126 15135 15144 15160
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 15187 15200 15215 15220 15228 15234 15243 15260 15264 15276 15281 15282 15295
## 0 1 1 1 1 0 1 1 1 1 1 1 1
## 15303 15304 15307 15331 15332 15351 15357 15358 15362 15365 15371 15372 15383
## 1 1 1 0 0 1 1 1 1 1 1 1 1
## 15387 15389 15391 15401 15402 15403 15417 15419 15421 15436 15445 15461 15464
## 0 0 1 1 1 1 1 0 1 1 1 1 1
## 15472 15479 15494 15496 15499 15505 15511 15513 15532 15543 15548 15555 15557
## 1 1 1 0 1 1 0 0 1 1 0 1 1
## 15567 15570 15614 15615 15651 15657 15659 15660 15674 15677 15688 15690 15701
## 1 1 1 1 1 1 0 1 1 1 0 1 1
## 15706 15729 15735 15738 15742 15755 15756 15760 15770 15777 15782 15783 15788
## 1 1 1 1 0 1 1 0 1 1 1 1 0
## 15804 15809 15817 15823 15824 15830 15831 15835 15846 15855 15856 15863 15870
## 1 0 1 0 1 1 1 1 1 1 1 1 1
## 15880 15881 15895 15904 15938 15959 15963 15992 16006 16007 16010 16011 16013
## 1 0 1 1 1 1 1 0 1 1 1 1 1
## 16035 16052 16055 16056 16061 16062 16069 16071 16073 16080 16084 16086 16089
## 1 1 1 0 0 1 1 0 0 1 0 0 1
## 16097 16099 16101 16112 16118 16124 16143 16144 16145 16153 16170 16176 16190
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 16199 16200 16201 16210 16211 16212 16216 16234 16242 16252 16260 16277 16282
## 1 1 0 1 0 0 0 1 1 1 1 1 0
## 16287 16288 16293 16302 16304 16309 16316 16318 16322 16327 16336 16340 16344
## 1 1 1 1 1 1 1 1 0 1 1 1 1
## 16345 16354 16372 16373 16376 16386 16391 16407 16437 16446 16448 16451 16453
## 0 0 1 1 1 1 1 0 0 1 1 1 1
## 16455 16464 16484 16494 16517 16534 16546 16560 16567 16571 16575 16581 16610
## 1 1 0 1 1 0 1 1 1 1 1 1 1
## 16620 16636 16656 16673 16676 16680 16681 16685 16689 16692 16697 16698 16701
## 1 1 1 1 0 0 1 0 0 1 1 0 1
## 16704 16706 16707 16708 16740 16743 16750 16756 16759 16767 16774 16794 16799
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 16803 16804 16818 16827 16840 16847 16849 16852 16854 16856 16869 16871 16886
## 0 1 0 1 0 0 1 1 1 1 1 0 1
## 16897 16903 16911 16917 16925 16926 16929 16942 16945 16956 16967 16974 16992
## 1 0 1 1 1 1 0 1 1 1 0 1 0
## 16996 17009 17014 17015 17038 17046 17058 17063 17066 17074 17086 17093 17125
## 1 1 1 1 1 1 1 1 0 1 1 0 1
## 17129 17132 17141 17142 17144 17156 17165 17170 17177 17179 17213 17232 17243
## 1 1 1 1 1 0 0 1 1 1 1 0 1
## 17259 17265 17266 17267 17277 17294 17303 17306 17310 17320 17327 17328 17329
## 1 1 1 1 1 1 1 1 0 1 1 0 0
## 17341 17354 17368 17393 17399 17402 17407 17414 17418 17420 17438 17442 17455
## 1 1 1 1 0 0 1 1 1 1 0 1 1
## 17464 17473 17479 17487 17494 17498 17507 17515 17533 17538 17539 17540 17552
## 1 1 1 0 1 1 1 1 1 1 1 1 0
## 17570 17571 17577 17580 17595 17599 17622 17633 17638 17647 17648 17654 17661
## 1 1 1 1 1 0 1 1 1 1 1 1 1
## 17667 17680 17685 17686 17691 17699 17702 17713 17721 17723 17724 17730 17747
## 1 1 1 1 1 1 1 1 0 1 1 1 1
## 17751 17776 17777 17798 17799 17801 17812 17820 17823 17825 17835 17847 17857
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 17866 17877 17888 17891 17897 17902 17918 17936 17938 17939 17941 17948 17955
## 0 1 1 1 1 0 1 1 1 1 1 1 1
## 17966 17974 17977 17978 17983 17996 17997 17999 18002 18040 18056 18059 18061
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 18064 18072 18082 18105 18115 18149 18155 18158 18173 18174 18187 18193 18208
## 1 1 1 1 0 1 1 1 0 1 1 0 1
## 18231 18233 18240 18254 18258 18282 18285 18295 18297 18304 18309 18323 18349
## 1 1 0 1 1 1 1 0 1 1 1 1 1
## 18369 18373 18395 18397 18425 18429 18430 18462 18473 18474 18487 18508 18511
## 1 1 1 1 1 1 0 0 1 1 0 1 1
## 18517 18518 18519 18526 18531 18536 18538 18539 18540 18544 18545 18558 18572
## 1 1 1 1 0 1 1 1 1 1 1 0 1
## 18591 18593 18595 18600 18613 18622 18623 18634 18642 18644 18659 18660 18666
## 0 1 1 1 1 1 0 1 1 0 1 1 1
## 18673 18675 18677 18703 18707 18716 18743 18766 18787 18795 18799 18808 18813
## 1 1 1 1 0 1 1 1 0 1 1 1 1
## 18817 18826 18835 18836 18840 18849 18861 18872 18877 18883 18884 18886 18892
## 1 1 1 1 0 1 1 1 1 1 1 0 1
## 18896 18898 18914 18926 18930 18939 18955 18983 18988 18992 19001 19021 19023
## 1 1 1 1 1 1 0 0 1 1 1 1 1
## 19025 19041 19050 19057 19062 19068 19070 19071 19072 19095 19107 19108 19110
## 1 1 1 1 0 0 1 1 1 1 0 1 1
## 19112 19120 19126 19140 19150 19162 19190 19209 19211 19242 19247 19253 19254
## 1 0 1 1 1 1 0 1 1 1 0 1 1
## 19256 19262 19279 19283 19293 19300 19309 19311 19324 19328 19333 19334 19361
## 1 1 1 0 0 1 0 0 1 1 1 1 1
## 19367 19370 19376 19401 19402 19407 19416 19423 19430 19448 19458 19466 19473
## 1 0 1 1 0 1 1 1 1 1 1 1 1
## 19474 19494 19495 19504 19513 19539 19542 19560 19563 19566 19600 19611 19622
## 1 1 0 1 1 1 1 1 0 1 1 1 1
## 19624 19625 19628 19630 19633 19647 19654 19659 19668 19669 19670 19671 19675
## 1 1 1 1 1 1 0 1 1 1 0 1 1
## 19680 19694 19706 19712 19720 19748 19758 19772 19781 19785 19786 19812 19822
## 0 1 1 1 1 1 0 1 1 1 1 1 1
## 19836 19837 19841 19865 19886 19887 19895 19900 19908 19910 19917 19919 19920
## 1 0 1 1 1 0 0 1 0 1 1 1 1
## 19921 19928 19931 19937 19951 19952 19963 19965 20006 20034 20036 20057 20060
## 0 1 1 1 1 1 1 1 1 1 1 1 1
## 20068 20072 20076 20119 20126 20129 20144 20153 20156 20163 20166 20172 20191
## 1 1 0 1 1 1 1 1 1 1 1 0 0
## 20197 20204 20205 20206 20211 20212 20213 20215 20238 20247 20280 20291 20296
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 20297 20316 20335 20336 20340 20366 20380 20387 20388 20399 20401 20413 20444
## 0 1 1 1 1 1 1 1 1 1 1 0 1
## 20453 20455 20458 20465 20471 20488 20499 20502 20513 20518 20521 20527 20531
## 1 1 0 0 1 1 0 1 0 1 1 1 0
## 20542 20557 20561 20564 20570 20574 20576 20596 20606 20607 20611 20624 20634
## 1 0 1 0 1 1 1 1 0 0 1 1 0
## 20641 20643 20646 20669 20671 20687 20689 20693 20714 20727 20735 20738 20739
## 1 1 0 0 1 1 1 0 1 1 1 0 0
## 20747 20765 20782 20790 20806 20807 20808 20811 20816 20822 20840 20863 20870
## 1 1 0 1 1 1 1 1 1 1 1 0 1
## 20884 20887 20907 20908 20916 20926 20928 20932 20939 20942 20958 20960 20969
## 1 1 1 1 1 0 1 1 0 1 1 1 0
## 20971 20978 20979 20982 20983 20984 20988 20991 20995 21003 21019 21025 21032
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 21048 21049 21056 21084 21086 21089 21096 21129 21139 21143 21161 21168 21208
## 1 0 1 1 1 1 1 0 1 1 0 1 1
## 21212 21216 21240 21243 21247 21251 21258 21260 21271 21275 21286 21310 21317
## 1 1 1 1 1 1 1 0 1 0 0 1 1
## 21322 21324 21327 21341 21347 21363 21394 21397 21404 21407 21413 21423 21431
## 1 1 1 0 1 1 0 1 1 1 1 1 1
## 21446 21451 21452 21467 21480 21482 21484 21487 21494 21498 21503 21517 21544
## 1 1 1 0 1 0 1 1 1 1 1 0 1
## 21547 21552 21562 21567 21579 21580 21591 21592 21594 21597 21614 21624 21625
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 21638 21657 21659 21663 21671 21675 21681 21686 21694 21711 21719 21722 21724
## 0 1 1 1 0 1 1 1 0 1 1 1 1
## 21739 21744 21786 21810 21811 21816 21824 21841 21860 21861 21873 21879 21884
## 1 1 1 1 1 0 1 0 0 1 1 1 1
## 21893 21904 21927 21930 21931 21940 21956 21969 21971 21983 21988 21990 21991
## 1 1 0 1 0 1 1 0 1 1 1 1 1
## 21992 21995 21999 22030 22036 22042 22049 22066 22068 22075 22094 22103 22110
## 1 1 1 0 1 1 1 1 1 1 1 1 1
## 22120 22124 22133 22160 22164 22167 22175 22184 22217 22220 22221 22224 22233
## 1 1 1 1 0 1 1 0 0 0 1 1 1
## 22235 22241 22258 22282 22286 22287 22289 22296 22297 22305 22314 22322 22349
## 1 1 1 1 1 1 0 1 1 1 0 1 1
## 22354 22356 22365 22369 22373 22387 22397 22401 22419 22422 22424 22450 22469
## 1 1 1 1 1 0 1 1 1 0 0 0 1
## 22480 22494 22516 22526 22537 22550 22552 22554 22556 22558 22567 22568 22573
## 1 0 1 1 0 0 1 1 1 1 1 1 1
## 22574 22576 22608 22614 22623 22630 22631 22645 22646 22649 22662 22663 22678
## 1 0 1 1 1 1 1 0 1 1 0 0 1
## 22690 22691 22699 22701 22717 22721 22726 22729 22732 22748 22751 22776 22788
## 1 1 1 0 1 1 0 0 0 1 1 1 0
## 22791 22792 22794 22795 22798 22802 22814 22821 22827 22845 22846 22852 22855
## 1 0 0 0 1 1 1 1 0 1 1 1 1
## 22857 22860 22866 22884 22901 22911 22917 22922 22938 22940 22945 22965 22971
## 0 1 1 1 1 1 1 1 1 1 1 1 1
## 22975 22981 22990 22997 23000 23001 23002 23003 23008 23009 23014 23023 23027
## 1 0 1 1 1 1 0 0 1 1 0 1 1
## 23028 23031 23046 23051 23066 23071 23077 23084 23087 23107 23118 23128 23129
## 1 1 0 1 1 1 0 1 1 1 1 1 1
## 23131 23133 23135 23152 23162 23180 23208 23212 23216 23223 23243 23253 23276
## 0 1 1 1 1 1 0 1 0 1 1 1 1
## 23305 23323 23333 23351 23353 23373 23397 23401 23411 23421 23444 23446 23447
## 1 1 1 1 0 1 1 1 1 1 1 0 0
## 23449 23457 23462 23481 23482 23489 23494 23497 23515 23519 23524 23531 23539
## 0 1 0 1 1 1 1 1 1 1 1 0 1
## 23541 23547 23557 23560 23563 23565 23568 23571 23577 23579 23583 23586 23589
## 1 1 0 0 0 1 0 1 1 1 1 1 1
## 23595 23596 23597 23604 23605 23615 23619 23632 23633 23648 23678 23730 23731
## 0 1 1 1 1 1 0 1 1 1 1 1 1
## 23750 23754 23757 23761 23762 23771 23783 23791 23795 23822 23832 23833 23838
## 1 1 1 1 1 1 1 1 0 1 1 1 1
## 23841 23848 23850 23854 23870 23875 23891 23893 23897 23932 23934 23946 23951
## 1 1 1 1 0 1 1 1 1 1 0 1 1
## 23952 23956 23965 23971 23974 23976 23986 23988 24021 24024 24030 24034 24040
## 0 1 1 1 1 1 0 1 1 1 1 1 1
## 24051 24060 24066 24067 24072 24076 24095 24100 24103 24107 24121 24128 24142
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 24153 24162 24180 24186 24210 24213 24225 24230 24234 24247 24252 24262 24266
## 1 1 1 0 1 0 1 1 0 1 1 1 1
## 24275 24277 24292 24298 24300 24319 24323 24326 24328 24331 24340 24344 24346
## 0 1 1 1 1 1 1 1 1 1 1 1 1
## 24356 24363 24424 24433 24447 24457 24476 24481 24484 24487 24505 24508 24524
## 1 1 1 1 1 1 1 0 0 1 1 0 1
## 24531 24553 24572 24576 24578 24580 24590 24608 24614 24619 24647 24649 24682
## 1 0 1 0 1 1 1 1 1 1 1 1 1
## 24696 24703 24711 24724 24725 24728 24730 24733 24741 24742 24752 24762 24772
## 1 0 0 1 1 0 1 1 1 1 1 1 0
## 24773 24774 24780 24789 24831 24844 24846 24849 24916 24919 24921 24923 24951
## 0 1 1 0 1 1 1 1 1 1 1 1 1
## 24954 24972 24976 24992 24994 24999 25000 25006 25014 25018 25021 25023 25028
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 25034 25051 25052 25057 25067 25082 25103 25117 25123 25129 25135 25156 25178
## 1 0 1 1 0 0 1 1 1 1 0 0 1
## 25180 25182 25184 25196 25203 25205 25214 25220 25225 25240 25251 25262 25268
## 1 1 1 1 1 1 0 1 1 1 1 1 1
## 25274 25276 25292 25307 25318 25322 25323 25345 25351 25360 25368 25378 25380
## 1 1 1 1 0 1 1 1 1 0 1 1 1
## 25408 25417 25431 25433 25437 25439 25445 25451 25471 25477 25478 25483 25487
## 1 1 1 1 1 1 1 0 1 0 1 1 0
## 25493 25503 25507 25508 25515 25522 25523 25540 25542 25544 25548 25550 25558
## 1 1 1 1 1 1 1 0 0 1 1 1 1
## 25560 25566 25568 25571 25578 25579 25602 25608 25641 25645 25647 25652 25653
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 25662 25664 25666 25667 25677 25706 25708 25719 25725 25737 25740 25743 25745
## 1 1 1 0 1 0 1 1 0 1 1 1 1
## 25746 25763 25774 25775 25778 25817 25827 25829 25833 25846 25854 25888 25896
## 1 1 1 1 1 1 1 1 0 1 1 0 0
## 25902 25905 25908 25917 25930 25932 26003 26006 26016 26022 26026 26045 26049
## 1 1 1 1 1 0 1 1 1 0 0 1 1
## 26054 26066 26067 26083 26086 26089 26091 26116 26117 26131 26133 26135 26147
## 1 1 1 0 1 1 0 1 1 1 1 1 1
## 26149 26156 26159 26163 26186 26196 26206 26225 26229 26231 26244 26245 26249
## 1 0 1 1 1 1 1 1 1 1 1 0 1
## 26275 26284 26309 26315 26331 26334 26337 26339 26347 26357 26359 26361 26362
## 1 0 1 0 1 0 1 1 1 1 0 1 1
## 26379 26401 26408 26412 26413 26435 26441 26454 26461 26472 26475 26485 26492
## 1 0 1 1 0 1 1 0 1 1 1 1 1
## 26494 26515 26517 26520 26548 26553 26556 26560 26571 26603 26604 26607 26626
## 1 1 1 1 0 0 1 1 1 1 1 0 1
## 26628 26629 26636 26648 26658 26659 26711 26713 26715 26717 26729 26736 26752
## 1 1 1 1 1 0 1 1 1 1 1 1 0
## 26770 26774 26775 26776 26777 26780 26794 26809 26818 26821 26825 26857 26863
## 1 1 1 0 1 0 1 0 1 0 1 1 1
## 26864 26883 26894 26923 26953 26988 27002 27003 27010 27013 27015 27022 27031
## 1 1 1 1 0 1 1 1 0 1 1 0 1
## 27039 27040 27059 27072 27081 27106 27111 27132 27133 27136 27140 27143 27148
## 1 1 1 1 1 0 1 1 1 0 0 1 0
## 27171 27187 27191 27210 27215 27236 27237 27246 27248 27252 27253 27263 27265
## 1 1 1 1 1 1 0 0 1 1 1 1 1
## 27275 27286 27290 27301 27303 27308 27309 27312 27315 27318 27323 27329 27337
## 1 0 1 0 1 1 1 0 1 1 1 1 1
## 27340 27354 27358 27362 27365 27371 27374 27388 27392 27402 27403 27404 27405
## 1 1 1 1 0 0 1 1 1 0 1 1 1
## 27413 27435 27446 27449 27458 27474 27490 27513 27519 27524 27535 27540 27546
## 1 1 1 1 1 1 1 0 0 1 0 1 1
## 27548 27563 27565 27569 27589 27593 27595 27605 27612 27614 27616 27632 27642
## 1 1 1 1 1 1 1 0 0 1 1 0 0
## 27651 27663 27669 27679 27689 27709 27710 27729 27731 27740 27742 27743 27744
## 1 1 0 1 1 1 1 1 1 1 1 0 0
## 27751 27761 27768 27769 27771 27775 27776 27778 27790 27792 27794 27801 27802
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 27803 27806 27809 27830 27842 27844 27845 27848 27856 27875 27886 27889 27892
## 1 1 1 1 1 1 0 1 0 1 1 1 0
## 27898 27900 27907 27919 27920 27931 27932 27943 27949 27961 27967 27980 27981
## 1 1 1 0 0 0 1 1 0 1 0 1 0
## 27983 27990 27991 27998 28001 28002 28010 28020 28031 28041 28044 28079 28093
## 1 1 1 0 1 1 1 1 1 0 1 0 1
## 28095 28114 28123 28131 28140 28154 28158 28162 28175 28193 28210 28211 28212
## 1 1 1 0 1 1 1 1 1 1 0 1 0
## 28214 28219 28231 28232 28248 28252 28253 28255 28259 28267 28274 28277 28280
## 1 1 1 1 1 0 1 0 1 1 1 0 1
## 28282 28286 28291 28308 28312 28317 28327 28331 28332 28339 28364 28371 28375
## 1 1 0 1 1 1 1 0 1 1 1 1 1
## 28383 28395 28398 28408 28429 28432 28436 28450 28451 28456 28468 28491 28501
## 1 0 1 1 1 1 1 1 1 0 1 1 1
## 28508 28509 28514 28522 28527 28538 28548 28559 28565 28577 28601 28608 28627
## 1 1 1 0 0 1 0 1 1 1 0 1 0
## 28643 28689 28716 28732 28774 28776 28782 28800 28804 28806 28813 28826 28839
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 28844 28850 28861 28871 28901 28904 28911 28927 28950 28954 28964 28971 28980
## 0 1 1 1 0 1 1 0 0 1 0 1 1
## 28988 28996 28997 29010 29013 29017 29019 29049 29057 29068 29070 29079 29082
## 1 1 1 1 1 1 1 0 1 1 0 0 1
## 29083 29088 29108 29112 29113 29126 29135 29147 29154 29176 29177 29178 29179
## 1 0 1 0 0 1 1 1 0 1 0 1 1
## 29184 29186 29188 29193 29194 29195 29212 29218 29220 29225 29238 29240 29244
## 1 1 0 1 1 1 1 1 1 1 0 1 1
## 29260 29274 29275 29278 29285 29291 29300 29307 29316 29321 29333 29346 29350
## 0 1 1 0 1 0 1 1 1 0 1 1 1
## 29353 29356 29358 29360 29383 29386 29394 29425 29431 29436 29456 29461 29467
## 1 1 0 1 1 1 1 0 1 1 1 0 1
## 29479 29485 29487 29495 29513 29519 29524 29542 29544 29550 29565 29571 29596
## 1 1 1 1 1 1 1 1 1 1 0 0 1
## 29598 29601 29613 29620 29645 29654 29677 29681 29685 29689 29692 29695 29696
## 1 1 1 1 1 0 1 0 0 1 0 1 1
## 29707 29709 29710 29726 29743 29744 29750 29762 29778 29781 29784 29785 29798
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 29801 29802 29809 29813 29820 29838 29845 29851 29852 29863 29881 29894 29915
## 0 0 1 1 1 0 1 1 1 1 1 0 1
## 29927 29941 29950 29951 29953 29956 29959 29963 29968 29972 29992 29996 30014
## 1 0 1 1 1 1 1 1 0 0 1 1 1
## 30041 30046 30049 30062 30083 30086 30087 30100 30121 30134 30140 30142 30156
## 1 0 0 1 0 1 1 1 1 1 1 1 1
## 30160 30175 30177 30184 30193 30204 30207 30211 30219 30233 30237 30238 30256
## 1 0 1 1 1 1 0 1 1 1 0 1 1
## 30266 30268 30277 30278 30280 30281 30286 30294 30297 30311 30312 30318 30321
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 30327 30335 30342 30348 30356 30363 30368 30383 30392 30394 30397 30407 30411
## 1 0 1 1 1 1 1 1 0 1 1 1 1
## 30459 30472 30477 30482 30503 30504 30524 30528 30533 30535 30542 30543 30551
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 30559 30565 30566 30571 30574 30578 30581 30587 30611 30620 30630 30635 30658
## 1 0 0 1 1 1 1 1 1 1 0 1 1
## 30676 30678 30684 30687 30689 30699 30707 30708 30711 30726 30728 30729 30731
## 1 1 1 1 1 1 0 0 1 1 1 1 1
## 30734 30736 30743 30749 30755 30761 30766 30769 30771 30775 30777 30780 30801
## 1 1 1 0 1 0 0 1 0 1 1 1 1
## 30810 30820 30821 30828 30846 30858 30868 30874 30877 30887 30889 30892 30895
## 0 1 1 0 1 1 1 1 1 1 1 0 1
## 30897 30908 30913 30914 30968 30980 31023 31031 31040 31044 31054 31065 31073
## 1 1 0 1 1 1 0 1 1 1 0 1 1
## 31075 31105 31106 31110 31114 31127 31160 31171 31183 31188 31199 31215 31219
## 1 1 1 1 1 1 0 1 1 1 1 1 1
## 31223 31232 31243 31257 31264 31265 31266 31267 31270 31278 31286 31287 31294
## 1 0 1 1 1 1 1 0 0 1 1 1 1
## 31295 31299 31304 31310 31317 31322 31334 31338 31348 31385 31393 31398 31400
## 1 1 1 1 0 0 1 0 0 1 1 1 0
## 31403 31411 31423 31429 31434 31465 31481 31483 31490 31516 31529 31538 31539
## 1 1 1 0 1 1 1 1 1 1 1 0 1
## 31540 31542 31550 31556 31561 31579 31599 31608 31628 31678 31685 31692 31715
## 1 1 0 1 1 0 1 1 1 0 1 0 0
## 31733 31738 31746 31761 31766 31799 31812 31829 31834 31838 31839 31847 31852
## 1 1 1 1 1 1 1 0 0 1 1 1 1
## 31862 31872 31879 31882 31907 31912 31919 31927 31940 31944 31946 31950 31952
## 0 1 1 1 1 1 1 1 1 1 1 1 1
## 31971 31995 32005 32011 32019 32030 32057 32066 32077 32086 32089 32094 32114
## 1 1 1 1 0 1 0 1 1 0 1 1 1
## 32127 32130 32135 32140 32154 32162 32164 32167 32172 32173 32177 32183 32200
## 0 1 1 1 0 1 1 1 1 0 1 1 1
## 32211 32232 32247 32260 32288 32291 32297 32309 32312 32313 32317 32319 32324
## 1 1 1 1 1 1 1 1 1 0 0 0 1
## 32333 32338 32359 32363 32400 32405 32406 32411 32416 32418 32419 32429 32446
## 1 1 1 1 0 1 1 0 1 1 1 1 0
## 32455 32465 32467 32472 32480 32481 32483 32485 32497 32520 32538 32555 32567
## 1 1 1 0 1 1 1 1 1 1 1 0 0
## 32569 32570 32574 32598 32610 32651 32654 32664 32672 32676 32702 32715 32718
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 32734 32741 32744 32746 32751 32774 32784 32798 32805 32810 32813 32814 32816
## 1 1 0 1 0 0 0 1 1 1 1 1 1
## 32817 32827 32831 32839 32842 32843 32850 32852 32866 32873 32877 32885 32896
## 1 0 1 1 1 0 1 1 1 1 1 1 1
## 32903 32906 32920 32925 32946 32951 32953 32954 32956 32960 32966 32976 32995
## 1 1 1 0 1 0 0 1 1 1 1 1 1
## 33005 33011 33013 33029 33035 33040 33060 33081 33084 33107 33109 33153 33167
## 1 1 1 0 1 1 0 1 1 1 1 1 1
## 33169 33174 33176 33178 33182 33190 33219 33230 33233 33240 33247 33256 33259
## 1 1 0 1 1 0 1 1 1 1 1 0 1
## 33280 33289 33290 33295 33300 33303 33319 33336 33337 33360 33364 33367 33374
## 0 1 1 1 1 1 1 0 1 1 0 1 0
## 33382 33385 33386 33389 33401 33402 33410 33420 33423 33436 33439 33452 33453
## 1 1 1 1 0 0 1 0 1 0 1 1 0
## 33465 33466 33470 33471 33523 33530 33534 33536 33542 33560 33574 33575 33577
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 33578 33584 33585 33587 33594 33605 33610 33634 33651 33655 33659 33674 33679
## 1 1 1 1 1 1 1 1 0 1 1 0 1
## 33703 33704 33711 33715 33724 33734 33754 33760 33763 33771 33774 33780 33782
## 1 0 1 1 0 1 1 0 0 1 1 1 1
## 33791 33796 33809 33826 33851 33852 33857 33859 33872 33873 33876 33881 33891
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 33902 33904 33910 33921 33927 33932 33936 33937 33943 33959 33972 33978 33980
## 1 0 0 1 1 0 1 1 1 1 1 1 1
## 33981 33987 33989 34004 34005 34006 34026 34031 34038 34039 34042 34054 34071
## 0 1 1 1 1 1 1 0 1 1 0 1 1
## 34072 34075 34088 34089 34096 34098 34119 34151 34164 34166 34184 34185 34186
## 1 0 1 1 1 1 1 1 1 1 1 1 1
## 34195 34197 34203 34215 34224 34230 34236 34244 34245 34256 34260 34264 34269
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 34272 34281 34291 34303 34308 34310 34318 34334 34335 34349 34352 34367 34378
## 0 1 1 1 1 1 1 1 1 1 1 1 1
## 34381 34382 34412 34414 34430 34432 34436 34438 34443 34453 34463 34470 34475
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 34478 34489 34498 34511 34512 34514 34515 34534 34560 34563 34565 34570 34576
## 1 1 0 1 1 1 1 1 1 0 1 1 1
## 34580 34586 34590 34595 34617 34619 34637 34652 34657 34660 34664 34666 34680
## 0 1 1 1 1 1 1 1 1 1 1 0 1
## 34688 34689 34709 34711 34714 34722 34738 34746 34760 34765 34768 34788 34791
## 1 0 1 0 1 1 1 1 1 1 1 1 1
## 34806 34815 34820 34825 34831 34836 34837 34862 34864 34869 34873 34874 34875
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 34895 34900 34901 34916 34921 34949 34952 34967 34988 34996 34997 34999 35010
## 1 1 1 0 1 1 1 1 1 0 0 0 1
## 35022 35027 35034 35035 35047 35055 35070 35073 35074 35087 35098 35099 35101
## 1 0 0 0 1 1 1 1 1 1 1 1 1
## 35105 35112 35114 35120 35121 35126 35142 35144 35160 35165 35166 35169 35188
## 0 1 1 0 1 0 1 1 1 1 1 1 1
## 35202 35206 35208 35216 35218 35227 35228 35230 35237 35239 35242 35246 35273
## 1 0 1 1 0 1 1 0 1 1 1 0 1
## 35287 35288 35291 35316 35320 35325 35337 35347 35352 35367 35370 35374 35378
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 35383 35385 35386 35391 35394 35406 35423 35425 35432 35435 35439 35451 35452
## 1 1 0 1 1 0 0 0 0 1 1 1 0
## 35459 35470 35471 35484 35492 35510 35513 35532 35533 35536 35538 35540 35543
## 1 1 1 0 1 1 1 1 1 0 0 1 0
## 35566 35577 35580 35585 35599 35607 35625 35627 35635 35637 35650 35659 35666
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 35671 35701 35707 35729 35745 35748 35772 35775 35776 35779 35783 35784 35798
## 1 1 0 1 1 1 0 1 0 0 1 1 1
## 35805 35816 35827 35828 35833 35857 35874 35878 35880 35887 35910 35917 35928
## 1 1 1 1 1 0 1 1 1 0 1 1 1
## 35936 35969 35970 35987 36002 36021 36023 36026 36032 36034 36037 36042 36046
## 0 1 1 1 1 0 1 1 1 1 0 0 0
## 36048 36055 36062 36063 36079 36089 36093 36105 36107 36109 36111 36114 36142
## 1 1 0 1 1 0 1 0 1 1 1 1 0
## 36164 36175 36178 36183 36185 36188 36192 36196 36216 36220 36226 36234 36250
## 1 1 1 1 1 1 1 0 1 0 0 1 0
## 36251 36254 36267 36269 36272 36278 36280 36281 36284 36296 36297 36303 36306
## 1 1 1 1 1 0 1 1 0 1 1 0 1
## 36311 36320 36330 36335 36344 36346 36349 36352 36358 36368 36370 36375 36385
## 1 0 1 1 1 0 1 0 1 1 1 1 1
## 36388 36389 36395 36413 36417 36423 36429 36441 36446 36458 36464 36477 36484
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 36491 36499 36503 36513 36517 36532 36538 36541 36557 36566 36569 36585 36594
## 1 1 0 1 1 1 1 1 1 1 1 1 0
## 36606 36609 36610 36611 36615 36616 36623 36630 36643 36651 36673 36689 36693
## 0 1 1 1 0 1 1 1 1 1 1 0 1
## 36695 36704 36710 36722 36736 36748 36752 36758 36777 36794 36798 36800 36806
## 1 1 1 0 1 1 1 0 1 0 1 0 0
## 36812 36819 36825 36829 36832 36834 36837 36843 36848 36859 36860 36863 36866
## 0 0 0 0 1 0 1 1 1 1 0 1 1
## 36873 36885 36886 36895 36908 36915 36932 36951 36961 36974 36975 36976 36988
## 0 0 1 1 1 1 1 0 1 1 1 1 1
## 36996 36998 37006 37007 37011 37031 37033 37039 37050 37075 37079 37088 37095
## 0 0 1 1 1 1 1 1 1 0 1 1 1
## 37098 37115 37125 37128 37132 37135 37178 37182 37184 37191 37193 37196 37207
## 1 1 1 1 1 1 1 0 1 0 1 1 1
## 37210 37211 37212 37232 37243 37266 37275 37296 37309 37313 37317 37318 37319
## 1 0 0 0 1 1 1 1 1 1 1 1 0
## 37320 37333 37336 37353 37356 37358 37365 37371 37383 37391 37400 37410 37413
## 1 1 0 1 1 1 1 1 1 1 1 1 1
## 37428 37429 37432 37440 37448 37450 37462 37466 37468 37474 37483 37492 37497
## 1 1 1 1 1 1 0 0 1 1 1 1 1
## 37502 37510 37512 37516 37532 37533 37539 37548 37551 37552 37567 37576 37584
## 1 0 1 0 1 1 1 1 1 1 1 1 1
## 37592 37604 37607 37632 37633 37656 37664 37669 37673 37674 37728 37741 37745
## 1 1 1 0 1 1 1 1 1 1 1 0 1
## 37749 37765 37766 37771 37776 37781 37782 37786 37797 37799 37800 37817 37832
## 1 1 1 1 0 1 1 0 1 0 1 1 1
## 37833 37840 37852 37856 37859 37872 37879 37884 37894 37905 37908 37919 37934
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 37939 37949 37977 37978 37986 37990 37993 38005 38018 38031 38049 38070 38072
## 1 1 1 1 1 1 1 1 0 1 1 0 1
## 38081 38083 38085 38089 38110 38116 38126 38133 38150 38151 38170 38172 38179
## 1 0 1 1 0 1 1 0 0 1 1 1 1
## 38192 38204 38205 38211 38218 38220 38223 38237 38244 38256 38266 38277 38284
## 0 0 1 1 1 1 0 1 1 1 1 1 1
## 38286 38287 38290 38292 38299 38306 38311 38314 38322 38323 38329 38330 38331
## 0 1 0 1 0 1 1 0 1 1 1 1 1
## 38336 38345 38346 38356 38375 38385 38386 38397 38415 38425 38427 38428 38432
## 1 1 0 0 1 1 1 1 1 1 1 1 1
## 38434 38439 38443 38450 38470 38484 38488 38509 38511 38515 38524 38529 38532
## 0 1 1 0 0 1 1 1 1 1 0 1 1
## 38542 38558 38565 38569 38572 38580 38583 38596 38598 38606 38610 38613 38628
## 1 1 1 1 0 1 1 1 1 1 1 1 0
## 38649 38652 38666 38675 38678 38692 38693 38704 38706 38720 38723 38729 38733
## 1 1 1 1 1 1 0 1 1 0 1 0 0
## 38772 38775 38779 38784 38788 38790 38797 38802 38803 38804 38828 38831 38845
## 1 1 1 0 1 1 1 1 1 1 1 1 0
## 38873 38874 38877 38885 38897 38901 38908 38922 38933 38935 38943 38956 38967
## 1 0 1 0 1 1 0 1 1 1 0 1 0
## 38969 38971 38986 38988 39009 39011 39014 39019 39021 39024 39038 39045 39067
## 1 1 0 1 1 1 1 1 1 1 1 1 0
## 39081 39086 39089 39090 39097 39102 39105 39123 39183 39185 39187 39188 39189
## 1 1 1 1 1 0 0 1 1 1 1 0 1
## 39193 39212 39216 39220 39239 39243 39245 39246 39249 39266 39273 39274 39293
## 1 1 1 1 1 0 0 1 0 1 1 1 1
## 39294 39299 39309 39310 39318 39319 39320 39321 39324 39325 39331 39336 39360
## 1 1 1 0 1 1 0 0 1 1 1 0 1
## 39361 39363 39372 39380 39384 39388 39394 39397 39400 39427 39440 39456 39460
## 1 1 1 1 1 1 1 1 1 0 1 1 0
## 39477 39478 39484 39499 39500 39503 39505 39511 39512 39529 39536 39558 39564
## 1 1 1 1 0 0 1 1 1 1 1 0 0
## 39569 39576 39585 39606 39607 39616 39617 39619 39622 39623 39631 39636 39641
## 1 1 1 1 0 0 1 0 1 1 0 1 1
## 39644 39653 39660 39681 39691 39709 39724 39731 39741 39763 39766 39775 39782
## 0 1 1 1 1 1 1 1 1 1 1 0 1
## 39794 39814 39832 39848 39849 39859 39867 39871 39872 39879 39899 39902 39908
## 1 0 0 1 1 0 1 0 0 1 1 1 1
## 39917 39925 39929 39931 39933 39936 39939 39940 39941 39946 39954 39961 39963
## 1 1 0 1 1 0 1 0 1 1 1 1 1
## 39969 39976 39978 39980 39984 39994 39995 40024 40029 40033 40040 40046 40048
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 40051 40066 40097 40098 40100 40104 40118 40120 40122 40123 40126 40142 40154
## 0 0 1 1 1 1 1 1 1 1 1 1 1
## 40160 40171 40180 40198 40202 40210 40212 40216 40219 40220 40230 40231 40238
## 1 1 1 0 0 1 1 1 1 1 1 1 1
## 40243 40257 40263 40280 40292 40303 40305 40315 40317 40319 40331 40334 40338
## 0 0 0 1 1 0 0 0 1 1 1 0 0
## 40346 40364 40368 40369 40374 40375 40381 40386 40387 40394 40400 40406 40409
## 1 1 1 1 0 1 1 1 1 1 0 1 1
## 40414 40422 40425 40435 40448 40450 40452 40455 40477 40495 40505 40506 40507
## 1 0 1 1 1 0 0 1 1 1 1 1 1
## 40509 40517 40536 40550 40556 40559 40571 40575 40584 40586 40589 40596 40601
## 1 1 1 1 0 0 0 1 1 1 1 1 1
## 40602 40617 40627 40637 40638 40646 40656 40666 40675 40678 40691 40708 40719
## 1 1 0 0 1 1 1 0 1 1 1 1 1
## 40748 40749 40753 40758 40763 40779 40780 40785 40786 40788 40791 40794 40809
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 40814 40826 40838 40846 40847 40848 40852 40857 40874 40881 40888 40891 40892
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 40895 40899 40906 40910 40922 40926 40929 40944 40950 40956 40964 40970 40972
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 40976 40993 40996 40998 41002 41003 41004 41006 41007 41009 41017 41029 41030
## 1 1 1 0 1 1 1 1 1 1 1 0 0
## 41042 41054 41071 41077 41090 41102 41103 41113 41126 41128 41136 41146 41167
## 1 0 1 1 0 0 0 0 1 0 1 0 1
## 41206 41227 41243 41246 41251 41273 41278 41309 41317 41358 41372 41387 41388
## 1 0 1 1 1 0 1 1 1 1 1 1 1
## 41412 41437 41448 41454 41460 41461 41462 41480 41481 41485 41500 41502 41506
## 0 1 0 0 1 1 1 1 1 1 1 1 1
## 41511 41520 41522 41545 41550 41557 41565 41578 41621 41640 41692 41698 41699
## 1 1 0 1 1 1 1 1 0 1 1 1 0
## 41702 41716 41717 41720 41724 41746 41749 41764 41771 41783 41804 41806 41816
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 41831 41842 41843 41851 41857 41860 41866 41868 41875 41885 41920 41921 41925
## 1 1 0 1 1 1 1 1 1 1 0 0 1
## 41929 41932 41944 41970 41976 41990 41997 41999 42018 42029 42047 42053 42063
## 1 0 1 0 0 1 1 1 1 1 0 1 0
## 42068 42070 42071 42084 42086 42090 42093 42109 42113 42114 42115 42146 42153
## 1 1 1 0 1 1 1 0 1 0 0 1 1
## 42171 42174 42185 42186 42188 42189 42190 42192 42200 42203 42207 42219 42232
## 0 0 1 1 1 1 1 1 1 0 1 0 0
## 42234 42248 42256 42258 42260 42263 42264 42272 42285 42288 42290 42293 42304
## 1 1 1 1 1 1 0 1 1 0 0 1 0
## 42305 42323 42328 42343 42348 42367 42371 42377 42379 42381 42384 42411 42413
## 0 0 1 0 1 1 0 0 1 1 1 1 1
## 42427 42429 42430 42440 42442 42456 42466 42483 42484 42490 42503 42506 42508
## 1 1 1 1 1 1 1 1 0 1 0 1 1
## 42511 42522 42524 42532 42541 42546 42554 42555 42566 42567 42576 42584 42586
## 1 0 1 1 1 1 1 1 1 1 1 1 1
## 42588 42598 42608 42614 42621 42627 42636 42638 42643 42692 42695 42713 42725
## 1 1 1 1 0 1 1 1 1 1 1 0 1
## 42733 42744 42759 42762 42777 42782 42783 42784 42787 42805 42807 42811 42813
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 42822 42826 42833 42839 42845 42847 42849 42850 42856 42857 42860 42862 42868
## 1 1 1 1 1 1 1 1 0 1 1 1 1
## 42878 42882 42885 42904 42913 42929 42938 42948 42963 42968 42969 42970 42974
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 42990 42992 43013 43035 43063 43079 43096 43103 43113 43115 43118 43119 43124
## 1 1 1 0 1 1 1 1 1 0 1 1 1
## 43130 43136 43139 43156 43163 43169 43189 43205 43242 43249 43255 43264 43265
## 1 1 1 1 1 1 0 1 1 0 1 0 0
## 43266 43274 43275 43283 43293 43304 43306 43315 43316 43317 43320 43326 43329
## 1 1 0 1 0 1 1 0 1 1 1 1 1
## 43336 43338 43348 43352 43361 43374 43378 43383 43385 43391 43402 43442 43448
## 1 1 1 1 1 1 1 0 1 1 1 0 1
## 43460 43480 43499 43502 43517 43518 43519 43525 43527 43538 43547 43549 43550
## 1 0 1 0 1 1 1 1 1 0 1 0 1
## 43564 43578 43582 43585 43589 43590 43595 43599 43604 43612 43617 43621 43623
## 1 1 0 0 0 0 1 1 1 1 1 1 0
## 43624 43628 43640 43650 43653 43670 43675 43679 43703 43707 43709 43722 43732
## 1 1 0 0 1 1 1 1 1 1 1 1 0
## 43738 43746 43749 43764 43776 43782 43785 43786 43787 43866 43869 43880 43891
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 43896 43902 43917 43934 43941 43952 43955 43961 43963 43979 43986 43988 43989
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 43992 43993 43995 43999 44003 44004 44013 44014 44016 44031 44032 44047 44055
## 1 1 1 1 0 1 1 1 1 1 1 0 1
## 44064 44070 44103 44104 44124 44125 44126 44136 44137 44150 44163 44165 44166
## 1 1 0 1 1 1 0 1 1 1 1 1 1
## 44174 44189 44201 44205 44221 44231 44232 44253 44264 44277 44320 44333 44346
## 1 0 1 1 1 1 0 1 1 1 1 1 1
## 44347 44349 44350 44373 44381 44385 44386 44388 44391 44405 44417 44421 44439
## 0 1 1 1 1 0 0 1 1 1 0 1 0
## 44457 44492 44495 44497 44499 44500 44505 44525 44526 44537 44543 44549 44555
## 1 1 1 1 1 1 1 1 1 1 0 1 0
## 44574 44577 44579 44596 44607 44610 44611 44612 44620 44630 44631 44667 44668
## 1 1 1 1 0 0 1 1 1 1 0 1 1
## 44672 44674 44676 44680 44704 44713 44718 44719 44720 44721 44728 44729 44767
## 0 1 1 1 0 1 1 0 1 1 1 1 1
## 44769 44772 44775 44777 44782 44799 44826 44834 44835 44843 44848 44858 44867
## 0 1 1 1 1 1 1 1 0 1 0 1 1
## 44868 44875 44880 44885 44889 44897 44898 44902 44914 44917 44929 44941 44948
## 0 0 1 0 1 1 1 1 1 1 1 1 0
## 44951 44959 44966 44980 44991 45030 45040 45044 45050 45053 45095 45099 45113
## 1 1 0 1 1 1 1 0 1 0 0 1 0
## 45114 45117 45124 45126 45137 45169 45187 45188 45189 45205 45212 45223 45232
## 0 1 1 1 0 1 1 1 1 1 1 1 0
## 45246 45252 45259 45273 45282 45286 45309 45312 45313 45316 45320 45339 45345
## 1 0 1 1 1 0 1 1 1 0 1 0 1
## 45349 45379 45396 45397 45399 45408 45416 45427 45438 45450 45472 45485 45491
## 0 1 0 1 1 1 0 1 1 1 1 1 1
## 45500 45502 45507 45514 45517 45527 45537 45540 45546 45548 45558 45568 45571
## 1 1 1 1 1 1 1 1 0 0 0 1 1
## 45572 45573 45586 45587 45595 45608 45622 45639 45645 45648 45670 45672 45690
## 0 1 1 1 1 1 1 1 1 1 1 0 1
## 45695 45705 45707 45709 45712 45722 45733 45751 45752 45765 45771 45774 45782
## 1 1 1 0 0 1 0 1 1 1 0 1 0
## 45784 45793 45815 45826 45838 45845 45849 45853 45860 45867 45874 45877 45890
## 1 1 1 1 0 0 0 1 1 1 0 1 0
## 45902 45916 45918 45921 45922 45940 45952 45964 45970 45983 46016 46021 46023
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 46029 46035 46037 46080 46088 46092 46105 46107 46125 46140 46144 46147 46149
## 1 0 1 1 1 1 1 1 0 0 1 1 1
## 46150 46152 46159 46163 46179 46183 46185 46189 46194 46200 46206 46212 46229
## 1 0 0 1 1 1 1 1 1 0 0 1 1
## 46239 46246 46247 46248 46253 46262 46270 46285 46293 46302 46311 46313 46315
## 1 1 1 0 0 0 1 1 1 1 1 1 0
## 46327 46328 46330 46340 46341 46348 46350 46367 46374 46379 46380 46390 46398
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 46399 46424 46449 46450 46452 46454 46459 46463 46492 46503 46509 46549 46556
## 1 0 1 1 1 1 1 1 1 1 1 1 1
## 46576 46580 46589 46595 46600 46652 46659 46668 46669 46689 46692 46700 46702
## 1 0 1 0 1 1 1 1 1 1 0 1 1
## 46723 46724 46725 46739 46741 46745 46751 46758 46767 46769 46772 46773 46774
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 46787 46802 46804 46822 46838 46839 46843 46844 46858 46860 46873 46876 46899
## 1 1 1 0 1 1 1 1 0 1 1 1 1
## 46908 46912 46916 46921 46928 46941 46949 46958 46976 46989 46991 46993 47015
## 1 1 1 1 0 0 1 1 1 1 1 1 0
## 47029 47038 47062 47071 47092 47102 47109 47111 47112 47124 47125 47132 47137
## 1 1 1 0 1 1 0 1 1 1 1 1 0
## 47141 47166 47169 47182 47183 47193 47199 47207 47210 47225 47228 47233 47236
## 0 1 1 1 0 0 1 1 1 1 1 1 1
## 47246 47252 47269 47271 47282 47289 47292 47317 47335 47337 47351 47372 47389
## 1 1 1 1 0 1 1 1 1 1 1 1 0
## 47392 47395 47397 47410 47415 47423 47427 47429 47433 47434 47448 47459 47460
## 1 1 1 1 1 1 1 1 1 1 0 0 1
## 47463 47475 47478 47480 47482 47487 47500 47511 47512 47514 47518 47521 47525
## 1 1 1 0 1 1 1 1 1 1 0 1 1
## 47526 47559 47572 47577 47586 47598 47606 47609 47610 47611 47621 47624 47627
## 1 1 0 0 1 1 1 1 1 0 0 1 0
## 47629 47650 47655 47680 47681 47699 47705 47707 47710 47721 47722 47726 47728
## 1 0 1 1 1 1 1 1 1 0 1 1 0
## 47732 47735 47749 47751 47753 47757 47783 47790 47798 47813 47833 47834 47836
## 0 1 1 0 1 1 1 1 1 0 0 1 1
## 47837 47843 47849 47852 47855 47856 47858 47867 47875 47877 47883 47893 47904
## 1 1 1 0 1 1 1 1 0 1 0 1 1
## 47908 47916 47942 47943 47944 47949 47969 47992 47995 47997 48007 48021 48025
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 48035 48054 48058 48059 48068 48083 48091 48106 48108 48109 48128 48132 48135
## 1 0 1 1 1 1 1 1 1 0 1 1 1
## 48152 48160 48167 48194 48206 48213 48217 48219 48233 48235 48241 48257 48265
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 48272 48276 48281 48283 48312 48317 48319 48324 48330 48338 48342 48348 48351
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 48369 48371 48383 48395 48405 48420 48439 48468 48474 48496 48500 48501 48508
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 48525 48532 48534 48543 48547 48550 48552 48562 48572 48578 48580 48589 48592
## 1 1 0 1 0 1 1 1 1 0 1 1 1
## 48596 48601 48602 48610 48637 48643 48649 48661 48664 48675 48700 48702 48707
## 0 1 0 1 1 1 0 1 1 1 1 1 1
## 48712 48714 48715 48740 48745 48751 48755 48759 48762 48767 48786 48796 48808
## 1 1 1 0 1 1 1 1 0 1 1 0 1
## 48831 48834 48843 48845 48882 48888 48891 48904 48911 48928 48931 48955 48962
## 0 0 1 1 1 1 1 1 1 0 1 1 1
## 48964 48965 48968 48974 48975 48980 48994 49012 49016 49017 49032 49035 49038
## 1 1 1 0 1 1 0 0 1 0 1 0 0
## 49047 49054 49069 49085 49086 49098 49122 49130 49131 49133 49147 49160 49165
## 1 1 1 0 0 1 1 1 0 1 0 1 1
## 49168 49173 49189 49202 49204 49212 49229 49230 49240 49247 49249 49250 49281
## 0 0 1 1 0 1 1 0 1 1 1 1 1
## 49282 49298 49309 49317 49319 49323 49327 49329 49339 49347 49353 49375 49406
## 0 1 1 1 1 1 1 1 0 0 1 0 0
## 49408 49420 49442 49454 49466 49475 49477 49496 49513 49523 49527 49533 49534
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 49554 49563 49565 49569 49580 49584 49600 49605 49610 49614 49623 49626 49629
## 1 0 1 1 0 0 1 1 1 0 1 0 1
## 49636 49655 49662 49687 49698 49701 49706 49708 49720 49723 49728 49730 49734
## 1 1 1 1 0 1 1 1 1 1 1 1 0
## 49740 49753 49759 49763 49764 49769 49770 49778 49782 49785 49795 49797 49805
## 1 1 1 1 1 1 1 0 1 1 0 1 1
## 49822 49831 49833 49843 49852 49853 49868 49869 49871 49874 49876 49877 49880
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 49882 49888 49893 49894 49922 49929 49940 49944 49974 49984 49990 49993 50031
## 1 1 0 0 1 1 1 1 0 0 1 1 0
## 50032 50037 50053 50059 50066 50073 50074 50077 50079 50081 50097 50103 50105
## 1 1 1 1 1 0 0 1 0 1 1 1 1
## 50110 50114 50119 50127 50144 50146 50155 50166 50168 50171 50191 50192 50198
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 50199 50204 50205 50220 50226 50238 50248 50259 50262 50265 50275 50285 50291
## 1 1 1 1 1 1 0 0 0 1 0 0 0
## 50303 50307 50309 50315 50316 50318 50320 50330 50344 50346 50347 50359 50360
## 1 0 1 1 1 1 0 0 1 1 1 1 0
## 50361 50375 50389 50401 50409 50420 50422 50432 50435 50451 50454 50481 50484
## 1 0 0 1 1 1 1 0 0 1 1 1 1
## 50518 50521 50535 50545 50550 50554 50564 50566 50576 50580 50586 50604 50605
## 1 1 1 0 1 0 1 1 1 1 1 1 1
## 50606 50607 50625 50628 50630 50636 50657 50663 50665 50667 50683 50688 50696
## 1 1 0 0 0 1 0 1 1 1 1 1 1
## 50698 50712 50718 50721 50730 50735 50745 50746 50747 50752 50758 50759 50762
## 1 1 0 1 1 1 1 1 1 1 1 0 1
## 50764 50786 50787 50790 50793 50796 50809 50817 50818 50820 50823 50825 50836
## 1 1 1 1 1 1 0 1 1 1 1 1 1
## 50841 50843 50845 50848 50849 50858 50867 50868 50884 50909 50910 50911 50940
## 0 0 1 1 1 0 0 1 1 0 0 1 1
## 50958 50962 50963 50965 50976 50982 50991 51012 51014 51015 51027 51049 51063
## 1 1 1 0 1 0 1 1 1 0 0 1 1
## 51067 51072 51080 51083 51097 51099 51113 51116 51122 51135 51145 51149 51150
## 1 1 1 1 1 1 1 0 1 0 1 0 1
## 51164 51183 51187 51190 51195 51199 51209 51218 51221 51251 51255 51258 51262
## 0 1 1 1 1 1 1 1 1 1 1 1 1
## 51287 51292 51307 51308 51314 51317 51321 51323 51325 51334 51339 51353 51363
## 1 1 1 1 1 0 1 1 1 0 1 1 1
## 51365 51374 51390 51395 51396 51454 51461 51467 51475 51476 51478 51479 51485
## 1 0 1 1 1 0 0 1 1 0 0 1 1
## 51494 51501 51507 51517 51528 51531 51536 51542 51543 51558 51585 51590 51593
## 0 1 1 1 0 1 1 1 1 1 1 1 1
## 51598 51599 51608 51610 51612 51618 51619 51622 51625 51635 51645 51648 51673
## 1 0 1 1 1 1 1 1 1 1 0 1 1
## 51679 51684 51691 51700 51701 51708 51715 51738 51756 51762 51783 51793 51799
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 51802 51808 51811 51825 51829 51838 51841 51844 51848 51849 51862 51865 51869
## 1 1 0 1 1 0 1 1 0 1 1 1 1
## 51870 51882 51883 51893 51911 51913 51919 51929 51932 51939 51951 51952 51953
## 1 1 1 0 1 1 1 0 0 1 1 1 0
## 51980 51983 51985 51989 52000 52004 52011 52020 52025 52031 52037 52038 52051
## 1 0 0 0 1 0 1 1 0 1 1 1 1
## 52098 52103 52104 52111 52113 52117 52157 52162 52175 52176 52191 52198 52202
## 1 0 1 1 1 0 1 1 1 0 0 1 1
## 52205 52220 52232 52264 52265 52271 52290 52293 52296 52307 52311 52321 52322
## 1 1 1 1 1 0 0 1 0 1 1 1 1
## 52324 52330 52332 52333 52336 52339 52343 52350 52364 52365 52366 52372 52393
## 0 0 1 1 1 1 0 1 0 1 1 1 1
## 52401 52408 52422 52423 52424 52425 52426 52427 52436 52441 52462 52485 52488
## 0 1 1 1 1 1 1 1 0 1 1 1 0
## 52490 52495 52503 52504 52507 52509 52512 52518 52528 52530 52540 52558 52566
## 1 0 1 1 0 1 1 1 1 1 0 0 1
## 52604 52606 52614 52629 52633 52637 52659 52660 52664 52667 52676 52681 52691
## 1 1 1 1 1 0 1 1 1 1 1 1 1
## 52697 52703 52704 52711 52718 52731 52741 52758 52768 52771 52779 52800 52813
## 1 1 1 1 1 0 0 1 1 1 0 1 1
## 52820 52821 52827 52835 52845 52848 52857 52863 52880 52882 52888 52892 52895
## 1 1 1 1 1 1 0 1 1 0 0 0 0
## 52896 52903 52904 52914 52934 52948 52949 52955 52958 52961 52967 52972 52982
## 1 1 1 1 1 1 1 1 0 1 1 1 0
## 52984 52991 52996 53015 53025 53039 53046 53066 53080 53084 53088 53131 53143
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 53149 53159 53161 53180 53192 53193 53198 53199 53202 53206 53217 53224 53225
## 1 1 1 1 1 1 1 1 1 0 1 1 0
## 53227 53228 53232 53242 53248 53299 53307 53314 53339 53340 53343 53346 53358
## 1 1 1 1 1 1 1 1 1 0 1 1 0
## 53374 53380 53384 53390 53393 53403 53405 53412 53418 53419 53427 53428 53430
## 0 1 1 1 1 0 1 0 0 1 1 1 1
## 53445 53460 53462 53468 53471 53474 53488 53490 53493 53498 53500 53502 53508
## 0 1 1 1 1 1 1 0 1 0 0 1 0
## 53516 53550 53554 53555 53569 53576 53588 53595 53598 53602 53604 53608 53620
## 1 0 0 1 1 0 1 1 1 1 1 0 1
## 53635 53639 53643 53688 53690 53691 53692 53694 53695 53706 53708 53709 53723
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 53726 53727 53734 53760 53762 53767 53774 53776 53797 53800 53809 53812 53813
## 1 1 1 0 1 1 0 0 1 0 1 1 1
## 53816 53823 53826 53840 53841 53848 53871 53885 53887 53893 53922 53943 53944
## 1 0 1 1 1 1 1 1 1 1 1 0 1
## 53947 53949 53950 53961 53962 53992 53994 53996 53999 54000 54007 54013 54014
## 1 1 1 1 1 1 1 0 1 1 0 1 1
## 54017 54020 54027 54029 54040 54053 54061 54077 54094 54096 54097 54107 54112
## 1 1 1 1 0 0 0 0 1 0 1 1 1
## 54115 54128 54129 54140 54153 54163 54166 54168 54180 54182 54184 54188 54190
## 0 1 0 1 1 1 1 1 1 1 1 1 1
## 54192 54203 54205 54208 54209 54210 54215 54224 54227 54235 54237 54239 54247
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 54254 54259 54272 54291 54309 54311 54315 54316 54319 54330 54333 54343 54346
## 1 1 1 0 1 1 1 1 1 1 0 1 1
## 54354 54375 54379 54381 54386 54395 54396 54426 54428 54436 54437 54443 54471
## 1 1 0 1 1 0 0 1 1 0 0 0 1
## 54474 54495 54507 54512 54518 54523 54541 54547 54551 54557 54558 54566 54568
## 1 1 1 1 1 1 0 1 0 1 0 1 1
## 54571 54580 54581 54626 54633 54634 54637 54640 54641 54642 54647 54663 54675
## 0 0 1 1 1 1 1 1 1 1 1 1 1
## 54686 54688 54710 54713 54715 54725 54731 54735 54741 54751 54760 54765 54767
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 54768 54779 54789 54792 54796 54799 54805 54811 54812 54818 54821 54827 54839
## 1 1 1 0 1 1 1 1 1 0 1 1 1
## 54840 54862 54872 54878 54899 54901 54913 54914 54918 54921 54951 54964 54989
## 1 0 1 1 0 0 1 1 1 1 1 1 1
## 54992 54995 54997 55005 55006 55015 55035 55044 55047 55055 55085 55110 55112
## 1 0 1 1 0 1 1 1 0 1 1 0 1
## 55116 55123 55128 55138 55144 55163 55171 55174 55194 55210 55221 55225 55238
## 1 1 0 1 1 1 0 1 1 1 0 1 1
## 55242 55256 55270 55293 55296 55300 55315 55322 55328 55330 55333 55348 55349
## 1 1 1 1 1 1 0 0 1 1 1 1 1
## 55356 55357 55359 55365 55370 55376 55378 55387 55393 55395 55397 55398 55436
## 0 1 1 1 1 0 0 1 0 1 1 1 0
## 55452 55460 55466 55467 55470 55478 55480 55486 55487 55491 55521 55524 55528
## 1 1 1 1 0 1 1 1 0 0 1 0 1
## 55540 55545 55549 55552 55565 55575 55577 55584 55588 55605 55611 55616 55634
## 0 1 0 1 1 1 0 0 1 1 1 1 1
## 55639 55646 55647 55650 55660 55662 55664 55683 55706 55708 55711 55715 55725
## 1 1 1 1 1 1 1 0 1 1 0 1 1
## 55732 55736 55741 55743 55756 55758 55767 55794 55799 55800 55813 55817 55819
## 1 1 0 0 1 0 1 1 1 1 1 0 1
## 55843 55861 55880 55892 55893 55899 55905 55917 55921 55923 55927 55928 55929
## 0 1 1 1 1 0 0 1 1 1 0 1 1
## 55950 55956 55975 55976 55991 56001 56003 56019 56032 56037 56039 56050 56056
## 1 0 0 1 1 0 1 0 0 1 1 1 1
## 56059 56070 56086 56091 56097 56116 56123 56126 56127 56128 56137 56142 56147
## 1 1 1 1 1 1 1 1 1 1 1 0 0
## 56159 56163 56168 56184 56188 56195 56208 56211 56216 56219 56263 56272 56284
## 0 1 1 1 1 1 0 0 1 1 1 1 0
## 56287 56293 56296 56320 56326 56333 56335 56341 56348 56405 56410 56420 56421
## 1 1 0 1 1 1 0 1 1 1 0 1 1
## 56428 56433 56441 56456 56463 56467 56468 56479 56483 56485 56501 56505 56510
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 56520 56521 56526 56531 56546 56566 56569 56595 56599 56606 56609 56610 56616
## 1 1 1 0 1 0 1 0 1 1 1 1 0
## 56622 56648 56656 56663 56676 56680 56686 56709 56710 56713 56724 56725 56728
## 1 1 1 1 1 0 1 1 1 1 1 1 1
## 56729 56743 56744 56747 56753 56771 56772 56775 56777 56781 56788 56796 56798
## 0 0 1 1 1 0 1 0 1 1 1 0 0
## 56801 56804 56807 56816 56820 56840 56849 56861 56887 56896 56899 56911 56918
## 1 0 0 1 1 1 1 0 0 1 1 1 1
## 56928 56934 56938 56948 56952 56956 56962 56972 56977 56990 57004 57005 57011
## 1 0 1 1 1 1 1 1 1 1 0 0 1
## 57019 57027 57032 57034 57038 57040 57046 57055 57086 57090 57092 57100 57101
## 1 1 0 1 0 0 1 1 1 1 1 1 1
## 57106 57110 57121 57126 57129 57134 57136 57138 57142 57143 57150 57163 57164
## 0 1 0 0 1 1 1 1 1 1 1 1 1
## 57205 57216 57224 57267 57270 57277 57279 57280 57281 57290 57291 57298 57311
## 0 1 1 1 0 0 0 0 0 1 0 1 1
## 57316 57318 57320 57321 57326 57328 57332 57346 57352 57367 57374 57395 57407
## 1 1 1 0 0 1 1 0 1 1 1 0 1
## 57408 57423 57426 57435 57447 57448 57451 57465 57467 57469 57474 57478 57481
## 1 1 0 1 1 0 1 1 1 1 1 1 1
## 57497 57500 57505 57515 57518 57533 57538 57540 57547 57551 57553 57566 57576
## 1 0 1 0 0 1 1 1 0 1 1 1 1
## 57594 57608 57618 57626 57628 57637 57644 57648 57654 57665 57677 57682 57687
## 1 1 1 1 1 1 1 1 0 1 1 1 1
## 57697 57719 57739 57747 57761 57762 57783 57785 57787 57818 57832 57834 57835
## 1 1 1 1 1 1 0 1 1 1 1 1 1
## 57845 57854 57857 57888 57895 57908 57909 57910 57919 57920 57941 57948 57966
## 1 0 1 1 1 1 1 0 1 1 0 1 0
## 57967 57980 57984 57998 58003 58006 58013 58050 58051 58055 58066 58076 58078
## 1 0 1 1 1 0 1 1 1 1 1 1 1
## 58083 58084 58090 58097 58101 58110 58114 58115 58117 58134 58135 58149 58168
## 1 1 1 0 0 0 1 1 1 1 1 0 0
## 58171 58174 58195 58197 58207 58216 58221 58234 58241 58258 58262 58270 58278
## 1 0 1 0 0 0 1 1 1 1 1 0 1
## 58291 58297 58305 58306 58318 58322 58329 58341 58348 58363 58372 58377 58381
## 1 0 1 1 0 0 1 0 0 1 0 1 1
## 58384 58405 58408 58416 58436 58438 58452 58459 58465 58468 58476 58482 58484
## 0 1 0 1 0 1 1 1 1 0 0 1 1
## 58507 58515 58525 58530 58532 58551 58552 58558 58571 58572 58574 58592 58599
## 1 1 0 1 1 1 1 1 1 1 1 1 1
## 58604 58607 58616 58620 58621 58637 58650 58655 58691 58710 58721 58725 58726
## 0 1 1 0 1 0 1 1 1 1 0 1 1
## 58783 58796 58800 58803 58804 58806 58807 58816 58818 58821 58823 58826 58836
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 58861 58893 58899 58908 58912 58914 58918 58929 58937 58944 58950 58973 58981
## 1 0 1 1 1 1 1 1 1 1 1 1 1
## 59004 59010 59011 59017 59021 59031 59037 59045 59048 59067 59070 59088 59092
## 1 1 1 0 1 0 0 1 1 0 1 0 1
## 59104 59108 59122 59131 59133 59134 59135 59137 59138 59145 59155 59177 59187
## 1 0 1 1 0 1 0 1 0 1 1 0 1
## 59199 59210 59211 59216 59227 59228 59229 59247 59253 59266 59275 59281 59295
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 59299 59303 59304 59305 59310 59313 59321 59327 59329 59332 59336 59344 59348
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 59353 59355 59360 59361 59365 59392 59406 59417 59419 59426 59428 59433 59434
## 1 1 1 1 0 0 1 1 1 0 0 1 0
## 59437 59440 59459 59470 59475 59490 59493 59504 59519 59526 59531 59534 59553
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 59555 59570 59587 59591 59596 59612 59619 59642 59644 59650 59652 59653 59659
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 59661 59662 59666 59674 59680 59685 59692 59695 59702 59705 59718 59719 59720
## 1 1 1 0 0 0 1 1 1 0 1 1 1
## 59726 59728 59732 59734 59737 59747 59764 59772 59779 59785 59803 59809 59822
## 1 1 1 0 1 1 0 1 1 1 1 1 1
## 59823 59824 59840 59842 59843 59850 59855 59858 59871 59881 59883 59888 59912
## 1 1 1 1 1 0 1 0 1 0 1 1 1
## 59917 59921 59922 59927 59930 59942 59947 59953 59955 59968 59979 59983 59996
## 1 1 1 1 1 1 1 1 1 1 0 1 1
## 59999 60012 60022 60056 60060 60065 60068 60070 60072 60073 60095 60111 60120
## 1 1 0 1 1 1 1 1 0 1 1 1 1
## 60149 60152 60158 60167 60171 60183 60195 60202 60203 60206 60213 60215 60227
## 1 1 1 1 1 1 1 0 1 1 1 1 0
## 60237 60241 60247 60268 60270 60288 60306 60320 60326 60343 60348 60355 60356
## 1 1 0 1 0 1 1 0 1 1 0 1 1
## 60359 60372 60373 60375 60387 60392 60398 60401 60421 60429 60436 60446 60447
## 0 1 0 1 0 1 0 1 1 1 1 1 0
## 60449 60457 60461 60466 60467 60472 60473 60478 60486 60488 60495 60499 60509
## 0 1 1 1 1 1 1 0 0 1 1 0 1
## 60513 60530 60533 60549 60556 60558 60561 60564 60575 60583 60584 60588 60593
## 1 0 0 1 1 1 1 1 1 0 1 0 1
## 60598 60599 60601 60615 60634 60639 60641 60647 60650 60667 60675 60678 60690
## 1 1 0 1 1 0 1 1 1 0 1 1 1
## 60695 60698 60739 60742 60749 60766 60771 60793 60795 60804 60805 60813 60814
## 1 1 1 1 1 1 1 1 1 1 0 1 1
## 60817 60840 60842 60854 60857 60860 60864 60873 60875 60882 60883 60886 60890
## 0 1 1 1 1 1 0 1 1 1 1 1 0
## 60905 60909 60921 60922 60928 60940 60947 60949 60960 60963 60967 60969 60979
## 1 0 1 1 1 1 0 1 1 1 1 1 1
## 60988 60990 61005 61016 61017 61024 61032 61035 61048 61054 61063 61066 61071
## 1 1 1 1 1 1 1 1 1 1 0 0 1
## 61077 61084 61085 61088 61113 61115 61128 61145 61151 61167 61170 61204 61216
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 61219 61224 61230 61239 61241 61246 61261 61264 61272 61281 61284 61286 61287
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 61293 61301 61309 61314 61324 61331 61346 61394 61401 61402 61410 61435 61436
## 0 1 0 1 1 1 0 1 1 1 1 1 1
## 61468 61470 61471 61482 61497 61509 61513 61515 61516 61517 61518 61522 61534
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 61539 61541 61546 61584 61596 61606 61607 61612 61615 61616 61623 61628 61630
## 1 0 1 1 1 0 0 1 1 1 1 1 1
## 61633 61636 61644 61647 61649 61652 61678 61682 61693 61695 61697 61706 61709
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 61711 61716 61718 61727 61729 61731 61779 61782 61788 61804 61806 61807 61816
## 0 1 1 1 1 1 1 1 0 0 0 1 1
## 61818 61834 61850 61861 61872 61876 61897 61912 61914 61924 61929 61933 61934
## 1 1 1 0 1 1 1 0 1 0 1 1 0
## 61939 61949 61953 61954 61961 61964 61967 61973 61979 61989 61992 61994 61996
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 61997 61999 62029 62045 62049 62058 62068 62079 62094 62098 62104 62109 62122
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 62125 62142 62153 62160 62167 62174 62206 62213 62225 62231 62251 62255 62260
## 1 1 1 1 1 0 1 0 1 1 1 0 1
## 62264 62266 62267 62271 62273 62275 62297 62301 62305 62316 62318 62353 62359
## 1 1 1 0 1 1 1 1 1 1 1 1 0
## 62362 62383 62400 62425 62442 62452 62460 62463 62465 62469 62495 62498 62506
## 0 1 1 0 0 1 1 0 0 0 0 1 1
## 62520 62526 62529 62536 62537 62539 62542 62555 62566 62567 62570 62571 62572
## 1 0 1 1 1 1 1 0 1 1 1 1 1
## 62574 62575 62579 62588 62597 62601 62607 62614 62616 62630 62652 62653 62657
## 1 1 1 1 0 1 1 1 0 0 1 0 0
## 62661 62662 62667 62682 62695 62704 62710 62723 62724 62727 62737 62738 62757
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 62778 62793 62802 62807 62810 62838 62840 62843 62847 62854 62876 62877 62880
## 1 1 1 0 1 1 1 1 1 1 1 0 1
## 62881 62885 62912 62914 62917 62920 62926 62942 62970 62973 62977 62978 62989
## 1 1 0 1 1 1 1 1 1 1 1 0 1
## 62996 62998 63005 63007 63014 63017 63026 63029 63035 63036 63039 63053 63054
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 63068 63101 63110 63115 63125 63127 63128 63138 63148 63156 63158 63159 63176
## 1 1 1 1 1 1 1 1 1 1 0 1 1
## 63178 63186 63189 63220 63249 63266 63267 63270 63311 63328 63329 63332 63357
## 1 1 1 1 1 1 1 1 1 0 1 0 1
## 63358 63369 63384 63389 63403 63406 63413 63414 63415 63416 63439 63448 63470
## 1 1 1 1 1 1 1 1 1 1 0 1 1
## 63494 63500 63502 63510 63532 63557 63562 63568 63580 63588 63605 63608 63612
## 1 1 1 1 1 1 1 0 1 0 1 1 1
## 63640 63641 63642 63643 63661 63688 63696 63699 63710 63711 63717 63718 63722
## 1 1 1 1 1 0 0 1 1 0 1 0 1
## 63726 63735 63744 63751 63752 63759 63760 63764 63774 63775 63777 63794 63800
## 1 1 0 1 1 1 1 1 1 1 1 1 1
## 63805 63806 63823 63834 63864 63876 63900 63913 63933 63935 63954 63956 63965
## 1 1 1 1 0 1 0 1 1 1 1 1 1
## 63971 63980 64037 64049 64051 64064 64070 64071 64074 64075 64076 64086 64098
## 1 0 1 1 1 1 0 1 1 1 1 1 1
## 64105 64114 64119 64130 64135 64167 64188 64196 64198 64201 64246 64247 64249
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 64254 64255 64256 64259 64262 64280 64292 64293 64300 64310 64315 64316 64325
## 1 1 1 0 1 1 1 1 0 1 1 1 0
## 64338 64357 64368 64371 64375 64376 64389 64391 64397 64401 64404 64411 64413
## 1 1 0 1 0 0 1 1 1 1 1 1 1
## 64416 64427 64452 64474 64483 64485 64488 64502 64507 64515 64548 64553 64554
## 1 1 0 1 1 1 0 1 1 1 1 1 0
## 64561 64565 64567 64569 64571 64574 64578 64590 64602 64605 64611 64622 64623
## 0 1 1 1 1 1 0 1 0 1 1 1 1
## 64634 64639 64642 64645 64647 64658 64661 64669 64675 64680 64682 64692 64700
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 64714 64715 64726 64733 64743 64745 64773 64779 64789 64820 64824 64853 64857
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 64858 64862 64863 64864 64870 64909 64928 64933 64936 64944 64946 64961 64963
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 64969 64978 64993 64995 65000 65001 65006 65028 65040 65042 65072 65074 65076
## 1 1 1 1 1 1 1 1 0 1 1 1 1
## 65080 65082 65088 65094 65099 65111 65117 65118 65137 65139 65141 65143 65163
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 65205 65217 65220 65226 65237 65244 65248 65251 65255 65257 65264 65272 65280
## 0 1 1 1 1 0 0 1 1 1 1 0 1
## 65293 65295 65305 65346 65349 65350 65351 65386 65392 65400 65416 65417 65418
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 65422 65431 65433 65445 65452 65455 65479 65484 65485 65487 65490 65502 65503
## 1 0 1 0 1 1 0 1 1 1 1 1 1
## 65505 65510 65512 65520 65524 65526 65540 65546 65557 65558 65581 65591 65595
## 1 1 1 1 1 1 0 1 1 0 1 1 1
## 65596 65602 65612 65615 65650 65653 65677 65678 65679 65681 65683 65712 65718
## 1 1 1 1 1 0 1 1 1 1 1 1 1
## 65719 65725 65757 65781 65788 65791 65802 65804 65813 65824 65842 65855 65862
## 1 0 1 1 1 1 1 1 0 1 1 0 0
## 65869 65873 65876 65881 65882 65884 65885 65896 65901 65909 65911 65913 65915
## 0 1 1 1 1 1 0 1 0 1 1 1 1
## 65931 65936 65942 65943 65944 65946 65951 65965 66017 66031 66051 66057 66058
## 1 1 1 1 0 1 1 0 0 1 0 1 0
## 66060 66061 66067 66069 66080 66083 66088 66091 66097 66099 66107 66116 66126
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 66130 66132 66138 66144 66156 66173 66176 66180 66188 66193 66201 66205 66208
## 1 1 1 1 1 1 0 1 1 1 1 1 1
## 66212 66213 66222 66236 66239 66242 66247 66248 66251 66265 66273 66291 66302
## 0 0 0 1 1 1 0 1 1 1 1 1 1
## 66305 66326 66329 66331 66339 66357 66372 66382 66388 66399 66405 66414 66425
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 66435 66439 66444 66447 66452 66454 66463 66468 66470 66473 66498 66528 66531
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 66534 66551 66552 66562 66563 66570 66591 66594 66608 66609 66612 66641 66642
## 1 1 1 1 1 1 0 1 1 1 1 0 1
## 66646 66650 66660 66672 66675 66676 66681 66683 66705 66708 66730 66732 66740
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 66744 66747 66773 66780 66795 66807 66818 66837 66850 66851 66883 66903 66905
## 1 0 1 1 0 1 1 0 1 1 1 1 1
## 66911 66914 66916 66928 66931 66938 66960 66963 66965 66973 66979 66987 66995
## 1 1 1 1 0 1 1 1 0 1 1 1 1
## 66997 67005 67008 67010 67011 67024 67027 67028 67040 67062 67063 67066 67067
## 0 1 1 1 1 0 0 1 1 1 1 1 1
## 67069 67072 67078 67081 67082 67083 67084 67085 67101 67106 67128 67130 67131
## 1 1 1 0 1 1 1 0 1 1 1 1 1
## 67132 67141 67160 67164 67165 67171 67173 67207 67216 67230 67243 67244 67247
## 1 0 1 1 1 0 1 1 1 0 1 1 1
## 67260 67263 67269 67270 67302 67304 67321 67327 67329 67332 67349 67350 67353
## 1 0 1 1 1 1 1 0 0 0 1 0 1
## 67357 67365 67373 67394 67395 67400 67401 67415 67437 67444 67448 67452 67455
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 67465 67482 67497 67511 67518 67520 67553 67578 67579 67580 67581 67587 67592
## 1 1 1 1 1 1 1 0 1 1 0 1 1
## 67599 67612 67623 67625 67644 67647 67648 67649 67653 67656 67678 67700 67718
## 1 0 0 0 1 1 1 1 1 1 1 1 1
## 67725 67729 67735 67759 67764 67768 67770 67777 67791 67796 67798 67800 67813
## 1 1 1 1 1 0 0 1 1 1 0 1 1
## 67815 67816 67832 67840 67855 67889 67893 67895 67918 67921 67932 67933 67943
## 0 0 1 1 0 1 1 1 1 1 1 1 1
## 67945 67956 67978 68007 68030 68076 68084 68088 68095 68101 68105 68108 68120
## 1 1 1 0 1 1 0 0 1 1 1 1 1
## 68129 68131 68141 68143 68154 68161 68165 68173 68177 68189 68205 68212 68214
## 1 1 1 1 1 1 1 0 1 1 1 1 1
## 68225 68231 68263 68278 68284 68315 68319 68323 68335 68352 68357 68359 68366
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 68398 68410 68427 68451 68457 68458 68459 68465 68487 68513 68521 68527 68529
## 1 1 1 1 1 1 0 1 0 1 0 1 1
## 68536 68537 68551 68553 68602 68604 68605 68608 68625 68628 68631 68632 68634
## 1 1 1 1 1 1 0 0 1 1 0 1 0
## 68643 68650 68666 68670 68672 68685 68692 68701 68713 68721 68747 68753 68757
## 1 0 1 1 1 1 1 1 1 1 1 0 1
## 68759 68773 68788 68795 68796 68809 68829 68837 68840 68841 68852 68870 68873
## 1 1 1 0 1 0 1 1 1 0 1 1 1
## 68879 68895 68914 68922 68927 68930 68941 68948 68966 68967 68970 68986 68994
## 1 1 0 1 1 0 1 1 1 0 1 1 1
## 69019 69020 69035 69041 69042 69048 69050 69052 69058 69064 69067 69117 69123
## 1 1 1 0 1 1 1 1 1 1 1 1 0
## 69126 69129 69137 69139 69147 69159 69163 69165 69166 69172 69188 69201 69211
## 1 1 1 1 1 1 1 0 0 1 1 1 1
## 69217 69219 69230 69238 69241 69242 69245 69247 69267 69278 69280 69327 69329
## 1 1 1 1 1 1 1 1 1 1 0 1 1
## 69332 69335 69343 69346 69349 69353 69364 69384 69392 69393 69396 69408 69410
## 1 1 1 0 0 0 1 1 1 1 1 1 1
## 69411 69412 69443 69452 69457 69466 69487 69488 69493 69495 69497 69498 69502
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 69544 69550 69552 69577 69582 69587 69592 69606 69614 69620 69626 69628 69636
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 69637 69638 69686 69697 69716 69743 69748 69751 69753 69758 69777 69779 69799
## 1 1 1 0 1 1 1 1 1 1 1 1 1
## 69819 69834 69840 69841 69843 69845 69846 69872 69873 69887 69891 69900 69907
## 1 1 1 1 1 1 1 1 0 1 1 1 0
## 69910 69912 69924 69948 69958 69966 69972 69980 69981 69985 69993 69998 70000
## 1 1 1 1 1 1 1 1 1 1 0 1 1
## 70001 70007 70038 70039 70043 70069 70097 70108 70110 70113 70125 70128 70130
## 0 1 1 1 1 1 1 1 1 1 1 1 1
## 70157 70158 70160 70173 70180 70182 70189 70198 70199 70208 70210 70211 70221
## 1 0 1 0 0 1 0 1 1 1 1 1 1
## 70222 70225 70228 70235 70249 70261 70263 70269 70294 70313 70314 70319 70323
## 1 1 1 0 1 1 0 1 1 1 1 1 1
## 70326 70328 70330 70341 70344 70364 70367 70371 70378 70396 70398 70402 70422
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 70426 70432 70439 70462 70463 70465 70479 70496 70523 70532 70540 70546 70566
## 1 1 0 1 1 1 1 1 1 0 0 1 0
## 70586 70587 70616 70655 70657 70665 70668 70677 70679 70684 70698 70711 70718
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 70721 70727 70731 70732 70734 70757 70762 70766 70788 70805 70809 70820 70836
## 1 0 1 1 1 1 1 1 0 1 1 1 1
## 70855 70858 70859 70867 70868 70878 70880 70885 70898 70900 70932 70964 70969
## 0 1 0 1 1 0 1 1 1 1 1 1 1
## 70991 71009 71024 71029 71038 71043 71044 71052 71063 71071 71075 71077 71084
## 1 1 1 1 1 1 1 1 0 0 1 1 1
## 71104 71111 71125 71129 71143 71149 71158 71172 71197 71221 71226 71228 71229
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 71252 71261 71277 71279 71285 71287 71288 71306 71308 71338 71352 71370 71380
## 1 1 1 1 1 0 1 0 1 1 1 0 0
## 71381 71393 71408 71423 71440 71444 71462 71474 71486 71500 71509 71514 71528
## 1 1 1 0 1 1 1 0 1 0 0 0 1
## 71539 71541 71556 71562 71579 71582 71602 71628 71639 71646 71662 71664 71685
## 1 1 1 1 1 1 1 0 1 0 1 1 1
## 71695 71696 71705 71721 71722 71728 71744 71751 71753 71755 71757 71766 71786
## 1 0 0 1 0 1 0 1 0 1 1 1 0
## 71795 71802 71804 71814 71836 71837 71842 71843 71847 71848 71855 71865 71891
## 1 1 0 1 1 0 0 1 1 1 1 1 1
## 71893 71899 71922 71957 71963 71970 71973 71984 71987 71990 72001 72007 72017
## 1 1 1 1 1 1 0 0 1 1 1 0 1
## 72019 72021 72048 72061 72073 72075 72084 72088 72094 72100 72102 72109 72116
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 72122 72127 72147 72150 72157 72163 72164 72167 72175 72183 72192 72193 72197
## 1 1 1 1 0 0 0 1 0 1 1 1 1
## 72199 72203 72204 72207 72238 72239 72242 72253 72254 72256 72259 72260 72281
## 1 0 1 1 1 0 0 1 1 1 1 1 1
## 72291 72294 72303 72312 72318 72321 72331 72337 72370 72374 72379 72390 72399
## 1 1 1 0 1 1 1 0 1 1 1 1 1
## 72413 72415 72429 72439 72446 72447 72491 72499 72504 72509 72516 72538 72568
## 1 1 1 1 1 1 0 1 1 1 1 1 1
## 72571 72582 72584 72602 72619 72628 72629 72630 72645 72646 72652 72655 72663
## 1 0 1 1 1 1 1 0 1 0 1 0 1
## 72665 72668 72680 72683 72702 72704 72711 72722 72737 72771 72775 72810 72814
## 1 1 1 0 1 0 1 0 1 1 0 1 1
## 72819 72820 72822 72824 72826 72843 72854 72899 72902 72921 72934 72944 72970
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 72972 72976 72985 73007 73010 73024 73025 73028 73037 73051 73064 73072 73074
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 73086 73128 73142 73148 73153 73163 73175 73181 73183 73198 73201 73217 73218
## 1 1 1 1 1 1 0 1 1 1 1 0 1
## 73233 73236 73242 73259 73265 73267 73272 73275 73277 73287 73299 73318 73323
## 1 1 1 0 1 0 1 1 1 1 1 1 1
## 73326 73328 73332 73335 73350 73365 73375 73376 73378 73391 73400 73406 73410
## 1 1 1 1 1 1 0 1 1 0 1 0 1
## 73413 73417 73429 73445 73469 73480 73492 73507 73536 73538 73542 73564 73567
## 0 0 1 1 1 0 1 1 1 1 1 1 1
## 73584 73625 73634 73637 73659 73668 73670 73671 73698 73703 73720 73722 73725
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 73742 73746 73762 73767 73768 73776 73791 73816 73822 73825 73833 73851 73860
## 1 1 1 0 0 0 1 1 1 1 1 1 1
## 73899 73916 73920 73923 73924 73925 73933 73940 73949 73959 73967 73968 73979
## 0 0 1 1 1 1 1 1 1 1 1 1 1
## 73985 73993 74007 74016 74018 74033 74041 74052 74053 74069 74070 74073 74087
## 1 0 1 1 1 1 1 1 1 1 1 1 1
## 74095 74096 74099 74106 74112 74113 74125 74126 74129 74155 74166 74176 74198
## 0 1 1 1 1 1 1 1 1 1 1 1 0
## 74215 74217 74228 74240 74248 74265 74283 74293 74295 74297 74300 74302 74303
## 1 1 1 1 1 1 0 1 1 1 1 1 1
## 74310 74324 74331 74351 74357 74362 74383 74388 74389 74439 74446 74448 74449
## 1 0 1 0 1 1 1 0 1 1 0 1 1
## 74452 74469 74472 74481 74484 74492 74500 74514 74518 74525 74526 74530 74532
## 0 0 1 1 0 0 1 0 0 0 1 0 1
## 74534 74544 74552 74562 74563 74564 74574 74578 74605 74614 74640 74642 74644
## 1 1 1 0 1 1 1 1 1 1 1 1 1
## 74651 74659 74681 74682 74701 74716 74720 74731 74734 74737 74758 74774 74775
## 1 1 0 1 1 1 1 1 1 1 1 1 0
## 74793 74799 74804 74806 74823 74826 74831 74859 74905 74911 74922 74929 74931
## 0 0 1 1 1 0 1 1 1 1 1 1 1
## 74934 74939 74951 74957 74959 74972 74978 74979 74995 75036 75038 75049 75056
## 1 0 0 1 1 1 1 1 1 1 0 1 0
## 75075 75077 75081 75083 75089 75092 75100 75104 75108 75113 75143 75145 75160
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 75211 75212 75213 75215 75248 75264 75275 75278 75286 75291 75314 75317 75326
## 1 1 1 1 0 1 0 1 1 1 1 1 0
## 75333 75334 75355 75357 75360 75369 75387 75391 75414 75420 75422 75431 75444
## 1 1 0 0 0 1 1 1 1 1 1 1 1
## 75446 75451 75468 75471 75502 75503 75505 75509 75528 75539 75557 75559 75562
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 75582 75583 75609 75627 75629 75666 75669 75680 75681 75682 75684 75686 75687
## 1 0 1 1 1 1 1 1 1 0 1 1 1
## 75688 75694 75700 75704 75716 75717 75719 75721 75727 75731 75738 75743 75749
## 0 0 1 1 1 1 0 0 0 1 0 0 1
## 75768 75773 75781 75826 75851 75852 75875 75877 75879 75880 75882 75888 75889
## 1 1 1 1 1 1 1 1 1 1 1 0 1
## 75895 75943 75947 75948 75955 75960 75973 75986 75992 75994 76015 76022 76042
## 1 1 1 0 1 1 1 0 1 1 1 0 1
## 76050 76052 76061 76064 76085 76087 76094 76096 76101 76103 76105 76113 76115
## 1 1 1 0 1 0 0 1 1 1 1 1 0
## 76118 76119 76120 76127 76136 76147 76152 76162 76168 76176 76179 76191 76205
## 1 1 1 1 1 1 0 1 1 1 1 0 0
## 76209 76215 76217 76232 76237 76267 76276 76281 76288 76289 76295 76296 76297
## 1 0 1 1 1 1 1 1 1 1 1 1 0
## 76314 76353 76359 76369 76373 76385 76395 76396 76408 76413 76461 76462 76463
## 1 1 1 1 0 1 1 0 1 1 1 1 1
## 76482 76505 76514 76516 76521 76531 76541 76549 76555 76569 76578 76622 76623
## 0 1 0 1 0 0 1 0 1 1 1 1 1
## 76629 76638 76642 76647 76656 76682 76686 76694 76712 76720 76735 76753 76772
## 1 1 1 1 1 0 1 0 1 1 1 1 1
## 76780 76787 76808 76823 76827 76834 76837 76841 76856 76868 76890 76900 76914
## 0 1 1 0 1 1 1 1 1 1 1 1 1
## 76929 76936 76967 76973 76975 77026 77034 77049 77056 77072 77074 77076 77088
## 1 0 1 1 1 1 1 1 1 1 1 1 0
## 77108 77115 77122 77130 77147 77153 77159 77162 77164 77182 77184 77185 77205
## 0 1 1 1 1 0 1 0 1 1 1 1 1
## 77207 77208 77214 77221 77222 77236 77243 77245 77246 77249 77252 77263 77269
## 1 1 1 1 1 1 1 1 1 0 1 0 1
## 77287 77301 77314 77318 77331 77333 77336 77355 77357 77372 77374 77424 77454
## 1 1 0 1 1 1 1 0 0 1 1 1 1
## 77455 77463 77467 77474 77480 77482 77488 77496 77501 77512 77516 77518 77520
## 1 1 1 1 1 1 1 1 0 0 0 0 0
## 77526 77547 77562 77591 77598 77601 77604 77616 77621 77625 77631 77637 77638
## 1 1 0 0 0 0 1 1 0 1 1 1 1
## 77639 77653 77659 77661 77662 77666 77671 77691 77696 77703 77728 77733 77739
## 1 1 1 1 1 1 0 1 0 1 1 1 0
## 77763 77779 77785 77790 77794 77802 77818 77847 77850 77856 77859 77873 77876
## 1 1 1 1 1 1 1 1 0 1 0 0 0
## 77896 77901 77903 77906 77907 77910 77912 77916 77919 77922 77926 77936 77943
## 0 1 1 0 1 1 1 1 1 1 1 1 1
## 77951 77952 77959 77973 77986 78007 78026 78034 78044 78048 78054 78055 78068
## 1 1 1 0 1 0 1 1 1 1 1 1 1
## 78089 78099 78124 78125 78130 78132 78143 78147 78155 78159 78160 78173 78181
## 1 1 1 1 0 1 0 0 1 1 1 0 1
## 78206 78216 78231 78232 78259 78263 78266 78275 78288 78304 78305 78308 78319
## 1 1 1 1 1 1 0 1 0 1 1 0 1
## 78320 78332 78338 78340 78343 78351 78391 78392 78403 78404 78419 78433 78434
## 1 1 0 1 1 0 1 0 1 1 0 0 1
## 78458 78459 78471 78475 78477 78498 78499 78516 78519 78534 78549 78560 78561
## 1 1 1 1 1 0 1 1 1 1 1 1 1
## 78567 78570 78581 78583 78593 78604 78608 78609 78611 78618 78629 78630 78643
## 1 0 1 1 1 1 1 1 1 1 0 1 1
## 78652 78656 78659 78663 78666 78668 78679 78689 78698 78703 78710 78712 78734
## 1 1 0 1 1 1 0 1 1 0 1 0 1
## 78743 78762 78768 78771 78777 78813 78816 78825 78827 78831 78833 78849 78851
## 1 1 1 1 0 1 1 0 0 1 0 1 1
## 78868 78876 78879 78890 78903 78905 78921 78932 78943 78957 78974 78984 78992
## 1 1 1 1 0 1 1 1 0 0 0 0 1
## 78994 79005 79006 79012 79020 79021 79022 79029 79042 79048 79064 79069 79070
## 1 1 1 1 0 1 1 1 1 1 1 1 1
## 79080 79083 79110 79128 79134 79138 79139 79143 79149 79155 79168 79196 79204
## 1 0 1 1 1 1 1 1 1 0 1 1 1
## 79206 79209 79211 79219 79221 79224 79239 79243 79267 79273 79285 79288 79289
## 1 1 1 1 1 0 1 1 1 1 1 1 1
## 79330 79338 79348 79353 79362 79376 79378 79384 79387 79398 79406 79411 79418
## 1 0 0 1 1 0 1 1 1 1 1 1 1
## 79422 79429 79433 79435 79436 79437 79445 79473 79478 79479 79485 79486 79493
## 1 1 0 1 1 1 0 0 1 1 1 1 0
## 79496 79505 79507 79509 79524 79527 79534 79547 79551 79554 79562 79569 79591
## 0 1 1 1 1 1 0 1 1 1 1 1 0
## 79595 79601 79613 79618 79626 79651 79652 79664 79666 79673 79675 79700 79703
## 1 1 0 1 1 1 1 1 1 1 1 0 1
## 79705 79757 79762 79765 79768 79801 79828 79834 79841 79844 79851 79856 79860
## 1 0 1 0 1 1 1 1 0 0 1 0 0
## 79886 79887 79889 79929 79930 79937 79942 79959 79963 80019 80024 80048 80050
## 1 1 1 1 1 1 1 1 1 1 0 1 1
## 80052 80067 80087 80089 80091 80092 80095 80107 80118 80120 80125 80129 80133
## 1 1 1 1 1 1 1 0 1 1 0 1 1
## 80141 80144 80160 80175 80177 80183 80244 80245 80247 80248 80250 80261 80267
## 1 1 1 0 1 1 1 1 1 1 1 1 1
## 80305 80310 80319 80326 80343 80349 80350 80354 80358 80360 80377 80378 80381
## 1 1 1 1 1 0 1 1 1 1 0 1 0
## 80392 80397 80400 80401 80408 80414 80419 80427 80428 80440 80443 80449 80450
## 0 0 1 0 1 1 1 1 1 1 1 1 0
## 80451 80476 80479 80489 80492 80510 80511 80517 80537 80539 80547 80552 80575
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 80581 80599 80602 80627 80632 80646 80682 80694 80706 80711 80724 80725 80732
## 1 1 1 1 0 1 1 1 1 1 0 1 1
## 80737 80745 80746 80752 80762 80766 80771 80780 80822 80843 80850 80866 80889
## 1 1 0 1 0 1 0 0 0 0 1 1 1
## 80914 80925 80948 80953 80954 80958 80967 80996 80998 81008 81013 81014 81040
## 0 1 1 1 1 0 1 0 1 1 1 1 1
## 81086 81100 81105 81106 81113 81149 81165 81166 81168 81169 81175 81179 81183
## 1 1 1 1 1 0 1 1 1 1 1 1 0
## 81195 81212 81244 81248 81251 81268 81271 81272 81289 81292 81311 81315 81317
## 1 1 1 0 0 1 1 1 1 1 1 1 1
## 81338 81341 81348 81353 81360 81373 81389 81394 81397 81417 81427 81430 81434
## 0 1 1 1 1 1 1 0 1 1 0 0 1
## 81487 81495 81505 81559 81562 81566 81575 81582 81588 81589 81596 81616 81630
## 0 1 0 1 1 1 1 1 1 1 1 0 1
## 81645 81651 81652 81690 81693 81695 81701 81707 81710 81718 81722 81723 81731
## 1 1 1 1 1 1 1 1 1 1 1 1 0
## 81734 81766 81769 81811 81817 81829 81842 81848 81877 81878 81925 81966 81970
## 0 0 0 0 0 1 1 1 0 1 0 1 1
## 81991 81998 82010 82013 82014 82070 82075 82089 82105 82120 82144 82145 82152
## 1 0 1 0 1 0 1 1 1 0 1 1 1
## 82154 82178 82188 82205 82211 82234 82238 82252 82256 82257 82282 82291 82306
## 1 1 1 1 1 1 1 1 0 1 1 0 1
## 82319 82326 82329 82342 82391 82406 82425 82433 82468 82470 82482 82501 82502
## 0 1 1 1 1 1 1 1 0 1 1 1 1
## 82508 82509 82528 82535 82544 82551 82571 82575 82580 82583 82587 82592 82602
## 1 1 1 0 1 1 1 1 1 1 1 1 1
## 82607 82614 82635 82643 82645 82665 82666 82683 82693 82710 82713 82757 82771
## 0 1 1 1 1 1 1 1 1 1 1 1 0
## 82773 82782 82783 82792 82820 82826 82831 82832 82842 82850 82857 82875 82882
## 1 1 1 1 1 1 0 1 1 1 1 1 0
## 82885 82886 82891 82899 82912 82913 82924 82937 82960 82966 82983 82997 83004
## 1 1 1 1 0 1 1 0 1 1 1 1 1
## 83009 83015 83030 83031 83045 83052 83116 83118 83119 83123 83136 83165 83173
## 1 1 1 1 1 1 1 1 1 1 0 1 1
## 83196 83220 83221 83223 83234 83240 83242 83249 83295 83306 83330 83336 83338
## 1 0 1 0 0 1 1 1 1 0 0 1 1
## 83344 83358 83359 83375 83399 83436 83441 83447 83456 83468 83469 83475 83491
## 1 1 0 1 1 1 1 1 1 1 0 1 0
## 83492 83503 83511 83534 83538 83546 83572 83575 83607 83612 83618 83624 83625
## 1 1 1 1 0 1 1 0 1 1 1 1 1
## 83635 83649 83662 83667 83671 83681 83716 83722 83736 83737 83740 83758 83763
## 1 1 1 1 1 0 1 1 0 0 0 0 1
## 83767 83769 83771 83779 83788 83791 83797 83800 83803 83807 83810 83821 83826
## 1 1 0 1 1 1 1 0 0 0 0 1 1
## 83830 83833 83835 83844 83850 83863 83866 83868 83874 83883 83926 83927 83957
## 1 0 1 1 1 1 0 1 1 0 1 1 1
## 83963 83969 83991 84002 84011 84056 84063 84069 84073 84078 84087 84098 84099
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 84104 84114 84115 84134 84138 84156 84199 84209 84210 84214 84228 84234 84240
## 0 1 1 1 0 0 1 1 1 0 0 1 1
## 84242 84251 84277 84291 84307 84343 84412 84447 84451 84460 84461 84465 84469
## 0 1 1 1 1 1 0 1 1 1 1 1 1
## 84473 84482 84530 84534 84535 84537 84542 84564 84568 84574 84580 84593 84606
## 0 0 0 1 1 1 0 1 1 1 1 0 1
## 84611 84691 84695 84704 84724 84738 84742 84744 84784 84791 84800 84810 84812
## 0 1 1 1 1 1 0 1 1 1 1 0 0
## 84818 84831 84852 84854 84863 84872 84875 84895 84933 84958 84961 84964 85010
## 0 1 0 1 0 1 0 1 0 1 1 1 0
## 85023 85024 85028 85029 85033 85044 85050 85063 85108 85119 85121 85136 85147
## 1 1 0 0 1 0 1 1 1 1 0 0 0
## 85150 85162 85168 85237 85247 85248 85253 85256 85284 85293 85294 85299 85308
## 1 1 1 1 1 0 1 1 1 0 1 1 1
## 85313 85317 85329 85331 85332 85334 85337 85342 85356 85363 85365 85371 85401
## 1 1 1 1 1 0 1 1 1 1 1 1 0
## 85409 85424 85425 85437 85440 85447 85463 85477 85479 85486 85489 85498 85512
## 1 1 0 1 0 1 0 1 1 1 1 1 0
## 85513 85525 85532 85533 85544 85566 85573 85594 85596 85605 85622 85626 85652
## 1 1 0 0 1 1 1 0 0 0 1 1 1
## 85653 85667 85680 85681 85686 85699 85702 85727 85731 85744 85749 85758 85767
## 1 1 1 0 1 1 1 1 1 1 1 1 0
## 85769 85772 85773 85785 85797 85812 85835 85856 85868 85874 85879 85880 85881
## 1 1 1 0 1 0 1 1 1 1 1 1 0
## 85905 85907 85908 85911 85940 85947 85971 85982 86021 86032 86037 86052 86055
## 1 1 1 1 1 1 0 1 1 1 1 1 1
## 86081 86087 86089 86101 86103 86105 86109 86116 86124 86133 86143 86148 86177
## 1 1 1 0 0 1 1 0 1 1 1 1 0
## 86188 86200 86201 86207 86208 86210 86214 86215 86216 86219 86229 86231 86238
## 1 1 1 1 1 1 0 1 0 1 1 1 1
## 86245 86259 86266 86308 86309 86312 86314 86319 86323 86335 86340 86344 86345
## 0 1 0 1 1 1 1 0 1 1 1 1 1
## 86354 86357 86370 86371 86375 86377 86400 86406 86416 86436 86452 86454 86467
## 1 1 0 0 1 1 0 1 1 1 0 1 1
## 86492 86510 86525 86543 86559 86574 86579 86582 86586 86588 86592 86597 86603
## 1 0 1 1 1 1 1 0 1 1 1 1 1
## 86612 86624 86631 86638 86639 86659 86696 86698 86701 86745 86749 86753 86770
## 1 1 0 1 1 0 1 1 1 1 1 1 0
## 86775 86778 86783 86790 86806 86828 86835 86836 86857 86867 86882 86886 86903
## 1 0 1 1 0 1 1 1 0 1 1 1 0
## 86914 86916 86939 86943 86977 86981 86995 87000 87016 87051 87103 87107 87112
## 1 1 0 1 0 1 1 0 1 1 0 0 1
## 87114 87116 87136 87149 87154 87162 87175 87189 87221 87229 87245 87248 87289
## 0 1 0 0 1 0 1 1 1 1 0 1 1
## 87295 87308 87310 87314 87316 87317 87327 87355 87365 87375 87391 87415 87432
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 87460 87473 87474 87481 87486 87499 87505 87527 87531 87541 87572 87591 87600
## 0 1 1 1 1 1 0 1 0 1 1 1 1
## 87621 87629 87635 87647 87648 87691 87705 87708 87733 87745 87749 87761 87797
## 1 1 1 1 1 1 1 1 1 0 1 1 1
## 87800 87804 87813 87815 87820 87828 87849 87853 87855 87858 87879 87889 87906
## 0 1 0 1 0 1 1 0 1 1 1 1 1
## 87915 87928 87942 87944 87974 87997 88002 88036 88079 88114 88127 88132 88135
## 0 0 0 1 1 0 1 0 1 0 1 1 1
## 88152 88158 88160 88174 88203 88229 88232 88250 88267 88269 88277 88295 88301
## 1 1 1 1 0 1 1 1 1 0 1 1 0
## 88303 88316 88341 88362 88386 88388 88397 88403 88417 88421 88454 88459 88480
## 1 1 1 1 1 1 1 0 1 1 0 1 1
## 88490 88503 88504 88505 88514 88521 88554 88564 88567 88572 88589 88593 88595
## 0 0 1 1 1 1 1 1 1 1 1 1 1
## 88603 88606 88608 88615 88639 88650 88655 88659 88668 88714 88717 88757 88759
## 0 1 0 1 1 1 0 0 0 1 1 1 1
## 88763 88766 88775 88792 88795 88804 88806 88814 88825 88869 88871 88887 88889
## 0 1 1 0 1 1 0 1 0 1 1 1 0
## 88895 88903 88936 88943 88966 88969 88981 88983 88990 88991 89034 89099 89102
## 1 0 1 0 1 1 1 0 0 1 1 1 1
## 89104 89106 89109 89133 89146 89177 89178 89191 89205 89219 89237 89316 89323
## 1 1 1 1 1 1 0 1 1 1 1 1 1
## 89334 89342 89366 89385 89392 89396 89399 89400 89402 89405 89408 89410 89411
## 0 1 0 1 1 0 1 1 0 1 0 0 0
## 89412 89413 89419 89422 89423 89426 89431 89435 89442 89449 89457 89459 89460
## 0 0 1 0 1 1 0 0 0 1 0 1 0
## 89468 89469 89471 89481 89483 89488 89492 89502 89505 89506 89508 89519 89525
## 0 1 0 0 0 0 1 0 0 1 0 0 0
## 89533 89543 89549 89555 89557 89564 89566 89567 89569 89577 89578 89579 89586
## 0 0 0 1 1 0 0 1 0 0 0 0 0
## 89589 89590 89593 89596 89597 89599 89600 89603 89606 89611 89620 89621 89624
## 1 0 0 1 1 1 0 0 1 1 0 0 0
## 89626 89630 89632 89633 89634 89636 89639 89641 89643 89646 89647 89648 89650
## 0 0 0 1 1 0 1 0 0 1 1 0 1
## 89652 89656 89659 89661 89662 89663 89664 89671 89686 89695 89699 89700 89703
## 0 0 1 1 0 0 0 0 0 0 0 0 1
## 89704 89705 89706 89708 89712 89720 89721 89724 89727 89732 89733 89734 89738
## 0 1 0 0 1 1 0 1 0 1 1 0 1
## 89739 89743 89745 89746 89748 89751 89752 89753 89754 89755 89756 89758 89759
## 1 1 1 1 1 0 1 1 0 0 0 1 1
## 89766 89771 89782 89783 89785 89788 89791 89792 89794 89802 89803 89805 89810
## 0 1 0 0 0 0 1 0 1 0 1 1 1
## 89814 89819 89821 89822 89830 89833 89837 89838 89839 89840 89842 89843 89844
## 1 1 0 1 1 0 0 1 1 1 1 1 1
## 89846 89851 89858 89862 89865 89869 89870 89881 89884 89891 89892 89894 89897
## 1 1 1 1 0 0 1 0 0 0 0 0 1
## 89902 89904 89905 89908 89918 89919 89922 89925 89926 89927 89928 89929 89933
## 0 1 1 0 0 0 0 0 0 0 1 1 0
## 89938 89943 89944 89950 89952 89956 89960 89962 89964 89966 89973 89977 89982
## 0 1 1 0 1 0 0 0 1 1 1 1 0
## 89985 89992 89993 89994 89998 90001 90005 90009 90012 90013 90018 90019 90021
## 0 0 0 0 0 1 0 1 1 1 1 1 1
## 90022 90025 90028 90030 90034 90036 90039 90049 90054 90057 90062 90064 90066
## 0 0 0 0 0 0 0 1 0 0 1 1 0
## 90082 90084 90086 90087 90090 90093 90096 90097 90100 90104 90105 90110 90112
## 1 0 0 0 0 1 0 1 0 0 1 1 0
## 90115 90116 90120 90122 90124 90126 90128 90131 90135 90137 90139 90142 90143
## 0 0 0 1 0 1 0 1 1 1 0 0 0
## 90147 90151 90153 90155 90160 90162 90166 90169 90174 90179 90189 90195 90196
## 0 1 0 0 1 0 0 0 0 1 1 0 0
## 90199 90201 90203 90206 90208 90212 90214 90217 90220 90226 90228 90233 90234
## 0 0 0 0 0 1 1 0 0 1 0 1 0
## 90242 90246 90249 90250 90256 90257 90274 90277 90278 90283 90285 90301 90304
## 1 0 1 0 0 1 0 0 0 0 0 0 0
## 90305 90309 90311 90325 90328 90338 90342 90350 90351 90356 90360 90362 90368
## 0 0 1 0 1 0 0 0 0 0 0 0 0
## 90376 90378 90379 90380 90384 90385 90387 90388 90390 90396 90403 90411 90414
## 0 0 1 1 0 0 1 1 1 0 0 1 0
## 90415 90418 90419 90421 90423 90424 90432 90435 90440 90444 90447 90449 90460
## 0 1 0 0 0 0 0 0 0 1 0 1 0
## 90464 90466 90468 90470 90471 90474 90476 90477 90478 90480 90485 90486 90488
## 0 0 0 0 1 0 0 0 0 0 0 0 1
## 90492 90493 90494 90504 90506 90509 90511 90514 90516 90518 90519 90521 90522
## 0 1 0 1 1 1 0 0 0 0 0 0 0
## 90527 90529 90535 90539 90540 90541 90550 90555 90556 90559 90563 90564 90566
## 0 0 0 1 1 0 1 0 0 1 1 0 0
## 90569 90570 90574 90578 90583 90584 90586 90591 90593 90598 90600 90601 90602
## 0 1 1 0 0 0 0 0 0 0 0 0 0
## 90603 90605 90608 90609 90611 90612 90617 90621 90622 90623 90629 90630 90647
## 1 0 0 0 0 0 1 1 0 1 0 0 0
## 90650 90653 90654 90659 90662 90666 90668 90671 90675 90676 90678 90681 90683
## 0 0 0 1 1 1 0 0 0 0 0 0 0
## 90686 90691 90702 90705 90718 90719 90720 90721 90724 90735 90736 90738 90742
## 0 0 1 0 0 0 0 0 0 0 1 1 0
## 90745 90750 90751 90753 90757 90763 90766 90767 90770 90774 90776 90777 90779
## 1 0 1 1 0 1 0 0 1 0 0 0 0
## 90783 90785 90786 90787 90791 90795 90797 90799 90803 90806 90807 90808 90812
## 1 1 1 1 0 0 0 0 0 0 0 0 1
## 90813 90821 90822 90824 90828 90829 90833 90834 90839 90843 90850 90852 90853
## 0 1 0 0 0 0 0 0 1 0 0 0 0
## 90858 90861 90862 90864 90866 90867 90869 90873 90874 90876 90877 90879 90881
## 1 1 0 0 0 0 0 0 1 0 0 0 0
## 90884 90885 90886 90887 90896 90898 90899 90902 90903 90916 90917 90923 90925
## 0 0 0 1 1 0 0 1 0 0 0 0 1
## 90927 90932 90933 90934 90935 90937 90941 90946 90955 90958 90969 90970 90978
## 0 0 0 1 0 0 0 0 0 1 1 1 0
## 90981 90985 90987 90988 90999 91004 91005 91006 91007 91012 91016 91025 91026
## 0 0 0 0 0 0 1 1 0 0 1 0 0
## 91029 91030 91031 91036 91037 91038 91040 91044 91046 91049 91053 91054 91056
## 0 0 0 1 1 0 1 0 0 0 0 0 0
## 91060 91061 91066 91067 91083 91089 91094 91098 91106 91109 91110 91117 91119
## 1 0 0 1 0 0 1 0 0 0 0 0 0
## 91120 91130 91136 91138 91139 91146 91153 91155 91161 91165 91169
## 0 1 0 0 0 0 1 0 0 0 0
## Levels: 0 1
# Evaluate the model
CrossTable(test_dt$No.Cancels, cancel_pred_dt,
prop.chisq = FALSE, prob.c = FALSE, prop.r = FALSE,
dnn = c('actual default','predicted default'))
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 10788
##
##
## | predicted default
## actual default | 0 | 1 | Row Total |
## ---------------|-----------|-----------|-----------|
## 0 | 2501 | 0 | 2501 |
## | 1.000 | 0.000 | |
## | 0.232 | 0.000 | |
## ---------------|-----------|-----------|-----------|
## 1 | 0 | 8287 | 8287 |
## | 0.000 | 1.000 | |
## | 0.000 | 0.768 | |
## ---------------|-----------|-----------|-----------|
## Column Total | 2501 | 8287 | 10788 |
## | 0.232 | 0.768 | |
## ---------------|-----------|-----------|-----------|
##
##
table_cancel <- data.frame(value = as.factor(test_dt$No.Cancels), pred = cancel_pred_dt)
library(yardstick)
## Warning: package 'yardstick' was built under R version 4.3.2
##
## Attaching package: 'yardstick'
## The following object is masked from 'package:epiDisplay':
##
## kap
## The following object is masked from 'package:rcompanion':
##
## accuracy
## The following objects are masked from 'package:caret':
##
## precision, recall, sensitivity, specificity
## The following object is masked from 'package:readr':
##
## spec
class_metrics <- metric_set(accuracy,precision,recall) #metric_set is function of library(yardstick)
class_metrics(table_cancel, truth = value, estimate = pred)
## # A tibble: 3 × 3
## .metric .estimator .estimate
## <chr> <chr> <dbl>
## 1 accuracy binary 1
## 2 precision binary 1
## 3 recall binary 1
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.