-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.R
114 lines (97 loc) · 1.56 KB
/
global.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
library(dplyr)
library(shinyBS)
library(shinyalert)
library(data.table)
# source("R/Calculations.R")
# source("R/Plotting.R")
betaCoefficients <- readRDS(
"Data/betaCoefficients.rds"
)
intercepts <- list(
mortality = -13.6,
icu = -.08949
)
fifths <- list(
mortality = c(
.01300704 * 100,
.03418947 * 100,
.06762459 * 100,
.14041268 * 100
),
icu = c(
.06701038 * 100,
.11692562 * 100,
.16903291 * 100,
.24799012 * 100
)
)
calibrationQuantiles <- readRDS(
"Data/calibrationQuantiles.rds"
)
calibration <- readRDS(
"Data/calibration.rds"
)
auc <- readRDS(
"Data/auc.rds"
)
calibrationIntercept <- readRDS(
"Data/calibrationIntercept.rds"
)
calibrationSlope <- readRDS(
"Data/calibrationSlope.rds"
)
# ----- Color grid behind graph output -----
colorMap <- data.frame(
fifth = 1:5,
color = c(
"#dffbdf",
"#44D492",
"#F5EB67",
"#FFA15C",
"#FA233E"
)
)
develTab1Long <- readRDS(
"Data/developTable1.rds"
) %>%
dplyr::mutate(
status = factor(
.$status,
levels = c(
"Overall",
"Dead",
"Discharged",
"In hospital"
)
)
) %>%
dplyr::arrange(
.$status,
.$variable
)
validationTab1Long <- readRDS(
"Data/validateTable1.rds"
) %>%
dplyr::mutate(
status = factor(
.$status,
levels = c(
"Overall",
"Dead",
"Discharged",
"In hospital"
)
)
) %>%
dplyr::arrange(
.$status,
.$variable
)
transformationsMortality <- list(
age = identity,
respiratoryRate = log,
crp = log,
ldh = log,
albumin = log,
urea = log
)