Call in the SAH segmentation datasset.
library(readxl)
SAH_imaging_database <- read_excel("~/Documents/Job/Research /Bulters research/SAH imaging /Data/SAH imaging database.xlsx",
sheet = "Complete dataset")
Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900Warning: NA inserted for an unsupported date prior to 1900
View(SAH_imaging_database)
data_imaging <- SAH_imaging_database
Cohort characteristic calcuations.
Firstly, calculate the median and IQR from symptom onset to scan.
na.omit(data_imaging$Time_until_scan_min)
[1] 157 128 207 210 189 1165 113 163 769 340 147 13 1042 124 126 222 308 92 96 266 1200
[22] 117 148 347 934 96 652 513 144 90 637 208 276 294 533 129 155 998 330 337 149 125
[43] 244 1014 103 341 871 541 549 127 118 78 779 293 224 800 337 123 1256 225 482 1256 491
[64] 923 349 288 232 1351 1187 393 136 119 1320 261 385 728 113 175 371 117 119 671
attr(,"na.action")
[1] 39 42 52 55 59 60 62 68 70 71 74 75 76 77 80
attr(,"class")
[1] "omit"
summary(data_imaging$Time_until_scan_min) # careful when doing this as variable number will differe afterwards
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
13.0 130.8 271.0 411.9 547.0 1351.0 15
271/60 #Mediam
[1] 4.516667
130/60 #1st quartile
[1] 2.166667
547/60 #3rd quartile
[1] 9.116667
Baseline characteristics table Unknown represents any missing data - 2 patients in the cohort did not have blood volumes collected.
library(gtsummary)
theme_gtsummary_compact()
Setting theme `Compact`
data_imaging %>% tbl_summary()
| Characteristic | N = 971 |
|---|---|
| Patient | |
| 01-001 | 1 (1.0%) |
| 01-002 | 1 (1.0%) |
| 01-003 | 1 (1.0%) |
| 01-004 | 1 (1.0%) |
| 01-005 | 1 (1.0%) |
| 01-006 | 1 (1.0%) |
| 01-007 | 1 (1.0%) |
| 01-008 | 1 (1.0%) |
| 01-009 | 1 (1.0%) |
| 01-011 | 1 (1.0%) |
| 01-012 | 1 (1.0%) |
| 01-013 | 1 (1.0%) |
| 01-014 | 1 (1.0%) |
| 01-015 | 1 (1.0%) |
| 01-016 | 1 (1.0%) |
| 01-017 | 1 (1.0%) |
| 01-018 | 1 (1.0%) |
| 01-019 | 1 (1.0%) |
| 01-020 | 1 (1.0%) |
| 01-022 | 1 (1.0%) |
| 01-023 | 1 (1.0%) |
| 01-024 | 1 (1.0%) |
| 01-026 | 1 (1.0%) |
| 01-027 | 1 (1.0%) |
| 01-028 | 1 (1.0%) |
| 01-029 | 1 (1.0%) |
| 01-030 | 1 (1.0%) |
| 01-031 | 1 (1.0%) |
| 01-032 | 1 (1.0%) |
| 01-033 | 1 (1.0%) |
| 01-034 | 1 (1.0%) |
| 01-035 | 1 (1.0%) |
| 01-036 | 1 (1.0%) |
| 01-037 | 1 (1.0%) |
| 01-038 | 1 (1.0%) |
| 01-039 | 1 (1.0%) |
| 01-040 | 1 (1.0%) |
| 01-042 | 1 (1.0%) |
| 01-043 | 1 (1.0%) |
| 01-044 | 1 (1.0%) |
| 01-045 | 1 (1.0%) |
| 01-046 | 1 (1.0%) |
| 01-047 | 1 (1.0%) |
| 01-048 | 1 (1.0%) |
| 01-049 | 1 (1.0%) |
| 01-051 | 1 (1.0%) |
| 01-052 | 1 (1.0%) |
| 01-053 | 1 (1.0%) |
| 01-055 | 1 (1.0%) |
| 01-056 | 1 (1.0%) |
| 01-057 | 1 (1.0%) |
| 01-058 | 1 (1.0%) |
| 01-059 | 1 (1.0%) |
| 01-060 | 1 (1.0%) |
| 01-061 | 1 (1.0%) |
| 01-062 | 1 (1.0%) |
| 01-063 | 1 (1.0%) |
| 01-064 | 1 (1.0%) |
| 01-066 | 1 (1.0%) |
| 01-067 | 1 (1.0%) |
| 01-068 | 1 (1.0%) |
| 01-069 | 1 (1.0%) |
| 01-070 | 1 (1.0%) |
| 01-071 | 1 (1.0%) |
| 01-072 | 1 (1.0%) |
| 01-073 | 1 (1.0%) |
| 01-074 | 1 (1.0%) |
| 01-075 | 1 (1.0%) |
| 01-076 | 1 (1.0%) |
| 01-077 | 1 (1.0%) |
| 01-078 | 1 (1.0%) |
| 01-079 | 1 (1.0%) |
| 01-080 | 1 (1.0%) |
| 01-081 | 1 (1.0%) |
| 01-082 | 1 (1.0%) |
| 01-083 | 1 (1.0%) |
| 01-084 | 1 (1.0%) |
| 01-085 | 1 (1.0%) |
| 01-086 | 1 (1.0%) |
| 01-087 | 1 (1.0%) |
| 01-088 | 1 (1.0%) |
| 01-089 | 1 (1.0%) |
| 03-001 | 1 (1.0%) |
| 03-002 | 1 (1.0%) |
| 03-003 | 1 (1.0%) |
| 03-004 | 1 (1.0%) |
| 03-005 | 1 (1.0%) |
| 03-006 | 1 (1.0%) |
| 03-007 | 1 (1.0%) |
| 03-008 | 1 (1.0%) |
| 03-009 | 1 (1.0%) |
| 03-010 | 1 (1.0%) |
| 03-011 | 1 (1.0%) |
| 03-012 | 1 (1.0%) |
| 04-001 | 1 (1.0%) |
| 04-002 | 1 (1.0%) |
| 04-003 | 1 (1.0%) |
| Patient_number | 50 (26, 74) |
| SITENAM | |
| Edinburgh | 12 (12%) |
| Royal London | 3 (3.1%) |
| Southampton | 82 (85%) |
| AGE | 55 (50, 62) |
| SEX | |
| Female | 75 (77%) |
| Male | 22 (23%) |
| BMIBL | 26.4 (22.9, 31.0) |
| Unknown | 8 |
| HTN | |
| N | 70 (72%) |
| Y | 27 (28%) |
| ANEULOC | |
| Anterior Circulation | 80 (84%) |
| Posterior Circulation | 15 (16%) |
| Unknown | 2 |
| ANEUMVA | |
| Anterior Cerebral Artery | 41 (42%) |
| Internal Carotid Artery | 17 (18%) |
| Middle Cerebral Artery | 24 (25%) |
| None | 2 (2.1%) |
| Vertebrobasilar | 13 (13%) |
| ANEUSP | |
| 2nd aneurysm Anterior Cerebral Artery | 1 (1.0%) |
| 4mm Left ACA Aneurysm | 1 (1.0%) |
| A Com | 2 (2.1%) |
| ACA or communicating artery | 1 (1.0%) |
| Acom aneurysm likely ruptured but ICA aneurysm also treated as uncertain which bled | 1 (1.0%) |
| Anterior Communicaing Artery + Left MCA perforated aneurysm | 1 (1.0%) |
| anterior communicating artery | 1 (1.0%) |
| Anterior communicating artery | 3 (3.1%) |
| Anterior Communicating artery | 5 (5.2%) |
| Anterior Communicating Artery | 12 (12%) |
| ANTERIOR COMMUNICATING ARTERY | 1 (1.0%) |
| Anterior Communicating Artery (Anterior Circulation) was felt most llikley to have ruptured but Basilar tip (Posterior Circulation) aneurysm also coiled as unsure | 1 (1.0%) |
| anterior communicating artery aneurysm | 1 (1.0%) |
| Anterior communicating artery aneurysm | 2 (2.1%) |
| Anterior inferior cerebellar artery | 1 (1.0%) |
| basilar aneurysm | 1 (1.0%) |
| basilar artery aneurysm | 1 (1.0%) |
| Basilar tip | 1 (1.0%) |
| Basilar Tip | 1 (1.0%) |
| BASILAR TIP | 1 (1.0%) |
| Basilar tip aneurysm | 1 (1.0%) |
| bilobed complex aneurysm measuring up to 4 mm arising from the left distal ICA which is likely to be a PCOM artery aneurysm | 1 (1.0%) |
| left anterior cerebral artery | 1 (1.0%) |
| Left Anterior Cerebral Artery | 2 (2.1%) |
| left ICA adjacent to P Com. 10x6x6mm | 1 (1.0%) |
| left internal carotid artery biforcation | 1 (1.0%) |
| Left MCA aneurysm | 1 (1.0%) |
| Left MCA bifurcation | 1 (1.0%) |
| Left middle cerebral artery | 1 (1.0%) |
| Left Pcom Aneurysm | 2 (2.1%) |
| Left posterior communicating artery | 1 (1.0%) |
| left supraclinoid ICA aneurism | 1 (1.0%) |
| MCA aneurysm | 14 (14%) |
| Non-aneurysmal | 2 (2.1%) |
| Paraopthalmic aneurysm | 1 (1.0%) |
| Pericallosal Artery | 1 (1.0%) |
| Posterior Cerebral Artery | 1 (1.0%) |
| posterior communicating artery | 1 (1.0%) |
| Posterior Communicating Artery | 1 (1.0%) |
| Posterior communicating artery aneurym | 1 (1.0%) |
| Posterior communicating artery aneurysm | 1 (1.0%) |
| Posterior Communicating artery aneurysm | 1 (1.0%) |
| Posterior infererior cerebellar artery | 1 (1.0%) |
| Right Anterior Cerebral Artery | 1 (1.0%) |
| Right anterior communicating artery | 1 (1.0%) |
| right anterior communicating artery aneurysm with a tiny additional right posterior communicating artery aneurysm. | 1 (1.0%) |
| Right Internal Carotid Artery and Middle Cerebral Artery | 1 (1.0%) |
| Right Middle cerebral Artery | 1 (1.0%) |
| Right Middle Cerebral Artery | 1 (1.0%) |
| Right Middle Cerebral Artery Aneurysm | 1 (1.0%) |
| Right Middle Cerebral Artery bifurcation | 1 (1.0%) |
| right pericallosal artery | 1 (1.0%) |
| Right posterior communicating artery | 3 (3.1%) |
| RIGHT V4 ANEURYSM | 1 (1.0%) |
| small aneurysm arising from the right A1/2 junction | 1 (1.0%) |
| small left A1 (22mm) | 1 (1.0%) |
| Superior cerebellar artery | 1 (1.0%) |
| Terminal ICA aneurysm | 1 (1.0%) |
| Vertebral artery aneurysm | 1 (1.0%) |
| Vertebrobasilar junction | 1 (1.0%) |
| FISHGRDN | |
| 3 | 37 (38%) |
| 4 | 60 (62%) |
| SURGPROC | |
| Clipping | 22 (23%) |
| Coiling | 73 (75%) |
| Not Done | 2 (2.1%) |
| WFNSGRDN | |
| 1 | 44 (45%) |
| 2 | 16 (16%) |
| 3 | 5 (5.2%) |
| 4 | 27 (28%) |
| 5 | 5 (5.2%) |
| WFNSGRP | |
| 1-3 | 65 (67%) |
| 4-5 | 32 (33%) |
| ICTDT | 2016-04-29 to 2019-02-04 |
| ICTTM | 1899-12-31 00:30:00 to 1899-12-31 23:45:00 |
| Unknown | 6 |
| ICTDUR | 28 (21, 44) |
| Unknown | 6 |
| ICTDURGR | |
| < 24 hours | 30 (33%) |
| > 48 hours | 4 (4.4%) |
| 24 to 48 hours | 57 (63%) |
| Unknown | 6 |
| Ictus_scan_date | |
| 19/20/2016 | 1 (1.2%) |
| 42490 | 1 (1.2%) |
| 42506 | 2 (2.4%) |
| 42512 | 1 (1.2%) |
| 42522 | 2 (2.4%) |
| 42523 | 1 (1.2%) |
| 42527 | 1 (1.2%) |
| 42540 | 1 (1.2%) |
| 42555 | 1 (1.2%) |
| 42557 | 1 (1.2%) |
| 42560 | 1 (1.2%) |
| 42568 | 1 (1.2%) |
| 42569 | 1 (1.2%) |
| 42572 | 1 (1.2%) |
| 42587 | 1 (1.2%) |
| 42646 | 1 (1.2%) |
| 42648 | 1 (1.2%) |
| 42676 | 1 (1.2%) |
| 42682 | 1 (1.2%) |
| 42686 | 1 (1.2%) |
| 42737 | 1 (1.2%) |
| 42744 | 2 (2.4%) |
| 42745 | 1 (1.2%) |
| 42757 | 1 (1.2%) |
| 42768 | 1 (1.2%) |
| 42781 | 1 (1.2%) |
| 42786 | 1 (1.2%) |
| 42795 | 1 (1.2%) |
| 43097 | 1 (1.2%) |
| 43109 | 1 (1.2%) |
| 43124 | 1 (1.2%) |
| 43127 | 1 (1.2%) |
| 43137 | 1 (1.2%) |
| 43152 | 1 (1.2%) |
| 43172 | 1 (1.2%) |
| 43179 | 1 (1.2%) |
| 43201 | 1 (1.2%) |
| 43206 | 1 (1.2%) |
| 43209 | 2 (2.4%) |
| 43222 | 1 (1.2%) |
| 43226 | 1 (1.2%) |
| 43231 | 1 (1.2%) |
| 43233 | 2 (2.4%) |
| 43234 | 1 (1.2%) |
| 43240 | 1 (1.2%) |
| 43244 | 1 (1.2%) |
| 43250 | 1 (1.2%) |
| 43253 | 1 (1.2%) |
| 43257 | 2 (2.4%) |
| 43279 | 1 (1.2%) |
| 43285 | 1 (1.2%) |
| 43286 | 1 (1.2%) |
| 43289 | 1 (1.2%) |
| 43293 | 1 (1.2%) |
| 43307 | 1 (1.2%) |
| 43327 | 1 (1.2%) |
| 43328 | 1 (1.2%) |
| 43334 | 1 (1.2%) |
| 43339 | 1 (1.2%) |
| 43346 | 1 (1.2%) |
| 43351 | 1 (1.2%) |
| 43367 | 1 (1.2%) |
| 43368 | 2 (2.4%) |
| 43370 | 1 (1.2%) |
| 43375 | 1 (1.2%) |
| 43377 | 1 (1.2%) |
| 43402 | 1 (1.2%) |
| 43430 | 1 (1.2%) |
| 43441 | 1 (1.2%) |
| 43458 | 1 (1.2%) |
| 43468 | 1 (1.2%) |
| 43474 | 1 (1.2%) |
| 43476 | 1 (1.2%) |
| 43497 | 1 (1.2%) |
| 43501 | 1 (1.2%) |
| Unknown | 15 |
| Ictus_scan_time | 1899-12-31 00:09:00 to 1899-12-31 23:49:00 |
| Unknown | 15 |
| Time_until_scan | 1899-12-31 00:13:00 to 1923-12-25 04:36:00 |
| Unknown | 16 |
| Time_until_scan_min | 271 (131, 547) |
| Unknown | 15 |
| CRPBL | 6 (3, 16) |
| EVDFL | |
| N | 62 (64%) |
| Y | 35 (36%) |
| Scan thickness | 4.00 (2.50, 5.00) |
| Blood right | 11 (4, 18) |
| Blood left | 8 (3, 15) |
| Non-SSV blood | 19 (9, 33) |
| Unknown | 2 |
| SSV blood | 0.00 (0.00, 1.50) |
| Unknown | 2 |
| IVH | |
| N | 24 (25%) |
| Y | 73 (75%) |
| ICH | |
| N | 82 (85%) |
| Y | 15 (15%) |
| ICH location | |
| Corpus callosum | 2 (14%) |
| left fronral | 2 (14%) |
| Left fronral | 1 (7.1%) |
| Left temporal | 1 (7.1%) |
| Right frontal | 4 (29%) |
| Right temporal | 4 (29%) |
| Unknown | 83 |
| Total blood | 20 (9, 35) |
| SEBES | |
| 0 | 63 (65%) |
| 1 | 15 (15%) |
| 2 | 9 (9.3%) |
| 3 | 7 (7.2%) |
| 4 | 3 (3.1%) |
| Ventricular volume | 39 (23, 62) |
| SSV Volume | 37 (20, 75) |
| Below SSV Volume | 110 (59, 223) |
| ACE volume | 41 (29, 55) |
| Total manual volume | 158 (90, 283) |
| Dice (ACE vs Ventricular) | 0.77 (0.71, 0.84) |
| DCDURD | 15 (12, 25) |
| Unknown | 3 |
| DCLOC | |
| Home | 48 (51%) |
| Hospital | 34 (36%) |
| Other | 3 (3.2%) |
| Rehabilitation unit | 9 (9.6%) |
| Unknown | 3 |
| DEATHDUR | 199 (180, 246) |
| DEATHCEN | 91 (94%) |
| DCIFL | |
| N | 81 (84%) |
| Y | 16 (16%) |
| DCIDT | 2016-06-25 to 2019-02-07 |
| Unknown | 81 |
| DCIDURD | 191 (170, 219) |
| DCICNSR | 81 (84%) |
| NCIFL | |
| N | 87 (90%) |
| Y | 10 (10%) |
| NCIDT | 2016-06-26 to 2019-05-24 |
| Unknown | 87 |
| NCIDURD | 197 (177, 232) |
| NCICNSR | 87 (90%) |
| VENTRICULITIS | |
| None | 91 (94%) |
| Ventriculitis | 6 (6.2%) |
| VENTRICULITSDATE | |
| 6 | 1 (17%) |
| 11 | 2 (33%) |
| 13 | 1 (17%) |
| 20 | 1 (17%) |
| 24 | 1 (17%) |
| Unknown | 91 |
| INFECTION | |
| Chest infection | 2 (2.1%) |
| Folliculitis | 1 (1.0%) |
| Hospital acquired pneumonia | 3 (3.1%) |
| Lumbar discitis | 1 (1.0%) |
| Meningitis | 1 (1.0%) |
| None | 81 (84%) |
| Urinary tract infection | 1 (1.0%) |
| Ventilator associated pneumonia | 3 (3.1%) |
| Ventriculitis | 4 (4.1%) |
| INFECTIONDATE | 8 (5, 13) |
| Unknown | 81 |
| LUMBARPUNCTURE | |
| Lumbar puncture | 57 (59%) |
| None | 40 (41%) |
| BIC90 | 1.58 (1.28, 2.71) |
| Unknown | 17 |
| BIC180 | 1.60 (1.08, 2.68) |
| Unknown | 13 |
| BIC90LOCF | 1.56 (1.21, 2.50) |
| Unknown | 8 |
| BIC180LOCF | 1.59 (1.15, 2.57) |
| Unknown | 6 |
| CLCE90 | |
| 0 | 7 (9.6%) |
| 1 | 9 (12%) |
| 2 | 6 (8.2%) |
| 3 | 12 (16%) |
| 4 | 5 (6.8%) |
| 5 | 15 (21%) |
| 6 | 19 (26%) |
| Unknown | 24 |
| CLCE180 | |
| 0 | 8 (10%) |
| 1 | 9 (11%) |
| 2 | 19 (24%) |
| 3 | 5 (6.3%) |
| 4 | 5 (6.3%) |
| 5 | 13 (16%) |
| 6 | 21 (26%) |
| Unknown | 17 |
| CLCE90LOCF | |
| #NA | 2 (2.2%) |
| 0 | 10 (11%) |
| 1 | 9 (9.9%) |
| 2 | 11 (12%) |
| 3 | 12 (13%) |
| 4 | 6 (6.6%) |
| 5 | 18 (20%) |
| 6 | 23 (25%) |
| Unknown | 6 |
| CLCE180LOCF | |
| 0 | 9 (9.9%) |
| 1 | 10 (11%) |
| 2 | 19 (21%) |
| 3 | 7 (7.7%) |
| 4 | 5 (5.5%) |
| 5 | 17 (19%) |
| 6 | 24 (26%) |
| Unknown | 6 |
| GOSE28 | |
| 1 | 3 (3.2%) |
| 2 | 7 (7.4%) |
| 3 | 24 (25%) |
| 4 | 15 (16%) |
| 5 | 21 (22%) |
| 6 | 4 (4.2%) |
| 7 | 15 (16%) |
| 8 | 6 (6.3%) |
| Unknown | 2 |
| GOSE90 | |
| 1 | 5 (5.3%) |
| 2 | 1 (1.1%) |
| 3 | 10 (11%) |
| 4 | 12 (13%) |
| 5 | 16 (17%) |
| 6 | 20 (21%) |
| 7 | 19 (20%) |
| 8 | 12 (13%) |
| Unknown | 2 |
| GOSE180 | |
| 1 | 6 (6.3%) |
| 3 | 10 (11%) |
| 4 | 5 (5.3%) |
| 5 | 10 (11%) |
| 6 | 20 (21%) |
| 7 | 23 (24%) |
| 8 | 21 (22%) |
| Unknown | 2 |
| GOSE28LOCF | |
| 1 | 3 (3.2%) |
| 2 | 7 (7.4%) |
| 3 | 24 (25%) |
| 4 | 15 (16%) |
| 5 | 21 (22%) |
| 6 | 4 (4.2%) |
| 7 | 15 (16%) |
| 8 | 6 (6.3%) |
| Unknown | 2 |
| GOSE28_dich | 49 (52%) |
| Unknown | 2 |
| GOSE90LOCF | |
| 1 | 5 (5.3%) |
| 2 | 1 (1.1%) |
| 3 | 10 (11%) |
| 4 | 12 (13%) |
| 5 | 16 (17%) |
| 6 | 20 (21%) |
| 7 | 19 (20%) |
| 8 | 12 (13%) |
| Unknown | 2 |
| GOSE90_dich | 28 (29%) |
| Unknown | 2 |
| GOSE180LOCF | |
| 1 | 6 (6.3%) |
| 3 | 10 (11%) |
| 4 | 5 (5.3%) |
| 5 | 10 (11%) |
| 6 | 20 (21%) |
| 7 | 23 (24%) |
| 8 | 21 (22%) |
| Unknown | 2 |
| GOSE180_dich | 21 (22%) |
| Unknown | 2 |
| MRS7 | |
| 0 | 1 (1.0%) |
| 1 | 2 (2.1%) |
| 2 | 13 (13%) |
| 3 | 27 (28%) |
| 4 | 24 (25%) |
| 5 | 28 (29%) |
| 6 | 2 (2.1%) |
| MRSDIS | |
| 0 | 2 (2.1%) |
| 1 | 4 (4.1%) |
| 2 | 25 (26%) |
| 3 | 24 (25%) |
| 4 | 23 (24%) |
| 5 | 17 (18%) |
| 6 | 2 (2.1%) |
| MRS28 | |
| 0 | 1 (1.0%) |
| 1 | 10 (10%) |
| 2 | 29 (30%) |
| 3 | 24 (25%) |
| 4 | 16 (16%) |
| 5 | 14 (14%) |
| 6 | 3 (3.1%) |
| MRS90 | |
| 0 | 5 (5.2%) |
| 1 | 16 (16%) |
| 2 | 41 (42%) |
| 3 | 20 (21%) |
| 4 | 7 (7.2%) |
| 5 | 3 (3.1%) |
| 6 | 5 (5.2%) |
| MRS180 | |
| 0 | 13 (13%) |
| 1 | 32 (33%) |
| 2 | 25 (26%) |
| 3 | 11 (11%) |
| 4 | 8 (8.2%) |
| 5 | 2 (2.1%) |
| 6 | 6 (6.2%) |
| MRS7LOCF | |
| 0 | 1 (1.0%) |
| 1 | 2 (2.1%) |
| 2 | 12 (12%) |
| 3 | 28 (29%) |
| 4 | 24 (25%) |
| 5 | 28 (29%) |
| 6 | 2 (2.1%) |
| MRS7_dich | 54 (56%) |
| MRSDISLOCF | |
| 0 | 2 (2.1%) |
| 1 | 4 (4.1%) |
| 2 | 25 (26%) |
| 3 | 24 (25%) |
| 4 | 23 (24%) |
| 5 | 17 (18%) |
| 6 | 2 (2.1%) |
| MRSDIS_dich | 42 (43%) |
| MRS28LOCF | |
| 0 | 1 (1.0%) |
| 1 | 10 (10%) |
| 2 | 29 (30%) |
| 3 | 24 (25%) |
| 4 | 16 (16%) |
| 5 | 14 (14%) |
| 6 | 3 (3.1%) |
| MRS28_dich | 33 (34%) |
| MRS90LOCF | |
| 0 | 5 (5.2%) |
| 1 | 16 (16%) |
| 2 | 41 (42%) |
| 3 | 20 (21%) |
| 4 | 7 (7.2%) |
| 5 | 3 (3.1%) |
| 6 | 5 (5.2%) |
| MRS90_dich | 15 (15%) |
| MRS180LOCF | |
| 0 | 13 (13%) |
| 1 | 32 (33%) |
| 2 | 25 (26%) |
| 3 | 11 (11%) |
| 4 | 8 (8.2%) |
| 5 | 2 (2.1%) |
| 6 | 6 (6.2%) |
| MRS180_dich | 16 (16%) |
| SAHOT28 | |
| 1 | 2 (2.1%) |
| 2 | 12 (13%) |
| 3 | 11 (12%) |
| 4 | 19 (20%) |
| 5 | 18 (19%) |
| 6 | 16 (17%) |
| 7 | 6 (6.3%) |
| 8 | 8 (8.4%) |
| 9 | 3 (3.2%) |
| Unknown | 2 |
| SAHOT90 | |
| 1 | 6 (6.3%) |
| 2 | 18 (19%) |
| 3 | 17 (18%) |
| 4 | 18 (19%) |
| 5 | 16 (17%) |
| 6 | 10 (11%) |
| 7 | 3 (3.2%) |
| 8 | 2 (2.1%) |
| 9 | 5 (5.3%) |
| Unknown | 2 |
| SAHOT180 | |
| 1 | 17 (18%) |
| 2 | 14 (15%) |
| 3 | 18 (19%) |
| 4 | 12 (13%) |
| 5 | 13 (14%) |
| 6 | 8 (8.4%) |
| 7 | 4 (4.2%) |
| 8 | 3 (3.2%) |
| 9 | 6 (6.3%) |
| Unknown | 2 |
| SAHOT28LOCF | |
| 1 | 2 (2.1%) |
| 2 | 12 (13%) |
| 3 | 11 (12%) |
| 4 | 19 (20%) |
| 5 | 18 (19%) |
| 6 | 16 (17%) |
| 7 | 6 (6.3%) |
| 8 | 8 (8.4%) |
| 9 | 3 (3.2%) |
| Unknown | 2 |
| SAHOT28_dich | 51 (54%) |
| Unknown | 2 |
| SAHOT90LOCF | |
| 1 | 6 (6.3%) |
| 2 | 18 (19%) |
| 3 | 17 (18%) |
| 4 | 18 (19%) |
| 5 | 16 (17%) |
| 6 | 10 (11%) |
| 7 | 3 (3.2%) |
| 8 | 2 (2.1%) |
| 9 | 5 (5.3%) |
| Unknown | 2 |
| SAHOT90_dich | 36 (38%) |
| Unknown | 2 |
| SAHOT180LOCF | |
| 1 | 17 (18%) |
| 2 | 14 (15%) |
| 3 | 18 (19%) |
| 4 | 12 (13%) |
| 5 | 13 (14%) |
| 6 | 8 (8.4%) |
| 7 | 4 (4.2%) |
| 8 | 3 (3.2%) |
| 9 | 6 (6.3%) |
| Unknown | 2 |
| SAHOT180_dich | 33 (35%) |
| Unknown | 2 |
| SAHOT28T | 43 (30, 64) |
| Unknown | 10 |
| SAHOT90T | 30 (16, 52) |
| Unknown | 23 |
| SAHOT180T | 24 (13, 50) |
| Unknown | 20 |
| SAHOT28TLOCF | 43 (28, 62) |
| Unknown | 5 |
| SAHOT90TLOCF | 33 (17, 53) |
| Unknown | 5 |
| SAHOT180TLOCF | 28 (14, 52) |
| Unknown | 5 |
| TCDD7 | 95 (69, 130) |
| Unknown | 10 |
| TCDMAX | 110 (90, 153) |
| Unknown | 7 |
| LRD7 | 2.50 (2.00, 3.23) |
| Unknown | 23 |
| LRMAX | 3.00 (2.30, 3.70) |
| Unknown | 16 |
| 1 n (%); Median (IQR); Range | |
data_imaging %>% select("AGE", "SEX", "HTN", "ANEULOC", "SURGPROC", "Time_until_scan_min", "FISHGRDN", "SEBES", "Total blood", "SSV blood", "Non-SSV blood", "Total manual volume", "SSV Volume", "Ventricular volume", "Below SSV Volume", "WFNSGRDN") %>% tbl_summary()
| Characteristic | N = 971 |
|---|---|
| AGE | 55 (50, 62) |
| SEX | |
| Female | 75 (77%) |
| Male | 22 (23%) |
| HTN | |
| N | 70 (72%) |
| Y | 27 (28%) |
| ANEULOC | |
| Anterior Circulation | 80 (84%) |
| Posterior Circulation | 15 (16%) |
| Unknown | 2 |
| SURGPROC | |
| Clipping | 22 (23%) |
| Coiling | 73 (75%) |
| Not Done | 2 (2.1%) |
| Time_until_scan_min | 271 (131, 547) |
| Unknown | 15 |
| FISHGRDN | |
| 3 | 37 (38%) |
| 4 | 60 (62%) |
| SEBES | |
| 0 | 63 (65%) |
| 1 | 15 (15%) |
| 2 | 9 (9.3%) |
| 3 | 7 (7.2%) |
| 4 | 3 (3.1%) |
| Total blood | 20 (9, 35) |
| SSV blood | 0.00 (0.00, 1.50) |
| Unknown | 2 |
| Non-SSV blood | 19 (9, 33) |
| Unknown | 2 |
| Total manual volume | 158 (90, 283) |
| SSV Volume | 37 (20, 75) |
| Ventricular volume | 39 (23, 62) |
| Below SSV Volume | 110 (59, 223) |
| WFNSGRDN | |
| 1 | 44 (45%) |
| 2 | 16 (16%) |
| 3 | 5 (5.2%) |
| 4 | 27 (28%) |
| 5 | 5 (5.2%) |
| 1 Median (IQR); n (%) | |
Blood distributions to check for the normality and see if transformations are required.
#Blood variables: Total Blood, SSV Blood and Non-SSV Blood
Total_blood <- SAH_imaging_database$`Total blood`
SSV_Blood <- SAH_imaging_database$`SSV blood`
Non_SSV_Blood <- SAH_imaging_database$`Non-SSV blood`
hist(Total_blood)
hist(SSV_Blood)
hist(Non_SSV_Blood)
library(moments)
d_total_blood <- density(Total_blood)# returns the density data
skewness(Total_blood, na.rm = TRUE) #Skewness
[1] 0.7766232
plot(d_total_blood, main = "Density plot Total Blood Volume (mls)", sub = "Skewness = 0.777") # plots the results
d_SSV_blood <- density(SSV_Blood, na.rm = TRUE)# returns the density data
skewness(SSV_Blood, na.rm = TRUE) #Skewness
[1] 3.526801
plot(d_SSV_blood, main = "Density plot SSV Blood Volume (mls)", sub = "Skewness = 3.53") # plots the results
d_Non_SSV_blood <- density(Non_SSV_Blood, na.rm = TRUE)# returns the density data
skewness(Non_SSV_Blood, na.rm = TRUE) #Skewness
[1] 0.7286446
plot(d_Non_SSV_blood, main = "Density plot Non-SSV Blood Volume (mls)", sub = "Skewness = 0.729") # plots the results
NA
NA
CSF distributions to check for skewness
#CSF variables: SEBES, Ventricular volume, SSV volume, Below SSV Volume
SEBES <- SAH_imaging_database$SEBES
Ventricle_CSF <- SAH_imaging_database$`Ventricular volume`
SSV_CSF <- SAH_imaging_database$`SSV Volume`
Below_SSV_CSF <- SAH_imaging_database$`Below SSV Volume`
Total_CSF <- SAH_imaging_database$`Total manual volume`
hist(SEBES)
hist(Ventricle_CSF)
hist(SSV_CSF)
hist(Below_SSV_CSF)
hist(Total_CSF)
library(moments)
d_SEBES <- density(SEBES)# returns the density data
skewness(SEBES, na.rm = TRUE) #Skewness
[1] 1.542407
plot(d_SEBES, main = "Density plot SEBES", sub = "Skewness = 1.542") # plots the results
d_Ventricle_CSF <- density(Ventricle_CSF, na.rm = TRUE)# returns the density data
skewness(Ventricle_CSF, na.rm = TRUE) #Skewness
[1] 1.590469
plot(d_Ventricle_CSF, main = "Density plot Ventricle CSF Volume (mls)", sub = "Skewness = 1.59") # plots the results
d_SSV_CSF <- density(SSV_CSF, na.rm = TRUE)# returns the density data
skewness(SSV_CSF, na.rm = TRUE) #Skewness
[1] 1.431467
plot(d_SSV_CSF, main = "Density plot SSV CSF Volume (mls)", sub = "Skewness = 1.43") # plots the results
d_Below_SSV_CSF <- density(Below_SSV_CSF, na.rm = TRUE)# returns the density data
skewness(Below_SSV_CSF, na.rm = TRUE) #Skewness
[1] 0.8290886
plot(d_Below_SSV_CSF, main = "Density plot Below SSV CSF Volume (mls)", sub = "Skewness = 0.829") # plots the results
d_Total_CSF <- density(Total_CSF, na.rm = TRUE)# returns the density data
skewness(Total_CSF, na.rm = TRUE) #Skewness
[1] 0.899855
plot(d_Total_CSF, main = "Density plot Total CSF Volume (mls)", sub = "Skewness = 0.9") # plots the results
Decision made not to transform the variables because they are generally normally distributed, with the exception of SSV blood which is not a clinically important variable anyway.
The next step is to identify through correlation matrices, how the imaging variables are related..
#For visualisation ensure that the variables have the correct names
SAH_imaging_database$Age <- SAH_imaging_database$AGE
SAH_imaging_database$WFNS <- SAH_imaging_database$WFNSGRDN
SAH_imaging_database$"Total CSF" <- SAH_imaging_database$`Total manual volume`
SAH_imaging_database$"Ventricular CSF" <- SAH_imaging_database$`Ventricular volume`
SAH_imaging_database$"SSV CSF" <- SAH_imaging_database$`SSV Volume`
data_imaging_correlation <- SAH_imaging_database[, c("Age", "WFNS",
"Total blood", "SSV CSF", "Ventricular CSF",
"Total CSF")]
data_imaging_correlation <- na.omit(data_imaging_correlation)
remove.packages('Hmisc')
Removing package from ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library’
(as ‘lib’ is unspecified)
install.packages("Hmisc", repos="http://cran.rstudio.com/", dependencies=TRUE)
Error in install.packages : Updating loaded packages
install.packages("checkmate")
Error in install.packages : Updating loaded packages
library(Hmisc)
res2 <- rcorr(as.matrix(data_imaging_correlation), type = "spearman")
res2
Age WFNS Total blood SSV CSF Ventricular CSF Total CSF
Age 1.00 0.06 0.01 0.24 0.39 0.34
WFNS 0.06 1.00 0.46 -0.37 -0.03 -0.14
Total blood 0.01 0.46 1.00 -0.26 -0.28 -0.19
SSV CSF 0.24 -0.37 -0.26 1.00 0.45 0.78
Ventricular CSF 0.39 -0.03 -0.28 0.45 1.00 0.78
Total CSF 0.34 -0.14 -0.19 0.78 0.78 1.00
n= 97
P
Age WFNS Total blood SSV CSF Ventricular CSF Total CSF
Age 0.5781 0.9249 0.0196 0.0000 0.0007
WFNS 0.5781 0.0000 0.0002 0.7396 0.1653
Total blood 0.9249 0.0000 0.0108 0.0051 0.0589
SSV CSF 0.0196 0.0002 0.0108 0.0000 0.0000
Ventricular CSF 0.0000 0.7396 0.0051 0.0000 0.0000
Total CSF 0.0007 0.1653 0.0589 0.0000 0.0000
res2$r
Age WFNS Total blood SSV CSF Ventricular CSF Total CSF
Age 1.000000000 0.05716434 0.009694334 0.2367181 0.38567391 0.3391306
WFNS 0.057164345 1.00000000 0.460972143 -0.3728866 -0.03418735 -0.1420047
Total blood 0.009694334 0.46097214 1.000000000 -0.2577188 -0.28217705 -0.1925100
SSV CSF 0.236718130 -0.37288664 -0.257718809 1.0000000 0.44937408 0.7821244
Ventricular CSF 0.385673908 -0.03418735 -0.282177046 0.4493741 1.00000000 0.7780086
Total CSF 0.339130575 -0.14200467 -0.192509994 0.7821244 0.77800863 1.0000000
res2$P
Age WFNS Total blood SSV CSF Ventricular CSF Total CSF
Age NA 5.781015e-01 9.249165e-01 1.957150e-02 9.569289e-05 0.0006787165
WFNS 5.781015e-01 NA 2.018435e-06 1.688910e-04 7.395581e-01 0.1652907303
Total blood 9.249165e-01 2.018435e-06 NA 1.081759e-02 5.106494e-03 0.0588736570
SSV CSF 1.957150e-02 1.688910e-04 1.081759e-02 NA 3.889443e-06 0.0000000000
Ventricular CSF 9.569289e-05 7.395581e-01 5.106494e-03 3.889443e-06 NA 0.0000000000
Total CSF 6.787165e-04 1.652907e-01 5.887366e-02 0.000000e+00 0.000000e+00 NA
flattenCorrMatrix <- function(cormat, pmat) { #format correlation matrix
ut <- upper.tri(cormat)
data.frame(
row = rownames(cormat)[row(cormat)[ut]],
column = rownames(cormat)[col(cormat)[ut]],
cor =(cormat)[ut],
p = pmat[ut]
)
}
correlation_matrix <- flattenCorrMatrix(res2$r, res2$P)
write.csv(correlation_matrix, "Correlation_matrix.csv", row.names = F) #export table
library(corrplot) #visualise the correlation matrix
res <- cor(data_imaging_correlation)
corrplot(res, type = "upper", order = "hclust",
tl.col = "black", tl.srt = 45)
corrplot(res2$r, type="upper", order="hclust", #insignificant correlations removed
p.mat = res2$P, sig.level = 0.01, insig = "blank")
Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 21, 15
Univariate analysis of variables
summary(Univariate)
Call:
glm(formula = data_imaging$SAHOT180_dich ~ data_imaging$`Total manual volume`,
family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.381248 0.379002 -1.006 0.314
data_imaging$`Total manual volume` -0.001276 0.001626 -0.785 0.433
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 122.07 on 93 degrees of freedom
AIC: 126.07
Number of Fisher Scoring iterations: 4
Dominance plots
To prevent overfitting of further predictive models, a dominance analysis was done by assessing each variable’s R2 when predicting mRS at day 28 and day 180. The mRS at day 28 and day 180 were used because mRS is used most widely in clinical practice to assess functional outcome. Day 28 was selected to reflect short term and day 180 long-term outcome. In addition, to demonstrate the difference between a general scale of functional outcome for stroke and a patient reported SAH specific scale of symptoms we undertook a dominance analysis of SAHOT on day 180.
bootmodpres100 <- bootDominanceAnalysis(Multivariate, R=100) # Bootstrap analysis for dominance analysis
bootmodpres100 <- bootDominanceAnalysis(Multivariate, R=100) # Bootstrap analysis for dominance analysis
In order to investigate the additional benefit of blood and CSF volume measurements in models over conventional clinical features alone multivariate models were built using the previously reported SAHIT core variables to predict mRS at day 28 and 180 and repeated adding total blood volume, SSV CSF, ventricular CSF.
Error: unexpected symbol in "In order"
Multivariate analysis
In order to investigate the additional benefit of blood and CSF volume measurements in models over conventional clinical features alone multivariate models were built using the previously reported SAHIT core variables to predict mRS at day 28 and 180 and repeated adding total blood volume, SSV CSF, ventricular CSF.
Core model= Age, Hypertension and Admission WFNS Neuroimaging model= Core model + Total Blood volume, SSV CSF and Ventricular CSF
For unknown reasons the below code did not work and therefore, I created the AUC graphs by adapting my previous analysed code.
legend("bottomright", title = "modified Rankin Scale",
legend = c("Neuroimaging Day 28", "Neuroimaging Day 180", "Clinical Day 28", "Clinical Day 180"), col = c("red", "black", "orange", "blue"),
lwd = 2, "Legend", cex=0.8)
Error in (function (s, units = "user", cex = NULL, font = NULL, vfont = NULL, :
plot.new has not been called yet
"", terms = c("Ventricular_CSF","Total_blood_volume","age [40,60,80]"))
Error: unexpected ',' in ""","
SSV dichotomisation from the literature
Choi et al.: SSV not normally distributed and subjects separated into equal quartiles for measuring odds ratios in examining associations with GCE as well as clinical outcomes. FINDINGS: compared to patients in the highest quartile for SSV, the OR for poor outcome at discharge increased in a dose dependent manner in the lower quartiles after adjusting for age, sex, smoking hypertension and HH score
Yuan et al.: SSV taken as continuous variable and in sensitivity analysis dichotomisation at <5.2ml was done. FINDINGS early SSV defined as lowest SSV volume in first 72hrs but not admission SSV was predictive of outcome
Create two new variables, SSV_quantiles and SSV_dich
<!-- rnb-source-end -->
<!-- rnb-output-begin eyJkYXRhIjoiRXJyb3I6IGF0dGVtcHQgdG8gdXNlIHplcm8tbGVuZ3RoIHZhcmlhYmxlIG5hbWVcbiJ9 -->
Error: attempt to use zero-length variable name
<!-- rnb-output-end -->
<!-- rnb-chunk-end -->
<!-- rnb-text-begin -->
Currently have several CSF volumes including - total CSF, SSV CSF, ventricular CSF and below SSV CSF. However, one volume that is missing, is a non-SSV, non-ventricular CSF.
Create non_SSV_non_vent_CSF variable
<!-- rnb-text-end -->
<!-- rnb-chunk-begin -->
<!-- rnb-source-begin eyJkYXRhIjoiYGBgclxuYGBgXG5cbmBgYCJ9 -->
```r
<!-- rnb-source-end -->
<!-- rnb-output-begin eyJkYXRhIjoiRXJyb3I6IGF0dGVtcHQgdG8gdXNlIHplcm8tbGVuZ3RoIHZhcmlhYmxlIG5hbWVcbiJ9 -->
Error: attempt to use zero-length variable name
<!-- rnb-output-end -->
<!-- rnb-chunk-end -->
<!-- rnb-text-begin -->
Before multivariate analysis, let's see if the new SSV cut-offs make it a significant predictor of day 30 and 180 outcome in a univariate analysis
<!-- rnb-text-end -->
<!-- rnb-chunk-begin -->
<!-- rnb-source-begin eyJkYXRhIjoiYGBgclxuZXhwKGNiaW5kKGNvZWYoVW5pdmFyaWF0ZSksIGNvbmZpbnQoVW5pdmFyaWF0ZSkpKVxuXG5gYGAifQ== -->
```r
exp(cbind(coef(Univariate), confint(Univariate)))
Waiting for profiling to be done...
2.5 % 97.5 %
(Intercept) 0.4791667 0.2864987 0.778339
data_imaging$SSV_dichlow 1.4906832 0.5654441 3.853318
Repeat regressions:
Before we make that major restructure we wanted to see the outcomes of the regressions for
If the latter does not give a clear result then we wanted to try it again but:
# Regression 1: WFNS, TBV and SSV regression
Multivariate <- glm(as.factor(mRS28) ~ WFNS+Total_blood_volume+SSV_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS28) ~ WFNS + Total_blood_volume +
SSV_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.010329 0.784551 -3.837 0.000125 ***
WFNS 0.856655 0.209192 4.095 4.22e-05 ***
Total_blood_volume 0.014721 0.015629 0.942 0.346263
SSV_CSF -0.004514 0.006311 -0.715 0.474383
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 124.387 on 96 degrees of freedom
Residual deviance: 89.964 on 93 degrees of freedom
AIC: 97.964
Number of Fisher Scoring iterations: 4
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume+SSV_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume +
SSV_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.415511 0.984158 -3.470 0.00052 ***
WFNS 0.525937 0.238247 2.208 0.02728 *
Total_blood_volume 0.018970 0.016313 1.163 0.24489
SSV_CSF -0.004060 0.007936 -0.512 0.60894
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 74.307 on 93 degrees of freedom
AIC: 82.307
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(SAHOT28_dich) ~ WFNS+Total_blood_volume+SSV_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT28_dich) ~ WFNS + Total_blood_volume +
SSV_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.469845 0.589470 -0.797 0.4254
WFNS 0.213558 0.180917 1.180 0.2378
Total_blood_volume 0.024086 0.014551 1.655 0.0979 .
SSV_CSF -0.008032 0.005332 -1.506 0.1320
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 131.18 on 94 degrees of freedom
Residual deviance: 117.88 on 91 degrees of freedom
(2 observations deleted due to missingness)
AIC: 125.88
Number of Fisher Scoring iterations: 4
Multivariate <- glm(as.factor(SAHOT180_dich) ~ WFNS+Total_blood_volume+SSV_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT180_dich) ~ WFNS + Total_blood_volume +
SSV_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.936754 0.645685 -1.451 0.1468
WFNS -0.014991 0.187351 -0.080 0.9362
Total_blood_volume 0.030589 0.014152 2.161 0.0307 *
SSV_CSF -0.009022 0.006394 -1.411 0.1582
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 112.25 on 91 degrees of freedom
(2 observations deleted due to missingness)
AIC: 120.25
Number of Fisher Scoring iterations: 4
# For mRS, WFNS is a significant predictor, for SAHOT, TBV is significant. Substitute in new SSV variables to see if this makes a difference.
#SSV_quantile first
Multivariate <- glm(as.factor(mRS28) ~ WFNS+Total_blood_volume+SSV_quantiles, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS28) ~ WFNS + Total_blood_volume +
SSV_quantiles, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.44386 0.95249 -3.616 0.000300 ***
WFNS 0.91927 0.23636 3.889 0.000101 ***
Total_blood_volume 0.01880 0.01655 1.136 0.255768
SSV_quantiles2 -0.36984 0.78129 -0.473 0.635952
SSV_quantiles3 0.62358 0.78633 0.793 0.427768
SSV_quantiles4 -0.72274 0.81935 -0.882 0.377732
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 124.387 on 96 degrees of freedom
Residual deviance: 87.279 on 91 degrees of freedom
AIC: 99.279
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume+SSV_quantiles, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume +
SSV_quantiles, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.62012 1.16642 -3.961 7.47e-05 ***
WFNS 0.70936 0.26454 2.681 0.00733 **
Total_blood_volume 0.01309 0.01801 0.727 0.46708
SSV_quantiles2 1.10257 0.85530 1.289 0.19736
SSV_quantiles3 1.23702 0.91902 1.346 0.17829
SSV_quantiles4 0.23181 1.00954 0.230 0.81838
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 71.709 on 91 degrees of freedom
AIC: 83.709
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(SAHOT28_dich) ~ WFNS+Total_blood_volume+SSV_quantiles, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT28_dich) ~ WFNS + Total_blood_volume +
SSV_quantiles, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.56706 0.74665 -0.759 0.448
WFNS 0.22010 0.20052 1.098 0.272
Total_blood_volume 0.02143 0.01498 1.431 0.152
SSV_quantiles2 0.35846 0.70441 0.509 0.611
SSV_quantiles3 -0.59282 0.66883 -0.886 0.375
SSV_quantiles4 -0.84778 0.68353 -1.240 0.215
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 131.18 on 94 degrees of freedom
Residual deviance: 116.03 on 89 degrees of freedom
(2 observations deleted due to missingness)
AIC: 128.03
Number of Fisher Scoring iterations: 4
Multivariate <- glm(as.factor(SAHOT180_dich) ~ WFNS+Total_blood_volume+SSV_quantiles, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT180_dich) ~ WFNS + Total_blood_volume +
SSV_quantiles, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.1602876 0.7493937 -1.548 0.1215
WFNS -0.0006619 0.2018584 -0.003 0.9974
Total_blood_volume 0.0305582 0.0147357 2.074 0.0381 *
SSV_quantiles2 0.0063719 0.6535923 0.010 0.9922
SSV_quantiles3 -0.1591029 0.6770875 -0.235 0.8142
SSV_quantiles4 -1.0107826 0.7590549 -1.332 0.1830
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 111.88 on 89 degrees of freedom
(2 observations deleted due to missingness)
AIC: 123.88
Number of Fisher Scoring iterations: 4
#Makes no difference. How about SSV_dich
Multivariate <- glm(as.factor(mRS28) ~ WFNS+Total_blood_volume+SSV_dich, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS28) ~ WFNS + Total_blood_volume +
SSV_dich, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.35505 0.64610 -5.193 2.07e-07 ***
WFNS 0.86463 0.22327 3.873 0.000108 ***
Total_blood_volume 0.01661 0.01556 1.067 0.285778
SSV_dichlow 0.16214 0.61914 0.262 0.793417
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 124.387 on 96 degrees of freedom
Residual deviance: 90.424 on 93 degrees of freedom
AIC: 98.424
Number of Fisher Scoring iterations: 4
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume+SSV_dich, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume +
SSV_dich, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.74949 0.81003 -4.629 3.68e-06 ***
WFNS 0.69899 0.26084 2.680 0.00737 **
Total_blood_volume 0.01566 0.01677 0.934 0.35020
SSV_dichlow -0.90681 0.74110 -1.224 0.22111
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 72.985 on 93 degrees of freedom
AIC: 80.985
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(SAHOT28_dich) ~ WFNS+Total_blood_volume+SSV_dich, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT28_dich) ~ WFNS + Total_blood_volume +
SSV_dich, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.06198 0.44665 -2.378 0.0174 *
WFNS 0.20878 0.19555 1.068 0.2857
Total_blood_volume 0.02790 0.01457 1.915 0.0555 .
SSV_dichlow 0.37694 0.57273 0.658 0.5104
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 131.18 on 94 degrees of freedom
Residual deviance: 119.86 on 91 degrees of freedom
(2 observations deleted due to missingness)
AIC: 127.86
Number of Fisher Scoring iterations: 4
Multivariate <- glm(as.factor(SAHOT180_dich) ~ WFNS+Total_blood_volume+SSV_dich, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT180_dich) ~ WFNS + Total_blood_volume +
SSV_dich, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.583066 0.483300 -3.276 0.00105 **
WFNS 0.008426 0.200301 0.042 0.96645
Total_blood_volume 0.033597 0.014236 2.360 0.01827 *
SSV_dichlow 0.308950 0.565281 0.547 0.58469
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 114.23 on 91 degrees of freedom
(2 observations deleted due to missingness)
AIC: 122.23
Number of Fisher Scoring iterations: 4
#Again no difference made.
# Regression 2: WFNS, TBV and ventricular volume to predict outcome
Multivariate <- glm(as.factor(mRS28) ~ WFNS+Total_blood_volume+Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS28) ~ WFNS + Total_blood_volume +
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.396700 0.877685 -5.009 5.46e-07 ***
WFNS 0.882108 0.213980 4.122 3.75e-05 ***
Total_blood_volume 0.026610 0.016492 1.614 0.1066
Ventricular_CSF 0.014472 0.006771 2.137 0.0326 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 124.39 on 96 degrees of freedom
Residual deviance: 85.55 on 93 degrees of freedom
AIC: 93.55
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume+Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume +
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.688721 1.031167 -4.547 5.44e-06 ***
WFNS 0.535981 0.241497 2.219 0.0265 *
Total_blood_volume 0.030422 0.017492 1.739 0.0820 .
Ventricular_CSF 0.012876 0.006733 1.912 0.0558 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 70.991 on 93 degrees of freedom
AIC: 78.991
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(SAHOT28_dich) ~ WFNS+Total_blood_volume+Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT28_dich) ~ WFNS + Total_blood_volume +
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.309795 0.552306 -2.372 0.0177 *
WFNS 0.242631 0.177250 1.369 0.1710
Total_blood_volume 0.029947 0.015179 1.973 0.0485 *
Ventricular_CSF 0.004223 0.005557 0.760 0.4473
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 131.18 on 94 degrees of freedom
Residual deviance: 119.71 on 91 degrees of freedom
(2 observations deleted due to missingness)
AIC: 127.71
Number of Fisher Scoring iterations: 4
Multivariate <- glm(as.factor(SAHOT180_dich) ~ WFNS+Total_blood_volume+Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT180_dich) ~ WFNS + Total_blood_volume +
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.586e+00 5.821e-01 -2.725 0.00644 **
WFNS 5.660e-02 1.822e-01 0.311 0.75604
Total_blood_volume 3.239e-02 1.463e-02 2.213 0.02688 *
Ventricular_CSF 5.209e-05 5.813e-03 0.009 0.99285
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 114.53 on 91 degrees of freedom
(2 observations deleted due to missingness)
AIC: 122.53
Number of Fisher Scoring iterations: 4
# Ventricular CSF significant at 30 day mRS and almost significant for mRS 180. However, not significant for SAHOT.
The above regressions demonstrate several observations with the dataset:
I think the above gives a clear result. Firstly, it shows that we have been able to replicate previous findings in the literature, that at early timepoints SSV predicts outcome. However, we have shown that this affect is not maintained at later timepoints or when combined with other significant predictors of outcome. Instead, imaging predictors of TBV, and to a lesser extent ventricular CSF are more important.
The narrative of the paper is clearer to me now and I think should be presented something like this:
For completeness, below I will include:
# add presence of an EVD as a covariate and an interaction between ventricular volume and an EVD
colnames(data_imaging)
[1] "Patient" "Patient_number" "SITENAM"
[4] "AGE" "SEX" "BMIBL"
[7] "HTN" "ANEULOC" "ANEUMVA"
[10] "ANEUSP" "FISHGRDN" "SURGPROC"
[13] "WFNSGRDN" "WFNSGRP" "ICTDT"
[16] "ICTTM" "ICTDUR" "ICTDURGR"
[19] "Ictus_scan_date" "Ictus_scan_time" "Time_until_scan"
[22] "Time_until_scan_min" "CRPBL" "EVDFL"
[25] "Scan thickness" "Blood right" "Blood left"
[28] "Non-SSV blood" "SSV blood" "IVH"
[31] "ICH" "ICH location" "Total blood"
[34] "SEBES" "Ventricular volume" "SSV Volume"
[37] "Below SSV Volume" "ACE volume" "Total manual volume"
[40] "Dice (ACE vs Ventricular)" "DCDURD" "DCLOC"
[43] "DEATHDUR" "DEATHCEN" "DCIFL"
[46] "DCIDT" "DCIDURD" "DCICNSR"
[49] "NCIFL" "NCIDT" "NCIDURD"
[52] "NCICNSR" "VENTRICULITIS" "VENTRICULITSDATE"
[55] "INFECTION" "INFECTIONDATE" "LUMBARPUNCTURE"
[58] "BIC90" "BIC180" "BIC90LOCF"
[61] "BIC180LOCF" "CLCE90" "CLCE180"
[64] "CLCE90LOCF" "CLCE180LOCF" "GOSE28"
[67] "GOSE90" "GOSE180" "GOSE28LOCF"
[70] "GOSE28_dich" "GOSE90LOCF" "GOSE90_dich"
[73] "GOSE180LOCF" "GOSE180_dich" "MRS7"
[76] "MRSDIS" "MRS28" "MRS90"
[79] "MRS180" "MRS7LOCF" "MRS7_dich"
[82] "MRSDISLOCF" "MRSDIS_dich" "MRS28LOCF"
[85] "MRS28_dich" "MRS90LOCF" "MRS90_dich"
[88] "MRS180LOCF" "MRS180_dich" "SAHOT28"
[91] "SAHOT90" "SAHOT180" "SAHOT28LOCF"
[94] "SAHOT28_dich" "SAHOT90LOCF" "SAHOT90_dich"
[97] "SAHOT180LOCF" "SAHOT180_dich" "SAHOT28T"
[100] "SAHOT90T" "SAHOT180T" "SAHOT28TLOCF"
[103] "SAHOT90TLOCF" "SAHOT180TLOCF" "TCDD7"
[106] "TCDMAX" "LRD7" "LRMAX"
[109] "Age" "WFNS" "Total CSF"
[112] "Ventricular CSF" "SSV CSF" "SSV_quantiles"
[115] "SSV_dich" "non_SSV_non_vent_CSF"
EVD <- data_imaging$EVDFL
EVD
[1] "N" "N" "Y" "N" "N" "N" "Y" "N" "Y" "Y" "N" "N" "N" "N" "Y" "N" "N" "Y" "N" "N" "N" "Y" "N" "N" "Y" "N"
[27] "N" "N" "N" "N" "Y" "N" "N" "N" "Y" "Y" "Y" "N" "Y" "N" "N" "Y" "Y" "Y" "N" "N" "N" "N" "N" "N" "N" "Y"
[53] "Y" "Y" "Y" "Y" "N" "N" "Y" "N" "N" "Y" "N" "Y" "N" "Y" "N" "N" "N" "N" "Y" "N" "N" "Y" "N" "Y" "Y" "N"
[79] "N" "Y" "N" "N" "N" "N" "N" "N" "Y" "Y" "N" "Y" "N" "N" "N" "N" "Y" "Y" "N"
ggplot(data = data_imaging, mapping = aes(x = EVD))+
geom_bar()
#Include EVD as covariate
Multivariate <- glm(as.factor(mRS28) ~ WFNS+Total_blood_volume+Ventricular_CSF+EVD, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS28) ~ WFNS + Total_blood_volume +
Ventricular_CSF + EVD, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.357074 0.913883 -4.768 1.86e-06 ***
WFNS 0.644076 0.237829 2.708 0.00677 **
Total_blood_volume 0.026927 0.017753 1.517 0.12934
Ventricular_CSF 0.012520 0.007096 1.764 0.07768 .
EVDY 1.597327 0.601242 2.657 0.00789 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 124.387 on 96 degrees of freedom
Residual deviance: 78.447 on 92 degrees of freedom
AIC: 88.447
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume+Ventricular_CSF+EVD, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume +
Ventricular_CSF + EVD, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.482326 1.018652 -4.400 1.08e-05 ***
WFNS 0.314962 0.279305 1.128 0.259
Total_blood_volume 0.027514 0.017655 1.558 0.119
Ventricular_CSF 0.010614 0.007086 1.498 0.134
EVDY 1.203011 0.756603 1.590 0.112
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 68.351 on 92 degrees of freedom
AIC: 78.351
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(SAHOT28_dich) ~ WFNS+Total_blood_volume+Ventricular_CSF+EVD, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT28_dich) ~ WFNS + Total_blood_volume +
Ventricular_CSF + EVD, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.287520 0.558454 -2.306 0.0211 *
WFNS 0.212307 0.209712 1.012 0.3114
Total_blood_volume 0.030003 0.015212 1.972 0.0486 *
Ventricular_CSF 0.004052 0.005591 0.725 0.4686
EVDY 0.152245 0.565423 0.269 0.7877
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 131.18 on 94 degrees of freedom
Residual deviance: 119.64 on 90 degrees of freedom
(2 observations deleted due to missingness)
AIC: 129.64
Number of Fisher Scoring iterations: 4
Multivariate <- glm(as.factor(SAHOT180_dich) ~ WFNS+Total_blood_volume+Ventricular_CSF+EVD, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT180_dich) ~ WFNS + Total_blood_volume +
Ventricular_CSF + EVD, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.438072 0.589679 -2.439 0.0147 *
WFNS -0.128803 0.218183 -0.590 0.5550
Total_blood_volume 0.032603 0.014795 2.204 0.0275 *
Ventricular_CSF -0.001554 0.006048 -0.257 0.7972
EVDY 0.924238 0.576979 1.602 0.1092
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 111.94 on 90 degrees of freedom
(2 observations deleted due to missingness)
AIC: 121.94
Number of Fisher Scoring iterations: 4
#EVD insertion is highly significant of early outcome using mRS and slightly reduces the significance of ventricular volumes
#Include EVD as interaction for Ventricular CSF volume
Multivariate <- glm(as.factor(mRS28) ~ WFNS+Total_blood_volume+Ventricular_CSF*EVD, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS28) ~ WFNS + Total_blood_volume +
Ventricular_CSF * EVD, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.292771 0.967559 -4.437 9.13e-06 ***
WFNS 0.642401 0.238223 2.697 0.007 **
Total_blood_volume 0.026658 0.017765 1.501 0.133
Ventricular_CSF 0.011486 0.008854 1.297 0.195
EVDY 1.452856 0.940344 1.545 0.122
Ventricular_CSF:EVDY 0.002818 0.014196 0.198 0.843
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 124.387 on 96 degrees of freedom
Residual deviance: 78.407 on 91 degrees of freedom
AIC: 90.407
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume+Ventricular_CSF*EVD, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume +
Ventricular_CSF * EVD, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -5.17723 1.23504 -4.192 2.77e-05 ***
WFNS 0.35852 0.29083 1.233 0.2177
Total_blood_volume 0.02756 0.01767 1.560 0.1188
Ventricular_CSF 0.02031 0.01024 1.983 0.0474 *
EVDY 2.12353 1.11352 1.907 0.0565 .
Ventricular_CSF:EVDY -0.01595 0.01299 -1.227 0.2197
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 66.859 on 91 degrees of freedom
AIC: 78.859
Number of Fisher Scoring iterations: 6
Multivariate <- glm(as.factor(SAHOT28_dich) ~ WFNS+Total_blood_volume+Ventricular_CSF*EVD, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT28_dich) ~ WFNS + Total_blood_volume +
Ventricular_CSF * EVD, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.159866 0.605712 -1.915 0.0555 .
WFNS 0.209379 0.210540 0.994 0.3200
Total_blood_volume 0.029557 0.015164 1.949 0.0513 .
Ventricular_CSF 0.001673 0.007149 0.234 0.8150
EVDY -0.165476 0.818565 -0.202 0.8398
Ventricular_CSF:EVDY 0.006057 0.011328 0.535 0.5928
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 131.18 on 94 degrees of freedom
Residual deviance: 119.35 on 89 degrees of freedom
(2 observations deleted due to missingness)
AIC: 131.35
Number of Fisher Scoring iterations: 4
Multivariate <- glm(as.factor(SAHOT180_dich) ~ WFNS+Total_blood_volume+Ventricular_CSF*EVD, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT180_dich) ~ WFNS + Total_blood_volume +
Ventricular_CSF * EVD, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.679285 0.661711 -2.538 0.0112 *
WFNS -0.118377 0.219761 -0.539 0.5901
Total_blood_volume 0.033320 0.014933 2.231 0.0257 *
Ventricular_CSF 0.003052 0.007898 0.386 0.6992
EVDY 1.396303 0.820639 1.701 0.0889 .
Ventricular_CSF:EVDY -0.009612 0.011730 -0.819 0.4125
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 111.26 on 89 degrees of freedom
(2 observations deleted due to missingness)
AIC: 123.26
Number of Fisher Scoring iterations: 4
#When EVD is added as an interaction term for ventricular volume, there is increased significance of the variables at 180 mRS.
# add an interaction between TBV and ventricular volume
Multivariate <- glm(as.factor(mRS28) ~ WFNS+Total_blood_volume*Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS28) ~ WFNS + Total_blood_volume *
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.4433004 0.9506115 -3.622 0.000292 ***
WFNS 0.9478682 0.2243990 4.224 2.4e-05 ***
Total_blood_volume -0.0254295 0.0283099 -0.898 0.369050
Ventricular_CSF -0.0065214 0.0119263 -0.547 0.584513
Total_blood_volume:Ventricular_CSF 0.0012159 0.0005725 2.124 0.033676 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 124.387 on 96 degrees of freedom
Residual deviance: 79.941 on 92 degrees of freedom
AIC: 89.941
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume*Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume *
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.8948325 1.1401470 -3.416 0.000635 ***
WFNS 0.5689045 0.2447871 2.324 0.020121 *
Total_blood_volume -0.0048386 0.0295537 -0.164 0.869950
Ventricular_CSF -0.0025913 0.0130075 -0.199 0.842092
Total_blood_volume:Ventricular_CSF 0.0007295 0.0005012 1.456 0.145507
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 68.536 on 92 degrees of freedom
AIC: 78.536
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(SAHOT28_dich) ~ WFNS+Total_blood_volume*Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT28_dich) ~ WFNS + Total_blood_volume *
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.0926149 0.6482785 -1.685 0.0919 .
WFNS 0.2473599 0.1776976 1.392 0.1639
Total_blood_volume 0.0183450 0.0238416 0.769 0.4416
Ventricular_CSF -0.0001561 0.0089894 -0.017 0.9861
Total_blood_volume:Ventricular_CSF 0.0002662 0.0004351 0.612 0.5407
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 131.18 on 94 degrees of freedom
Residual deviance: 119.32 on 90 degrees of freedom
(2 observations deleted due to missingness)
AIC: 129.32
Number of Fisher Scoring iterations: 4
Multivariate <- glm(as.factor(SAHOT180_dich) ~ WFNS+Total_blood_volume*Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT180_dich) ~ WFNS + Total_blood_volume *
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.4615466 0.6989305 -2.091 0.0365 *
WFNS 0.0598182 0.1825409 0.328 0.7431
Total_blood_volume 0.0267093 0.0229077 1.166 0.2436
Ventricular_CSF -0.0024775 0.0099317 -0.249 0.8030
Total_blood_volume:Ventricular_CSF 0.0001248 0.0003905 0.320 0.7493
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 114.42 on 90 degrees of freedom
(2 observations deleted due to missingness)
AIC: 124.42
Number of Fisher Scoring iterations: 4
Another thing we should check is whether the model fit is better if we use just: -WFNS and blood vol -WFNS and CSF vol -Blood and CSF vol
#Multivarate
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume+SSV_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume +
SSV_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.415511 0.984158 -3.470 0.00052 ***
WFNS 0.525937 0.238247 2.208 0.02728 *
Total_blood_volume 0.018970 0.016313 1.163 0.24489
SSV_CSF -0.004060 0.007936 -0.512 0.60894
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 74.307 on 93 degrees of freedom
AIC: 82.307
Number of Fisher Scoring iterations: 5
#WFNS, SSV and TBV
#AIC = 82.3
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume+Total_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume +
Total_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.399267 1.094137 -4.021 5.8e-05 ***
WFNS 0.609560 0.242768 2.511 0.012 *
Total_blood_volume 0.022004 0.016296 1.350 0.177
Total_CSF 0.002316 0.002224 1.041 0.298
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 73.526 on 93 degrees of freedom
AIC: 81.526
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume+Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume +
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.688721 1.031167 -4.547 5.44e-06 ***
WFNS 0.535981 0.241497 2.219 0.0265 *
Total_blood_volume 0.030422 0.017492 1.739 0.0820 .
Ventricular_CSF 0.012876 0.006733 1.912 0.0558 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 70.991 on 93 degrees of freedom
AIC: 78.991
Number of Fisher Scoring iterations: 5
##AIC: 78.991
#WFNS, blood volume ventricular volume significant
#WFNS and blood volume
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume,
family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.72336 0.80745 -4.611 4e-06 ***
WFNS 0.55965 0.23060 2.427 0.0152 *
Total_blood_volume 0.01987 0.01618 1.228 0.2194
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 74.586 on 94 degrees of freedom
AIC: 80.586
Number of Fisher Scoring iterations: 5
##AIC: 80.586
#WFNS significant blood volume isn't
#WFNS and ventricular volume
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Ventricular_CSF, family = binomial,
data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.949874 0.863933 -4.572 4.83e-06 ***
WFNS 0.668095 0.219495 3.044 0.00234 **
Ventricular_CSF 0.008904 0.006197 1.437 0.15075
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 74.099 on 94 degrees of freedom
AIC: 80.099
Number of Fisher Scoring iterations: 5
##AIC: 80.099
#WFNS significant, ventricular volume is almost significant
#WFNS and total CSF volume
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_CSF, family = binomial,
data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.922239 0.984257 -3.985 6.75e-05 ***
WFNS 0.699934 0.226759 3.087 0.00202 **
Total_CSF 0.001857 0.002136 0.870 0.38457
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 75.369 on 94 degrees of freedom
AIC: 81.369
Number of Fisher Scoring iterations: 5
##AIC: 81.369
#WFNS significant, ventricular volume is almost significant
Multivariate <- glm(as.factor(mRS180) ~ WFNS+SSV_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + SSV_CSF, family = binomial,
data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.051539 0.898705 -3.395 0.000685 ***
WFNS 0.606010 0.223041 2.717 0.006587 **
SSV_CSF -0.004920 0.007738 -0.636 0.524934
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 75.666 on 94 degrees of freedom
AIC: 81.666
Number of Fisher Scoring iterations: 5
##AIC: 81.666
#WFNS significant, ventricular volume is almost significant
#Blood and ventricular volume
Multivariate <- glm(as.factor(mRS180) ~ Total_blood_volume+Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ Total_blood_volume + Ventricular_CSF,
family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.723412 0.810831 -4.592 4.39e-06 ***
Total_blood_volume 0.045961 0.016094 2.856 0.00429 **
Ventricular_CSF 0.014509 0.006567 2.210 0.02714 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 76.155 on 94 degrees of freedom
AIC: 82.155
Number of Fisher Scoring iterations: 5
##AIC: 112.16
#Total blood very significant and ventricular volume significant
#Ventricular volume only
Univariate <- glm(as.factor(mRS180) ~ Ventricular_CSF, family = binomial, data = data_imaging)
summary(Univariate)
Call:
glm(formula = as.factor(mRS180) ~ Ventricular_CSF, family = binomial,
data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.097775 0.451256 -4.649 3.34e-06 ***
Ventricular_CSF 0.008568 0.005918 1.448 0.148
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 84.892 on 95 degrees of freedom
AIC: 88.892
Number of Fisher Scoring iterations: 4
#Ventricular volume is not significant on its own
#WFNS only
Univariate <- glm(as.factor(mRS180) ~ WFNS, family = binomial, data = data_imaging)
summary(Univariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.4077 0.7329 -4.649 3.33e-06 ***
WFNS 0.6518 0.2136 3.052 0.00227 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 76.106 on 95 degrees of freedom
AIC: 80.106
Number of Fisher Scoring iterations: 5
##AIC: 95.594
#WFNS is highly significant
#TBV only
Univariate <- glm(as.factor(mRS180) ~ Total_blood_volume, family = binomial, data = data_imaging)
summary(Univariate)
Call:
glm(formula = as.factor(mRS180) ~ Total_blood_volume, family = binomial,
data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.62181 0.54423 -4.817 1.45e-06 ***
Total_blood_volume 0.03580 0.01477 2.424 0.0153 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.87 on 96 degrees of freedom
Residual deviance: 80.82 on 95 degrees of freedom
AIC: 84.82
Number of Fisher Scoring iterations: 4
##AIC: 84.82
#TBV is highly significant
#WFNS, age and HTN
Multivariate <- glm(as.factor(mRS180) ~ WFNS+ age+HTN, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + age + HTN, family = binomial,
data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.012054 1.761312 -2.278 0.02273 *
WFNS 0.668701 0.218503 3.060 0.00221 **
age 0.006251 0.029049 0.215 0.82962
HTNY 0.646141 0.652048 0.991 0.32171
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 74.876 on 93 degrees of freedom
AIC: 82.876
Number of Fisher Scoring iterations: 5
Multivariate <- glm(as.factor(mRS180) ~ Total_blood_volume+Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ Total_blood_volume + Ventricular_CSF,
family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.723412 0.810831 -4.592 4.39e-06 ***
Total_blood_volume 0.045961 0.016094 2.856 0.00429 **
Ventricular_CSF 0.014509 0.006567 2.210 0.02714 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 76.155 on 94 degrees of freedom
AIC: 82.155
Number of Fisher Scoring iterations: 5
#Ventricular volume vs outcome
ggplot(data = data_imaging, mapping = aes(x = Total_blood_volume, y = data_imaging$MRS180))+
geom_point()+
geom_smooth()
ggplot(data = data_imaging, mapping = aes(x = Ventricular_CSF, y = data_imaging$MRS180))+
geom_point()+
geom_smooth()
ggplot(data = data_imaging, mapping = aes(x = data_imaging$`Below SSV Volume`, y = data_imaging$MRS180))+
geom_point()+
geom_smooth()
SAHOT as linear to see if this changes significance of variables. SAHOT is a 9 part scale 1 (Best outcome), 9 (death).
Repeat regressions Univariate SSV analyses:
sahot28 <- data_imaging$SAHOT28LOCF
sahot90 <- data_imaging$SAHOT90LOCF
sahot180 <- data_imaging$SAHOT180LOCF
sahot28 #2NAs
[1] 6 5 7 3 5 4 4 5 9 2 5 5 3 3 6 4 5 6 4 2 4 4 4 5 8 2 5 6 4 2 2 1 6 3 6
[36] 6 3 8 4 5 4 8 3 8 4 5 6 6 4 7 2 6 7 5 8 3 6 5 6 3 2 7 2 8 5 4 2 2 4 4
[71] 5 5 5 7 6 7 8 5 5 9 3 6 3 6 6 2 3 9 2 4 4 1 NA 4 4 8 NA
sahot90 #2NAs
[1] 5 5 9 3 6 3 3 5 9 2 5 2 1 2 5 4 6 6 4 2 3 3 2 5 9 2 5 4 6 1 2 1 7 5 5
[36] 7 2 5 4 4 4 4 3 6 4 4 4 7 3 6 4 4 2 4 8 4 6 5 3 3 2 4 1 3 2 4 2 3 3 3
[71] 5 3 5 5 2 3 5 5 2 9 2 6 3 6 6 2 3 9 1 4 4 1 NA 2 2 8 NA
sahot180 #2NAs
[1] 3 5 9 3 4 2 3 6 9 1 3 1 1 2 7 4 7 7 4 3 1 2 4 4 9 2 5 5 6 1 1 1 7 5 4
[36] 5 2 3 2 5 2 5 3 6 1 3 3 6 3 6 4 5 2 3 6 4 8 5 6 4 1 9 1 8 1 1 1 2 2 3
[71] 4 3 3 5 3 3 5 5 1 9 2 6 2 5 3 2 2 9 1 4 4 1 NA 3 1 8 NA
str(sahot28)
num [1:97] 6 5 7 3 5 4 4 5 9 2 ...
str(sahot180)
num [1:97] 3 5 9 3 4 2 3 6 9 1 ...
#Visualise the spread of SAHOT
ggplot(data = data_imaging, mapping = aes(x = sahot28))+
geom_bar()
ggplot(data = data_imaging, mapping = aes(x = sahot28, y = WFNS))+
geom_point()+
geom_smooth()+
geom_jitter(width = 0.25)
ggplot(data = data_imaging, mapping = aes(x = sahot180))+
geom_bar()
ggplot(data = data_imaging, mapping = aes(x = sahot180, y = WFNS))+
geom_point()+
geom_smooth()+
geom_jitter(width = 0.25)
#SSV_quantile the Choi et al. cut-off
# 1<=20.250781, 2>20.250781, 2<=37.098849, 3>37.098849, 3<=75.128303, 4>75.128303 (units = mls)
Univariate <- lm(sahot28 ~ data_imaging$SSV_quantiles, data = data_imaging)
summary(Univariate)
Call:
lm(formula = sahot28 ~ data_imaging$SSV_quantiles, data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-3.4167 -1.3750 0.0435 1.0435 4.0435
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.41667 0.38382 14.112 <2e-16 ***
data_imaging$SSV_quantiles2 -0.08333 0.54281 -0.154 0.8783
data_imaging$SSV_quantiles3 -1.04167 0.54281 -1.919 0.0581 .
data_imaging$SSV_quantiles4 -1.46014 0.54868 -2.661 0.0092 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.88 on 91 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.1022, Adjusted R-squared: 0.07256
F-statistic: 3.451 on 3 and 91 DF, p-value: 0.0198
exp(cbind(coef(Univariate), confint(Univariate)))
2.5 % 97.5 %
(Intercept) 225.1274456 105.03022066 482.550322
data_imaging$SSV_quantiles2 0.9200444 0.31299878 2.704425
data_imaging$SSV_quantiles3 0.3528661 0.12004492 1.037232
data_imaging$SSV_quantiles4 0.2322026 0.07807976 0.690551
Univariate <- lm(sahot180 ~ data_imaging$SSV_quantiles, data = data_imaging)
summary(Univariate)
Call:
lm(formula = sahot180 ~ data_imaging$SSV_quantiles, data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-3.4167 -1.5833 -0.4167 1.4167 4.9130
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.2917 0.4671 9.188 1.27e-14 ***
data_imaging$SSV_quantiles2 0.1250 0.6605 0.189 0.8503
data_imaging$SSV_quantiles3 -0.7083 0.6605 -1.072 0.2864
data_imaging$SSV_quantiles4 -1.2047 0.6677 -1.804 0.0745 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.288 on 91 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.05454, Adjusted R-squared: 0.02337
F-statistic: 1.75 on 3 and 91 DF, p-value: 0.1624
exp(cbind(coef(Univariate), confint(Univariate)))
2.5 % 97.5 %
(Intercept) 73.0881807 28.90133042 184.831704
data_imaging$SSV_quantiles2 1.1331485 0.30511159 4.208380
data_imaging$SSV_quantiles3 0.4924643 0.13260095 1.828954
data_imaging$SSV_quantiles4 0.2997789 0.07958156 1.129249
#The above analysis replicates shows that at the earlier timepoint low SSV predicts poor outcome using mRS and SAHOT. However, SSV does not reach significance at the 180 timepoint.
#Very similar results in comparison to when SAHOT was treated as a dichotomised variable
#Use dichotomisation from Yuan, lowest quantile defined as 'low'
Univariate <- lm(sahot28 ~ data_imaging$SSV_dich, data = data_imaging)
summary(Univariate)
Call:
lm(formula = sahot28 ~ data_imaging$SSV_dich, data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-3.5634 -1.5634 -0.4167 1.4366 4.4366
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.5634 0.2287 19.955 <2e-16 ***
data_imaging$SSV_dichlow 0.8533 0.4550 1.875 0.0639 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.927 on 93 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.03644, Adjusted R-squared: 0.02608
F-statistic: 3.517 on 1 and 93 DF, p-value: 0.06386
exp(cbind(coef(Univariate), confint(Univariate)))
2.5 % 97.5 %
(Intercept) 95.907126 60.9021773 151.031985
data_imaging$SSV_dichlow 2.347348 0.9510453 5.793673
Univariate <- glm(sahot180 ~ data_imaging$SSV_dich, data = data_imaging)
summary(Univariate)
Call:
glm(formula = sahot180 ~ data_imaging$SSV_dich, data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.7042 0.2746 13.492 <2e-16 ***
data_imaging$SSV_dichlow 0.5874 0.5462 1.075 0.285
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 5.352119)
Null deviance: 503.94 on 94 degrees of freedom
Residual deviance: 497.75 on 93 degrees of freedom
(2 observations deleted due to missingness)
AIC: 432.94
Number of Fisher Scoring iterations: 2
exp(cbind(coef(Univariate), confint(Univariate)))
Waiting for profiling to be done...
2.5 % 97.5 %
(Intercept) 40.618570 23.7148647 69.571058
data_imaging$SSV_dichlow 1.799378 0.6168156 5.249159
#At neither timepoint low SSV is significant..
#Use linear SAHOT for univarate analysis
Univariate <- glm(sahot180 ~ data_imaging$`Total manual volume`, data = data_imaging)
summary(Univariate)
Call:
glm(formula = sahot180 ~ data_imaging$`Total manual volume`,
data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.125559 0.419911 9.825 4.8e-16 ***
data_imaging$`Total manual volume` -0.001370 0.001736 -0.789 0.432
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 5.382648)
Null deviance: 503.94 on 94 degrees of freedom
Residual deviance: 500.59 on 93 degrees of freedom
(2 observations deleted due to missingness)
AIC: 433.48
Number of Fisher Scoring iterations: 2
As SAHOT as a linear 9 point scale,
Repeat regressions SAHOT at D28 and D180: 1) WFNS, TBV and SSV to predict outcome (MRS and SAHOT at day 30 and 180) 2) WFNS, TBV and ventricular volume to predict outcome
#Regression 1:
Multivariate <- lm(sahot28 ~ WFNS+Total_blood_volume+SSV_CSF, data = data_imaging)
summary(Multivariate)
Call:
lm(formula = sahot28 ~ WFNS + Total_blood_volume + SSV_CSF, data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-3.7605 -1.4983 0.1452 1.0891 3.8653
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.639999 0.492760 7.387 6.98e-11 ***
WFNS 0.488280 0.149983 3.256 0.00159 **
Total_blood_volume 0.011952 0.011313 1.056 0.29354
SSV_CSF -0.005128 0.004246 -1.208 0.23020
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.757 on 91 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.2165, Adjusted R-squared: 0.1907
F-statistic: 8.383 on 3 and 91 DF, p-value: 5.581e-05
Multivariate <- lm(sahot180 ~ WFNS+Total_blood_volume+SSV_CSF, data = data_imaging)
summary(Multivariate)
Call:
lm(formula = sahot180 ~ WFNS + Total_blood_volume + SSV_CSF,
data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-3.6592 -1.6592 -0.3611 1.5857 4.9587
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.670773 0.600849 4.445 2.47e-05 ***
WFNS 0.198001 0.182882 1.083 0.28182
Total_blood_volume 0.039548 0.013794 2.867 0.00515 **
SSV_CSF -0.004229 0.005177 -0.817 0.41611
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.142 on 91 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.1716, Adjusted R-squared: 0.1443
F-statistic: 6.285 on 3 and 91 DF, p-value: 0.0006344
#for SAHOT, WFNS is sig. D28 and TBV is significant at late timpoint
#Regression 2:
Multivariate <- lm(sahot28 ~ WFNS+Total_blood_volume+Ventricular_CSF, data = data_imaging)
summary(Multivariate)
Call:
lm(formula = sahot28 ~ WFNS + Total_blood_volume + Ventricular_CSF,
data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-3.3984 -1.3727 0.1452 1.2326 4.1794
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.906170 0.446541 6.508 4.06e-09 ***
WFNS 0.493165 0.148622 3.318 0.0013 **
Total_blood_volume 0.018098 0.011707 1.546 0.1256
Ventricular_CSF 0.005971 0.004593 1.300 0.1969
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.754 on 91 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.2185, Adjusted R-squared: 0.1927
F-statistic: 8.48 on 3 and 91 DF, p-value: 5.002e-05
Multivariate <- lm(sahot180 ~ WFNS+Total_blood_volume+Ventricular_CSF, data = data_imaging)
summary(Multivariate)
Call:
lm(formula = sahot180 ~ WFNS + Total_blood_volume + Ventricular_CSF,
data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-3.4973 -1.7656 -0.4125 1.5223 5.1628
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.2918313 0.5470922 4.189 6.47e-05 ***
WFNS 0.2250422 0.1820884 1.236 0.21968
Total_blood_volume 0.0416388 0.0143432 2.903 0.00464 **
Ventricular_CSF 0.0008862 0.0056270 0.157 0.87520
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.149 on 91 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.1658, Adjusted R-squared: 0.1383
F-statistic: 6.028 on 3 and 91 DF, p-value: 0.0008604
#No change substituiting ventricular CSF volume - WFNS is sig. D28 and TBV is significant at late timpoint
Reasoning why a variable in a univariate analysis is not significant but becomes significant in a multivariate analysis:
The case of two predictors that are truly orthogonal: there is absolutely no collinearity among them. A remarkable change in significance can still happen.
Designate the predictor variables 𝑋1 and 𝑋2 and let 𝑌 name the predictor. The regression of 𝑌 against 𝑋1 will fail to be significant when the variation in 𝑌 around its mean is not appreciably reduced when 𝑋1 is used as the independent variable. When that variation is strongly associated with a second variable 𝑋2, however, the situation changes. Recall that multiple regression of 𝑌 against 𝑋1 and 𝑋2 is equivalent to separately regress 𝑌 and 𝑋1 against 𝑋2.
Regress the 𝑌 residuals against the 𝑋1 residuals.
The residuals from the first step have removed the effect of 𝑋2. When 𝑋2 is closely correlated with 𝑌, this can expose a relatively small amount of variation that had previously been masked. If this variation is associated with 𝑋1, we obtain a significant result.
Further info from: https://stats.stackexchange.com/questions/28474/how-can-adding-a-2nd-iv-make-the-1st-iv-significant
In the analyses done WFNS and ventricular volume are not colinear, but blood volume and ventricular volume are colinear in a negative direction. WFNS and ventricular volume, therefore represent the above finding:
#Ventricular volume only
Univariate <- glm(as.factor(mRS180) ~ Ventricular_CSF, family = binomial, data = data_imaging) summary(Univariate)
#Ventricular volume is not significant on its own
#WFNS and ventricular volume
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Ventricular_CSF, family = binomial, data = data_imaging) summary(Multivariate)
##AIC: 94.269 #WFNS significant, ventricular volume is almost significant
#Blood and ventricular volume
Multivariate <- glm(as.factor(mRS180) ~ Total_blood_volume+Ventricular_CSF, family = binomial, data = data_imaging) summary(Multivariate)
##AIC: 112.16 #Total blood very significant and ventricular volume significant - probably due to collinarity
Shapley plots
Complex predictive models are not easy to interpret. By complex I mean: random forest, xgboost, deep learning, etc.
Shapley values calculate the importance of a feature by comparing what a model predicts with and without the feature. However, since the order in which a model sees features can affect its predictions, this is done in every possible order, so that the features are fairly compared.
How to interpret the shap summary plot?
The y-axis indicates the variable name, in order of importance from top to bottom. The value next to them is the mean SHAP value. On the x-axis is the SHAP value. Indicates how much is the change in log-odds. From this number we can extract the probability of success. Gradient color indicates the original value for that variable. In booleans, it will take two colors, but in number it can contain the whole spectrum. Each point represents a row from the original dataset.
install.packages("shapr") #Call in packages
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/shapr_0.2.2.tgz'
Content type 'application/x-gzip' length 1306715 bytes (1.2 MB)
==================================================
downloaded 1.2 MB
The downloaded binary packages are in
/var/folders/5q/zxkgc5yn685ffrcr6m2_f_4h0000gn/T//RtmpguTcG5/downloaded_packages
install.packages("xgboost")
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/xgboost_1.7.5.1.tgz'
Content type 'application/x-gzip' length 15036872 bytes (14.3 MB)
==================================================
downloaded 14.3 MB
The downloaded binary packages are in
/var/folders/5q/zxkgc5yn685ffrcr6m2_f_4h0000gn/T//RtmpguTcG5/downloaded_packages
install.packages("SHAPforxgboost")
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/SHAPforxgboost_0.1.3.tgz'
Content type 'application/x-gzip' length 820521 bytes (801 KB)
==================================================
downloaded 801 KB
The downloaded binary packages are in
/var/folders/5q/zxkgc5yn685ffrcr6m2_f_4h0000gn/T//RtmpguTcG5/downloaded_packages
library(shapr)
Attaching package: ‘shapr’
The following object is masked from ‘package:dplyr’:
explain
library(xgboost)
Attaching package: ‘xgboost’
The following object is masked from ‘package:dplyr’:
slice
library(SHAPforxgboost)
?shapr
#Define the response and features
colnames(data_imaging)
[1] "Patient" "Patient_number" "SITENAM"
[4] "AGE" "SEX" "BMIBL"
[7] "HTN" "ANEULOC" "ANEUMVA"
[10] "ANEUSP" "FISHGRDN" "SURGPROC"
[13] "WFNSGRDN" "WFNSGRP" "ICTDT"
[16] "ICTTM" "ICTDUR" "ICTDURGR"
[19] "Ictus_scan_date" "Ictus_scan_time" "Time_until_scan"
[22] "Time_until_scan_min" "CRPBL" "EVDFL"
[25] "Scan thickness" "Blood right" "Blood left"
[28] "Non-SSV blood" "SSV blood" "IVH"
[31] "ICH" "ICH location" "Total blood"
[34] "SEBES" "Ventricular volume" "SSV Volume"
[37] "Below SSV Volume" "ACE volume" "Total manual volume"
[40] "Dice (ACE vs Ventricular)" "DCDURD" "DCLOC"
[43] "DEATHDUR" "DEATHCEN" "DCIFL"
[46] "DCIDT" "DCIDURD" "DCICNSR"
[49] "NCIFL" "NCIDT" "NCIDURD"
[52] "NCICNSR" "VENTRICULITIS" "VENTRICULITSDATE"
[55] "INFECTION" "INFECTIONDATE" "LUMBARPUNCTURE"
[58] "BIC90" "BIC180" "BIC90LOCF"
[61] "BIC180LOCF" "CLCE90" "CLCE180"
[64] "CLCE90LOCF" "CLCE180LOCF" "GOSE28"
[67] "GOSE90" "GOSE180" "GOSE28LOCF"
[70] "GOSE28_dich" "GOSE90LOCF" "GOSE90_dich"
[73] "GOSE180LOCF" "GOSE180_dich" "MRS7"
[76] "MRSDIS" "MRS28" "MRS90"
[79] "MRS180" "MRS7LOCF" "MRS7_dich"
[82] "MRSDISLOCF" "MRSDIS_dich" "MRS28LOCF"
[85] "MRS28_dich" "MRS90LOCF" "MRS90_dich"
[88] "MRS180LOCF" "MRS180_dich" "SAHOT28"
[91] "SAHOT90" "SAHOT180" "SAHOT28LOCF"
[94] "SAHOT28_dich" "SAHOT90LOCF" "SAHOT90_dich"
[97] "SAHOT180LOCF" "SAHOT180_dich" "SAHOT28T"
[100] "SAHOT90T" "SAHOT180T" "SAHOT28TLOCF"
[103] "SAHOT90TLOCF" "SAHOT180TLOCF" "TCDD7"
[106] "TCDMAX" "LRD7" "LRMAX"
[109] "Age" "WFNS" "Total CSF"
[112] "Ventricular CSF" "SSV CSF" "SSV_quantiles"
[115] "SSV_dich" "non_SSV_non_vent_CSF"
#Prepare data
data_imaging_subset <- data_imaging[, c("AGE", "WFNSGRDN", "Total blood", "SSV Volume",
"Ventricular volume", "Total manual volume", "MRS180_dich")]
view(data_imaging_subset)
y <- "MRS180_dich"
x <- c("AGE", "WFNSGRDN", "Total blood", "SSV Volume",
"Ventricular volume", "Total manual volume")
data_imaging_subset <- na.omit(data_imaging_subset)
#Fit a manually tuned XGBoost model to the data.
dtrain <- xgb.DMatrix(data.matrix(data_imaging_subset))
dvalid <- xgb.DMatrix(data.matrix(data_imaging_subset))
params <- list(
objective = "reg:squarederror",
learning_rate = 0.05,
subsample = 0.9,
colsample_bynode = 1,
reg_lambda = 2,
max_depth = 5
)
fit_xgb <- xgb.train(
params,
data = dtrain,
watchlist = list(valid = dvalid),
early_stopping_rounds = 20,
print_every_n = 100,
nrounds = 10000 # early stopping
)
Error in xgb.iter.update(bst$handle, dtrain, iteration - 1, obj) :
[17:11:16] src/objective/regression_obj.cu:43: Check failed: info.labels.Shape(0) == info.num_row_ (0 vs. 97) : Invalid shape of labels.
Stack trace:
[bt] (0) 1 xgboost.so 0x0000000162d19c7c dmlc::LogMessageFatal::~LogMessageFatal() + 124
[bt] (1) 2 xgboost.so 0x0000000162d45388 xgboost::obj::(anonymous namespace)::CheckInitInputs(xgboost::MetaInfo const&) + 200
[bt] (2) 3 xgboost.so 0x0000000162d4515c xgboost::obj::(anonymous namespace)::CheckRegInputs(xgboost::MetaInfo const&, xgboost::HostDeviceVector<float> const&) + 28
[bt] (3) 4 xgboost.so 0x0000000162d444bc xgboost::obj::RegLossObj<xgboost::obj::LinearSquareLoss>::GetGradient(xgboost::HostDeviceVector<float> const&, xgboost::MetaInfo const&, int, xgboost::HostDeviceVector<xgboost::detail::GradientPairInternal<float> >*) + 60
[bt] (4) 5 xgboost.so 0x0000000162e6db38 xgboost::Lea
Create a comparative AUC graph for the ‘final’ model that includes WFNS, total blood volume and ventricular CSF volume in the prediction of mRS 180
#Final model
WFNS
[1] 2 1 4 2 1 1 4 1 4 2 4 4 1 4 4 1 3 5 4 1 3 4 1 1 4 2 1 1 4 1 4 1 1 1 4 4 4 4 1 1 1 1 2 2 1 1 4 3 1 2 1 4 4
[54] 4 4 1 1 1 2 1 1 5 1 3 1 5 1 1 2 2 4 1 1 2 2 4 4 1 1 4 1 2 1 1 4 2 4 3 1 1 1 1 1 2 2 5 5
Total_blood_volume
[1] 32.400000 24.400000 36.500000 15.900000 5.700000 14.900000 33.700000 9.100000 15.000000 3.118535
[11] 37.472276 31.231171 5.491420 47.479970 65.454199 10.138847 31.581787 28.955907 27.285191 7.854454
[21] 4.227739 16.020520 6.978028 20.911137 52.074488 35.622834 17.055241 26.429269 65.527850 19.142697
[31] 16.869858 20.093183 22.394635 9.199460 24.307879 60.359894 3.413555 28.965052 10.258070 33.824464
[41] 3.243393 10.483703 36.928319 33.267863 1.209736 2.395339 8.259483 39.559046 16.681489 2.761489
[51] 32.617570 57.148609 8.839489 28.012290 15.813096 7.544845 28.201294 4.276737 34.957123 50.374237
[61] 21.819479 13.643278 43.344303 46.734763 8.007995 13.296591 14.335251 17.322519 7.569529 33.880681
[71] 71.126159 13.158308 1.068114 35.640291 41.463008 43.092587 48.838911 17.413142 18.684369 74.481030
[81] 8.888236 34.620570 2.904084 1.551720 44.934654 62.929976 21.536082 47.621679 4.195765 2.302453
[91] 5.529027 13.700646 30.016398 2.734029 7.065417 33.506611 30.635859
Ventricular_CSF
[1] 9.667383 59.437809 105.747770 22.509641 35.480966 31.113891 19.334438 22.106917 23.304122
[10] 78.536379 16.788840 5.443820 73.621226 5.892354 34.984601 81.296587 33.032562 26.320942
[19] 95.262843 82.435527 84.648238 39.411129 56.888522 30.790471 39.811292 113.214270 17.519609
[28] 32.539334 9.178510 30.471520 32.554963 37.260322 17.022475 46.299016 78.131139 61.787545
[37] 34.735763 4.955197 142.881353 23.934929 9.976834 38.777920 21.644511 64.399689 43.170692
[46] 39.248139 56.379489 47.080518 17.541656 118.928929 27.726619 15.794455 163.479939 75.361008
[55] 186.955737 15.176592 45.225739 23.006334 34.633998 28.484390 13.792105 30.790568 27.719789
[64] 87.236288 47.853423 119.480964 15.397792 25.419939 201.587615 25.082665 29.335329 105.236661
[73] 142.059181 41.303871 2.399171 138.262246 39.029850 144.275070 69.029261 30.583620 61.047909
[82] 50.782190 45.247032 42.013523 15.331787 61.457247 51.225838 60.158310 81.658571 47.418994
[91] 42.604271 22.591503 25.818504 55.144547 27.030652 14.767146 9.767928
mRS180
[1] 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
[54] 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0
## mRS
mRS180 <- as.factor(recode(mRS180, "0"="Good outcome", "1" = "Bad outcome"))
contrasts(as.factor(mRS28))
1
0 0
1 1
mRS180 <- factor(mRS180, levels = c("Good outcome", "Bad outcome"))
contrasts(as.factor(mRS180))
Bad outcome
Good outcome 0
Bad outcome 1
Multivariate <- glm(mRS180 ~ WFNS+Total_blood_volume+Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = mRS180 ~ WFNS + Total_blood_volume + Ventricular_CSF,
family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.688721 1.031167 -4.547 5.44e-06 ***
WFNS 0.535981 0.241497 2.219 0.0265 *
Total_blood_volume 0.030422 0.017492 1.739 0.0820 .
Ventricular_CSF 0.012876 0.006733 1.912 0.0558 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 70.991 on 93 degrees of freedom
AIC: 78.991
Number of Fisher Scoring iterations: 5
coef(Multivariate)
(Intercept) WFNS Total_blood_volume Ventricular_CSF
-4.68872145 0.53598054 0.03042234 0.01287614
## Combined AUC
library(ROCR)
library(pROC)
plot(x = WFNS, y = mRS180)
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume+Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume +
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.688721 1.031167 -4.547 5.44e-06 ***
WFNS 0.535981 0.241497 2.219 0.0265 *
Total_blood_volume 0.030422 0.017492 1.739 0.0820 .
Ventricular_CSF 0.012876 0.006733 1.912 0.0558 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 70.991 on 93 degrees of freedom
AIC: 78.991
Number of Fisher Scoring iterations: 5
roc1 <- roc(mRS180, Multivariate$fitted.values, plot = TRUE)
Setting levels: control = Good outcome, case = Bad outcome
Setting direction: controls < cases
roc1
Call:
roc.default(response = mRS180, predictor = Multivariate$fitted.values, plot = TRUE)
Data: Multivariate$fitted.values in 81 controls (mRS180 Good outcome) < 16 cases (mRS180 Bad outcome).
Area under the curve: 0.8063
ci(roc1)
95% CI: 0.7087-0.904 (DeLong)
par(pty = "s")
roc(mRS180, Multivariate$fitted.values, plot = TRUE, legacy.axes = TRUE, percent = TRUE,
xlab= "False Positive Percentage", ylab = "True Positive Percentage", col = "black", lwd = 2, print.auc = 60)
Setting levels: control = Good outcome, case = Bad outcome
Setting direction: controls < cases
Call:
roc.default(response = mRS180, predictor = Multivariate$fitted.values, percent = TRUE, plot = TRUE, legacy.axes = TRUE, xlab = "False Positive Percentage", ylab = "True Positive Percentage", col = "black", lwd = 2, print.auc = 60)
Data: Multivariate$fitted.values in 81 controls (mRS180 Good outcome) < 16 cases (mRS180 Bad outcome).
Area under the curve: 80.63%
legend("bottomright", legend = c("mRS day 180"), col = c("black"), lwd = 4)
ci(roc1)
95% CI: 0.7087-0.904 (DeLong)
# Overlap AUC
Multivariate <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume+Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood_volume +
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.688721 1.031167 -4.547 5.44e-06 ***
WFNS 0.535981 0.241497 2.219 0.0265 *
Total_blood_volume 0.030422 0.017492 1.739 0.0820 .
Ventricular_CSF 0.012876 0.006733 1.912 0.0558 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 70.991 on 93 degrees of freedom
AIC: 78.991
Number of Fisher Scoring iterations: 5
roc(mRS180, Multivariate$fitted.values, plot = TRUE, legacy.axes = TRUE, percent = TRUE,
xlab= "False Positive Percentage", ylab = "True Positive Percentage", col = "black", lwd = 2, print.auc = 60)
Setting levels: control = Good outcome, case = Bad outcome
Setting direction: controls < cases
Call:
roc.default(response = mRS180, predictor = Multivariate$fitted.values, percent = TRUE, plot = TRUE, legacy.axes = TRUE, xlab = "False Positive Percentage", ylab = "True Positive Percentage", col = "black", lwd = 2, print.auc = 60)
Data: Multivariate$fitted.values in 81 controls (mRS180 Good outcome) < 16 cases (mRS180 Bad outcome).
Area under the curve: 80.63%
par(pty = "s")
Multivariate2 <- glm(as.factor(mRS180) ~ WFNS+Total_blood_volume, family = binomial, data = data_imaging)
Multivariate3 <- glm(as.factor(mRS180) ~ WFNS+SSV_CSF, family = binomial, data = data_imaging)
Multivariate4 <- glm(as.factor(mRS180) ~ WFNS+Ventricular_CSF, family = binomial, data = data_imaging)
Multivariate5 <- glm(as.factor(mRS180) ~ WFNS+Total_CSF, family = binomial, data = data_imaging)
roc(mRS180, Multivariate$fitted.values, plot = TRUE, legacy.axes = TRUE, percent = TRUE,
xlab= "False Positive Percentage", ylab = "True Positive Percentage", col = "orange", lwd = 1, print.auc = TRUE, print.auc.y = 70, print.auc.x = 40)
Setting levels: control = Good outcome, case = Bad outcome
Setting direction: controls < cases
Call:
roc.default(response = mRS180, predictor = Multivariate$fitted.values, percent = TRUE, plot = TRUE, legacy.axes = TRUE, xlab = "False Positive Percentage", ylab = "True Positive Percentage", col = "orange", lwd = 1, print.auc = TRUE, print.auc.y = 70, print.auc.x = 40)
Data: Multivariate$fitted.values in 81 controls (mRS180 Good outcome) < 16 cases (mRS180 Bad outcome).
Area under the curve: 80.63%
plot.roc(mRS180, Multivariate2$fitted.values, percent = TRUE, col = "red", lwd = 1, add = TRUE, print.auc = TRUE, print.auc.y = 90, print.auc.x = 40)
Setting levels: control = Good outcome, case = Bad outcome
Setting direction: controls < cases
plot.roc(mRS180, Multivariate3$fitted.values, percent = TRUE, col = "blue", lwd = 1, add = TRUE, print.auc = TRUE, print.auc.y = 60, print.auc.x = 40)
Setting levels: control = Good outcome, case = Bad outcome
Setting direction: controls < cases
plot.roc(mRS180, Multivariate4$fitted.values, percent = TRUE, col = "black", lwd = 1, add = TRUE, print.auc = TRUE, print.auc.y = 80, print.auc.x = 40)
Setting levels: control = Good outcome, case = Bad outcome
Setting direction: controls < cases
plot.roc(mRS180, Multivariate5$fitted.values, percent = TRUE, col = "forestgreen", lwd = 1, add = TRUE, print.auc = TRUE, print.auc.y = 80, print.auc.x = 40)
Setting levels: control = Good outcome, case = Bad outcome
Setting direction: controls < cases
legend("bottomright", title = "modified Rankin Scale",
legend = c("WFNS+Blood", "WFNS+VentricularCSF", "Final model", "WFNS+SSV_CSF", "WFNS+TotalCSF"), col = c("red", "black", "orange", "blue", "forestgreen"),
lwd = 2, "Legend", cex=0.8)
Stepwise regresssional analysis for the development of the multivariate model.
Variables: age, WFNS, TBV, SSV, Ventricular CSF, total CSF
#Packages
library(tidyverse)
library(caret)
Loading required package: lattice
Attaching package: ‘caret’
The following object is masked from ‘package:purrr’:
lift
library(leaps)
library(MASS)
Attaching package: ‘MASS’
The following object is masked from ‘package:dplyr’:
select
The following object is masked from ‘package:gtsummary’:
select
#Fit full model
full.model <- glm(mRS180 ~ age+WFNS+Total_blood+SSV_CSF+Ventricular_CSF, family = binomial, data = data_imaging)
summary(full.model)
Call:
glm(formula = mRS180 ~ age + WFNS + Total_blood + SSV_CSF + Ventricular_CSF,
family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.635387 1.838266 -1.978 0.0480 *
age -0.010590 0.033785 -0.313 0.7539
WFNS 0.433561 0.256723 1.689 0.0913 .
Total_blood 0.031913 0.017975 1.775 0.0758 .
SSV_CSF -0.010740 0.009192 -1.168 0.2427
Ventricular_CSF 0.018222 0.008605 2.117 0.0342 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 69.118 on 91 degrees of freedom
AIC: 81.118
Number of Fisher Scoring iterations: 5
#Stepwise model
step.model <- stepAIC(full.model, direction = "both", trace = FALSE)
summary(step.model)
Call:
glm(formula = mRS180 ~ WFNS + Total_blood + Ventricular_CSF,
family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.688721 1.031167 -4.547 5.44e-06 ***
WFNS 0.535981 0.241497 2.219 0.0265 *
Total_blood 0.030422 0.017492 1.739 0.0820 .
Ventricular_CSF 0.012876 0.006733 1.912 0.0558 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 70.991 on 93 degrees of freedom
AIC: 78.991
Number of Fisher Scoring iterations: 5
SAHOT revisited
It also makes me think we want to look more closely how the continuous SAHOT alters our results. If I recall correctly you have used the ordinal scores 0-9 as a continuous variable for the one set of analyses you have done. If we were to be methodologically robust then we should use the raw SAHOT scores (0-112 I think and available in the main spreadsheet that you have). We have previously shown this is a linear variable. Can you redo the SAHOT 180 column excluding deaths and using the 0-112 raw score? We can then look at how this differs. You will need to exclude patients who died as these do not have a raw SAHOT. How many deaths are there in your analysis? Also for those that survived can you do a correlation between the raw and ordinal SAHOT. If the r is high (over 0.9) then you can argue the 0-9 scale is equally linear and perhaps justify using that including death.
#Identiy number of deaths by looking at mRS180
ggplot(data = data_imaging, mapping = aes(x = data_imaging$MRS180LOCF, fill = mRS180)) +
geom_bar()
xtabs(~data_imaging$MRS180LOCF)
data_imaging$MRS180LOCF
0 1 2 3 4 5 6
13 32 25 11 8 2 6
# 6 people died (6.2%)
# Correlation between raw and ordinal SAHOT
sahotraw28 <- data_imaging$SAHOT28TLOCF
sahotraw90 <- data_imaging$SAHOT90TLOCF
sahotraw180 <- data_imaging$SAHOT180TLOCF
ggplot(data = data_imaging, mapping = aes(x = sahotraw28, y = sahot28)) +
geom_point()+
geom_smooth()
ggplot(data = data_imaging, mapping = aes(x = sahotraw90, y = sahot90)) +
geom_point()+
geom_smooth()
ggplot(data = data_imaging, mapping = aes(x = sahotraw180, y = sahot180)) +
geom_point()+
geom_smooth()
library("ggpubr")
ggscatter(data_imaging, x = "SAHOT28TLOCF", y = "SAHOT28LOCF",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "SAHOT Day 28 Raw", ylab = "SAHOT Day 28 Ordinal")
ggscatter(data_imaging, x = "SAHOT90TLOCF", y = "SAHOT90LOCF",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "SAHOT Day 90 Raw", ylab = "SAHOT Day 90 Ordinal")
ggscatter(data_imaging, x = "SAHOT180TLOCF", y = "SAHOT180LOCF",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "SAHOT Day 180 Raw", ylab = "SAHOT Day 180 Ordinal")
# At all timepoints comparisons between SAHOT raw with SAHOT ordinal lead to a R>0.9, and therefore justify use of ordinal scale.
# Repeat Univariate SAHOT 180 with raw scores
Univariate <- lm(sahotraw180 ~ relevel(SSV_quantiles, ref = "4"), family = binomial, data = data_imaging)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(Univariate)
Call:
lm(formula = sahotraw180 ~ relevel(SSV_quantiles, ref = "4"),
data = data_imaging, family = binomial)
Residuals:
Min 1Q Median 3Q Max
-39.522 -18.318 -5.318 15.682 72.682
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 23.870 5.291 4.511 1.98e-05 ***
relevel(SSV_quantiles, ref = "4")1 10.449 7.568 1.381 0.1709
relevel(SSV_quantiles, ref = "4")2 16.652 7.483 2.225 0.0286 *
relevel(SSV_quantiles, ref = "4")3 9.047 7.405 1.222 0.2250
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 25.38 on 88 degrees of freedom
(5 observations deleted due to missingness)
Multiple R-squared: 0.05433, Adjusted R-squared: 0.0221
F-statistic: 1.685 on 3 and 88 DF, p-value: 0.176
exp(cbind(coef(Univariate), confint(Univariate)))
2.5 % 97.5 %
(Intercept) 2.324987e+10 6.303927e+05 8.574913e+14
relevel(SSV_quantiles, ref = "4")1 3.449662e+04 1.014738e-02 1.172733e+11
relevel(SSV_quantiles, ref = "4")2 1.705875e+07 5.936133e+00 4.902198e+13
relevel(SSV_quantiles, ref = "4")3 8.493882e+03 3.453760e-03 2.088913e+10
The correlation between raw and ordinal is clearly tight and we can easily defend using the ordinal 0-9 scale as a continuous variable if we choose
Equally the number of deaths is not that high so it would also be completely defensible to use the raw 0-112 as a continuous variable
The choice between which is really on whether we want to present the whole cohort and include death or use SAHOT for what it was designed which is complimentary to mRS and look at mechanisms of outcome but not death.
Can you go ahead and do the automated multivariable regression using the ordinal SAHOT 180 as a continuous and then again using the raw SAHOT 180. Can you also run fig 7a and 7b for both of those assuming the implementation is not significantly complicated by having a continuous variable (shouldn’t be as even if the function requires a categorical variable you can use some autobinning feature to create three bins to have a categorical variable).
To do: 1. Repeat the multivariate regressions (stepwise) for SAHOT
180 (9 points)
2. Repeat the multivariate regressions (stepwise) for SAHOT 180 (112
points) 3. Repeat 3 way interaction between age, TBV, SSV CSF; and age,
TBV, ventricular CSF for SAHOT 180 (9 points) 4. Repeat 3 way
interaction between age, TBV, SSV CSF; and age, TBV, ventricular CSF for
SAHOT 180 (112) point)
# 1. Repeat the multivariate regressions (stepwise) for SAHOT 180 (9 points)
#Packages
library(tidyverse)
library(caret)
library(leaps)
library(MASS)
#Fit full model
full.model <- lm(sahot180 ~ age+WFNS+Total_blood+SSV_CSF+Ventricular_CSF, family = binomial, data = data_imaging)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(full.model)
Call:
lm(formula = sahot180 ~ age + WFNS + Total_blood + SSV_CSF +
Ventricular_CSF, data = data_imaging, family = binomial)
Residuals:
Min 1Q Median 3Q Max
-3.9757 -1.6646 -0.3036 1.5264 4.9151
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.845302 1.167834 3.293 0.00142 **
age -0.027295 0.021405 -1.275 0.20556
WFNS 0.168754 0.191039 0.883 0.37943
Total_blood 0.044703 0.014486 3.086 0.00270 **
SSV_CSF -0.005399 0.005780 -0.934 0.35279
Ventricular_CSF 0.006793 0.006730 1.009 0.31556
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.142 on 89 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.1895, Adjusted R-squared: 0.144
F-statistic: 4.162 on 5 and 89 DF, p-value: 0.001916
#Stepwise model
step.model <- stepAIC(full.model, direction = "both", trace = FALSE)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregardedWarning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregardedWarning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregardedWarning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(step.model)
Call:
lm(formula = sahot180 ~ Total_blood, data = data_imaging, family = binomial)
Residuals:
Min 1Q Median 3Q Max
-3.8050 -1.7222 -0.3198 1.4260 5.6564
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.67233 0.36475 7.327 8.43e-11 ***
Total_blood 0.04920 0.01212 4.058 0.000103 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.146 on 93 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.1505, Adjusted R-squared: 0.1413
F-statistic: 16.47 on 1 and 93 DF, p-value: 0.0001028
#Prediction of SAHOT 180 (9 points) is completely dominated by Total blood volume, stepwise regression only contains TBV
# 2. Repeat the multivariate regressions (stepwise) for SAHOT 180 (112 points)
#Fit full model
full.model.raw <- lm(sahotraw180 ~ age+WFNS+Total_blood+SSV_CSF+Ventricular_CSF, family = binomial, data = data_imaging)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(full.model.raw)
Call:
lm(formula = sahotraw180 ~ age + WFNS + Total_blood + SSV_CSF +
Ventricular_CSF, data = data_imaging, family = binomial)
Residuals:
Min 1Q Median 3Q Max
-47.303 -19.052 -3.921 17.557 62.130
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 42.00583 13.69676 3.067 0.00289 **
age -0.42194 0.24960 -1.690 0.09457 .
WFNS 0.65311 2.20538 0.296 0.76783
Total_blood 0.49065 0.17267 2.842 0.00560 **
SSV_CSF -0.05083 0.06598 -0.770 0.44313
Ventricular_CSF 0.08213 0.07681 1.069 0.28793
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 24.33 on 86 degrees of freedom
(5 observations deleted due to missingness)
Multiple R-squared: 0.1503, Adjusted R-squared: 0.1009
F-statistic: 3.042 on 5 and 86 DF, p-value: 0.01414
#Stepwise model
step.model.raw <- stepAIC(full.model.raw, direction = "both", trace = FALSE)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregardedWarning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregardedWarning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(step.model.raw)
Call:
lm(formula = sahotraw180 ~ age + Total_blood, data = data_imaging,
family = binomial)
Residuals:
Min 1Q Median 3Q Max
-47.286 -18.191 -4.932 17.667 64.548
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 39.4790 13.1195 3.009 0.003407 **
age -0.3252 0.2247 -1.447 0.151421
Total_blood 0.4963 0.1443 3.440 0.000887 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 24.16 on 89 degrees of freedom
(5 observations deleted due to missingness)
Multiple R-squared: 0.1327, Adjusted R-squared: 0.1133
F-statistic: 6.811 on 2 and 89 DF, p-value: 0.001769
#Prediction of SAHOT 180 (112 points) is similarly dominated by total blood volume, the stepwise model incldues age and TBV
#For reference repat multivatiate regressions (stepwise) for sahot 180 dichotomised
#Fit full model
full.model.dich <- glm(SAHOT180_dich ~ age+WFNS+Total_blood+SSV_CSF+Ventricular_CSF, family = binomial, data = data_imaging)
summary(full.model.dich)
Call:
glm(formula = SAHOT180_dich ~ age + WFNS + Total_blood + SSV_CSF +
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.000242 1.213406 0.824 0.4098
age -0.046535 0.023506 -1.980 0.0477 *
WFNS -0.039355 0.201317 -0.195 0.8450
Total_blood 0.039540 0.015419 2.564 0.0103 *
SSV_CSF -0.010079 0.006920 -1.456 0.1453
Ventricular_CSF 0.010047 0.007181 1.399 0.1617
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 107.65 on 89 degrees of freedom
(2 observations deleted due to missingness)
AIC: 119.65
Number of Fisher Scoring iterations: 4
#Stepwise model
step.model.dich <- stepAIC(full.model.dich, direction = "both", trace = FALSE)
summary(step.model.dich)
Call:
glm(formula = SAHOT180_dich ~ age + Total_blood, family = binomial,
data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.53434 1.13603 0.470 0.63810
age -0.03842 0.02072 -1.854 0.06369 .
Total_blood 0.03736 0.01299 2.877 0.00401 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 111.06 on 92 degrees of freedom
(2 observations deleted due to missingness)
AIC: 117.06
Number of Fisher Scoring iterations: 4
#Dichotomised SAHOT 180 offers the most neutral results with age almost being significant along with TBV in the prediction of outome.
#Comparison of models:
summary(step.model)
Call:
lm(formula = sahot180 ~ Total_blood, data = data_imaging, family = binomial)
Residuals:
Min 1Q Median 3Q Max
-3.8050 -1.7222 -0.3198 1.4260 5.6564
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.67233 0.36475 7.327 8.43e-11 ***
Total_blood 0.04920 0.01212 4.058 0.000103 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.146 on 93 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.1505, Adjusted R-squared: 0.1413
F-statistic: 16.47 on 1 and 93 DF, p-value: 0.0001028
summary(step.model.raw)
Call:
lm(formula = sahotraw180 ~ age + Total_blood, data = data_imaging,
family = binomial)
Residuals:
Min 1Q Median 3Q Max
-47.286 -18.191 -4.932 17.667 64.548
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 39.4790 13.1195 3.009 0.003407 **
age -0.3252 0.2247 -1.447 0.151421
Total_blood 0.4963 0.1443 3.440 0.000887 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 24.16 on 89 degrees of freedom
(5 observations deleted due to missingness)
Multiple R-squared: 0.1327, Adjusted R-squared: 0.1133
F-statistic: 6.811 on 2 and 89 DF, p-value: 0.001769
summary(step.model.dich)
Call:
glm(formula = SAHOT180_dich ~ age + Total_blood, family = binomial,
data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.53434 1.13603 0.470 0.63810
age -0.03842 0.02072 -1.854 0.06369 .
Total_blood 0.03736 0.01299 2.877 0.00401 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 111.06 on 92 degrees of freedom
(2 observations deleted due to missingness)
AIC: 117.06
Number of Fisher Scoring iterations: 4
# 3. Repeat 3 way interaction between age, TBV, SSV CSF; and age, TBV, ventricular CSF for SAHOT 180 (9 points)
full.model <- lm(sahot180 ~ age * Total_blood *SSV_CSF, family = binomial, data = data_imaging)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(full.model)
Call:
lm(formula = sahot180 ~ age * Total_blood * SSV_CSF, data = data_imaging,
family = binomial)
Residuals:
Min 1Q Median 3Q Max
-3.3111 -1.5730 -0.3303 1.4080 5.3742
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.826e+00 2.963e+00 1.966 0.0525 .
age -5.339e-02 5.335e-02 -1.001 0.3197
Total_blood -8.867e-02 1.083e-01 -0.819 0.4150
SSV_CSF -1.625e-02 5.220e-02 -0.311 0.7562
age:Total_blood 2.518e-03 1.909e-03 1.319 0.1905
age:SSV_CSF 2.471e-04 9.053e-04 0.273 0.7855
Total_blood:SSV_CSF 1.174e-03 1.964e-03 0.598 0.5515
age:Total_blood:SSV_CSF -2.306e-05 3.388e-05 -0.681 0.4979
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.163 on 87 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.1919, Adjusted R-squared: 0.1269
F-statistic: 2.952 on 7 and 87 DF, p-value: 0.007999
coef(full.model)
(Intercept) age Total_blood SSV_CSF
5.826484e+00 -5.339302e-02 -8.867406e-02 -1.625340e-02
age:Total_blood age:SSV_CSF Total_blood:SSV_CSF age:Total_blood:SSV_CSF
2.518276e-03 2.471139e-04 1.174279e-03 -2.306314e-05
#Plots
library(sjPlot)
Learn more about sjPlot with 'browseVignettes("sjPlot")'.
library(sjmisc)
library(ggplot2)
theme_set(theme_sjplot())
interaction_model <- plot_model(full.model, type = "pred",
axis.title = c("SSV CSF Volume (mls)", "Probability of poor outcome (%)"), title = "", terms = c("SSV_CSF", "Total_blood", "age [40,60,80]"))
interaction_model + xlim(0,100) + ylim(0,100)
Scale for y is already present.
Adding another scale for y, which will replace the existing scale.
#For me to create these plot SAHOT must be dichotomised into good/bad outcome so that I can calculate the proability of poor outcome
#Repeat using sahot dich for illustration purposes
full.model.dich <- glm(SAHOT180_dich ~ age * Total_blood *SSV_CSF, family = binomial, data = data_imaging)
summary(full.model.dich)
Call:
glm(formula = SAHOT180_dich ~ age * Total_blood * SSV_CSF, family = binomial,
data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.285e+00 3.340e+00 0.385 0.701
age -4.464e-02 6.441e-02 -0.693 0.488
Total_blood -1.194e-01 1.296e-01 -0.921 0.357
SSV_CSF -6.684e-03 6.522e-02 -0.102 0.918
age:Total_blood 2.949e-03 2.467e-03 1.196 0.232
age:SSV_CSF 1.847e-05 1.227e-03 0.015 0.988
Total_blood:SSV_CSF 2.518e-03 2.713e-03 0.928 0.353
age:Total_blood:SSV_CSF -5.083e-05 5.167e-05 -0.984 0.325
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.7 on 94 degrees of freedom
Residual deviance: 104.3 on 87 degrees of freedom
(2 observations deleted due to missingness)
AIC: 120.3
Number of Fisher Scoring iterations: 5
coef(full.model.dich)
(Intercept) age Total_blood SSV_CSF
1.284715e+00 -4.463863e-02 -1.193513e-01 -6.684046e-03
age:Total_blood age:SSV_CSF Total_blood:SSV_CSF age:Total_blood:SSV_CSF
2.949120e-03 1.846719e-05 2.517662e-03 -5.083267e-05
interaction_model <- plot_model(full.model.dich, type = "pred",
axis.title = c("SSV CSF Volume (mls)", "Probability of poor outcome (%)"), title = "", terms = c("SSV_CSF", "Total_blood", "age [40,60,80]"))
Data were 'prettified'. Consider using `terms="SSV_CSF [all]"` to get smooth plots.
interaction_model + xlim(0,100)
#Repeat with age, TBV, ventricular CSF
full.model.dich <- glm(SAHOT180_dich ~ age * Total_blood * Ventricular_CSF, family = binomial, data = data_imaging)
summary(full.model.dich)
Call:
glm(formula = SAHOT180_dich ~ age * Total_blood * Ventricular_CSF,
family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.690e+00 3.343e+00 1.104 0.2697
age -9.937e-02 5.938e-02 -1.673 0.0942 .
Total_blood -1.358e-01 1.242e-01 -1.093 0.2744
Ventricular_CSF -4.602e-02 6.946e-02 -0.663 0.5076
age:Total_blood 2.995e-03 2.110e-03 1.420 0.1557
age:Ventricular_CSF 8.381e-04 1.095e-03 0.766 0.4438
Total_blood:Ventricular_CSF 3.284e-03 2.797e-03 1.174 0.2404
age:Total_blood:Ventricular_CSF -5.319e-05 4.439e-05 -1.198 0.2308
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 107.93 on 87 degrees of freedom
(2 observations deleted due to missingness)
AIC: 123.93
Number of Fisher Scoring iterations: 4
coef(full.model.dich)
(Intercept) age Total_blood
3.690368e+00 -9.937085e-02 -1.357895e-01
Ventricular_CSF age:Total_blood age:Ventricular_CSF
-4.601945e-02 2.995029e-03 8.380874e-04
Total_blood:Ventricular_CSF age:Total_blood:Ventricular_CSF
3.283840e-03 -5.319132e-05
interaction_model <- plot_model(full.model.dich, type = "pred",
axis.title = c("Ventricular CSF Volume (mls)", "Probability of poor outcome (%)"), title = "", terms = c("Ventricular_CSF", "Total_blood", "age [40,60,80]"))
Data were 'prettified'. Consider using `terms="Ventricular_CSF [all]"` to get smooth plots.
interaction_model + xlim(0,100)
Deciding which univariable data to present therefore should be simply on the table of all the univariable outputs. Could you send that through again? Ideally it would have the three SAHOT columns (30,90,180) for dichotomised and then again for ordinal.
I cant recall if we ever looked at mRS as an ordinal variable. If not can you run the three columns for that as an ordinal as well and add to the table. Can you also run the multivariable stepwise model with mRS.
If you can get me that table of univariates and the one multivariable mRS ordinal model I think I can decide how to proceed - it is likely to be with the last version of the paper I saw just adapting the discussion.
To do:
# 1. Add SAHOT 30. 90, 180 dichotomised and ordinal to univariate table
#Dichotomose already present in the supplement so just the 9 point ordinal
Univariate <- lm(sahot90 ~ relevel(SSV_quantiles, ref = "4"), data = data_imaging)
summary(Univariate)
Call:
lm(formula = sahot90 ~ relevel(SSV_quantiles, ref = "4"), data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-3.7917 -1.3822 -0.3478 1.2083 4.5833
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.3478 0.4101 8.164 1.75e-12 ***
relevel(SSV_quantiles, ref = "4")1 1.0688 0.5739 1.863 0.0658 .
relevel(SSV_quantiles, ref = "4")2 1.4438 0.5739 2.516 0.0136 *
relevel(SSV_quantiles, ref = "4")3 0.3605 0.5739 0.628 0.5314
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.967 on 91 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.07979, Adjusted R-squared: 0.04945
F-statistic: 2.63 on 3 and 91 DF, p-value: 0.05486
exp(cbind(coef(Univariate), confint(Univariate)))
2.5 % 97.5 %
(Intercept) 28.440838 12.5944504 64.225216
relevel(SSV_quantiles, ref = "4")1 2.912001 0.9313946 9.104359
relevel(SSV_quantiles, ref = "4")2 4.236937 1.3551712 13.246765
relevel(SSV_quantiles, ref = "4")3 1.434057 0.4586786 4.483572
Univariate <- lm(sahot90 ~ data_imaging$`Total manual volume`, data = data_imaging)
summary(Univariate)
Call:
lm(formula = sahot90 ~ data_imaging$`Total manual volume`, data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-3.1382 -1.5129 -0.2277 0.9615 5.0054
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.347430 0.365428 11.897 <2e-16 ***
data_imaging$`Total manual volume` -0.001374 0.001511 -0.909 0.366
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.019 on 93 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.008813, Adjusted R-squared: -0.001845
F-statistic: 0.8269 on 1 and 93 DF, p-value: 0.3655
exp(cbind(coef(Univariate), confint(Univariate)))
2.5 % 97.5 %
(Intercept) 77.2795989 37.4034238 159.668174
data_imaging$`Total manual volume` 0.9986273 0.9956361 1.001627
# 2. mRS 30, 90, 180 as ordinal variable - this has been done previously but quite a while ago so I will repeat it
mRS28_or <- data_imaging$MRS28LOCF
mRS90_or <- data_imaging$MRS90LOCF
mRS180_or <- data_imaging$MRS180LOCF
Univariate <- lm(mRS180_or ~ data_imaging$`Total manual volume`, data = data_imaging)
summary(Univariate)
Call:
lm(formula = mRS180_or ~ data_imaging$`Total manual volume`,
data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-2.0368 -1.0231 -0.0311 0.9616 4.0287
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.0531137 0.2871644 7.150 1.78e-10 ***
data_imaging$`Total manual volume` -0.0003183 0.0011911 -0.267 0.79
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.592 on 95 degrees of freedom
Multiple R-squared: 0.0007511, Adjusted R-squared: -0.009767
F-statistic: 0.07141 on 1 and 95 DF, p-value: 0.7899
exp(cbind(coef(Univariate), confint(Univariate)))
2.5 % 97.5 %
(Intercept) 7.7921255 4.4062337 13.779846
data_imaging$`Total manual volume` 0.9996818 0.9973207 1.002048
Univariate <- lm(mRS180_or ~ relevel(SSV_quantiles, ref = "4"), data = data_imaging)
summary(Univariate)
Call:
lm(formula = mRS180_or ~ relevel(SSV_quantiles, ref = "4"), data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-2.4167 -1.1667 -0.4167 0.5833 3.8333
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.5600 0.3150 4.953 3.26e-06 ***
relevel(SSV_quantiles, ref = "4")1 0.8567 0.4501 1.903 0.0601 .
relevel(SSV_quantiles, ref = "4")2 0.6067 0.4501 1.348 0.1809
relevel(SSV_quantiles, ref = "4")3 0.2733 0.4501 0.607 0.5451
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.575 on 93 degrees of freedom
Multiple R-squared: 0.04286, Adjusted R-squared: 0.01199
F-statistic: 1.388 on 3 and 93 DF, p-value: 0.2513
exp(cbind(coef(Univariate), confint(Univariate)))
2.5 % 97.5 %
(Intercept) 4.758821 2.5460016 8.894880
relevel(SSV_quantiles, ref = "4")1 2.355297 0.9636217 5.756846
relevel(SSV_quantiles, ref = "4")2 1.834307 0.7504694 4.483436
relevel(SSV_quantiles, ref = "4")3 1.314338 0.5377348 3.212522
# 3. Stepwise multivariate mRS 180 ordinal
#Packages
library(tidyverse)
library(caret)
library(leaps)
library(MASS)
#Fit full model
full.model <- lm(mRS180_or ~ age+WFNS+Total_blood+ SSV_CSF +Ventricular_CSF, family = binomial, data = data_imaging)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(full.model)
Call:
lm(formula = mRS180_or ~ age + WFNS + Total_blood + SSV_CSF +
Ventricular_CSF, data = data_imaging, family = binomial)
Residuals:
Min 1Q Median 3Q Max
-2.6668 -1.0187 -0.1687 0.9198 3.3052
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.050689 0.769097 1.366 0.17526
age -0.007249 0.014127 -0.513 0.60908
WFNS 0.371734 0.120749 3.079 0.00275 **
Total_blood 0.015682 0.009493 1.652 0.10198
SSV_CSF -0.004694 0.003689 -1.272 0.20651
Ventricular_CSF 0.006996 0.004341 1.611 0.11055
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.414 on 91 degrees of freedom
Multiple R-squared: 0.245, Adjusted R-squared: 0.2035
F-statistic: 5.907 on 5 and 91 DF, p-value: 8.977e-05
#Stepwise model
step.model <- stepAIC(full.model, direction = "both", trace = FALSE)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregardedWarning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregardedWarning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregardedWarning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(step.model)
Call:
lm(formula = mRS180_or ~ WFNS, data = data_imaging, family = binomial)
Residuals:
Min 1Q Median 3Q Max
-2.8434 -0.8434 -0.3286 0.6714 3.6615
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.8237 0.2770 2.974 0.00372 **
WFNS 0.5049 0.1024 4.932 3.45e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.421 on 95 degrees of freedom
Multiple R-squared: 0.2039, Adjusted R-squared: 0.1955
F-statistic: 24.33 on 1 and 95 DF, p-value: 3.449e-06
#model dominated by WFNS, in a similar way that SAHOT is dominated by blood volume
#Compare with mRS dichotomised
#Fit full model
full.model <- glm(mRS180 ~ age+WFNS+Total_blood+Ventricular_CSF, family = binomial, data = data_imaging)
summary(full.model)
Call:
glm(formula = mRS180 ~ age + WFNS + Total_blood + Ventricular_CSF,
family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.961042 1.788662 -2.215 0.0268 *
age -0.015856 0.032796 -0.483 0.6288
WFNS 0.544637 0.242249 2.248 0.0246 *
Total_blood 0.031760 0.017658 1.799 0.0721 .
Ventricular_CSF 0.014719 0.007791 1.889 0.0589 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 70.758 on 92 degrees of freedom
AIC: 80.758
Number of Fisher Scoring iterations: 5
#Stepwise model
step.model <- stepAIC(full.model, direction = "both", trace = FALSE)
summary(step.model)
Call:
glm(formula = mRS180 ~ WFNS + Total_blood + Ventricular_CSF,
family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.688721 1.031167 -4.547 5.44e-06 ***
WFNS 0.535981 0.241497 2.219 0.0265 *
Total_blood 0.030422 0.017492 1.739 0.0820 .
Ventricular_CSF 0.012876 0.006733 1.912 0.0558 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 70.991 on 93 degrees of freedom
AIC: 78.991
Number of Fisher Scoring iterations: 5
5/8/23
I would run the mRS as an ordinal with all the categories preserved which is what is done in most RCTs these days (SCIL study for example). The key regression is the multivariable mRS ordinal regressions that would be the one to fit in with the rest of the story of the paper. I think it would also be worth doing the multivariable ordinal regression with all the imaging predictors logged (blood vol, SSV and centric volume) as they do all have a long tail and statisticians have always advised me that there is no downside to logging values prior to analysis (other than clinicians finding it harder to interpret the numbers).
To do: 1. Univariate ordinal regression with mRS 180 of imaging variables 2. Multivariate ordinal regression with mRS180
I am not sure how best to address the above. The multivariate regression we present has 5 predictors - age+WFNS+Total_blood+ SSV_CSF + Ventricular_CSF. Also, the mRS had 6 levels. As mRS is the outcome in the scenario I am not sure how you would fit a regression and separate it into its 6 part scale. If there were fewer predictors and for the univariates, you can flip the model.
An option for the multivariate is an ordered regression. However, it is tricky as over a 6 point scale, interpretation will be difficult. Ideally you do not want more than three levels. See: https://stats.oarc.ucla.edu/r/dae/ordinal-logistic-regression/
Therefore, I have decided to flip the model for the univariates and present the multivariate model as a three part ordered regression - 0+1 - no significant disability, 2+3 - moderate disability 4+6 - severe disability or death
library(tidyverse)
library(gtsummary)
library(survival) #Packages load
Attaching package: ‘survival’
The following object is masked from ‘package:caret’:
cluster
# Flip model and run univariate ordinal regression
mRS180_or <- data_imaging$MRS180LOCF
mRS180_or <- as.factor(mRS180_or) #convert to ordinal outcome
summary(mRS180_or)
0 1 2 3 4 5 6
13 32 25 11 8 2 6
class(mRS180_or)
[1] "factor"
colnames(data_imaging)
[1] "Patient" "Patient_number" "SITENAM"
[4] "AGE" "SEX" "BMIBL"
[7] "HTN" "ANEULOC" "ANEUMVA"
[10] "ANEUSP" "FISHGRDN" "SURGPROC"
[13] "WFNSGRDN" "WFNSGRP" "ICTDT"
[16] "ICTTM" "ICTDUR" "ICTDURGR"
[19] "Ictus_scan_date" "Ictus_scan_time" "Time_until_scan"
[22] "Time_until_scan_min" "CRPBL" "EVDFL"
[25] "Scan thickness" "Blood right" "Blood left"
[28] "Non-SSV blood" "SSV blood" "IVH"
[31] "ICH" "ICH location" "Total blood"
[34] "SEBES" "Ventricular volume" "SSV Volume"
[37] "Below SSV Volume" "ACE volume" "Total manual volume"
[40] "Dice (ACE vs Ventricular)" "DCDURD" "DCLOC"
[43] "DEATHDUR" "DEATHCEN" "DCIFL"
[46] "DCIDT" "DCIDURD" "DCICNSR"
[49] "NCIFL" "NCIDT" "NCIDURD"
[52] "NCICNSR" "VENTRICULITIS" "VENTRICULITSDATE"
[55] "INFECTION" "INFECTIONDATE" "LUMBARPUNCTURE"
[58] "BIC90" "BIC180" "BIC90LOCF"
[61] "BIC180LOCF" "CLCE90" "CLCE180"
[64] "CLCE90LOCF" "CLCE180LOCF" "GOSE28"
[67] "GOSE90" "GOSE180" "GOSE28LOCF"
[70] "GOSE28_dich" "GOSE90LOCF" "GOSE90_dich"
[73] "GOSE180LOCF" "GOSE180_dich" "MRS7"
[76] "MRSDIS" "MRS28" "MRS90"
[79] "MRS180" "MRS7LOCF" "MRS7_dich"
[82] "MRSDISLOCF" "MRSDIS_dich" "MRS28LOCF"
[85] "MRS28_dich" "MRS90LOCF" "MRS90_dich"
[88] "MRS180LOCF" "MRS180_dich" "SAHOT28"
[91] "SAHOT90" "SAHOT180" "SAHOT28LOCF"
[94] "SAHOT28_dich" "SAHOT90LOCF" "SAHOT90_dich"
[97] "SAHOT180LOCF" "SAHOT180_dich" "SAHOT28T"
[100] "SAHOT90T" "SAHOT180T" "SAHOT28TLOCF"
[103] "SAHOT90TLOCF" "SAHOT180TLOCF" "TCDD7"
[106] "TCDMAX" "LRD7" "LRMAX"
[109] "Age" "WFNS" "Total CSF"
[112] "Ventricular CSF" "SSV CSF" "SSV_quantiles"
[115] "SSV_dich" "non_SSV_non_vent_CSF"
library(gtsummary)
theme_gtsummary_compact()
Setting theme `Compact`
age
[1] 51 46 72 48 50 54 56 55 31 46 55 51 76 54 48 53 52 58 75 77 59 48 59 57 48 69 44 48 69 69 56 74 45 36 68
[36] 53 48 59 58 57 36 70 52 55 43 53 53 57 49 62 52 62 69 76 65 58 36 24 52 68 56 50 36 75 39 70 57 62 65 69
[71] 55 50 75 70 52 56 49 58 62 67 63 57 20 59 37 49 57 56 67 59 68 51 52 53 52 42 52
Univariate <- glm(age ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = age ~ mRS180_or, data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 54.15385 3.21927 16.822 <2e-16 ***
mRS180_or1 1.31490 3.81758 0.344 0.731
mRS180_or2 1.76615 3.96898 0.445 0.657
mRS180_or3 0.02797 4.75517 0.006 0.995
mRS180_or4 5.47115 5.21581 1.049 0.297
mRS180_or5 4.34615 8.81633 0.493 0.623
mRS180_or6 -0.15385 5.72873 -0.027 0.979
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 134.7279)
Null deviance: 12340 on 96 degrees of freedom
Residual deviance: 12126 on 90 degrees of freedom
AIC: 759.62
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #Age
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 3.72 | 0.00, 6,616 | 0.7 |
| 2 | 5.85 | 0.00, 13,978 | 0.7 |
| 3 | 1.03 | 0.00, 11,475 | >0.9 |
| 4 | 238 | 0.01, 6,543,311 | 0.3 |
| 5 | 77.2 | 0.00, 2,465,941,904 | 0.6 |
| 6 | 0.86 | 0.00, 64,489 | >0.9 |
| 1 CI = Confidence Interval | |||
Univariate <- glm(WFNS ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = WFNS ~ mRS180_or, data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.3846 0.3552 3.898 0.000186 ***
mRS180_or1 0.6779 0.4212 1.609 0.111018
mRS180_or2 0.7754 0.4379 1.771 0.079992 .
mRS180_or3 1.5245 0.5246 2.906 0.004610 **
mRS180_or4 1.2404 0.5755 2.155 0.033792 *
mRS180_or5 3.1154 0.9727 3.203 0.001882 **
mRS180_or6 2.6154 0.6320 4.138 7.87e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 1.639956)
Null deviance: 192.72 on 96 degrees of freedom
Residual deviance: 147.60 on 90 degrees of freedom
AIC: 331.99
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #WFNS
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 1.97 | 0.86, 4.50 | 0.11 |
| 2 | 2.17 | 0.92, 5.12 | 0.080 |
| 3 | 4.59 | 1.64, 12.8 | 0.005 |
| 4 | 3.46 | 1.12, 10.7 | 0.034 |
| 5 | 22.5 | 3.35, 152 | 0.002 |
| 6 | 13.7 | 3.96, 47.2 | <0.001 |
| 1 CI = Confidence Interval | |||
Univariate <- glm(data_imaging$FISHGRDN ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = data_imaging$FISHGRDN ~ mRS180_or, data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.61538 0.13605 26.573 <2e-16 ***
mRS180_or1 -0.05288 0.16134 -0.328 0.744
mRS180_or2 -0.05538 0.16774 -0.330 0.742
mRS180_or3 0.02098 0.20096 0.104 0.917
mRS180_or4 0.13462 0.22043 0.611 0.543
mRS180_or5 -0.11538 0.37260 -0.310 0.758
mRS180_or6 0.38462 0.24211 1.589 0.116
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 0.2406375)
Null deviance: 22.887 on 96 degrees of freedom
Residual deviance: 21.657 on 90 degrees of freedom
AIC: 145.84
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #Fisher grade
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 0.95 | 0.69, 1.30 | 0.7 |
| 2 | 0.95 | 0.68, 1.31 | 0.7 |
| 3 | 1.02 | 0.69, 1.51 | >0.9 |
| 4 | 1.14 | 0.74, 1.76 | 0.5 |
| 5 | 0.89 | 0.43, 1.85 | 0.8 |
| 6 | 1.47 | 0.91, 2.36 | 0.12 |
| 1 CI = Confidence Interval | |||
Univariate <- glm(data_imaging$`SSV blood` ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = data_imaging$`SSV blood` ~ mRS180_or, data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.21308 1.11166 1.991 0.0496 *
mRS180_or1 -1.39695 1.32440 -1.055 0.2944
mRS180_or2 -0.07908 1.37055 -0.058 0.9541
mRS180_or3 0.92692 1.68592 0.550 0.5838
mRS180_or4 -2.05058 1.80110 -1.139 0.2580
mRS180_or5 -2.21308 3.04441 -0.727 0.4692
mRS180_or6 2.23692 1.97822 1.131 0.2612
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 16.06527)
Null deviance: 1536.6 on 94 degrees of freedom
Residual deviance: 1413.7 on 88 degrees of freedom
(2 observations deleted due to missingness)
AIC: 542.11
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #SSV Blood
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 0.25 | 0.02, 3.32 | 0.3 |
| 2 | 0.92 | 0.06, 13.6 | >0.9 |
| 3 | 2.53 | 0.09, 68.8 | 0.6 |
| 4 | 0.13 | 0.00, 4.39 | 0.3 |
| 5 | 0.11 | 0.00, 42.7 | 0.5 |
| 6 | 9.36 | 0.19, 452 | 0.3 |
| 1 CI = Confidence Interval | |||
Univariate <- glm(data_imaging$`Non-SSV blood` ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = data_imaging$`Non-SSV blood` ~ mRS180_or, data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 14.203 4.372 3.249 0.00164 **
mRS180_or1 7.501 5.208 1.440 0.15336
mRS180_or2 5.910 5.390 1.097 0.27584
mRS180_or3 9.531 6.630 1.438 0.15410
mRS180_or4 17.272 7.083 2.438 0.01676 *
mRS180_or5 16.197 11.973 1.353 0.17959
mRS180_or6 21.226 7.780 2.728 0.00768 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 248.4655)
Null deviance: 24707 on 94 degrees of freedom
Residual deviance: 21865 on 88 degrees of freedom
(2 observations deleted due to missingness)
AIC: 802.28
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #Non-SSV blood
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 1,810 | 0.07, 49,103,845 | 0.2 |
| 2 | 369 | 0.01, 14,278,078 | 0.3 |
| 3 | 13,785 | 0.03, 6,067,920,985 | 0.2 |
| 4 | 31,690,971 | 29.6, 33,893,642,155,126 | 0.017 |
| 5 | 10,816,057 | 0.00, 167,976,215,553,519,648 | 0.2 |
| 6 | 1,653,359,892 | 395, 6,925,572,327,002,324 | 0.008 |
| 1 CI = Confidence Interval | |||
Univariate <- glm(data_imaging$`Total blood` ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = data_imaging$`Total blood` ~ mRS180_or, data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 16.495 4.879 3.381 0.00107 **
mRS180_or1 5.561 5.785 0.961 0.33903
mRS180_or2 4.778 6.015 0.794 0.42909
mRS180_or3 13.886 7.206 1.927 0.05714 .
mRS180_or4 15.151 7.904 1.917 0.05843 .
mRS180_or5 13.901 13.361 1.040 0.30092
mRS180_or6 23.392 8.682 2.694 0.00841 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 309.4093)
Null deviance: 31396 on 96 degrees of freedom
Residual deviance: 27847 on 90 degrees of freedom
AIC: 840.27
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #Total blood
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 260 | 0.00, 21,852,891 | 0.3 |
| 2 | 119 | 0.00, 15,656,006 | 0.4 |
| 3 | 1,073,256 | 0.79, 1,460,841,797,226 | 0.057 |
| 4 | 3,801,625 | 0.71, 20,326,541,829,890 | 0.058 |
| 5 | 1,089,197 | 0.00, 256,839,192,420,255,968 | 0.3 |
| 6 | 14,418,758,828 | 588, 353,718,823,652,565,952 | 0.008 |
| 1 CI = Confidence Interval | |||
Univariate <- glm(data_imaging$SEBES ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = data_imaging$SEBES ~ mRS180_or, data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.5385 0.2859 1.883 0.0629 .
mRS180_or1 0.2115 0.3391 0.624 0.5343
mRS180_or2 -0.2585 0.3525 -0.733 0.4653
mRS180_or3 0.8252 0.4223 1.954 0.0538 .
mRS180_or4 -0.5385 0.4632 -1.162 0.2482
mRS180_or5 0.4615 0.7830 0.589 0.5571
mRS180_or6 1.2949 0.5088 2.545 0.0126 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 1.062773)
Null deviance: 117.09 on 96 degrees of freedom
Residual deviance: 95.65 on 90 degrees of freedom
AIC: 289.91
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #SEBES
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 1.24 | 0.64, 2.40 | 0.5 |
| 2 | 0.77 | 0.39, 1.54 | 0.5 |
| 3 | 2.28 | 1.00, 5.22 | 0.054 |
| 4 | 0.58 | 0.24, 1.45 | 0.2 |
| 5 | 1.59 | 0.34, 7.36 | 0.6 |
| 6 | 3.65 | 1.35, 9.90 | 0.013 |
| 1 CI = Confidence Interval | |||
Univariate <- glm(data_imaging$`SSV Volume` ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = data_imaging$`SSV Volume` ~ mRS180_or, data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 72.80 12.42 5.860 7.48e-08 ***
mRS180_or1 -21.48 14.73 -1.458 0.1483
mRS180_or2 -18.72 15.32 -1.222 0.2247
mRS180_or3 -16.39 18.35 -0.893 0.3741
mRS180_or4 -18.48 20.13 -0.918 0.3610
mRS180_or5 -46.05 34.02 -1.354 0.1792
mRS180_or6 -54.78 22.11 -2.478 0.0151 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 2006.024)
Null deviance: 194615 on 96 degrees of freedom
Residual deviance: 180542 on 90 degrees of freedom
AIC: 1021.6
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #SSV CSF
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 0.00 | 0.00, 1,626 | 0.15 |
| 2 | 0.00 | 0.00, 80,390 | 0.2 |
| 3 | 0.00 | 0.00, 316,230,232 | 0.4 |
| 4 | 0.00 | 0.00, 1,275,297,058 | 0.4 |
| 5 | 0.00 | 0.00, 907,769,217 | 0.2 |
| 6 | 0.00 | 0.00, 0.00 | 0.015 |
| 1 CI = Confidence Interval | |||
Univariate <- glm(data_imaging$`Below SSV Volume` ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = data_imaging$`Below SSV Volume` ~ mRS180_or, data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 169.882 28.700 5.919 5.79e-08 ***
mRS180_or1 -51.811 34.034 -1.522 0.131
mRS180_or2 -19.553 35.384 -0.553 0.582
mRS180_or3 -11.179 42.392 -0.264 0.793
mRS180_or4 33.272 46.499 0.716 0.476
mRS180_or5 -1.235 78.598 -0.016 0.988
mRS180_or6 -50.232 51.072 -0.984 0.328
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 10707.86)
Null deviance: 1029650 on 96 degrees of freedom
Residual deviance: 963708 on 90 degrees of freedom
AIC: 1184
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #Non-SSV CSF
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 0.00 | 0.00, 2,941,247 | 0.13 |
| 2 | 0.00 | 0.00, 4,233,693,551,986,937,430,016 | 0.6 |
| 3 | 0.00 | 0.00, 16,963,138,658,302,543,833,435,413,151,744 | 0.8 |
| 4 | 281,652,756,992,182 | 0.00, 1,071,037,626,329,540,026,546,900,620,788,881,852,645,163,398,380,650,496 | 0.5 |
| 5 | 0.29 | 0.00, 2,324,693,896,061,375,467,716,969,506,733,797,726,895,819,253,663,757,471,976,337,178,624 | >0.9 |
| 6 | 0.00 | 0.00, 4,536,702,679,534,533,607,424 | 0.3 |
| 1 CI = Confidence Interval | |||
Univariate <- glm(data_imaging$non_SSV_non_vent_CSF ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = data_imaging$non_SSV_non_vent_CSF ~ mRS180_or,
data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 115.043 21.871 5.260 9.66e-07 ***
mRS180_or1 -39.594 25.935 -1.527 0.130
mRS180_or2 -19.664 26.964 -0.729 0.468
mRS180_or3 4.067 32.305 0.126 0.900
mRS180_or4 9.012 35.434 0.254 0.800
mRS180_or5 -1.411 59.895 -0.024 0.981
mRS180_or6 -43.793 38.919 -1.125 0.263
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 6218.228)
Null deviance: 594310 on 96 degrees of freedom
Residual deviance: 559641 on 90 degrees of freedom
AIC: 1131.3
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #non_SSV_non_vent_CSF
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 0.00 | 0.00, 76,013 | 0.13 |
| 2 | 0.00 | 0.00, 258,084,809,043,096 | 0.5 |
| 3 | 58.4 | 0.00, 183,755,386,917,563,334,525,037,051,904 | >0.9 |
| 4 | 8,199 | 0.00, 11,902,417,868,551,100,218,058,690,015,526,912 | 0.8 |
| 5 | 0.24 | 0.00, 234,540,193,146,125,707,795,291,530,308,575,931,365,880,311,578,624 | >0.9 |
| 6 | 0.00 | 0.00, 128,540,182,329,939 | 0.3 |
| 1 CI = Confidence Interval | |||
Univariate <- glm(data_imaging$`Ventricular volume` ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = data_imaging$`Ventricular volume` ~ mRS180_or,
data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 54.8388 11.3681 4.824 5.71e-06 ***
mRS180_or1 -12.2170 13.4809 -0.906 0.367
mRS180_or2 0.1109 14.0155 0.008 0.994
mRS180_or3 -15.2458 16.7918 -0.908 0.366
mRS180_or4 24.2600 18.4184 1.317 0.191
mRS180_or5 0.1761 31.1327 0.006 0.995
mRS180_or6 -6.4396 20.2296 -0.318 0.751
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 1680.029)
Null deviance: 161843 on 96 degrees of freedom
Residual deviance: 151203 on 90 degrees of freedom
AIC: 1004.4
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #ventricular CSF
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 0.00 | 0.00, 1,476,297 | 0.4 |
| 2 | 1.12 | 0.00, 951,003,982,096 | >0.9 |
| 3 | 0.00 | 0.00, 46,990,824 | 0.4 |
| 4 | 34,354,126,196 | 0.00, 163,580,739,791,143,944,813,805,568 | 0.2 |
| 5 | 1.19 | 0.00, 377,346,634,616,162,890,786,275,328 | >0.9 |
| 6 | 0.00 | 0.00, 264,743,322,040,471 | 0.8 |
| 1 CI = Confidence Interval | |||
Univariate <- glm(data_imaging$`Total manual volume` ~ mRS180_or, data = data_imaging)
summary(Univariate)
Call:
glm(formula = data_imaging$`Total manual volume` ~ mRS180_or,
data = data_imaging)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 242.68 37.90 6.404 6.74e-09 ***
mRS180_or1 -73.29 44.94 -1.631 0.106
mRS180_or2 -38.28 46.72 -0.819 0.415
mRS180_or3 -27.57 55.98 -0.493 0.624
mRS180_or4 14.79 61.40 0.241 0.810
mRS180_or5 -47.28 103.78 -0.456 0.650
mRS180_or6 -105.01 67.44 -1.557 0.123
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 18669.94)
Null deviance: 1786673 on 96 degrees of freedom
Residual deviance: 1680294 on 90 degrees of freedom
AIC: 1238
Number of Fisher Scoring iterations: 2
tbl_regression(Univariate, exponentiate = TRUE) #total CSF
| Characteristic | exp(Beta) | 95% CI1 | p-value |
|---|---|---|---|
| mRS180_or | |||
| 0 | — | — | |
| 1 | 0.00 | 0.00, 2,654,538 | 0.11 |
| 2 | 0.00 | 0.00, 140,294,768,190,772,685,570,048 | 0.4 |
| 3 | 0.00 | 0.00, 472,213,844,572,313,663,157,313,401,090,211,840 | 0.6 |
| 4 | 2,654,015 | 0.00, 48,663,036,568,583,551,858,184,546,004,120,793,563,310,388,000,238,323,367,936 | 0.8 |
| 5 | 0.00 | 0.00, 63,897,280,763,961,510,444,121,097,710,211,467,417,672,738,100,726,777,703,596,499,664,896 | 0.6 |
| 6 | 0.00 | 0.00, 628,953,566,864 | 0.12 |
| 1 CI = Confidence Interval | |||
# Create ordered multivariate logistic regression
#Cut offs - 0+1 - no significant disability, 2+3 - moderate disability 4+6 - severe disability or death
ggplot(data = data_imaging, aes(x=mRS180_or))+
geom_bar()
#Based on this the following split is made.
data_imaging$mRS180_3part[data_imaging$MRS180LOCF < 2] <- "Independent"
Warning: Unknown or uninitialised column: `mRS180_3part`.
data_imaging$mRS180_3part[data_imaging$MRS180LOCF == 2] <- "Moderate Disability"
data_imaging$mRS180_3part[data_imaging$MRS180LOCF == 3] <- "Moderate Disability"
data_imaging$mRS180_3part[data_imaging$MRS180LOCF > 3] <- "Severe Disability or Death"
mRS180_3part <- as.factor(data_imaging$mRS180_3part)
levels(mRS180_3part)
[1] "Independent" "Moderate Disability" "Severe Disability or Death"
library(MASS)
m <- polr(as.factor(mRS180_3part) ~ age+WFNS+Total_blood+ SSV_CSF + Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m)
Call:
polr(formula = as.factor(mRS180_3part) ~ age + WFNS + Total_blood +
SSV_CSF + Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
age -0.007979 0.019778 -0.4034
WFNS 0.358869 0.168685 2.1274
Total_blood 0.017898 0.012839 1.3940
SSV_CSF -0.004882 0.005152 -0.9476
Ventricular_CSF 0.012042 0.006106 1.9721
Intercepts:
Value Std. Error t value
Independent|Moderate Disability 0.9408 1.0810 0.8703
Moderate Disability|Severe Disability or Death 2.9924 1.1259 2.6579
Residual Deviance: 180.6727
AIC: 194.6727
(ctable <- coef(summary(m)))
Value Std. Error t value
age -0.007978742 0.019778249 -0.4034099
WFNS 0.358868568 0.168685265 2.1274447
Total_blood 0.017897916 0.012839293 1.3939955
SSV_CSF -0.004882470 0.005152254 -0.9476377
Ventricular_CSF 0.012042081 0.006106292 1.9720775
Independent|Moderate Disability 0.940767145 1.080959988 0.8703071
Moderate Disability|Severe Disability or Death 2.992408977 1.125874366 2.6578534
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
age -0.007978742 0.019778249 -0.4034099 0.68664668
WFNS 0.358868568 0.168685265 2.1274447 0.03338315
Total_blood 0.017897916 0.012839293 1.3939955 0.16331897
SSV_CSF -0.004882470 0.005152254 -0.9476377 0.34331393
Ventricular_CSF 0.012042081 0.006106292 1.9720775 0.04860075
Independent|Moderate Disability 0.940767145 1.080959988 0.8703071 0.38413260
Moderate Disability|Severe Disability or Death 2.992408977 1.125874366 2.6578534 0.00786401
(ci <- confint(m))
Waiting for profiling to be done...
2.5 % 97.5 %
age -0.0469857205 0.031214392
WFNS 0.0305035459 0.695654271
Total_blood -0.0071290226 0.043479733
SSV_CSF -0.0152227729 0.005157516
Ventricular_CSF 0.0001632932 0.024314569
confint.default(m)
2.5 % 97.5 %
age -4.674340e-02 0.030785914
WFNS 2.825152e-02 0.689485613
Total_blood -7.266635e-03 0.043062468
SSV_CSF -1.498070e-02 0.005215763
Ventricular_CSF 7.396895e-05 0.024010193
exp(coef(m))
age WFNS Total_blood SSV_CSF Ventricular_CSF
0.9920530 1.4317086 1.0180590 0.9951294 1.0121149
exp(cbind(OR = coef(m), ci))
OR 2.5 % 97.5 %
age 0.9920530 0.9541010 1.031707
WFNS 1.4317086 1.0309735 2.005020
Total_blood 1.0180590 0.9928963 1.044439
SSV_CSF 0.9951294 0.9848925 1.005171
Ventricular_CSF 1.0121149 1.0001633 1.024613
The main take aways from the ordered regression are:
Higher WFNS and ventricular CSF values are significant predictors of patients having moderate disability vs independence and severe disability or death vs moderate disability. all other predictors are not significant, which repeats previous observations in multivariate logistic regression
When looking at the odds of an outcome occurring, most predictors cross 1 and are therefore not significant. However, noticeably WFNS and ventricular volume do not cross 1. This can be be interpretted as:
library(MASS)
m <- polr(as.factor(mRS180_or) ~ age+WFNS+Total_blood+ SSV_CSF + Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m)
Call:
polr(formula = as.factor(mRS180_or) ~ age + WFNS + Total_blood +
SSV_CSF + Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
age -0.002443 0.018823 -0.1298
WFNS 0.424276 0.158654 2.6742
Total_blood 0.017129 0.012194 1.4046
SSV_CSF -0.005435 0.005039 -1.0784
Ventricular_CSF 0.007361 0.005679 1.2962
Intercepts:
Value Std. Error t value
0|1 -0.7663 1.0205 -0.7509
1|2 1.1202 1.0171 1.1014
2|3 2.3867 1.0405 2.2938
3|4 3.1544 1.0643 2.9639
4|5 4.0370 1.1027 3.6609
5|6 4.3792 1.1242 3.8954
Residual Deviance: 306.6054
AIC: 328.6054
(ctable <- coef(summary(m)))
Value Std. Error t value
age -0.002442635 0.018823188 -0.1297673
WFNS 0.424276096 0.158653625 2.6742288
Total_blood 0.017128574 0.012194217 1.4046473
SSV_CSF -0.005434759 0.005039495 -1.0784333
Ventricular_CSF 0.007360524 0.005678522 1.2962041
0|1 -0.766255574 1.020507904 -0.7508571
1|2 1.120190930 1.017053987 1.1014075
2|3 2.386732221 1.040531501 2.2937626
3|4 3.154416049 1.064268041 2.9639301
4|5 4.036953359 1.102710896 3.6609354
5|6 4.379188614 1.124183032 3.8954409
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
age -0.002442635 0.018823188 -0.1297673 8.967505e-01
WFNS 0.424276096 0.158653625 2.6742288 7.490133e-03
Total_blood 0.017128574 0.012194217 1.4046473 1.601262e-01
SSV_CSF -0.005434759 0.005039495 -1.0784333 2.808404e-01
Ventricular_CSF 0.007360524 0.005678522 1.2962041 1.949052e-01
0|1 -0.766255574 1.020507904 -0.7508571 4.527387e-01
1|2 1.120190930 1.017053987 1.1014075 2.707193e-01
2|3 2.386732221 1.040531501 2.2937626 2.180414e-02
3|4 3.154416049 1.064268041 2.9639301 3.037373e-03
4|5 4.036953359 1.102710896 3.6609354 2.512961e-04
5|6 4.379188614 1.124183032 3.8954409 9.802024e-05
(ci <- confint(m))
Waiting for profiling to be done...
2.5 % 97.5 %
age -0.039691662 0.034371349
WFNS 0.117296249 0.741588315
Total_blood -0.006666095 0.041377649
SSV_CSF -0.015398480 0.004425128
Ventricular_CSF -0.003790807 0.018593497
confint.default(m)
2.5 % 97.5 %
age -0.039335406 0.034450136
WFNS 0.113320705 0.735231487
Total_blood -0.006771652 0.041028799
SSV_CSF -0.015311988 0.004442469
Ventricular_CSF -0.003769175 0.018490223
exp(coef(m))
age WFNS Total_blood SSV_CSF Ventricular_CSF
0.9975603 1.5284835 1.0172761 0.9945800 1.0073877
exp(cbind(OR = coef(m), ci))
OR 2.5 % 97.5 %
age 0.9975603 0.9610857 1.034969
WFNS 1.5284835 1.1244525 2.099267
Total_blood 1.0172761 0.9933561 1.042246
SSV_CSF 0.9945800 0.9847195 1.004435
Ventricular_CSF 1.0073877 0.9962164 1.018767
Repeating as a full 6 part scale the only significant predictor is WFNS. - For each point increase in WFNS, there is a 1.52x chance of increasing the mRS by one point.
First run the same multivariable model as before but with mRS 0-2 lumped as one group. Then do the same for 0-3 lumped together to see which gives more significant results.
Then you want to do a step model as you did with the logistic regression. I dont know if the automated package will work for you but you can do it manually on AIC given you know you can manually get the same results as the automated package.
You can also do all the univariable logistic regressions you have in table 2 as univariable ordinal regressions
#Reorder the ordinal mRS
#Lump mRS 0-2
data_imaging$mRS180_ordinal_1[data_imaging$MRS180LOCF < 3] <- "Good outcome"
Warning: Unknown or uninitialised column: `mRS180_ordinal_1`.
data_imaging$mRS180_ordinal_1[data_imaging$MRS180LOCF == 3] <- "Mild Disability"
data_imaging$mRS180_ordinal_1[data_imaging$MRS180LOCF == 4] <- "Moderate Disability"
data_imaging$mRS180_ordinal_1[data_imaging$MRS180LOCF == 5] <- "Severe Disability"
data_imaging$mRS180_ordinal_1[data_imaging$MRS180LOCF == 6] <- "z_Death" #z used to ensure last category
mRS180_ordinal_1 <- data_imaging$mRS180_ordinal_1
ggplot(data = data_imaging, aes(x=mRS180_ordinal_1))+
geom_bar()
#Repeat ordered regression
m1 <- polr(as.factor(mRS180_ordinal_1) ~ age+WFNS+Total_blood+ SSV_CSF + Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m1)
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ age + WFNS + Total_blood +
SSV_CSF + Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
age -0.019472 0.026193 -0.7434
WFNS 0.526073 0.200629 2.6221
Total_blood 0.028154 0.015266 1.8442
SSV_CSF -0.002442 0.006045 -0.4040
Ventricular_CSF 0.010818 0.006771 1.5977
Intercepts:
Value Std. Error t value
Good outcome|Mild Disability 2.3767 1.3980 1.7001
Mild Disability|Moderate Disability 3.1648 1.4182 2.2316
Moderate Disability|Severe Disability 4.0690 1.4482 2.8096
Severe Disability|z_Death 4.4175 1.4645 3.0165
Residual Deviance: 161.3405
AIC: 179.3405
(ctable <- coef(summary(m1)))
Value Std. Error t value
age -0.019472408 0.026193157 -0.7434158
WFNS 0.526072547 0.200629420 2.6221107
Total_blood 0.028154110 0.015266440 1.8441831
SSV_CSF -0.002441943 0.006044980 -0.4039622
Ventricular_CSF 0.010818056 0.006771088 1.5976835
Good outcome|Mild Disability 2.376729249 1.398033583 1.7000516
Mild Disability|Moderate Disability 3.164779139 1.418195941 2.2315528
Moderate Disability|Severe Disability 4.068952312 1.448230934 2.8096019
Severe Disability|z_Death 4.417506989 1.464454495 3.0164863
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
age -0.019472408 0.026193157 -0.7434158 0.457229953
WFNS 0.526072547 0.200629420 2.6221107 0.008738704
Total_blood 0.028154110 0.015266440 1.8441831 0.065156462
SSV_CSF -0.002441943 0.006044980 -0.4039622 0.686240513
Ventricular_CSF 0.010818056 0.006771088 1.5976835 0.110113424
Good outcome|Mild Disability 2.376729249 1.398033583 1.7000516 0.089121218
Mild Disability|Moderate Disability 3.164779139 1.418195941 2.2315528 0.025644533
Moderate Disability|Severe Disability 4.068952312 1.448230934 2.8096019 0.004960282
Severe Disability|z_Death 4.417506989 1.464454495 3.0164863 0.002557227
(ci <- confint(m1))
Waiting for profiling to be done...
2.5 % 97.5 %
age -0.071124447 0.032307964
WFNS 0.138535338 0.932836473
Total_blood -0.001430389 0.058987954
SSV_CSF -0.015091117 0.009094349
Ventricular_CSF -0.002633931 0.024235806
confint.default(m1)
2.5 % 97.5 %
age -0.070810052 0.031865236
WFNS 0.132846109 0.919298985
Total_blood -0.001767562 0.058075783
SSV_CSF -0.014289886 0.009405999
Ventricular_CSF -0.002453033 0.024089144
exp(coef(m1))
age WFNS Total_blood SSV_CSF Ventricular_CSF
0.980716 1.692273 1.028554 0.997561 1.010877
exp(cbind(OR = coef(m1), ci))
OR 2.5 % 97.5 %
age 0.980716 0.9313460 1.032836
WFNS 1.692273 1.1485903 2.541708
Total_blood 1.028554 0.9985706 1.060762
SSV_CSF 0.997561 0.9850222 1.009136
Ventricular_CSF 1.010877 0.9973695 1.024532
#WFNS is significant
#Lump mRS 0-3
data_imaging$mRS180_ordinal_2[data_imaging$MRS180LOCF < 4] <- "Good outcome"
Warning: Unknown or uninitialised column: `mRS180_ordinal_2`.
data_imaging$mRS180_ordinal_2[data_imaging$MRS180LOCF == 4] <- "Moderate Disability"
data_imaging$mRS180_ordinal_2[data_imaging$MRS180LOCF == 5] <- "Severe Disability"
data_imaging$mRS180_ordinal_2[data_imaging$MRS180LOCF == 6] <- "z_Death"
mRS180_ordinal_2 <- data_imaging$mRS180_ordinal_2
ggplot(data = data_imaging, aes(x=mRS180_ordinal_2))+
geom_bar()
#Repeat ordered regression
m2 <- polr(as.factor(mRS180_ordinal_2) ~ age+WFNS+Total_blood+ SSV_CSF + Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m2)
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ age + WFNS + Total_blood +
SSV_CSF + Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
age -0.007817 0.034128 -0.2291
WFNS 0.470427 0.254634 1.8475
Total_blood 0.033435 0.018413 1.8159
SSV_CSF -0.011574 0.009426 -1.2278
Ventricular_CSF 0.015599 0.007836 1.9907
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 3.7373 1.8722 1.9962
Moderate Disability|Severe Disability 4.6640 1.9047 2.4487
Severe Disability|z_Death 5.0195 1.9217 2.6120
Residual Deviance: 99.1064
AIC: 115.1064
(ctable <- coef(summary(m2)))
Value Std. Error t value
age -0.007817495 0.034127586 -0.2290668
WFNS 0.470427481 0.254634049 1.8474649
Total_blood 0.033435143 0.018412571 1.8158867
SSV_CSF -0.011573817 0.009426299 -1.2278220
Ventricular_CSF 0.015599275 0.007836142 1.9906830
Good outcome|Moderate Disability 3.737320481 1.872178773 1.9962412
Moderate Disability|Severe Disability 4.664004986 1.904669408 2.4487215
Severe Disability|z_Death 5.019518637 1.921737569 2.6119688
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
age -0.007817495 0.034127586 -0.2290668 0.818817031
WFNS 0.470427481 0.254634049 1.8474649 0.064679784
Total_blood 0.033435143 0.018412571 1.8158867 0.069387757
SSV_CSF -0.011573817 0.009426299 -1.2278220 0.219513798
Ventricular_CSF 0.015599275 0.007836142 1.9906830 0.046515752
Good outcome|Moderate Disability 3.737320481 1.872178773 1.9962412 0.045907670
Moderate Disability|Severe Disability 4.664004986 1.904669408 2.4487215 0.014336424
Severe Disability|z_Death 5.019518637 1.921737569 2.6119688 0.009002246
(ci <- confint(m2))
Waiting for profiling to be done...
2.5 % 97.5 %
age -0.0745595741 0.060298482
WFNS -0.0217603314 0.994067962
Total_blood -0.0021996600 0.070940371
SSV_CSF -0.0337931059 0.004500731
Ventricular_CSF 0.0003439224 0.031607723
confint.default(m2)
2.5 % 97.5 %
age -0.0747063345 0.059071344
WFNS -0.0286460853 0.969501047
Total_blood -0.0026528336 0.069523120
SSV_CSF -0.0300490236 0.006901389
Ventricular_CSF 0.0002407184 0.030957832
exp(coef(m2))
age WFNS Total_blood SSV_CSF Ventricular_CSF
0.9922130 1.6006783 1.0340004 0.9884929 1.0157216
exp(cbind(OR = coef(m2), ci))
OR 2.5 % 97.5 %
age 0.9922130 0.9281522 1.062154
WFNS 1.6006783 0.9784747 2.702205
Total_blood 1.0340004 0.9978028 1.073517
SSV_CSF 0.9884929 0.9667715 1.004511
Ventricular_CSF 1.0157216 1.0003440 1.032113
#Ventricular CSF is significant, WFNS and total blood are nearly significant.
#Repeat stepwise model with ordered regression
#Packages
library(tidyverse)
library(caret)
library(leaps)
library(MASS)
#Models
m #entire 6 point scale
Call:
polr(formula = as.factor(mRS180_or) ~ age + WFNS + Total_blood +
SSV_CSF + Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
age WFNS Total_blood SSV_CSF Ventricular_CSF
-0.002442635 0.424276096 0.017128574 -0.005434759 0.007360524
Intercepts:
0|1 1|2 2|3 3|4 4|5 5|6
-0.7662556 1.1201909 2.3867322 3.1544160 4.0369534 4.3791886
Residual Deviance: 306.6054
AIC: 328.6054
m1 #0-2 lumped together
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ age + WFNS + Total_blood +
SSV_CSF + Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
age WFNS Total_blood SSV_CSF Ventricular_CSF
-0.019472408 0.526072547 0.028154110 -0.002441943 0.010818056
Intercepts:
Good outcome|Mild Disability Mild Disability|Moderate Disability
2.376729 3.164779
Moderate Disability|Severe Disability Severe Disability|z_Death
4.068952 4.417507
Residual Deviance: 161.3405
AIC: 179.3405
m2 #0-3 lumped together
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ age + WFNS + Total_blood +
SSV_CSF + Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
age WFNS Total_blood SSV_CSF Ventricular_CSF
-0.007817495 0.470427481 0.033435143 -0.011573817 0.015599275
Intercepts:
Good outcome|Moderate Disability Moderate Disability|Severe Disability
3.737320 4.664005
Severe Disability|z_Death
5.019519
Residual Deviance: 99.1064
AIC: 115.1064
#Stepwise model
step.model <- stepAIC(m, direction = "both", trace = FALSE)
summary(step.model)
Call:
polr(formula = as.factor(mRS180_or) ~ WFNS, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.5669 0.1396 4.061
Intercepts:
Value Std. Error t value
0|1 -0.7665 0.3946 -1.9424
1|2 1.0972 0.3708 2.9591
2|3 2.3340 0.4259 5.4802
3|4 3.0774 0.4721 6.5186
4|5 3.9404 0.5516 7.1440
5|6 4.2793 0.5946 7.1975
Residual Deviance: 310.1408
AIC: 324.1408
#Does not work with package.. will do it manually
#Aim to add the most dominant predictors WFNS first, then total blood, then ventricular volume. Aim for highest AIC.
#m model with entire 6 point scale
summary(m)
Call:
polr(formula = as.factor(mRS180_or) ~ age + WFNS + Total_blood +
SSV_CSF + Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
age -0.002443 0.018823 -0.1298
WFNS 0.424276 0.158654 2.6742
Total_blood 0.017129 0.012194 1.4046
SSV_CSF -0.005435 0.005039 -1.0784
Ventricular_CSF 0.007361 0.005679 1.2962
Intercepts:
Value Std. Error t value
0|1 -0.7663 1.0205 -0.7509
1|2 1.1202 1.0171 1.1014
2|3 2.3867 1.0405 2.2938
3|4 3.1544 1.0643 2.9639
4|5 4.0370 1.1027 3.6609
5|6 4.3792 1.1242 3.8954
Residual Deviance: 306.6054
AIC: 328.6054
m <- polr(as.factor(mRS180_or) ~ WFNS, data = data_imaging, Hess=TRUE)
summary(m) #AIC: 324.1408 *optimised model*
Call:
polr(formula = as.factor(mRS180_or) ~ WFNS, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.5669 0.1396 4.061
Intercepts:
Value Std. Error t value
0|1 -0.7665 0.3946 -1.9424
1|2 1.0972 0.3708 2.9591
2|3 2.3340 0.4259 5.4802
3|4 3.0774 0.4721 6.5186
4|5 3.9404 0.5516 7.1440
5|6 4.2793 0.5946 7.1975
Residual Deviance: 310.1408
AIC: 324.1408
m <- polr(as.factor(mRS180_or) ~ WFNS + Total_blood, data = data_imaging, Hess=TRUE)
summary(m) #AIC: 324.8266
Call:
polr(formula = as.factor(mRS180_or) ~ WFNS + Total_blood, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.49326 0.1530 3.224
Total_blood 0.01304 0.0114 1.144
Intercepts:
Value Std. Error t value
0|1 -0.6323 0.4126 -1.5322
1|2 1.2384 0.3937 3.1456
2|3 2.4881 0.4513 5.5134
3|4 3.2413 0.4985 6.5026
4|5 4.1057 0.5742 7.1502
5|6 4.4451 0.6157 7.2195
Residual Deviance: 308.8266
AIC: 324.8266
m <- polr(as.factor(mRS180_or) ~ WFNS + Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m) #AIC: 325.7733
Call:
polr(formula = as.factor(mRS180_or) ~ WFNS + Ventricular_CSF,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.563383 0.139818 4.0294
Ventricular_CSF 0.002862 0.004723 0.6058
Intercepts:
Value Std. Error t value
0|1 -0.6401 0.4458 -1.4359
1|2 1.2277 0.4296 2.8576
2|3 2.4685 0.4819 5.1226
3|4 3.2148 0.5257 6.1148
4|5 4.0820 0.6016 6.7854
5|6 4.4199 0.6405 6.9012
Residual Deviance: 309.7733
AIC: 325.7733
m <- polr(as.factor(mRS180_or) ~ Total_blood, data = data_imaging, Hess=TRUE)
summary(m) #AIC: 333.626
Call:
polr(formula = as.factor(mRS180_or) ~ Total_blood, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
Total_blood 0.02898 0.01032 2.808
Intercepts:
Value Std. Error t value
0|1 -1.2549 0.3656 -3.4321
1|2 0.5200 0.3149 1.6515
2|3 1.6823 0.3551 4.7371
3|4 2.3924 0.4001 5.9788
4|5 3.2093 0.4791 6.6988
5|6 3.5304 0.5240 6.7374
Residual Deviance: 319.626
AIC: 333.626
#m1 model with 0-2 lumped together
m1 <- polr(as.factor(mRS180_ordinal_1) ~ WFNS, data = data_imaging, Hess=TRUE)
summary(m1) #AIC: 175.8569 *optimised model*
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ WFNS, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.6633 0.1712 3.875
Intercepts:
Value Std. Error t value
Good outcome|Mild Disability 2.6321 0.5400 4.8739
Mild Disability|Moderate Disability 3.3832 0.5811 5.8215
Moderate Disability|Severe Disability 4.2575 0.6539 6.5111
Severe Disability|z_Death 4.6013 0.6933 6.6370
Residual Deviance: 165.8569
AIC: 175.8569
m1 <- polr(as.factor(mRS180_ordinal_1) ~ WFNS + Total_blood, data = data_imaging, Hess=TRUE)
summary(m1) #AIC: 175.8869
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ WFNS + Total_blood,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.55938 0.18719 2.988
Total_blood 0.01954 0.01397 1.398
Intercepts:
Value Std. Error t value
Good outcome|Mild Disability 2.8895 0.5870 4.9225
Mild Disability|Moderate Disability 3.6560 0.6303 5.8008
Moderate Disability|Severe Disability 4.5332 0.6983 6.4917
Severe Disability|z_Death 4.8784 0.7359 6.6291
Residual Deviance: 163.8869
AIC: 175.8869
m1 <- polr(as.factor(mRS180_ordinal_1) ~ WFNS + Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m1) #AIC: 177.2447
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ WFNS + Ventricular_CSF,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.670900 0.172758 3.8835
Ventricular_CSF 0.004162 0.005258 0.7916
Intercepts:
Value Std. Error t value
Good outcome|Mild Disability 2.8654 0.6258 4.5786
Mild Disability|Moderate Disability 3.6221 0.6656 5.4416
Moderate Disability|Severe Disability 4.5049 0.7362 6.1191
Severe Disability|z_Death 4.8478 0.7707 6.2898
Residual Deviance: 165.2447
AIC: 177.2447
m1 <- polr(as.factor(mRS180_ordinal_1) ~ Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m1) #AIC: 191.962
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ Ventricular_CSF,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
Ventricular_CSF 0.0035 0.005175 0.6762
Intercepts:
Value Std. Error t value
Good outcome|Mild Disability 1.1319 0.3545 3.1930
Mild Disability|Moderate Disability 1.8062 0.3925 4.6020
Moderate Disability|Severe Disability 2.5987 0.4695 5.5352
Severe Disability|z_Death 2.9084 0.5115 5.6858
Residual Deviance: 181.962
AIC: 191.962
m1 <- polr(as.factor(mRS180_ordinal_1) ~ Total_blood, data = data_imaging, Hess=TRUE)
summary(m1) #AIC: 183.0859
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ Total_blood, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
Total_blood 0.03745 0.01255 2.984
Intercepts:
Value Std. Error t value
Good outcome|Mild Disability 1.9367 0.4297 4.5072
Mild Disability|Moderate Disability 2.6577 0.4726 5.6231
Moderate Disability|Severe Disability 3.4835 0.5452 6.3888
Severe Disability|z_Death 3.8089 0.5874 6.4841
Residual Deviance: 173.0859
AIC: 183.0859
#m2 model with 0-3 lumped together
m2 <- polr(as.factor(mRS180_ordinal_2) ~ WFNS, data = data_imaging, Hess=TRUE)
summary(m2) #AIC: 113.7564 *optimised model*
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ WFNS, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.703 0.2156 3.261
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 3.5247 0.7386 4.7723
Moderate Disability|Severe Disability 4.4017 0.8040 5.4750
Severe Disability|z_Death 4.7469 0.8395 5.6544
Residual Deviance: 105.7564
AIC: 113.7564
m2 <- polr(as.factor(mRS180_ordinal_2) ~ WFNS + Total_blood, data = data_imaging, Hess=TRUE)
summary(m2) #AIC: 114.096
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ WFNS + Total_blood,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.60886 0.23277 2.616
Total_blood 0.02116 0.01646 1.286
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 3.8722 0.8202 4.7209
Moderate Disability|Severe Disability 4.7555 0.8813 5.3962
Severe Disability|z_Death 5.1036 0.9152 5.5767
Residual Deviance: 104.096
AIC: 114.096
m2 <- polr(as.factor(mRS180_ordinal_2) ~ WFNS + Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m2) #AIC: 114.3877
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ WFNS + Ventricular_CSF,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.710975 0.219928 3.233
Ventricular_CSF 0.006941 0.005824 1.192
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 3.9406 0.8450 4.6632
Moderate Disability|Severe Disability 4.8280 0.9080 5.3170
Severe Disability|z_Death 5.1702 0.9380 5.5117
Residual Deviance: 104.3877
AIC: 114.3877
m2 <- polr(as.factor(mRS180_ordinal_2) ~ Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m2) #AIC: 124.5227
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ Ventricular_CSF,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
Ventricular_CSF 0.007262 0.005695 1.275
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 2.0325 0.4440 4.5771
Moderate Disability|Severe Disability 2.8307 0.5158 5.4879
Severe Disability|z_Death 3.1399 0.5540 5.6677
Residual Deviance: 116.5227
AIC: 124.5227
m2 <- polr(as.factor(mRS180_ordinal_2) ~ Total_blood, data = data_imaging, Hess=TRUE)
summary(m2) #AIC: 119.3228
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ Total_blood, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
Total_blood 0.03854 0.01504 2.562
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 2.6937 0.5537 4.8647
Moderate Disability|Severe Disability 3.5204 0.6201 5.6770
Severe Disability|z_Death 3.8464 0.6594 5.8332
Residual Deviance: 111.3228
AIC: 119.3228
#Repeat all univariate analyses using ordered regression
library(tidyverse)
library(gtsummary)
library(survival)
library(MASS) #Packages load
# Flip model and run univariate ordinal regression
mRS180_or <- data_imaging$MRS180LOCF
colnames(data_imaging)
[1] "Patient" "Patient_number" "SITENAM"
[4] "AGE" "SEX" "BMIBL"
[7] "HTN" "ANEULOC" "ANEUMVA"
[10] "ANEUSP" "FISHGRDN" "SURGPROC"
[13] "WFNSGRDN" "WFNSGRP" "ICTDT"
[16] "ICTTM" "ICTDUR" "ICTDURGR"
[19] "Ictus_scan_date" "Ictus_scan_time" "Time_until_scan"
[22] "Time_until_scan_min" "CRPBL" "EVDFL"
[25] "Scan thickness" "Blood right" "Blood left"
[28] "Non-SSV blood" "SSV blood" "IVH"
[31] "ICH" "ICH location" "Total blood"
[34] "SEBES" "Ventricular volume" "SSV Volume"
[37] "Below SSV Volume" "ACE volume" "Total manual volume"
[40] "Dice (ACE vs Ventricular)" "DCDURD" "DCLOC"
[43] "DEATHDUR" "DEATHCEN" "DCIFL"
[46] "DCIDT" "DCIDURD" "DCICNSR"
[49] "NCIFL" "NCIDT" "NCIDURD"
[52] "NCICNSR" "VENTRICULITIS" "VENTRICULITSDATE"
[55] "INFECTION" "INFECTIONDATE" "LUMBARPUNCTURE"
[58] "BIC90" "BIC180" "BIC90LOCF"
[61] "BIC180LOCF" "CLCE90" "CLCE180"
[64] "CLCE90LOCF" "CLCE180LOCF" "GOSE28"
[67] "GOSE90" "GOSE180" "GOSE28LOCF"
[70] "GOSE28_dich" "GOSE90LOCF" "GOSE90_dich"
[73] "GOSE180LOCF" "GOSE180_dich" "MRS7"
[76] "MRSDIS" "MRS28" "MRS90"
[79] "MRS180" "MRS7LOCF" "MRS7_dich"
[82] "MRSDISLOCF" "MRSDIS_dich" "MRS28LOCF"
[85] "MRS28_dich" "MRS90LOCF" "MRS90_dich"
[88] "MRS180LOCF" "MRS180_dich" "SAHOT28"
[91] "SAHOT90" "SAHOT180" "SAHOT28LOCF"
[94] "SAHOT28_dich" "SAHOT90LOCF" "SAHOT90_dich"
[97] "SAHOT180LOCF" "SAHOT180_dich" "SAHOT28T"
[100] "SAHOT90T" "SAHOT180T" "SAHOT28TLOCF"
[103] "SAHOT90TLOCF" "SAHOT180TLOCF" "TCDD7"
[106] "TCDMAX" "LRD7" "LRMAX"
[109] "Age" "WFNS" "Total CSF"
[112] "Ventricular CSF" "SSV CSF" "SSV_quantiles"
[115] "SSV_dich" "non_SSV_non_vent_CSF" "mRS180_3part"
[118] "mRS180_ordinal_1" "mRS180_ordinal_2"
library(gtsummary)
theme_gtsummary_compact()
Setting theme `Compact`
Univariate <- polr(as.factor(mRS180_or) ~ age,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ age, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
age 0.008917 0.01693 0.5267
Intercepts:
Value Std. Error t value
0|1 -1.3733 0.9784 -1.4036
1|2 0.3514 0.9631 0.3649
2|3 1.4501 0.9724 1.4913
3|4 2.1210 0.9882 2.1463
4|5 2.9103 1.0230 2.8449
5|6 3.2202 1.0432 3.0869
Residual Deviance: 327.4793
AIC: 341.4793
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p() #Age
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| age | 1.01 | 0.98, 1.04 | 0.6 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$SEX ,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$SEX, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$SEXMale -0.3818 0.4378 -0.8721
Intercepts:
Value Std. Error t value
0|1 -1.9609 0.3193 -6.1416
1|2 -0.2287 0.2255 -1.0140
2|3 0.8710 0.2443 3.5648
3|4 1.5382 0.2888 5.3258
4|5 2.3274 0.3799 6.1264
5|6 2.6392 0.4305 6.1300
Residual Deviance: 326.9902
AIC: 340.9902
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Sex
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$SEX | 0.4 | ||
| Female | — | — | |
| Male | 0.68 | 0.29, 1.60 | |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$HTN,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$HTN, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$HTNY 0.5612 0.4033 1.391
Intercepts:
Value Std. Error t value
0|1 -1.7292 0.3129 -5.5269
1|2 0.0116 0.2335 0.0498
2|3 1.1268 0.2622 4.2981
3|4 1.8067 0.3082 5.8626
4|5 2.5976 0.3969 6.5449
5|6 2.9071 0.4460 6.5178
Residual Deviance: 325.8125
AIC: 339.8125
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Hypertension
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$HTN | 0.2 | ||
| N | — | — | |
| Y | 1.75 | 0.80, 3.89 | |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$ANEULOC,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$ANEULOC, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$ANEULOCPosterior Circulation 0.8779 0.4896 1.793
Intercepts:
Value Std. Error t value
0|1 -1.7287 0.3049 -5.6689
1|2 0.0445 0.2234 0.1991
2|3 1.1999 0.2558 4.6904
3|4 1.8502 0.3027 6.1117
4|5 2.5809 0.3904 6.6115
5|6 2.8967 0.4415 6.5617
Residual Deviance: 314.9902
AIC: 328.9902
(2 observations deleted due to missingness)
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #aneurysm location
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$ANEULOC | 0.072 | ||
| Anterior Circulation | — | — | |
| Posterior Circulation | 2.41 | 0.92, 6.37 | |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$SURGPROC,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$SURGPROC,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$SURGPROCCoiling 0.484 0.463 1.045
data_imaging$SURGPROCNot Done 2.125 1.131 1.878
Intercepts:
Value Std. Error t value
0|1 -1.4766 0.4582 -3.2229
1|2 0.2775 0.4269 0.6501
2|3 1.4078 0.4455 3.1603
3|4 2.1001 0.4734 4.4366
4|5 2.8971 0.5364 5.4012
5|6 3.2058 0.5740 5.5849
Residual Deviance: 324.1987
AIC: 340.1987
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Surgical procedure
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$SURGPROC | 0.2 | ||
| Clipping | — | — | |
| Coiling | 1.62 | 0.66, 4.08 | |
| Not Done | 8.37 | 0.82, 87.2 | |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$WFNSGRDN,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$WFNSGRDN,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$WFNSGRDN 0.5669 0.1396 4.061
Intercepts:
Value Std. Error t value
0|1 -0.7665 0.3946 -1.9424
1|2 1.0972 0.3708 2.9591
2|3 2.3340 0.4259 5.4802
3|4 3.0774 0.4721 6.5186
4|5 3.9404 0.5516 7.1440
5|6 4.2793 0.5946 7.1975
Residual Deviance: 310.1408
AIC: 324.1408
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #WFNS Significant
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$WFNSGRDN | 1.76 | 1.35, 2.33 | <0.001 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$FISHGRDN,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$FISHGRDN,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$FISHGRDN 0.4544 0.371 1.225
Intercepts:
Value Std. Error t value
0|1 -0.2462 1.3501 -0.1824
1|2 1.4826 1.3445 1.1027
2|3 2.5911 1.3608 1.9041
3|4 3.2688 1.3775 2.3731
4|5 4.0635 1.4061 2.8899
5|6 4.3761 1.4230 3.0753
Residual Deviance: 326.2459
AIC: 340.2459
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Fisher
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$FISHGRDN | 1.58 | 0.76, 3.28 | 0.2 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$`SSV blood`,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$`SSV blood`,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$`SSV blood` 0.04099 0.04705 0.8711
Intercepts:
Value Std. Error t value
0|1 -1.7836 0.3056 -5.8355
1|2 -0.0820 0.2193 -0.3739
2|3 1.0532 0.2480 4.2464
3|4 1.6739 0.2895 5.7814
4|5 2.4628 0.3812 6.4609
5|6 2.7754 0.4329 6.4111
Residual Deviance: 320.3342
AIC: 334.3342
(2 observations deleted due to missingness)
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #SSV blood
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$`SSV blood` | 1.04 | 0.95, 1.15 | 0.4 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$`Non-SSV blood`,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$`Non-SSV blood`,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$`Non-SSV blood` 0.03019 0.01154 2.616
Intercepts:
Value Std. Error t value
0|1 -1.2394 0.3731 -3.3218
1|2 0.5010 0.3238 1.5469
2|3 1.6715 0.3603 4.6390
3|4 2.3256 0.4014 5.7943
4|5 3.1475 0.4810 6.5440
5|6 3.4670 0.5249 6.6053
Residual Deviance: 313.9797
AIC: 327.9797
(2 observations deleted due to missingness)
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Non-SSV blood Significant
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$`Non-SSV blood` | 1.03 | 1.01, 1.05 | 0.008 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$`Total blood`,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$`Total blood`,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$`Total blood` 0.02898 0.01032 2.808
Intercepts:
Value Std. Error t value
0|1 -1.2549 0.3656 -3.4321
1|2 0.5200 0.3149 1.6515
2|3 1.6823 0.3551 4.7371
3|4 2.3924 0.4001 5.9788
4|5 3.2093 0.4791 6.6988
5|6 3.5304 0.5240 6.7374
Residual Deviance: 319.626
AIC: 333.626
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Total blood Significant
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$`Total blood` | 1.03 | 1.01, 1.05 | 0.004 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$SEBES,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$SEBES, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$SEBES 0.1794 0.1734 1.035
Intercepts:
Value Std. Error t value
0|1 -1.7576 0.3147 -5.5849
1|2 -0.0377 0.2286 -0.1651
2|3 1.0673 0.2541 4.1997
3|4 1.7421 0.2997 5.8119
4|5 2.5324 0.3903 6.4880
5|6 2.8470 0.4418 6.4436
Residual Deviance: 326.6843
AIC: 340.6843
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #SEBES
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$SEBES | 1.20 | 0.85, 1.69 | 0.3 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$`SSV Volume`,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$`SSV Volume`,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$`SSV Volume` -0.00734 0.004278 -1.716
Intercepts:
Value Std. Error t value
0|1 -2.2860 0.3931 -5.8154
1|2 -0.5353 0.3055 -1.7522
2|3 0.5721 0.3133 1.8262
3|4 1.2478 0.3454 3.6125
4|5 2.0456 0.4219 4.8483
5|6 2.3609 0.4670 5.0553
Residual Deviance: 324.7649
AIC: 338.7649
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #SSV CSF
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$`SSV Volume` | 0.99 | 0.98, 1.00 | 0.084 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$SSV_quantiles,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$SSV_quantiles,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$SSV_quantiles2 -0.4128 0.5295 -0.7797
data_imaging$SSV_quantiles3 -0.5329 0.5059 -1.0534
data_imaging$SSV_quantiles4 -0.8354 0.5081 -1.6440
Intercepts:
Value Std. Error t value
0|1 -2.3412 0.4467 -5.2415
1|2 -0.5969 0.3738 -1.5970
2|3 0.5166 0.3745 1.3797
3|4 1.1912 0.4025 2.9596
4|5 1.9842 0.4717 4.2069
5|6 2.2997 0.5119 4.4926
Residual Deviance: 324.948
AIC: 342.948
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #SSV Quartiles
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$SSV_quantiles | 0.4 | ||
| 1 | — | — | |
| 2 | 0.66 | 0.23, 1.87 | |
| 3 | 0.59 | 0.22, 1.58 | |
| 4 | 0.43 | 0.16, 1.17 | |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$SSV_dich,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$SSV_dich,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$SSV_dichlow 0.6038 0.4174 1.446
Intercepts:
Value Std. Error t value
0|1 -1.7334 0.3109 -5.5754
1|2 0.0080 0.2302 0.0345
2|3 1.1205 0.2577 4.3475
3|4 1.7918 0.3013 5.9472
4|5 2.5802 0.3908 6.6025
5|6 2.8942 0.4416 6.5531
Residual Deviance: 325.6532
AIC: 339.6532
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #SSV dich
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$SSV_dich | 0.15 | ||
| high | — | — | |
| low | 1.83 | 0.81, 4.18 | |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$`Below SSV Volume`,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$`Below SSV Volume`,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$`Below SSV Volume` 0.001393 0.001815 0.7672
Intercepts:
Value Std. Error t value
0|1 -1.6772 0.3844 -4.3629
1|2 0.0508 0.3263 0.1557
2|3 1.1601 0.3551 3.2665
3|4 1.8357 0.3938 4.6610
4|5 2.6261 0.4681 5.6104
5|6 2.9354 0.5100 5.7552
Residual Deviance: 327.1661
AIC: 341.1661
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Below SSV
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$`Below SSV Volume` | 1.00 | 1.00, 1.00 | 0.4 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$`Ventricular volume`,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$`Ventricular volume`,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$`Ventricular volume` 0.003813 0.004657 0.8188
Intercepts:
Value Std. Error t value
0|1 -1.6859 0.3683 -4.5775
1|2 0.0430 0.3068 0.1401
2|3 1.1477 0.3312 3.4654
3|4 1.8227 0.3709 4.9144
4|5 2.6157 0.4508 5.8020
5|6 2.9254 0.4945 5.9155
Residual Deviance: 327.0886
AIC: 341.0886
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Ventricular volume
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$`Ventricular volume` | 1.00 | 1.0, 1.01 | 0.4 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$non_SSV_non_vent_CSF,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$non_SSV_non_vent_CSF,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$non_SSV_non_vent_CSF 0.001352 0.002325 0.5815
Intercepts:
Value Std. Error t value
0|1 -1.7461 0.3613 -4.8330
1|2 -0.0213 0.2943 -0.0725
2|3 1.0849 0.3230 3.3589
3|4 1.7584 0.3630 4.8441
4|5 2.5469 0.4407 5.7785
5|6 2.8563 0.4851 5.8880
Residual Deviance: 327.4189
AIC: 341.4189
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Non-SSV non ventricular
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$non_SSV_non_vent_CSF | 1.00 | 1.00, 1.01 | 0.6 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate <- polr(as.factor(mRS180_or) ~ data_imaging$`Total manual volume`,data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_or) ~ data_imaging$`Total manual volume`,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
data_imaging$`Total manual volume` 2.587e-05 0.001387 0.01865
Intercepts:
Value Std. Error t value
0|1 -1.8608 0.4000 -4.6524
1|2 -0.1396 0.3366 -0.4147
2|3 0.9578 0.3587 2.6701
3|4 1.6271 0.3937 4.1325
4|5 2.4145 0.4658 5.1840
5|6 2.7243 0.5074 5.3692
Residual Deviance: 327.7555
AIC: 341.7555
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Total CSF
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| data_imaging$`Total manual volume` | 1.00 | 1.00, 1.00 | >0.9 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
NA
For
m2 <- polr(as.factor(mRS180_ordinal_2) ~ age+WFNS+Total_blood+ SSV_CSF + Ventricular_CSF, data = data_imaging, Hess=TRUE) What happens if you remove age and SSV CSF?
The others are tantalisingly close to significance. You could make an argument for using the multivariable model with only significant predictors rather than in AIC if that looked good What about with ordinal 1?
And what does using the lot of total blood, ventricular CSF and SSV CSF in those two regressions do to the p values?
m2 <- polr(as.factor(mRS180_ordinal_2) ~ age+WFNS+Total_blood + Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m2)
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ age + WFNS + Total_blood +
Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
age -0.01551 0.032759 -0.4733
WFNS 0.58506 0.242144 2.4162
Total_blood 0.03288 0.018074 1.8190
Ventricular_CSF 0.01279 0.007356 1.7384
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 4.0005 1.8197 2.1985
Moderate Disability|Severe Disability 4.9069 1.8518 2.6498
Severe Disability|z_Death 5.2542 1.8678 2.8131
Residual Deviance: 100.9623
AIC: 114.9623
(ctable <- coef(summary(m2)))
Value Std. Error t value
age -0.01550610 0.032758505 -0.4733459
WFNS 0.58505667 0.242143894 2.4161529
Total_blood 0.03287664 0.018073766 1.8190255
Ventricular_CSF 0.01278770 0.007356011 1.7384019
Good outcome|Moderate Disability 4.00052393 1.819665648 2.1984940
Moderate Disability|Severe Disability 4.90693436 1.851833010 2.6497715
Severe Disability|z_Death 5.25421850 1.867795470 2.8130588
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
age -0.01550610 0.032758505 -0.4733459 0.635966419
WFNS 0.58505667 0.242143894 2.4161529 0.015685473
Total_blood 0.03287664 0.018073766 1.8190255 0.068907540
Ventricular_CSF 0.01278770 0.007356011 1.7384019 0.082140022
Good outcome|Moderate Disability 4.00052393 1.819665648 2.1984940 0.027913925
Moderate Disability|Severe Disability 4.90693436 1.851833010 2.6497715 0.008054622
Severe Disability|z_Death 5.25421850 1.867795470 2.8130588 0.004907268
(ci <- confint(m2))
Waiting for profiling to be done...
2.5 % 97.5 %
age -0.080223079 0.04915366
WFNS 0.120847823 1.08824062
Total_blood -0.002152712 0.06966408
Ventricular_CSF -0.001775837 0.02760619
confint.default(m2)
2.5 % 97.5 %
age -0.079711594 0.04869939
WFNS 0.110463361 1.05964998
Total_blood -0.002547289 0.06830057
Ventricular_CSF -0.001629813 0.02720522
exp(coef(m2))
age WFNS Total_blood Ventricular_CSF
0.9846135 1.7950927 1.0334230 1.0128698
exp(cbind(OR = coef(m2), ci))
OR 2.5 % 97.5 %
age 0.9846135 0.9229104 1.050382
WFNS 1.7950927 1.1284532 2.969046
Total_blood 1.0334230 0.9978496 1.072148
Ventricular_CSF 1.0128698 0.9982257 1.027991
#WFNS is significant, total blood and ventricular CSF are close to significance.
m1 <- polr(as.factor(mRS180_ordinal_1) ~ age+WFNS+Total_blood + Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m1)
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ age + WFNS + Total_blood +
Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
age -0.020167 0.026078 -0.7733
WFNS 0.552236 0.191211 2.8881
Total_blood 0.028130 0.015246 1.8451
Ventricular_CSF 0.009859 0.006358 1.5506
Intercepts:
Value Std. Error t value
Good outcome|Mild Disability 2.4852 1.3700 1.8140
Mild Disability|Moderate Disability 3.2693 1.3916 2.3493
Moderate Disability|Severe Disability 4.1688 1.4239 2.9277
Severe Disability|z_Death 4.5157 1.4408 3.1341
Residual Deviance: 161.5066
AIC: 177.5066
(ctable <- coef(summary(m1)))
Value Std. Error t value
age -0.020166653 0.026078111 -0.7733172
WFNS 0.552235608 0.191210510 2.8881028
Total_blood 0.028129704 0.015245735 1.8450867
Ventricular_CSF 0.009859397 0.006358249 1.5506466
Good outcome|Mild Disability 2.485151671 1.369950584 1.8140448
Mild Disability|Moderate Disability 3.269332263 1.391642524 2.3492615
Moderate Disability|Severe Disability 4.168783070 1.423922106 2.9276763
Severe Disability|z_Death 4.515692079 1.440826286 3.1340989
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
age -0.020166653 0.026078111 -0.7733172 0.439334651
WFNS 0.552235608 0.191210510 2.8881028 0.003875732
Total_blood 0.028129704 0.015245735 1.8450867 0.065024928
Ventricular_CSF 0.009859397 0.006358249 1.5506466 0.120986398
Good outcome|Mild Disability 2.485151671 1.369950584 1.8140448 0.069670836
Mild Disability|Moderate Disability 3.269332263 1.391642524 2.3492615 0.018810689
Moderate Disability|Severe Disability 4.168783070 1.423922106 2.9276763 0.003415053
Severe Disability|z_Death 4.515692079 1.440826286 3.1340989 0.001723827
(ci <- confint(m1))
Waiting for profiling to be done...
2.5 % 97.5 %
age -0.071637603 0.03132325
WFNS 0.182115261 0.93815223
Total_blood -0.001388498 0.05894550
Ventricular_CSF -0.002777202 0.02249505
confint.default(m1)
2.5 % 97.5 %
age -0.071278813 0.03094551
WFNS 0.177469895 0.92700132
Total_blood -0.001751389 0.05801080
Ventricular_CSF -0.002602542 0.02232134
exp(coef(m1))
age WFNS Total_blood Ventricular_CSF
0.9800353 1.7371322 1.0285291 1.0099082
exp
function (x) .Primitive("exp")
#WFNS is the single significant predictor, total blood volume is close to significance.
#Repeat m1 and m2 with imaging variables only
m1 <- polr(as.factor(mRS180_ordinal_1) ~ Total_blood + Ventricular_CSF + SSV_CSF, data = data_imaging, Hess=TRUE)
summary(m1)
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ Total_blood + Ventricular_CSF +
SSV_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
Total_blood 0.042128 0.013662 3.083
Ventricular_CSF 0.012316 0.005947 2.071
SSV_CSF -0.007455 0.006075 -1.227
Intercepts:
Value Std. Error t value
Good outcome|Mild Disability 2.3047 0.6550 3.5184
Mild Disability|Moderate Disability 3.0638 0.6948 4.4094
Moderate Disability|Severe Disability 3.9324 0.7571 5.1938
Severe Disability|z_Death 4.2674 0.7894 5.4060
Residual Deviance: 168.6379
AIC: 182.6379
(ctable <- coef(summary(m1)))
Value Std. Error t value
Total_blood 0.042127505 0.013662436 3.083455
Ventricular_CSF 0.012315802 0.005947192 2.070860
SSV_CSF -0.007454597 0.006075312 -1.227031
Good outcome|Mild Disability 2.304676114 0.655042873 3.518359
Mild Disability|Moderate Disability 3.063839188 0.694849403 4.409357
Moderate Disability|Severe Disability 3.932447251 0.757139417 5.193822
Severe Disability|z_Death 4.267440674 0.789392733 5.405979
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
Total_blood 0.042127505 0.013662436 3.083455 2.046122e-03
Ventricular_CSF 0.012315802 0.005947192 2.070860 3.837188e-02
SSV_CSF -0.007454597 0.006075312 -1.227031 2.198109e-01
Good outcome|Mild Disability 2.304676114 0.655042873 3.518359 4.342242e-04
Mild Disability|Moderate Disability 3.063839188 0.694849403 4.409357 1.036779e-05
Moderate Disability|Severe Disability 3.932447251 0.757139417 5.193822 2.060203e-07
Severe Disability|z_Death 4.267440674 0.789392733 5.405979 6.445529e-08
(ci <- confint(m1))
Waiting for profiling to be done...
2.5 % 97.5 %
Total_blood 0.0160216868 0.070049465
Ventricular_CSF 0.0003514342 0.024004581
SSV_CSF -0.0204271460 0.003770313
confint.default(m1)
2.5 % 97.5 %
Total_blood 0.01534962 0.068905389
Ventricular_CSF 0.00065952 0.023972083
SSV_CSF -0.01936199 0.004452796
exp(coef(m1))
Total_blood Ventricular_CSF SSV_CSF
1.0430275 1.0123920 0.9925731
exp
function (x) .Primitive("exp")
#Total blood and ventricular volume are significant
m2 <- polr(as.factor(mRS180_ordinal_2) ~ Total_blood + Ventricular_CSF + SSV_CSF, data = data_imaging, Hess=TRUE)
summary(m2)
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ Total_blood + Ventricular_CSF +
SSV_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
Total_blood 0.04612 0.016908 2.728
Ventricular_CSF 0.01811 0.006898 2.625
SSV_CSF -0.01798 0.009800 -1.835
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 3.1075 0.8751 3.5509
Moderate Disability|Severe Disability 4.0054 0.9331 4.2927
Severe Disability|z_Death 4.3498 0.9615 4.5241
Residual Deviance: 102.6161
AIC: 114.6161
(ctable <- coef(summary(m2)))
Value Std. Error t value
Total_blood 0.04612426 0.016907637 2.728013
Ventricular_CSF 0.01810743 0.006897670 2.625151
SSV_CSF -0.01798257 0.009799664 -1.835019
Good outcome|Moderate Disability 3.10753656 0.875144412 3.550884
Moderate Disability|Severe Disability 4.00540023 0.933079056 4.292670
Severe Disability|z_Death 4.34982944 0.961488095 4.524060
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
Total_blood 0.04612426 0.016907637 2.728013 6.371702e-03
Ventricular_CSF 0.01810743 0.006897670 2.625151 8.661052e-03
SSV_CSF -0.01798257 0.009799664 -1.835019 6.650290e-02
Good outcome|Moderate Disability 3.10753656 0.875144412 3.550884 3.839391e-04
Moderate Disability|Severe Disability 4.00540023 0.933079056 4.292670 1.765375e-05
Severe Disability|z_Death 4.34982944 0.961488095 4.524060 6.066463e-06
(ci <- confint(m2))
Waiting for profiling to be done...
2.5 % 97.5 %
Total_blood 0.013854678 0.081092659
Ventricular_CSF 0.004595752 0.032183082
SSV_CSF -0.040417104 -0.001262182
confint.default(m2)
2.5 % 97.5 %
Total_blood 0.012985901 0.07926262
Ventricular_CSF 0.004588241 0.03162661
SSV_CSF -0.037189557 0.00122442
exp(coef(m2))
Total_blood Ventricular_CSF SSV_CSF
1.0472045 1.0182724 0.9821782
exp(cbind(OR = coef(m2), ci))
OR 2.5 % 97.5 %
Total_blood 1.0472045 1.0139511 1.0844714
Ventricular_CSF 1.0182724 1.0046063 1.0327066
SSV_CSF 0.9821782 0.9603888 0.9987386
#Total blood and ventricular volume are significant
27.8.23
polr(as.factor(mRS180_ordinal_2) ~ WFNS + Total_blood + Ventricular_CSF + SSV_CSF, data = data_imaging, Hess=TRUE) And
polr(as.factor(mRS180_ordinal_2) ~ Total_blood + Ventricular_CSF + SSV_CSF, data = data_imaging, Hess=TRUE)
polr(as.factor(mRS180_ordinal_2) ~ Total_blood , data = data_imaging, Hess=TRUE)
polr(as.factor(mRS180_ordinal_2) ~ Ventricular_CSF , data = data_imaging, Hess=TRUE)
polr(as.factor(mRS180_ordinal_2) ~ SSV_CSF, data = data_imaging, Hess=TRUE)
#Create log variables
WFNS_log = log(WFNS)
Total_blood_log = log(Total_blood)
Ventricular_CSF_log = log(Ventricular_CSF)
SSV_CSF_log = log(SSV_CSF)
#Rerun regressions
m1 <- polr(as.factor(mRS180_ordinal_1) ~ WFNS_log + Total_blood_log + Ventricular_CSF_log + SSV_CSF_log, data = data_imaging, Hess=TRUE)
summary(m1)
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ WFNS_log + Total_blood_log +
Ventricular_CSF_log + SSV_CSF_log, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS_log 1.2520 0.4871 2.570
Total_blood_log 0.6245 0.3431 1.820
Ventricular_CSF_log 0.6670 0.3376 1.976
SSV_CSF_log -0.3305 0.3138 -1.053
Intercepts:
Value Std. Error t value
Good outcome|Mild Disability 5.0023 1.8199 2.7487
Mild Disability|Moderate Disability 5.8203 1.8525 3.1419
Moderate Disability|Severe Disability 6.7580 1.8975 3.5616
Severe Disability|z_Death 7.1165 1.9128 3.7205
Residual Deviance: 157.19
AIC: 173.19
(ctable <- coef(summary(m1)))
Value Std. Error t value
WFNS_log 1.2519599 0.4870713 2.570383
Total_blood_log 0.6245215 0.3431036 1.820213
Ventricular_CSF_log 0.6670476 0.3375892 1.975915
SSV_CSF_log -0.3305486 0.3137987 -1.053378
Good outcome|Mild Disability 5.0023212 1.8198778 2.748713
Mild Disability|Moderate Disability 5.8203496 1.8524992 3.141890
Moderate Disability|Severe Disability 6.7580167 1.8974725 3.561589
Severe Disability|z_Death 7.1165093 1.9128074 3.720453
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
WFNS_log 1.2519599 0.4870713 2.570383 0.0101586061
Total_blood_log 0.6245215 0.3431036 1.820213 0.0687266092
Ventricular_CSF_log 0.6670476 0.3375892 1.975915 0.0481643880
SSV_CSF_log -0.3305486 0.3137987 -1.053378 0.2921678634
Good outcome|Mild Disability 5.0023212 1.8198778 2.748713 0.0059829800
Mild Disability|Moderate Disability 5.8203496 1.8524992 3.141890 0.0016786084
Moderate Disability|Severe Disability 6.7580167 1.8974725 3.561589 0.0003686176
Severe Disability|z_Death 7.1165093 1.9128074 3.720453 0.0001988660
(ci <- confint(m1))
Waiting for profiling to be done...
2.5 % 97.5 %
WFNS_log 0.329150650 2.2616738
Total_blood_log -0.009974644 1.3520576
Ventricular_CSF_log 0.022077038 1.3551971
SSV_CSF_log -0.957953703 0.2874137
confint.default(m1)
2.5 % 97.5 %
WFNS_log 0.297317713 2.2066022
Total_blood_log -0.047949140 1.2969921
Ventricular_CSF_log 0.005384941 1.3287102
SSV_CSF_log -0.945582880 0.2844856
exp(coef(m1))
WFNS_log Total_blood_log Ventricular_CSF_log SSV_CSF_log
3.4971905 1.8673522 1.9484761 0.7185294
exp(cbind(OR = coef(m1), ci))
OR 2.5 % 97.5 %
WFNS_log 3.4971905 1.3897872 9.599143
Total_blood_log 1.8673522 0.9900749 3.865371
Ventricular_CSF_log 1.9484761 1.0223225 3.877525
SSV_CSF_log 0.7185294 0.3836772 1.332976
#In log form WNFS, Total blood and ventricular CSF are significant.
m2 <- polr(as.factor(mRS180_ordinal_2) ~ Total_blood_log + Ventricular_CSF_log + SSV_CSF_log, data = data_imaging, Hess=TRUE)
summary(m2)
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ Total_blood_log +
Ventricular_CSF_log + SSV_CSF_log, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
Total_blood_log 1.5910 0.5531 2.877
Ventricular_CSF_log 1.4048 0.4677 3.004
SSV_CSF_log -0.9505 0.4079 -2.330
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 8.5656 2.8165 3.0413
Moderate Disability|Severe Disability 9.5140 2.8597 3.3269
Severe Disability|z_Death 9.8774 2.8754 3.4352
Residual Deviance: 95.75806
AIC: 107.7581
(ctable <- coef(summary(m2)))
Value Std. Error t value
Total_blood_log 1.5910103 0.5530522 2.876781
Ventricular_CSF_log 1.4047921 0.4677060 3.003579
SSV_CSF_log -0.9504638 0.4078756 -2.330279
Good outcome|Moderate Disability 8.5656024 2.8164716 3.041253
Moderate Disability|Severe Disability 9.5139773 2.8597342 3.326875
Severe Disability|z_Death 9.8774455 2.8753819 3.435177
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
Total_blood_log 1.5910103 0.5530522 2.876781 0.0040175401
Ventricular_CSF_log 1.4047921 0.4677060 3.003579 0.0026682403
SSV_CSF_log -0.9504638 0.4078756 -2.330279 0.0197914192
Good outcome|Moderate Disability 8.5656024 2.8164716 3.041253 0.0023559584
Moderate Disability|Severe Disability 9.5139773 2.8597342 3.326875 0.0008782587
Severe Disability|z_Death 9.8774455 2.8753819 3.435177 0.0005921672
(ci <- confint(m2))
Waiting for profiling to be done...
2.5 % 97.5 %
Total_blood_log 0.6410525 2.8264917
Ventricular_CSF_log 0.5520853 2.4068205
SSV_CSF_log -1.8095809 -0.1851241
confint.default(m2)
2.5 % 97.5 %
Total_blood_log 0.5070478 2.6749727
Ventricular_CSF_log 0.4881052 2.3214791
SSV_CSF_log -1.7498853 -0.1510424
exp(coef(m2))
Total_blood_log Ventricular_CSF_log SSV_CSF_log
4.9087055 4.0746796 0.3865617
exp(cbind(OR = coef(m2), ci))
OR 2.5 % 97.5 %
Total_blood_log 4.9087055 1.8984781 16.8861148
Ventricular_CSF_log 4.0746796 1.7368712 11.0986167
SSV_CSF_log 0.3865617 0.1637227 0.8310012
#In log form Total blood, ventricular CSF and SSV CSF are all significant.
#Univariate regessions
Univariate = polr(as.factor(mRS180_ordinal_2) ~ Total_blood_log , data = data_imaging, Hess=TRUE)
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Total_blood_log
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| Total_blood_log | 3.08 | 1.44, 8.16 | 0.002 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate = polr(as.factor(mRS180_ordinal_2) ~ Ventricular_CSF , data = data_imaging, Hess=TRUE)
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #Ventricular CSF log
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| Ventricular_CSF | 1.01 | 1.00, 1.02 | 0.2 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
Univariate = polr(as.factor(mRS180_ordinal_2) ~ SSV_CSF, data = data_imaging, Hess=TRUE)
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #SSV CSF log
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| SSV_CSF | 0.99 | 0.97, 1.00 | 0.060 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
m <- polr(as.factor(mRS180_or) ~ WFNS_log+Total_blood_log+ SSV_CSF_log + Ventricular_CSF_log, data = data_imaging, Hess=TRUE)
summary(m)
Call:
polr(formula = as.factor(mRS180_or) ~ WFNS_log + Total_blood_log +
SSV_CSF_log + Ventricular_CSF_log, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS_log 1.0723 0.3625 2.9581
Total_blood_log 0.1818 0.2141 0.8493
SSV_CSF_log -0.3152 0.2481 -1.2704
Ventricular_CSF_log 0.5240 0.2607 2.0102
Intercepts:
Value Std. Error t value
0|1 -0.1981 1.2551 -0.1578
1|2 1.7132 1.2555 1.3645
2|3 2.9953 1.2793 2.3413
3|4 3.7690 1.3046 2.8891
4|5 4.6632 1.3442 3.4692
5|6 5.0089 1.3606 3.6815
Residual Deviance: 304.5751
AIC: 324.5751
(ctable <- coef(summary(m)))
Value Std. Error t value
WFNS_log 1.0723247 0.3625008 2.9581302
Total_blood_log 0.1818196 0.2140818 0.8492993
SSV_CSF_log -0.3151975 0.2481043 -1.2704235
Ventricular_CSF_log 0.5239768 0.2606616 2.0101801
0|1 -0.1981120 1.2551284 -0.1578420
1|2 1.7132197 1.2555217 1.3645481
2|3 2.9953474 1.2793430 2.3413169
3|4 3.7689941 1.3045702 2.8890696
4|5 4.6632459 1.3441896 3.4691877
5|6 5.0089229 1.3605808 3.6814595
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
WFNS_log 1.0723247 0.3625008 2.9581302 0.0030951136
Total_blood_log 0.1818196 0.2140818 0.8492993 0.3957147547
SSV_CSF_log -0.3151975 0.2481043 -1.2704235 0.2039338213
Ventricular_CSF_log 0.5239768 0.2606616 2.0101801 0.0444121358
0|1 -0.1981120 1.2551284 -0.1578420 0.8745813025
1|2 1.7132197 1.2555217 1.3645481 0.1723951335
2|3 2.9953474 1.2793430 2.3413169 0.0192158507
3|4 3.7689941 1.3045702 2.8890696 0.0038638353
4|5 4.6632459 1.3441896 3.4691877 0.0005220346
5|6 5.0089229 1.3605808 3.6814595 0.0002319026
(ci <- confint(m2))
Waiting for profiling to be done...
2.5 % 97.5 %
Total_blood_log 0.6410525 2.8264917
Ventricular_CSF_log 0.5520853 2.4068205
SSV_CSF_log -1.8095809 -0.1851241
confint.default(m2)
2.5 % 97.5 %
Total_blood_log 0.5070478 2.6749727
Ventricular_CSF_log 0.4881052 2.3214791
SSV_CSF_log -1.7498853 -0.1510424
exp(coef(m))
WFNS_log Total_blood_log SSV_CSF_log Ventricular_CSF_log
2.9221648 1.1993978 0.7296448 1.6887301
exp(cbind(OR = coef(m), ci))
Warning: number of rows of result is not a multiple of vector length (arg 1)
OR 2.5 % 97.5 %
Total_blood_log 2.9221648 1.8984781 16.8861148
Ventricular_CSF_log 1.1993978 1.7368712 11.0986167
SSV_CSF_log 0.7296448 0.1637227 0.8310012
m1 <- polr(as.factor(mRS180_ordinal_1) ~ WFNS_log + Total_blood_log + Ventricular_CSF_log + SSV_CSF_log, data = data_imaging, Hess=TRUE)
summary(m1)
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ WFNS_log + Total_blood_log +
Ventricular_CSF_log + SSV_CSF_log, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS_log 1.2520 0.4871 2.570
Total_blood_log 0.6245 0.3431 1.820
Ventricular_CSF_log 0.6670 0.3376 1.976
SSV_CSF_log -0.3305 0.3138 -1.053
Intercepts:
Value Std. Error t value
Good outcome|Mild Disability 5.0023 1.8199 2.7487
Mild Disability|Moderate Disability 5.8203 1.8525 3.1419
Moderate Disability|Severe Disability 6.7580 1.8975 3.5616
Severe Disability|z_Death 7.1165 1.9128 3.7205
Residual Deviance: 157.19
AIC: 173.19
(ctable <- coef(summary(m1)))
Value Std. Error t value
WFNS_log 1.2519599 0.4870713 2.570383
Total_blood_log 0.6245215 0.3431036 1.820213
Ventricular_CSF_log 0.6670476 0.3375892 1.975915
SSV_CSF_log -0.3305486 0.3137987 -1.053378
Good outcome|Mild Disability 5.0023212 1.8198778 2.748713
Mild Disability|Moderate Disability 5.8203496 1.8524992 3.141890
Moderate Disability|Severe Disability 6.7580167 1.8974725 3.561589
Severe Disability|z_Death 7.1165093 1.9128074 3.720453
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
WFNS_log 1.2519599 0.4870713 2.570383 0.0101586061
Total_blood_log 0.6245215 0.3431036 1.820213 0.0687266092
Ventricular_CSF_log 0.6670476 0.3375892 1.975915 0.0481643880
SSV_CSF_log -0.3305486 0.3137987 -1.053378 0.2921678634
Good outcome|Mild Disability 5.0023212 1.8198778 2.748713 0.0059829800
Mild Disability|Moderate Disability 5.8203496 1.8524992 3.141890 0.0016786084
Moderate Disability|Severe Disability 6.7580167 1.8974725 3.561589 0.0003686176
Severe Disability|z_Death 7.1165093 1.9128074 3.720453 0.0001988660
(ci <- confint(m1))
Waiting for profiling to be done...
2.5 % 97.5 %
WFNS_log 0.329150650 2.2616738
Total_blood_log -0.009974644 1.3520576
Ventricular_CSF_log 0.022077038 1.3551971
SSV_CSF_log -0.957953703 0.2874137
confint.default(m1)
2.5 % 97.5 %
WFNS_log 0.297317713 2.2066022
Total_blood_log -0.047949140 1.2969921
Ventricular_CSF_log 0.005384941 1.3287102
SSV_CSF_log -0.945582880 0.2844856
exp(coef(m1))
WFNS_log Total_blood_log Ventricular_CSF_log SSV_CSF_log
3.4971905 1.8673522 1.9484761 0.7185294
exp(cbind(OR = coef(m1), ci))
OR 2.5 % 97.5 %
WFNS_log 3.4971905 1.3897872 9.599143
Total_blood_log 1.8673522 0.9900749 3.865371
Ventricular_CSF_log 1.9484761 1.0223225 3.877525
SSV_CSF_log 0.7185294 0.3836772 1.332976
m1 <- polr(as.factor(mRS180_ordinal_1) ~ WFNS_log + Total_blood_log + Ventricular_CSF_log + SSV_CSF_log, data = data_imaging, Hess=TRUE)
summary(m2)
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ Total_blood_log +
Ventricular_CSF_log + SSV_CSF_log, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
Total_blood_log 1.5910 0.5531 2.877
Ventricular_CSF_log 1.4048 0.4677 3.004
SSV_CSF_log -0.9505 0.4079 -2.330
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 8.5656 2.8165 3.0413
Moderate Disability|Severe Disability 9.5140 2.8597 3.3269
Severe Disability|z_Death 9.8774 2.8754 3.4352
Residual Deviance: 95.75806
AIC: 107.7581
(ctable <- coef(summary(m2)))
Value Std. Error t value
Total_blood_log 1.5910103 0.5530522 2.876781
Ventricular_CSF_log 1.4047921 0.4677060 3.003579
SSV_CSF_log -0.9504638 0.4078756 -2.330279
Good outcome|Moderate Disability 8.5656024 2.8164716 3.041253
Moderate Disability|Severe Disability 9.5139773 2.8597342 3.326875
Severe Disability|z_Death 9.8774455 2.8753819 3.435177
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
Total_blood_log 1.5910103 0.5530522 2.876781 0.0040175401
Ventricular_CSF_log 1.4047921 0.4677060 3.003579 0.0026682403
SSV_CSF_log -0.9504638 0.4078756 -2.330279 0.0197914192
Good outcome|Moderate Disability 8.5656024 2.8164716 3.041253 0.0023559584
Moderate Disability|Severe Disability 9.5139773 2.8597342 3.326875 0.0008782587
Severe Disability|z_Death 9.8774455 2.8753819 3.435177 0.0005921672
(ci <- confint(m2))
Waiting for profiling to be done...
2.5 % 97.5 %
Total_blood_log 0.6410525 2.8264917
Ventricular_CSF_log 0.5520853 2.4068205
SSV_CSF_log -1.8095809 -0.1851241
confint.default(m2)
2.5 % 97.5 %
Total_blood_log 0.5070478 2.6749727
Ventricular_CSF_log 0.4881052 2.3214791
SSV_CSF_log -1.7498853 -0.1510424
exp(coef(m2))
Total_blood_log Ventricular_CSF_log SSV_CSF_log
4.9087055 4.0746796 0.3865617
exp(cbind(OR = coef(m2), ci))
OR 2.5 % 97.5 %
Total_blood_log 4.9087055 1.8984781 16.8861148
Ventricular_CSF_log 4.0746796 1.7368712 11.0986167
SSV_CSF_log 0.3865617 0.1637227 0.8310012
#without log variables
m <- polr(as.factor(mRS180_or) ~ WFNS+Total_blood+ SSV_CSF + Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m)
Call:
polr(formula = as.factor(mRS180_or) ~ WFNS + Total_blood + SSV_CSF +
Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.424041 0.158687 2.672
Total_blood 0.016890 0.012048 1.402
SSV_CSF -0.005518 0.005002 -1.103
Ventricular_CSF 0.007089 0.005274 1.344
Intercepts:
Value Std. Error t value
0|1 -0.6547 0.5481 -1.1944
1|2 1.2326 0.5327 2.3139
2|3 2.4989 0.5798 4.3102
3|4 3.2667 0.6202 5.2674
4|5 4.1491 0.6857 6.0513
5|6 4.4914 0.7197 6.2407
Residual Deviance: 306.6222
AIC: 326.6222
(ctable <- coef(summary(m)))
Value Std. Error t value
WFNS 0.424040599 0.158686570 2.672190
Total_blood 0.016889569 0.012048325 1.401819
SSV_CSF -0.005518073 0.005001940 -1.103187
Ventricular_CSF 0.007088625 0.005273502 1.344197
0|1 -0.654699379 0.548144442 -1.194392
1|2 1.232613348 0.532709398 2.313857
2|3 2.498897247 0.579763926 4.310198
3|4 3.266731390 0.620180397 5.267389
4|5 4.149131891 0.685659069 6.051305
5|6 4.491390070 0.719696451 6.240673
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
WFNS 0.424040599 0.158686570 2.672190 7.535806e-03
Total_blood 0.016889569 0.012048325 1.401819 1.609693e-01
SSV_CSF -0.005518073 0.005001940 -1.103187 2.699462e-01
Ventricular_CSF 0.007088625 0.005273502 1.344197 1.788847e-01
0|1 -0.654699379 0.548144442 -1.194392 2.323246e-01
1|2 1.232613348 0.532709398 2.313857 2.067557e-02
2|3 2.498897247 0.579763926 4.310198 1.631085e-05
3|4 3.266731390 0.620180397 5.267389 1.383778e-07
4|5 4.149131891 0.685659069 6.051305 1.436775e-09
5|6 4.491390070 0.719696451 6.240673 4.356928e-10
(ci <- confint(m2))
Waiting for profiling to be done...
2.5 % 97.5 %
Total_blood_log 0.6410525 2.8264917
Ventricular_CSF_log 0.5520853 2.4068205
SSV_CSF_log -1.8095809 -0.1851241
confint.default(m2)
2.5 % 97.5 %
Total_blood_log 0.5070478 2.6749727
Ventricular_CSF_log 0.4881052 2.3214791
SSV_CSF_log -1.7498853 -0.1510424
exp(coef(m))
WFNS Total_blood SSV_CSF Ventricular_CSF
1.5281236 1.0170330 0.9944971 1.0071138
exp(cbind(OR = coef(m), ci))
Warning: number of rows of result is not a multiple of vector length (arg 1)
OR 2.5 % 97.5 %
Total_blood_log 1.5281236 1.8984781 16.8861148
Ventricular_CSF_log 1.0170330 1.7368712 11.0986167
SSV_CSF_log 0.9944971 0.1637227 0.8310012
m1 <- polr(as.factor(mRS180_ordinal_1) ~ WFNS + Total_blood + Ventricular_CSF + SSV_CSF, data = data_imaging, Hess=TRUE)
summary(m1)
Call:
polr(formula = as.factor(mRS180_ordinal_1) ~ WFNS + Total_blood +
Ventricular_CSF + SSV_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.509398 0.198866 2.5615
Total_blood 0.026432 0.015035 1.7581
Ventricular_CSF 0.008862 0.006215 1.4259
SSV_CSF -0.002797 0.006133 -0.4562
Intercepts:
Value Std. Error t value
Good outcome|Mild Disability 3.2554 0.7995 4.0721
Mild Disability|Moderate Disability 4.0433 0.8370 4.8307
Moderate Disability|Severe Disability 4.9447 0.8958 5.5199
Severe Disability|z_Death 5.2924 0.9248 5.7227
Residual Deviance: 161.8911
AIC: 177.8911
(ctable <- coef(summary(m1)))
Value Std. Error t value
WFNS 0.509397996 0.198866351 2.5615092
Total_blood 0.026432204 0.015034930 1.7580530
Ventricular_CSF 0.008862145 0.006215114 1.4259021
SSV_CSF -0.002797401 0.006132507 -0.4561595
Good outcome|Mild Disability 3.255445631 0.799454621 4.0720831
Mild Disability|Moderate Disability 4.043257467 0.836994645 4.8306850
Moderate Disability|Severe Disability 4.944690147 0.895794634 5.5198926
Severe Disability|z_Death 5.292419837 0.924813462 5.7226890
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
WFNS 0.509397996 0.198866351 2.5615092 1.042185e-02
Total_blood 0.026432204 0.015034930 1.7580530 7.873849e-02
Ventricular_CSF 0.008862145 0.006215114 1.4259021 1.538966e-01
SSV_CSF -0.002797401 0.006132507 -0.4561595 6.482753e-01
Good outcome|Mild Disability 3.255445631 0.799454621 4.0720831 4.659455e-05
Mild Disability|Moderate Disability 4.043257467 0.836994645 4.8306850 1.360641e-06
Moderate Disability|Severe Disability 4.944690147 0.895794634 5.5198926 3.392070e-08
Severe Disability|z_Death 5.292419837 0.924813462 5.7226890 1.048511e-08
(ci <- confint(m1))
Waiting for profiling to be done...
2.5 % 97.5 %
WFNS 0.124909490 0.912229093
Total_blood -0.002784905 0.056673423
Ventricular_CSF -0.003591125 0.021091929
SSV_CSF -0.015571538 0.008947321
confint.default(m1)
2.5 % 97.5 %
WFNS 0.119627110 0.899168883
Total_blood -0.003035717 0.055900125
Ventricular_CSF -0.003319256 0.021043545
SSV_CSF -0.014816894 0.009222092
exp(coef(m1))
WFNS Total_blood Ventricular_CSF SSV_CSF
1.6642890 1.0267846 1.0089015 0.9972065
exp(cbind(OR = coef(m1), ci))
OR 2.5 % 97.5 %
WFNS 1.6642890 1.1330459 2.489866
Total_blood 1.0267846 0.9972190 1.058310
Ventricular_CSF 1.0089015 0.9964153 1.021316
SSV_CSF 0.9972065 0.9845491 1.008987
m2 <- polr(as.factor(mRS180_ordinal_2) ~ WFNS + Total_blood + Ventricular_CSF + SSV_CSF, data = data_imaging, Hess=TRUE)
summary(m2)
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ WFNS + Total_blood +
Ventricular_CSF + SSV_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.46479 0.253811 1.831
Total_blood 0.03287 0.018272 1.799
Ventricular_CSF 0.01486 0.007131 2.084
SSV_CSF -0.01199 0.009346 -1.282
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 4.0888 1.0965 3.7288
Moderate Disability|Severe Disability 5.0158 1.1511 4.3573
Severe Disability|z_Death 5.3719 1.1768 4.5650
Residual Deviance: 99.15872
AIC: 113.1587
(ctable <- coef(summary(m2)))
Value Std. Error t value
WFNS 0.46478776 0.253810662 1.831238
Total_blood 0.03286864 0.018271858 1.798867
Ventricular_CSF 0.01486237 0.007131075 2.084170
SSV_CSF -0.01198556 0.009346302 -1.282385
Good outcome|Moderate Disability 4.08880406 1.096544299 3.728809
Moderate Disability|Severe Disability 5.01581873 1.151133947 4.357285
Severe Disability|z_Death 5.37190561 1.176770618 4.564956
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
WFNS 0.46478776 0.253810662 1.831238 6.706501e-02
Total_blood 0.03286864 0.018271858 1.798867 7.203973e-02
Ventricular_CSF 0.01486237 0.007131075 2.084170 3.714467e-02
SSV_CSF -0.01198556 0.009346302 -1.282385 1.997075e-01
Good outcome|Moderate Disability 4.08880406 1.096544299 3.728809 1.923870e-04
Moderate Disability|Severe Disability 5.01581873 1.151133947 4.357285 1.316857e-05
Severe Disability|z_Death 5.37190561 1.176770618 4.564956 4.996001e-06
(ci <- confint(m2))
Waiting for profiling to be done...
2.5 % 97.5 %
WFNS -0.0250991722 0.98724709
Total_blood -0.0024195740 0.07015623
Ventricular_CSF 0.0009692953 0.02940701
SSV_CSF -0.0338671883 0.00401962
confint.default(m2)
2.5 % 97.5 %
WFNS -0.0326719996 0.962247513
Total_blood -0.0029435423 0.068680826
Ventricular_CSF 0.0008857256 0.028839024
SSV_CSF -0.0303039754 0.006332854
exp(coef(m2))
WFNS Total_blood Ventricular_CSF SSV_CSF
1.591676 1.033415 1.014973 0.988086
exp(cbind(OR = coef(m2), ci))
OR 2.5 % 97.5 %
WFNS 1.591676 0.9752132 2.683836
Total_blood 1.033415 0.9975834 1.072676
Ventricular_CSF 1.014973 1.0009698 1.029844
SSV_CSF 0.988086 0.9666999 1.004028
Multivariate <- glm(as.factor(mRS180) ~ WFNS+
Total_blood+SSV_CSF+Ventricular_CSF,
family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(mRS180) ~ WFNS + Total_blood + SSV_CSF +
Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.104731 1.102820 -3.722 0.000198 ***
WFNS 0.426438 0.255563 1.669 0.095192 .
Total_blood 0.030991 0.017782 1.743 0.081367 .
SSV_CSF -0.011151 0.009197 -1.212 0.225340
Ventricular_CSF 0.017090 0.007759 2.203 0.027622 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 69.216 on 92 degrees of freedom
AIC: 79.216
Number of Fisher Scoring iterations: 5
coef(Multivariate)
(Intercept) WFNS Total_blood SSV_CSF Ventricular_CSF
-4.10473124 0.42643795 0.03099088 -0.01115133 0.01709038
#Repeat log analyses with SAHOT
#SAHOT dich
Multivariate <- glm(as.factor(SAHOT180_dich) ~ WFNS+
Total_blood+SSV_CSF+Ventricular_CSF,
family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = as.factor(SAHOT180_dich) ~ WFNS + Total_blood +
SSV_CSF + Ventricular_CSF, family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.053038 0.670319 -1.571 0.1162
WFNS -0.054070 0.195938 -0.276 0.7826
Total_blood 0.033314 0.014719 2.263 0.0236 *
SSV_CSF -0.010977 0.007074 -1.552 0.1207
Ventricular_CSF 0.004629 0.006497 0.712 0.4762
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 122.70 on 94 degrees of freedom
Residual deviance: 111.74 on 90 degrees of freedom
(2 observations deleted due to missingness)
AIC: 121.74
Number of Fisher Scoring iterations: 4
coef(Multivariate
Multivariate <- glm(as.factor(SAHOT180_dich) ~ WFNS_log+
Error: unexpected symbol in:
"
Multivariate"
11.9.23
#Further univaritate analyses
#Lump mRS_28 and mRS_90 0-3
data_imaging$mRS90_ordinal_2[data_imaging$MRS90LOCF < 4] <- "Good outcome"
data_imaging$mRS90_ordinal_2[data_imaging$MRS90LOCF == 4] <- "Moderate Disability"
data_imaging$mRS90_ordinal_2[data_imaging$MRS90LOCF == 5] <- "Severe Disability"
data_imaging$mRS90_ordinal_2[data_imaging$MRS90LOCF == 6] <- "z_Death"
mRS90_ordinal_2 <- data_imaging$mRS90_ordinal_2
mRS90_ordinal_2
[1] "Good outcome" "Good outcome" "z_Death" "Moderate Disability"
[5] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[9] "z_Death" "Good outcome" "Good outcome" "Good outcome"
[13] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[17] "Good outcome" "Good outcome" "Moderate Disability" "Good outcome"
[21] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[25] "z_Death" "Good outcome" "Good outcome" "Good outcome"
[29] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[33] "Moderate Disability" "Good outcome" "Good outcome" "Good outcome"
[37] "Good outcome" "Moderate Disability" "Good outcome" "Good outcome"
[41] "Good outcome" "Good outcome" "Good outcome" "Severe Disability"
[45] "Good outcome" "Good outcome" "Good outcome" "Moderate Disability"
[49] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[53] "Good outcome" "Good outcome" "Moderate Disability" "Good outcome"
[57] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[61] "Good outcome" "Severe Disability" "Good outcome" "Moderate Disability"
[65] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[69] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[73] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[77] "Good outcome" "Good outcome" "Good outcome" "z_Death"
[81] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[85] "Good outcome" "Good outcome" "Good outcome" "z_Death"
[89] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[93] "Good outcome" "Good outcome" "Good outcome" "Severe Disability"
[97] "Good outcome"
data_imaging$mRS28_ordinal_2[data_imaging$MRS28LOCF < 4] <- "Good outcome"
data_imaging$mRS28_ordinal_2[data_imaging$MRS28LOCF == 4] <- "Moderate Disability"
data_imaging$mRS28_ordinal_2[data_imaging$MRS28LOCF == 5] <- "Severe Disability"
data_imaging$mRS28_ordinal_2[data_imaging$MRS28LOCF == 6] <- "z_Death"
mRS28_ordinal_2 <- data_imaging$mRS28_ordinal_2
mRS28_ordinal_2
[1] "Good outcome" "Good outcome" "Severe Disability" "Severe Disability"
[5] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[9] "z_Death" "Good outcome" "Good outcome" "Good outcome"
[13] "Good outcome" "Good outcome" "Severe Disability" "Good outcome"
[17] "Moderate Disability" "Good outcome" "Moderate Disability" "Good outcome"
[21] "Good outcome" "Moderate Disability" "Good outcome" "Good outcome"
[25] "Severe Disability" "Good outcome" "Good outcome" "Good outcome"
[29] "Good outcome" "Good outcome" "Moderate Disability" "Good outcome"
[33] "Good outcome" "Good outcome" "Moderate Disability" "Moderate Disability"
[37] "Good outcome" "Severe Disability" "Good outcome" "Good outcome"
[41] "Good outcome" "Moderate Disability" "Good outcome" "Severe Disability"
[45] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[49] "Good outcome" "Moderate Disability" "Good outcome" "Moderate Disability"
[53] "Severe Disability" "Good outcome" "Severe Disability" "Good outcome"
[57] "Good outcome" "Good outcome" "Severe Disability" "Good outcome"
[61] "Good outcome" "Severe Disability" "Good outcome" "Severe Disability"
[65] "Good outcome" "Moderate Disability" "Good outcome" "Good outcome"
[69] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[73] "Good outcome" "Moderate Disability" "Good outcome" "Moderate Disability"
[77] "Severe Disability" "Good outcome" "Good outcome" "z_Death"
[81] "Good outcome" "Moderate Disability" "Good outcome" "Good outcome"
[85] "Moderate Disability" "Moderate Disability" "Severe Disability" "z_Death"
[89] "Good outcome" "Good outcome" "Good outcome" "Good outcome"
[93] "Good outcome" "Moderate Disability" "Good outcome" "Severe Disability"
[97] "Good outcome"
Univariate = polr(as.factor(mRS180_ordinal_2) ~ Ventricular_CSF , data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(mRS180_ordinal_2) ~ Ventricular_CSF,
data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
Ventricular_CSF 0.007262 0.005695 1.275
Intercepts:
Value Std. Error t value
Good outcome|Moderate Disability 2.0325 0.4440 4.5771
Moderate Disability|Severe Disability 2.8307 0.5158 5.4879
Severe Disability|z_Death 3.1399 0.5540 5.6677
Residual Deviance: 116.5227
AIC: 124.5227
exp(cbind(coef(Univariate), confint(Univariate)))
Waiting for profiling to be done...
[,1] [,2]
2.5 % 1.007288 0.9954349
97.5 % 1.007288 1.0184059
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #SSV CSF log
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| Ventricular_CSF | 1.01 | 1.00, 1.02 | 0.2 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
#Univariate with log predictors on 7 part mRS
Univariate <- lm(data_imaging$MRS180LOCF ~ Ventricular_CSF_log, data = data_imaging)
summary(Univariate)
Call:
lm(formula = data_imaging$MRS180LOCF ~ Ventricular_CSF_log, data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-2.3439 -1.0007 -0.1375 0.9280 4.1086
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.2311 0.7190 1.712 0.0901 .
Ventricular_CSF_log 0.2097 0.1937 1.082 0.2818
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.583 on 95 degrees of freedom
Multiple R-squared: 0.01218, Adjusted R-squared: 0.001785
F-statistic: 1.172 on 1 and 95 DF, p-value: 0.2818
exp(cbind(coef(Univariate), confint(Univariate)))
2.5 % 97.5 %
(Intercept) 3.425138 0.8218319 14.274907
Ventricular_CSF_log 1.233308 0.8395355 1.811775
#SAHOT raw and SAHOT 9 part with log variables
Univariate <- lm(sahot180 ~ Ventricular_CSF_log, data = data_imaging)
summary(Univariate)
Call:
lm(formula = sahot180 ~ Ventricular_CSF_log, data = data_imaging)
Residuals:
Min 1Q Median 3Q Max
-2.8933 -1.8611 -0.7805 1.1644 5.1646
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.72382 1.07784 3.455 0.000831 ***
Ventricular_CSF_log 0.03543 0.28913 0.123 0.902727
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.328 on 93 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.0001615, Adjusted R-squared: -0.01059
F-statistic: 0.01502 on 1 and 93 DF, p-value: 0.9027
exp(cbind(coef(Univariate), confint(Univariate)))
2.5 % 97.5 %
(Intercept) 41.422448 4.8716775 352.202949
Ventricular_CSF_log 1.036069 0.5834945 1.839671
#Calculate VIF values for main regressions
m <- polr(as.factor(mRS180_or) ~ WFNS + Total_blood + Ventricular_CSF + SSV_CSF, data = data_imaging, Hess=TRUE)
summary(m)
Call:
polr(formula = as.factor(mRS180_or) ~ WFNS + Total_blood + Ventricular_CSF +
SSV_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.424041 0.158687 2.672
Total_blood 0.016890 0.012048 1.402
Ventricular_CSF 0.007089 0.005274 1.344
SSV_CSF -0.005518 0.005002 -1.103
Intercepts:
Value Std. Error t value
0|1 -0.6547 0.5481 -1.1944
1|2 1.2326 0.5327 2.3139
2|3 2.4989 0.5798 4.3102
3|4 3.2667 0.6202 5.2674
4|5 4.1491 0.6857 6.0513
5|6 4.4914 0.7197 6.2407
Residual Deviance: 306.6222
AIC: 326.6222
(ctable <- coef(summary(m)))
Value Std. Error t value
WFNS 0.424040599 0.158686570 2.672190
Total_blood 0.016889569 0.012048325 1.401819
Ventricular_CSF 0.007088625 0.005273502 1.344197
SSV_CSF -0.005518073 0.005001940 -1.103187
0|1 -0.654699379 0.548144442 -1.194392
1|2 1.232613348 0.532709398 2.313857
2|3 2.498897247 0.579763926 4.310198
3|4 3.266731390 0.620180397 5.267389
4|5 4.149131891 0.685659069 6.051305
5|6 4.491390070 0.719696451 6.240673
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
WFNS 0.424040599 0.158686570 2.672190 7.535806e-03
Total_blood 0.016889569 0.012048325 1.401819 1.609693e-01
Ventricular_CSF 0.007088625 0.005273502 1.344197 1.788847e-01
SSV_CSF -0.005518073 0.005001940 -1.103187 2.699462e-01
0|1 -0.654699379 0.548144442 -1.194392 2.323246e-01
1|2 1.232613348 0.532709398 2.313857 2.067557e-02
2|3 2.498897247 0.579763926 4.310198 1.631085e-05
3|4 3.266731390 0.620180397 5.267389 1.383778e-07
4|5 4.149131891 0.685659069 6.051305 1.436775e-09
5|6 4.491390070 0.719696451 6.240673 4.356928e-10
(ci <- confint(m))
Waiting for profiling to be done...
2.5 % 97.5 %
WFNS 0.117009952 0.741429098
Total_blood -0.006639450 0.040812764
Ventricular_CSF -0.003319082 0.017477642
SSV_CSF -0.015401471 0.004296216
confint.default(m)
2.5 % 97.5 %
WFNS 0.113020636 0.735060561
Total_blood -0.006724714 0.040503851
Ventricular_CSF -0.003247249 0.017424498
SSV_CSF -0.015321695 0.004285549
exp(coef(m))
WFNS Total_blood Ventricular_CSF SSV_CSF
1.5281236 1.0170330 1.0071138 0.9944971
exp(cbind(OR = coef(m), ci))
OR 2.5 % 97.5 %
WFNS 1.5281236 1.1241306 2.098933
Total_blood 1.0170330 0.9933825 1.041657
Ventricular_CSF 1.0071138 0.9966864 1.017631
SSV_CSF 0.9944971 0.9847165 1.004305
library(car)
vif(m)
WFNS Total_blood Ventricular_CSF SSV_CSF
1.288627 1.327136 1.291018 1.229226
vif_values <- vif(m)
#create horizontal bar chart to display each VIF value
barplot(vif_values, main = "VIF Values", horiz = TRUE, col = "steelblue")
#add vertical line at 5
abline(v = 5, lwd = 3, lty = 2)
full.model <- lm(sahot180 ~ WFNS+Total_blood+ SSV_CSF +Ventricular_CSF, family = binomial, data = data_imaging)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(full.model)
Call:
lm(formula = sahot180 ~ WFNS + Total_blood + SSV_CSF + Ventricular_CSF,
data = data_imaging, family = binomial)
Residuals:
Min 1Q Median 3Q Max
-3.518 -1.635 -0.463 1.613 5.062
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.583077 0.621872 4.154 7.43e-05 ***
WFNS 0.166081 0.191691 0.866 0.38858
Total_blood 0.041719 0.014346 2.908 0.00458 **
SSV_CSF -0.005712 0.005795 -0.986 0.32697
Ventricular_CSF 0.003626 0.006277 0.578 0.56491
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.15 on 90 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.1747, Adjusted R-squared: 0.138
F-statistic: 4.763 on 4 and 90 DF, p-value: 0.001567
vif(full.model)
WFNS Total_blood SSV_CSF Ventricular_CSF
1.461091 1.394703 1.389117 1.359998
#Centre regressions to account for multicollinearity
install.packages("jtools")
Error in install.packages : Updating loaded packages
library(jtools)
Attaching package: ‘jtools’
The following objects are masked from ‘package:sjmisc’:
%nin%, center
The following object is masked from ‘package:Hmisc’:
%nin%
center_mod(full.model)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
Call:
lm(formula = sahot180 ~ WFNS + Total_blood + SSV_CSF + Ventricular_CSF,
family = binomial)
Coefficients:
(Intercept) WFNS Total_blood SSV_CSF Ventricular_CSF
3.852632 0.166081 0.041719 -0.005712 0.003626
centred_fullmodel <- center_mod(full.model)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(centred_fullmodel)
Call:
lm(formula = sahot180 ~ WFNS + Total_blood + SSV_CSF + Ventricular_CSF,
family = binomial)
Residuals:
Min 1Q Median 3Q Max
-3.518 -1.635 -0.463 1.613 5.062
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.852632 0.220552 17.468 < 2e-16 ***
WFNS 0.166081 0.191691 0.866 0.38858
Total_blood 0.041719 0.014346 2.908 0.00458 **
SSV_CSF -0.005712 0.005795 -0.986 0.32697
Ventricular_CSF 0.003626 0.006277 0.578 0.56491
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.15 on 90 degrees of freedom
Multiple R-squared: 0.1747, Adjusted R-squared: 0.138
F-statistic: 4.763 on 4 and 90 DF, p-value: 0.001567
vif(centred_fullmodel)
WFNS Total_blood SSV_CSF Ventricular_CSF
1.461091 1.394703 1.389117 1.359998
full.model <- lm(sahot180 ~ scale(WFNS)+scale(Total_blood)+ scale(SSV_CSF) +scale(Ventricular_CSF), family = binomial, data = data_imaging)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(full.model)
Call:
lm(formula = sahot180 ~ scale(WFNS) + scale(Total_blood) + scale(SSV_CSF) +
scale(Ventricular_CSF), data = data_imaging, family = binomial)
Residuals:
Min 1Q Median 3Q Max
-3.518 -1.635 -0.463 1.613 5.062
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.8530 0.2207 17.455 < 2e-16 ***
scale(WFNS) 0.2353 0.2716 0.866 0.38858
scale(Total_blood) 0.7545 0.2594 2.908 0.00458 **
scale(SSV_CSF) -0.2572 0.2609 -0.986 0.32697
scale(Ventricular_CSF) 0.1489 0.2577 0.578 0.56491
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.15 on 90 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.1747, Adjusted R-squared: 0.138
F-statistic: 4.763 on 4 and 90 DF, p-value: 0.001567
Multivariate <- glm(mRS180 ~ WFNS+Total_blood+ SSV_CSF +Ventricular_CSF, family = binomial, data = data_imaging)
summary(Multivariate)
Call:
glm(formula = mRS180 ~ WFNS + Total_blood + SSV_CSF + Ventricular_CSF,
family = binomial, data = data_imaging)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.104731 1.102820 -3.722 0.000198 ***
WFNS 0.426438 0.255563 1.669 0.095192 .
Total_blood 0.030991 0.017782 1.743 0.081367 .
SSV_CSF -0.011151 0.009197 -1.212 0.225340
Ventricular_CSF 0.017090 0.007759 2.203 0.027622 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 69.216 on 92 degrees of freedom
AIC: 79.216
Number of Fisher Scoring iterations: 5
center_mod(Multivariate)
Call: glm(formula = mRS180 ~ WFNS + Total_blood + SSV_CSF + Ventricular_CSF,
family = binomial)
Coefficients:
(Intercept) WFNS Total_blood SSV_CSF Ventricular_CSF
-2.09867 0.42644 0.03099 -0.01115 0.01709
Degrees of Freedom: 96 Total (i.e. Null); 92 Residual
Null Deviance: 86.87
Residual Deviance: 69.22 AIC: 79.22
centred_multivariate <- center_mod(Multivariate)
summary(centred_multivariate)
Call:
glm(formula = mRS180 ~ WFNS + Total_blood + SSV_CSF + Ventricular_CSF,
family = binomial)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.098666 0.387046 -5.422 5.89e-08 ***
WFNS 0.426438 0.255563 1.669 0.0952 .
Total_blood 0.030991 0.017782 1.743 0.0814 .
SSV_CSF -0.011151 0.009197 -1.212 0.2253
Ventricular_CSF 0.017090 0.007759 2.203 0.0276 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 86.870 on 96 degrees of freedom
Residual deviance: 69.216 on 92 degrees of freedom
AIC: 79.216
Number of Fisher Scoring iterations: 5
vif(centred_multivariate)
WFNS Total_blood SSV_CSF Ventricular_CSF
1.240375 1.288203 1.350574 1.393881
vif(full.model)
scale(WFNS) scale(Total_blood) scale(SSV_CSF) scale(Ventricular_CSF)
1.461091 1.394703 1.389117 1.359998
19.9.23 Further analyses requested
# Univariate SAHOT ordinal analyses and log SAHOT ordinal analyses
Univariate = polr(as.factor(sahot180) ~ Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(sahot180) ~ Ventricular_CSF, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
Ventricular_CSF -0.002284 0.004241 -0.5386
Intercepts:
Value Std. Error t value
1|2 -1.6480 0.3555 -4.6360
2|3 -0.8468 0.3162 -2.6783
3|4 -0.0539 0.2993 -0.1800
4|5 0.4690 0.3029 1.5483
5|6 1.1441 0.3265 3.5038
6|7 1.7270 0.3659 4.7199
7|8 2.1433 0.4084 5.2486
8|9 2.5832 0.4709 5.4854
Residual Deviance: 391.89
AIC: 409.89
(2 observations deleted due to missingness)
exp(cbind(coef(Univariate), confint(Univariate)))
Waiting for profiling to be done...
[,1] [,2]
2.5 % 0.9977183 0.9894327
97.5 % 0.9977183 1.0061109
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #SSV CSF log
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| Ventricular_CSF | 1.00 | 0.99, 1.01 | 0.6 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
#Univariate with log predictors
Univariate = polr(as.factor(sahot180) ~ Ventricular_CSF_log, data = data_imaging, Hess=TRUE)
summary(Univariate)
Call:
polr(formula = as.factor(sahot180) ~ Ventricular_CSF_log, data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
Ventricular_CSF_log 0.01495 0.2088 0.07159
Intercepts:
Value Std. Error t value
1|2 -1.4692 0.8043 -1.8268
2|3 -0.6709 0.7855 -0.8540
3|4 0.1171 0.7810 0.1500
4|5 0.6387 0.7862 0.8123
5|6 1.3139 0.7981 1.6463
6|7 1.8961 0.8153 2.3255
7|8 2.3114 0.8352 2.7675
8|9 2.7512 0.8681 3.1692
Residual Deviance: 392.1746
AIC: 410.1746
(2 observations deleted due to missingness)
exp(cbind(coef(Univariate), confint(Univariate)))
Waiting for profiling to be done...
[,1] [,2]
2.5 % 1.015061 0.6704922
97.5 % 1.015061 1.5285094
tbl_regression(Univariate, exponentiate = TRUE)%>%
add_global_p() %>% bold_p #SSV CSF log
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| Ventricular_CSF_log | 1.02 | 0.67, 1.53 | >0.9 |
| 1 OR = Odds Ratio, CI = Confidence Interval | |||
# 2. Multivariate Ordinal centred mRS 180
# use scale function
m <- polr(as.factor(mRS180_or) ~ scale(WFNS, scale = FALSE) + scale(Total_blood, scale = FALSE) + scale(Ventricular_CSF, center = TRUE) + scale(SSV_CSF, center = TRUE), data = data_imaging, Hess=TRUE)
summary(m)
Call:
polr(formula = as.factor(mRS180_or) ~ scale(WFNS, scale = FALSE) +
scale(Total_blood, scale = FALSE) + scale(Ventricular_CSF,
center = TRUE) + scale(SSV_CSF, center = TRUE), data = data_imaging,
Hess = TRUE)
Coefficients:
Value Std. Error t value
scale(WFNS, scale = FALSE) 0.42404 0.15868 2.672
scale(Total_blood, scale = FALSE) 0.01689 0.01205 1.402
scale(Ventricular_CSF, center = TRUE) 0.29105 0.21645 1.345
scale(SSV_CSF, center = TRUE) -0.24846 0.22519 -1.103
Intercepts:
Value Std. Error t value
0|1 -2.1074 0.3138 -6.7162
1|2 -0.2201 0.2186 -1.0069
2|3 1.0462 0.2445 4.2793
3|4 1.8140 0.2941 6.1691
4|5 2.6964 0.3905 6.9045
5|6 3.0387 0.4425 6.8664
Residual Deviance: 306.6222
AIC: 326.6222
vif(m)
scale(WFNS, scale = FALSE) scale(Total_blood, scale = FALSE)
1.288584 1.327167
scale(Ventricular_CSF, center = TRUE) scale(SSV_CSF, center = TRUE)
1.290854 1.228969
(ctable <- coef(summary(m)))
Value Std. Error t value
scale(WFNS, scale = FALSE) 0.42404092 0.15868401 2.672235
scale(Total_blood, scale = FALSE) 0.01688968 0.01204789 1.401878
scale(Ventricular_CSF, center = TRUE) 0.29105181 0.21645048 1.344658
scale(SSV_CSF, center = TRUE) -0.24846148 0.22519112 -1.103336
0|1 -2.10741901 0.31378248 -6.716178
1|2 -0.22008015 0.21856680 -1.006924
2|3 1.04618461 0.24447342 4.279339
3|4 1.81403211 0.29405124 6.169102
4|5 2.69644423 0.39053688 6.904455
5|6 3.03867419 0.44254447 6.866370
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
scale(WFNS, scale = FALSE) 0.42404092 0.15868401 2.672235 7.534793e-03
scale(Total_blood, scale = FALSE) 0.01688968 0.01204789 1.401878 1.609516e-01
scale(Ventricular_CSF, center = TRUE) 0.29105181 0.21645048 1.344658 1.787358e-01
scale(SSV_CSF, center = TRUE) -0.24846148 0.22519112 -1.103336 2.698813e-01
0|1 -2.10741901 0.31378248 -6.716178 1.865527e-11
1|2 -0.22008015 0.21856680 -1.006924 3.139713e-01
2|3 1.04618461 0.24447342 4.279339 1.874492e-05
3|4 1.81403211 0.29405124 6.169102 6.867891e-10
4|5 2.69644423 0.39053688 6.904455 5.039660e-12
5|6 3.03867419 0.44254447 6.866370 6.585602e-12
(ci <- confint(m))
Waiting for profiling to be done...
2.5 % 97.5 %
scale(WFNS, scale = FALSE) 0.117009951 0.74142913
scale(Total_blood, scale = FALSE) -0.006639464 0.04081276
scale(Ventricular_CSF, center = TRUE) -0.136279027 0.71761936
scale(SSV_CSF, center = TRUE) -0.693448553 0.19343640
confint.default(m)
2.5 % 97.5 %
scale(WFNS, scale = FALSE) 0.113025975 0.73505587
scale(Total_blood, scale = FALSE) -0.006723758 0.04050311
scale(Ventricular_CSF, center = TRUE) -0.133183346 0.71528696
scale(SSV_CSF, center = TRUE) -0.689827970 0.19290501
exp(coef(m))
scale(WFNS, scale = FALSE) scale(Total_blood, scale = FALSE)
1.5281241 1.0170331
scale(Ventricular_CSF, center = TRUE) scale(SSV_CSF, center = TRUE)
1.3378339 0.7799999
exp(cbind(OR = coef(m), ci))
OR 2.5 % 97.5 %
scale(WFNS, scale = FALSE) 1.5281241 1.1241306 2.098933
scale(Total_blood, scale = FALSE) 1.0170331 0.9933825 1.041657
scale(Ventricular_CSF, center = TRUE) 1.3378339 0.8725991 2.049548
scale(SSV_CSF, center = TRUE) 0.7799999 0.4998493 1.213412
#Repeat centering of SAHOT using the same method
full.model <- lm(sahot180 ~ scale(WFNS, scale = FALSE)+scale(Total_blood, scale = FALSE)+ scale(SSV_CSF, scale = FALSE) +scale(Ventricular_CSF, scale = FALSE), family = binomial, data = data_imaging)
Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra argument ‘family’ will be disregarded
summary(full.model)
Call:
lm(formula = sahot180 ~ scale(WFNS, scale = FALSE) + scale(Total_blood,
scale = FALSE) + scale(SSV_CSF, scale = FALSE) + scale(Ventricular_CSF,
scale = FALSE), data = data_imaging, family = binomial)
Residuals:
Min 1Q Median 3Q Max
-3.518 -1.635 -0.463 1.613 5.062
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.853044 0.220736 17.455 < 2e-16 ***
scale(WFNS, scale = FALSE) 0.166081 0.191691 0.866 0.38858
scale(Total_blood, scale = FALSE) 0.041719 0.014346 2.908 0.00458 **
scale(SSV_CSF, scale = FALSE) -0.005712 0.005795 -0.986 0.32697
scale(Ventricular_CSF, scale = FALSE) 0.003626 0.006277 0.578 0.56491
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.15 on 90 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.1747, Adjusted R-squared: 0.138
F-statistic: 4.763 on 4 and 90 DF, p-value: 0.001567
vif(full.model)
scale(WFNS, scale = FALSE) scale(Total_blood, scale = FALSE)
1.461091 1.394703
scale(SSV_CSF, scale = FALSE) scale(Ventricular_CSF, scale = FALSE)
1.389117 1.359998
#3. Multivariate ordinal SAHOT 180
m <- polr(as.factor(sahot180) ~ WFNS + Total_blood + SSV_CSF + Ventricular_CSF, data = data_imaging, Hess=TRUE)
summary(m)
Call:
polr(formula = as.factor(sahot180) ~ WFNS + Total_blood + SSV_CSF +
Ventricular_CSF, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS 0.030994 0.162825 0.1904
Total_blood 0.036132 0.012771 2.8292
SSV_CSF -0.005630 0.004721 -1.1926
Ventricular_CSF 0.004449 0.005081 0.8756
Intercepts:
Value Std. Error t value
1|2 -0.8059 0.5318 -1.5154
2|3 0.0581 0.5139 0.1131
3|4 0.9192 0.5099 1.8027
4|5 1.4932 0.5191 2.8768
5|6 2.2484 0.5493 4.0935
6|7 2.8917 0.5881 4.9167
7|8 3.3391 0.6246 5.3456
8|9 3.8070 0.6750 5.6399
Residual Deviance: 376.4082
AIC: 400.4082
(2 observations deleted due to missingness)
(ctable <- coef(summary(m)))
Value Std. Error t value
WFNS 0.030994329 0.162825023 0.1903536
Total_blood 0.036131566 0.012771006 2.8291872
SSV_CSF -0.005630311 0.004721009 -1.1926076
Ventricular_CSF 0.004449033 0.005080856 0.8756463
1|2 -0.805866721 0.531793998 -1.5153739
2|3 0.058094846 0.513864821 0.1130547
3|4 0.919152583 0.509873806 1.8027060
4|5 1.493235528 0.519061050 2.8768013
5|6 2.248360164 0.549254946 4.0934728
6|7 2.891681063 0.588140488 4.9166502
7|8 3.339101002 0.624645673 5.3455921
8|9 3.806959433 0.675007829 5.6398745
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
WFNS 0.030994329 0.162825023 0.1903536 8.490321e-01
Total_blood 0.036131566 0.012771006 2.8291872 4.666640e-03
SSV_CSF -0.005630311 0.004721009 -1.1926076 2.330231e-01
Ventricular_CSF 0.004449033 0.005080856 0.8756463 3.812224e-01
1|2 -0.805866721 0.531793998 -1.5153739 1.296778e-01
2|3 0.058094846 0.513864821 0.1130547 9.099872e-01
3|4 0.919152583 0.509873806 1.8027060 7.143440e-02
4|5 1.493235528 0.519061050 2.8768013 4.017284e-03
5|6 2.248360164 0.549254946 4.0934728 4.249600e-05
6|7 2.891681063 0.588140488 4.9166502 8.803764e-07
7|8 3.339101002 0.624645673 5.3455921 9.012194e-08
8|9 3.806959433 0.675007829 5.6398745 1.701742e-08
(ci <- confint(m))
Waiting for profiling to be done...
2.5 % 97.5 %
WFNS -0.288552147 0.351876967
Total_blood 0.011458793 0.061672417
SSV_CSF -0.014999063 0.003627862
Ventricular_CSF -0.005588999 0.014427012
confint.default(m)
2.5 % 97.5 %
WFNS -0.288136851 0.350125509
Total_blood 0.011100855 0.061162278
SSV_CSF -0.014883318 0.003622696
Ventricular_CSF -0.005509262 0.014407327
exp(coef(m))
WFNS Total_blood SSV_CSF Ventricular_CSF
1.0314797 1.0367922 0.9943855 1.0044589
exp(cbind(OR = coef(m), ci))
OR 2.5 % 97.5 %
WFNS 1.0314797 0.7493477 1.421734
Total_blood 1.0367922 1.0115247 1.063614
SSV_CSF 0.9943855 0.9851129 1.003634
Ventricular_CSF 1.0044589 0.9944266 1.014532
2.10.23
Was there a difference between patients with known hypertension and not?
HTN
[1] "Y" "N" "Y" "N" "N" "N" "N" "Y" "N" "N" "N" "N" "N" "N" "N" "Y" "Y" "N" "N" "Y" "N" "N" "N" "Y" "Y" "N"
[27] "Y" "N" "Y" "Y" "N" "N" "N" "N" "N" "N" "N" "N" "N" "N" "N" "Y" "N" "N" "N" "N" "Y" "Y" "Y" "N" "Y" "Y"
[53] "N" "N" "N" "N" "N" "N" "Y" "N" "N" "N" "N" "Y" "N" "Y" "N" "N" "Y" "Y" "N" "N" "Y" "Y" "N" "N" "N" "Y"
[79] "N" "N" "N" "N" "N" "N" "N" "N" "N" "N" "N" "N" "Y" "N" "N" "N" "N" "N" "Y"
xtabs(~ HTN)
HTN
N Y
70 27
Total_blood_volume
[1] 32.400000 24.400000 36.500000 15.900000 5.700000 14.900000 33.700000 9.100000 15.000000 3.118535
[11] 37.472276 31.231171 5.491420 47.479970 65.454199 10.138847 31.581787 28.955907 27.285191 7.854454
[21] 4.227739 16.020520 6.978028 20.911137 52.074488 35.622834 17.055241 26.429269 65.527850 19.142697
[31] 16.869858 20.093183 22.394635 9.199460 24.307879 60.359894 3.413555 28.965052 10.258070 33.824464
[41] 3.243393 10.483703 36.928319 33.267863 1.209736 2.395339 8.259483 39.559046 16.681489 2.761489
[51] 32.617570 57.148609 8.839489 28.012290 15.813096 7.544845 28.201294 4.276737 34.957123 50.374237
[61] 21.819479 13.643278 43.344303 46.734763 8.007995 13.296591 14.335251 17.322519 7.569529 33.880681
[71] 71.126159 13.158308 1.068114 35.640291 41.463008 43.092587 48.838911 17.413142 18.684369 74.481030
[81] 8.888236 34.620570 2.904084 1.551720 44.934654 62.929976 21.536082 47.621679 4.195765 2.302453
[91] 5.529027 13.700646 30.016398 2.734029 7.065417 33.506611 30.635859
ggplot(data = data_imaging)+
geom_point(mapping = aes(x=Total_blood, y=HTN, color=HTN))
hist(Total_blood)
HTN_patients <- data_imaging %>% filter(HTN == "Y")
Non_HTN_patients <- data_imaging %>% filter(HTN == "N")
hist(HTN_patients$`Total blood`)
hist(Non_HTN_patients$`Total blood`)
ggplot(data = data_imaging) +
geom_boxplot(aes(x = HTN, y = Total_blood))
t.test(Total_blood ~ HTN, data = data_imaging)
Welch Two Sample t-test
data: Total_blood by HTN
t = -0.551, df = 51.036, p-value = 0.584
alternative hypothesis: true difference in means between group N and group Y is not equal to 0
95 percent confidence interval:
-10.142341 5.773934
sample estimates:
mean in group N mean in group Y
23.51067 25.69487
Test the proportional odds ratios of the multivariate regressions using mRS.
This is the document I have used to read up on proportional odds assumptions - https://medium.com/evangelinelee/brant-test-for-proportional-odds-in-r-b0b373a93aa2
It recommends using the brant test This is possible to use on models created using the polr function.
install.packages("brant")
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/brant_0.3-0.tgz'
Content type 'application/x-gzip' length 24944 bytes (24 KB)
==================================================
downloaded 24 KB
The downloaded binary packages are in
/var/folders/5q/zxkgc5yn685ffrcr6m2_f_4h0000gn/T//RtmpguTcG5/downloaded_packages
install.packages("jtools")
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/jtools_2.2.2.tgz'
Content type 'application/x-gzip' length 3070659 bytes (2.9 MB)
==================================================
downloaded 2.9 MB
The downloaded binary packages are in
/var/folders/5q/zxkgc5yn685ffrcr6m2_f_4h0000gn/T//RtmpguTcG5/downloaded_packages
library(brant)
m <- polr(as.factor(mRS180_or) ~ WFNS_log+Total_blood_log+ SSV_CSF_log+ Ventricular_CSF_log, data = data_imaging, Hess=TRUE)
summary(m)
Call:
polr(formula = as.factor(mRS180_or) ~ WFNS_log + Total_blood_log +
SSV_CSF_log + Ventricular_CSF_log, data = data_imaging, Hess = TRUE)
Coefficients:
Value Std. Error t value
WFNS_log 1.0723 0.3625 2.9581
Total_blood_log 0.1818 0.2141 0.8493
SSV_CSF_log -0.3152 0.2481 -1.2704
Ventricular_CSF_log 0.5240 0.2607 2.0102
Intercepts:
Value Std. Error t value
0|1 -0.1981 1.2551 -0.1578
1|2 1.7132 1.2555 1.3645
2|3 2.9953 1.2793 2.3413
3|4 3.7690 1.3046 2.8891
4|5 4.6632 1.3442 3.4692
5|6 5.0089 1.3606 3.6815
Residual Deviance: 304.5751
AIC: 324.5751
brant(m)
----------------------------------------------------
Test for X2 df probability
----------------------------------------------------
Omnibus 19.98 20 0.46
WFNS_log 1.16 5 0.95
Total_blood_log 5.59 5 0.35
SSV_CSF_log 3.32 5 0.65
Ventricular_CSF_log 6.1 5 0.3
----------------------------------------------------
H0: Parallel Regression Assumption holds
(ctable <- coef(summary(m)))
Value Std. Error t value
WFNS_log 1.0723247 0.3625008 2.9581302
Total_blood_log 0.1818196 0.2140818 0.8492993
SSV_CSF_log -0.3151975 0.2481043 -1.2704235
Ventricular_CSF_log 0.5239768 0.2606616 2.0101801
0|1 -0.1981120 1.2551284 -0.1578420
1|2 1.7132197 1.2555217 1.3645481
2|3 2.9953474 1.2793430 2.3413169
3|4 3.7689941 1.3045702 2.8890696
4|5 4.6632459 1.3441896 3.4691877
5|6 5.0089229 1.3605808 3.6814595
p <- pnorm(abs(ctable[, "t value"]), lower.tail = FALSE) * 2
(ctable <- cbind(ctable, "p value" = p))
Value Std. Error t value p value
WFNS_log 1.0723247 0.3625008 2.9581302 0.0030951136
Total_blood_log 0.1818196 0.2140818 0.8492993 0.3957147547
SSV_CSF_log -0.3151975 0.2481043 -1.2704235 0.2039338213
Ventricular_CSF_log 0.5239768 0.2606616 2.0101801 0.0444121358
0|1 -0.1981120 1.2551284 -0.1578420 0.8745813025
1|2 1.7132197 1.2555217 1.3645481 0.1723951335
2|3 2.9953474 1.2793430 2.3413169 0.0192158507
3|4 3.7689941 1.3045702 2.8890696 0.0038638353
4|5 4.6632459 1.3441896 3.4691877 0.0005220346
5|6 5.0089229 1.3605808 3.6814595 0.0002319026
(ci <- confint(m))
Waiting for profiling to be done...
2.5 % 97.5 %
WFNS_log 0.3731453 1.7995066
Total_blood_log -0.2335280 0.6092363
SSV_CSF_log -0.8072398 0.1697179
Ventricular_CSF_log 0.0155963 1.0428723
confint.default(m)
2.5 % 97.5 %
WFNS_log 0.3618361 1.7828133
Total_blood_log -0.2377731 0.6014123
SSV_CSF_log -0.8014729 0.1710779
Ventricular_CSF_log 0.0130894 1.0348642
exp(coef(m))
WFNS_log Total_blood_log SSV_CSF_log Ventricular_CSF_log
2.9221648 1.1993978 0.7296448 1.6887301
exp(cbind(OR = coef(m), ci))
OR 2.5 % 97.5 %
WFNS_log 2.9221648 1.4522953 6.046663
Total_blood_log 1.1993978 0.7917354 1.839026
SSV_CSF_log 0.7296448 0.4460877 1.184970
Ventricular_CSF_log 1.6887301 1.0157186 2.837355