-
Notifications
You must be signed in to change notification settings - Fork 0
/
SaveOR.R
254 lines (152 loc) · 5.76 KB
/
SaveOR.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
library(ggplot2)
library(sciplot)
library(mosaic)
library(tableone)
library(survival)
library(car)
library(gridExtra)
library(R.utils)
library(foreign)
library(lattice)
library(lme4)
library(MASS)
library(dplyr)
library(tidyr)
library(stringr)
library(lubridate)
library(rgl)
library(multcomp)
library(R.utils)
library(matlab)
install.packages('caret')
library(caret)
#This is the anaysis for the SAVE OR data
#read in data
save = read.csv('SaveTotal.csv')
head(save)
count(save)
#only include patients fROM the OR
saveor = subset(save, Area == 'OR')
count(saveor)
#exclude patients with missing data
saveor2 = subset(saveor, Total.Score != 'NA')
saveor3 = subset(saveor2, Grade != 'NA')
count(saveor3)
View(saveor3)
#subset patients into difficult and easy intubation groups
difficult= subset(saveor3, Grade >="3")
difficult
difficult = subset(difficult, Total.Score != '0')
easy= subset(saveor3, Grade < "3")
easy
difficult$Grade
easy$Grade
count(difficult)
count(easy)
view(easy)
#get rid of useless columns
saveor3$X = NULL
saveor3$X.1 = NULL
saveor3$X.2 = NULL
#Primary analysis of score
count(easy, Total.Score<5)
count(difficult, Total.Score>=5)
difficult$Total.Score
count(easy)
count(difficult)
difficult$Total.Score
brave$Disease.associated.w..difficult.airway
easy$Disease.associated.w..difficult.airway
View(difficult)
amatrix <- matrix(c(319,5,17,4),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(amatrix)
chisq.test(amatrix)
#mutlivariable analysis
HODIF <- matrix(c(69,10,0,0),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(HODIF)
count(easy$Disease.associated.w..difficult.airway)
count(difficult$Disease.associated.w..difficult.airway)
DISEASAS <- matrix(c(68,10,1,0),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(DISEASAS)
count(easy$Mallampati)
count(difficult$Mallampati)
MALLA <- matrix(c(57,4,12,5),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(MALLA)
count(easy$Thyro.mental.distance)
count(difficult$Thyro.mental.distance)
THYROMEN <- matrix(c(63,3,6,6),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(THYROMEN)
count(easy$Mouth.Opening)
count(difficult$Mouth.Opening)
MOUTHOPEN <- matrix(c(66,8,3,1),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(MOUTHOPEN)
count(easy$Neck.mobility)
count(difficult$Neck.mobility)
NECKMOB <- matrix(c(38,1,31,8),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(NECKMOB)
count(easy$Neck.Circumference)
count(difficult$Neck.Circumference)
NECKCIR <- matrix(c(40,7,29,2),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(NECKCIR)
count(easy$BMI..30)
count(difficult$BMI..30)
BMI30 <- matrix(c(48,8,21,1),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(BMI30)
count(easy$BMI..40)
count(difficult$BMI..40)
BMI40 <- matrix(c(62,7,7,2),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(BMI40)
count(easy$Thyro.sternal.distance)
count(difficult$Thyro.sternal.distance)
THYROSTERN <- matrix(c(65,9,4,0),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(THYROSTERN)
count(easy$Mandibular.angle)
count(difficult$Mandibular.angle)
MANDIBANGLE <- matrix(c(59,4,11,5),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(MANDIBANGLE)
count(easy$Overbite)
count(difficult$Overbite)
OVERBITE <- matrix(c(62,5,7,4),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(OVERBITE)
count(easy$Absence.of.upper.incisors)
count(difficult$Absence.of.upper.incisors)
ABSUPPINC <- matrix(c(43,0,26,9),ncol=2,byrow=TRUE,
dimnames = list(c("BRAVE Score < 5", "BRAVE Score >=5"),
c("Easy Intubation Group", "Difficult Intubation Group")))
fisher.test(ABSUPPINC)
#evaluate the affect of diplicate obesity documentation
head(easy)
head(easy$Disease.associated.w..difficult.airway)
easy3 = subset(easy, Disease.associated.w..difficult.airway != '3' )
count(easy3)
count(easy)
library(utils)
view(easy3)
head(easy3)
head(easy)