Libraries
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.2 v purrr 0.3.4
## v tibble 3.0.4 v dplyr 1.0.2
## v tidyr 1.1.2 v stringr 1.4.0
## v readr 1.4.0 v forcats 0.5.0
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
#install.packages("MESS")
library(MESS)
## Warning: package 'MESS' was built under R version 4.0.4
#install.packages("multcomp")
library(multcomp)
## Loading required package: mvtnorm
## Loading required package: survival
## Loading required package: TH.data
## Loading required package: MASS
##
## Attaching package: 'MASS'
## The following object is masked from 'package:dplyr':
##
## select
##
## Attaching package: 'TH.data'
## The following object is masked from 'package:MASS':
##
## geyser
library(nparcomp)
## Warning: package 'nparcomp' was built under R version 4.0.4
#install.packages("PMCMRplus")
library(PMCMRplus)
## Warning: package 'PMCMRplus' was built under R version 4.0.4
select <- dplyr::select
Dataset
dataset <- read_csv(file = "data/treatment_data.csv") %>%
unite(col = "group", vaccine,
checkpoint.inhibitor, sep = " + ") %>%
mutate(group = factor(group))
##
## -- Column specification --------------------------------------------------------
## cols(
## id = col_double(),
## experiment = col_double(),
## vaccine = col_character(),
## checkpoint.inhibitor = col_character(),
## t0 = col_double(),
## t4 = col_double(),
## t8 = col_double(),
## t10 = col_double(),
## t14 = col_double(),
## t18 = col_double(),
## t21 = col_double(),
## t24 = col_double()
## )
Area Under Curve
auc(x = c(0, 2, 5, 6), y = c(0, 10, 15, 18), type = "linear")
## [1] 64
auc(x = c(0, 2, 5, 6), y = c(0, 10, 15, 18), type = "spline")
## [1] 65.47887
aux <- dataset %>% select(id, t0:t24) %>%
pivot_longer(names_to = "time",
values_to = "volume", names_prefix = "t", t0:t24) %>%
arrange(id) %>%
mutate(time = as.numeric(time)) %>%
group_by(id) %>%
mutate(auc = auc(x = time, y = volume)) %>%
select(id, auc)
dt <- left_join(dataset, aux, by = "id")
Analysis of Variance
ggplot(dt, aes(x = group, y = auc)) + geom_boxplot()
ggplot(dt, aes(x = group, y = t24)) + geom_boxplot()
av <- aov(auc ~ group, data = dt)
anova(av)
## Analysis of Variance Table
##
## Response: auc
## Df Sum Sq Mean Sq F value Pr(>F)
## group 4 1954277773 488569443 66.211 < 2.2e-16 ***
## Residuals 515 3800170053 7378971
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
av <- aov(t24 ~ group, data = dt)
anova(av)
## Analysis of Variance Table
##
## Response: t24
## Df Sum Sq Mean Sq F value Pr(>F)
## group 4 101989651 25497413 49.186 < 2.2e-16 ***
## Residuals 515 266971726 518392
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Checking assumptions using plots
fitted.values(av)
## 1 2 3 4 5 6 7 8
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 9 10 11 12 13 14 15 16
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 17 18 19 20 21 22 23 24
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 25 26 27 28 29 30 31 32
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 33 34 35 36 37 38 39 40
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 41 42 43 44 45 46 47 48
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 49 50 51 52 53 54 55 56
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 57 58 59 60 61 62 63 64
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 65 66 67 68 69 70 71 72
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 73 74 75 76 77 78 79 80
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 81 82 83 84 85 86 87 88
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 89 90 91 92 93 94 95 96
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 97 98 99 100 101 102 103 104
## 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146 1052.8146
## 105 106 107 108 109 110 111 112
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 113 114 115 116 117 118 119 120
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 121 122 123 124 125 126 127 128
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 129 130 131 132 133 134 135 136
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 137 138 139 140 141 142 143 144
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 145 146 147 148 149 150 151 152
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 153 154 155 156 157 158 159 160
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 161 162 163 164 165 166 167 168
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 169 170 171 172 173 174 175 176
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 177 178 179 180 181 182 183 184
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 185 186 187 188 189 190 191 192
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 193 194 195 196 197 198 199 200
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 201 202 203 204 205 206 207 208
## 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392 511.8392
## 209 210 211 212 213 214 215 216
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 217 218 219 220 221 222 223 224
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 225 226 227 228 229 230 231 232
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 233 234 235 236 237 238 239 240
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 241 242 243 244 245 246 247 248
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 249 250 251 252 253 254 255 256
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 257 258 259 260 261 262 263 264
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 265 266 267 268 269 270 271 272
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 273 274 275 276 277 278 279 280
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 281 282 283 284 285 286 287 288
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 289 290 291 292 293 294 295 296
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 297 298 299 300 301 302 303 304
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 305 306 307 308 309 310 311 312
## 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831 394.0831
## 313 314 315 316 317 318 319 320
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 321 322 323 324 325 326 327 328
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 329 330 331 332 333 334 335 336
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 337 338 339 340 341 342 343 344
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 345 346 347 348 349 350 351 352
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 353 354 355 356 357 358 359 360
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 361 362 363 364 365 366 367 368
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 369 370 371 372 373 374 375 376
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 377 378 379 380 381 382 383 384
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 385 386 387 388 389 390 391 392
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 393 394 395 396 397 398 399 400
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 401 402 403 404 405 406 407 408
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 409 410 411 412 413 414 415 416
## 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692 302.9692
## 417 418 419 420 421 422 423 424
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 425 426 427 428 429 430 431 432
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 433 434 435 436 437 438 439 440
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 441 442 443 444 445 446 447 448
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 449 450 451 452 453 454 455 456
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 457 458 459 460 461 462 463 464
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 465 466 467 468 469 470 471 472
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 473 474 475 476 477 478 479 480
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 481 482 483 484 485 486 487 488
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 489 490 491 492 493 494 495 496
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 497 498 499 500 501 502 503 504
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 505 506 507 508 509 510 511 512
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
## 513 514 515 516 517 518 519 520
## 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562 1461.2562
res <- residuals(av)
plot(av)
# Testing homogeneity of variances
lawstat::levene.test(dt$auc, dt$group)
##
## Modified robust Brown-Forsythe Levene-type test based on the absolute
## deviations from the median
##
## data: dt$auc
## Test Statistic = 37.913, p-value < 2.2e-16
# Testing normality
nortest::ad.test(res)
##
## Anderson-Darling normality test
##
## data: res
## A = 14.428, p-value < 2.2e-16
# Pairwise t test
pairwise.t.test(x = dt$auc, g = dt$group, pool.sd = TRUE,
alternative = "two.sided")
##
## Pairwise comparisons using t tests with pooled SD
##
## data: dt$auc and dt$group
##
## AD-GFP + IgG AD-HER3 + a-CTLA4
## AD-HER3 + a-CTLA4 < 2e-16 -
## AD-HER3 + a-CTLA4 + a-PDL1 < 2e-16 0.693
## AD-HER3 + a-PDL1 < 2e-16 0.156
## AD-HER3 + IgG 8.3e-07 5.8e-13
## AD-HER3 + a-CTLA4 + a-PDL1 AD-HER3 + a-PDL1
## AD-HER3 + a-CTLA4 - -
## AD-HER3 + a-CTLA4 + a-PDL1 - -
## AD-HER3 + a-PDL1 0.094 -
## AD-HER3 + IgG 4.1e-14 3.5e-08
##
## P value adjustment method: holm
# Tukey Honest Significace Differece
test <- glht(av, linfct = mcp(group = "Tukey"))
## Warning in if (class(model) != "gamlss") {: the condition has length > 1 and
## only the first element will be used
summary(test)
##
## Simultaneous Tests for General Linear Hypotheses
##
## Multiple Comparisons of Means: Tukey Contrasts
##
##
## Fit: aov(formula = t24 ~ group, data = dt)
##
## Linear Hypotheses:
## Estimate Std. Error t value
## AD-HER3 + a-CTLA4 - AD-GFP + IgG == 0 -1067.17 99.85 -10.688
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-GFP + IgG == 0 -1158.29 99.85 -11.601
## AD-HER3 + a-PDL1 - AD-GFP + IgG == 0 -949.42 99.85 -9.509
## AD-HER3 + IgG - AD-GFP + IgG == 0 -408.44 99.85 -4.091
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + a-CTLA4 == 0 -91.11 99.85 -0.913
## AD-HER3 + a-PDL1 - AD-HER3 + a-CTLA4 == 0 117.76 99.85 1.179
## AD-HER3 + IgG - AD-HER3 + a-CTLA4 == 0 658.73 99.85 6.598
## AD-HER3 + a-PDL1 - AD-HER3 + a-CTLA4 + a-PDL1 == 0 208.87 99.85 2.092
## AD-HER3 + IgG - AD-HER3 + a-CTLA4 + a-PDL1 == 0 749.85 99.85 7.510
## AD-HER3 + IgG - AD-HER3 + a-PDL1 == 0 540.98 99.85 5.418
## Pr(>|t|)
## AD-HER3 + a-CTLA4 - AD-GFP + IgG == 0 <0.001 ***
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-GFP + IgG == 0 <0.001 ***
## AD-HER3 + a-PDL1 - AD-GFP + IgG == 0 <0.001 ***
## AD-HER3 + IgG - AD-GFP + IgG == 0 <0.001 ***
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + a-CTLA4 == 0 0.892
## AD-HER3 + a-PDL1 - AD-HER3 + a-CTLA4 == 0 0.763
## AD-HER3 + IgG - AD-HER3 + a-CTLA4 == 0 <0.001 ***
## AD-HER3 + a-PDL1 - AD-HER3 + a-CTLA4 + a-PDL1 == 0 0.225
## AD-HER3 + IgG - AD-HER3 + a-CTLA4 + a-PDL1 == 0 <0.001 ***
## AD-HER3 + IgG - AD-HER3 + a-PDL1 == 0 <0.001 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## (Adjusted p values reported -- single-step method)
# Dunnet test
test <- glht(av, linfct = mcp(group = "Dunnet"))
## Warning in if (class(model) != "gamlss") {: the condition has length > 1 and
## only the first element will be used
summary(test)
##
## Simultaneous Tests for General Linear Hypotheses
##
## Multiple Comparisons of Means: Dunnett Contrasts
##
##
## Fit: aov(formula = t24 ~ group, data = dt)
##
## Linear Hypotheses:
## Estimate Std. Error t value
## AD-HER3 + a-CTLA4 - AD-GFP + IgG == 0 -1067.17 99.85 -10.688
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-GFP + IgG == 0 -1158.29 99.85 -11.601
## AD-HER3 + a-PDL1 - AD-GFP + IgG == 0 -949.42 99.85 -9.509
## AD-HER3 + IgG - AD-GFP + IgG == 0 -408.44 99.85 -4.091
## Pr(>|t|)
## AD-HER3 + a-CTLA4 - AD-GFP + IgG == 0 < 1e-04 ***
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-GFP + IgG == 0 < 1e-04 ***
## AD-HER3 + a-PDL1 - AD-GFP + IgG == 0 < 1e-04 ***
## AD-HER3 + IgG - AD-GFP + IgG == 0 0.000193 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## (Adjusted p values reported -- single-step method)
# Specific contrast
levels(dt$group)
## [1] "AD-GFP + IgG" "AD-HER3 + a-CTLA4"
## [3] "AD-HER3 + a-CTLA4 + a-PDL1" "AD-HER3 + a-PDL1"
## [5] "AD-HER3 + IgG"
# Changing the order of the groups
dt <- dt %>%
mutate(group = factor(group,
levels = c("AD-HER3 + IgG",
"AD-HER3 + a-CTLA4",
"AD-HER3 + a-PDL1",
"AD-HER3 + a-CTLA4 + a-PDL1",
"AD-GFP + IgG")))
levels(dt$group)
## [1] "AD-HER3 + IgG" "AD-HER3 + a-CTLA4"
## [3] "AD-HER3 + a-PDL1" "AD-HER3 + a-CTLA4 + a-PDL1"
## [5] "AD-GFP + IgG"
C1 <- c(1, 0, 0, 0, -1)
C2 <- c(1, 0, -1, 0, 0)
C3 <- c(1, -1, 0, 0, 0)
C4 <- c(1, 0, 0, -1, 0)
C5 <- c(0, 1, -1, 0, 0)
C6 <- c(0, 1, 0, -1, 0)
C7 <- c(0, 0, 1, -1, 0)
C <- rbind(C1, C2, C3, C4, C5, C6, C7)
test <- glht(av, linfct = C)
summary(test)
##
## Simultaneous Tests for General Linear Hypotheses
##
## Fit: aov(formula = t24 ~ group, data = dt)
##
## Linear Hypotheses:
## Estimate Std. Error t value Pr(>|t|)
## C1 == 0 1869.70 157.87 11.843 <0.001 ***
## C2 == 0 2619.54 157.87 16.593 <0.001 ***
## C3 == 0 2528.43 157.87 16.016 <0.001 ***
## C4 == 0 2410.67 157.87 15.270 <0.001 ***
## C5 == 0 91.11 99.85 0.913 0.824
## C6 == 0 -117.76 99.85 -1.179 0.665
## C7 == 0 -208.87 99.85 -2.092 0.163
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## (Adjusted p values reported -- single-step method)
Welch ANOVA
oneway.test(auc ~ group, data = dt, var.equal = FALSE)
##
## One-way analysis of means (not assuming equal variances)
##
## data: auc and group
## F = 49.47, num df = 4.00, denom df = 249.39, p-value < 2.2e-16
pairwise.t.test(dt$auc, dt$group, pool.sd = FALSE, alternative = "two.sided")
##
## Pairwise comparisons using t tests with non-pooled SD
##
## data: dt$auc and dt$group
##
## AD-HER3 + IgG AD-HER3 + a-CTLA4 AD-HER3 + a-PDL1
## AD-HER3 + a-CTLA4 4.5e-11 - -
## AD-HER3 + a-PDL1 3.2e-07 0.00502 -
## AD-HER3 + a-CTLA4 + a-PDL1 2.8e-12 0.43688 0.00022
## AD-GFP + IgG 0.00096 < 2e-16 6.1e-16
## AD-HER3 + a-CTLA4 + a-PDL1
## AD-HER3 + a-CTLA4 -
## AD-HER3 + a-PDL1 -
## AD-HER3 + a-CTLA4 + a-PDL1 -
## AD-GFP + IgG < 2e-16
##
## P value adjustment method: holm
gamesHowellTest(x=dt$auc, g=dt$group)
##
## Pairwise comparisons using Games-Howell test
## data: dt$auc and dt$group
## AD-HER3 + IgG AD-HER3 + a-CTLA4 AD-HER3 + a-PDL1
## AD-HER3 + a-CTLA4 7.6e-11 - -
## AD-HER3 + a-PDL1 6.3e-07 0.02095 -
## AD-HER3 + a-CTLA4 + a-PDL1 4.1e-12 0.93640 0.00052
## AD-GFP + IgG 0.00294 < 2e-16 3.0e-14
## AD-HER3 + a-CTLA4 + a-PDL1
## AD-HER3 + a-CTLA4 -
## AD-HER3 + a-PDL1 -
## AD-HER3 + a-CTLA4 + a-PDL1 -
## AD-GFP + IgG 3.5e-14
##
## P value adjustment method: none
## alternative hypothesis: two.sided
Kruskal-Wallis test
kruskal.test(dt$auc, dt$group)
##
## Kruskal-Wallis rank sum test
##
## data: dt$auc and dt$group
## Kruskal-Wallis chi-squared = 204.35, df = 4, p-value < 2.2e-16
# All comparisons
## Dunn test
pairwise.wilcox.test(x=dt$auc, g=dt$group,
alternative = "two.sided", correct = TRUE,
exact = FALSE)
##
## Pairwise comparisons using Wilcoxon rank sum test with continuity correction
##
## data: dt$auc and dt$group
##
## AD-HER3 + IgG AD-HER3 + a-CTLA4 AD-HER3 + a-PDL1
## AD-HER3 + a-CTLA4 1.1e-10 - -
## AD-HER3 + a-PDL1 1.4e-06 0.00034 -
## AD-HER3 + a-CTLA4 + a-PDL1 2.1e-13 0.71305 2.8e-08
## AD-GFP + IgG 1.0e-05 < 2e-16 < 2e-16
## AD-HER3 + a-CTLA4 + a-PDL1
## AD-HER3 + a-CTLA4 -
## AD-HER3 + a-PDL1 -
## AD-HER3 + a-CTLA4 + a-PDL1 -
## AD-GFP + IgG < 2e-16
##
## P value adjustment method: holm
kwAllPairsDunnTest(x=dt$auc, g=dt$group)
## Warning in kwAllPairsDunnTest.default(x = dt$auc, g = dt$group): Ties are
## present. z-quantiles were corrected for ties.
##
## Pairwise comparisons using Dunn's all-pairs test
## data: dt$auc and dt$group
## AD-HER3 + IgG AD-HER3 + a-CTLA4 AD-HER3 + a-PDL1
## AD-HER3 + a-CTLA4 1.0e-11 - -
## AD-HER3 + a-PDL1 0.00016 0.00628 -
## AD-HER3 + a-CTLA4 + a-PDL1 3.5e-14 0.44251 0.00059
## AD-GFP + IgG 0.00012 < 2e-16 6.5e-16
## AD-HER3 + a-CTLA4 + a-PDL1
## AD-HER3 + a-CTLA4 -
## AD-HER3 + a-PDL1 -
## AD-HER3 + a-CTLA4 + a-PDL1 -
## AD-GFP + IgG < 2e-16
##
## P value adjustment method: holm
## alternative hypothesis: two.sided
## Conover's test
kwAllPairsConoverTest(x=dt$auc, g=dt$group)
## Warning in kwAllPairsConoverTest.default(x = dt$auc, g = dt$group): Ties are
## present. Quantiles were corrected for ties.
##
## Pairwise comparisons using Conover's all-pairs test
## data: dt$auc and dt$group
## AD-HER3 + IgG AD-HER3 + a-CTLA4 AD-HER3 + a-PDL1
## AD-HER3 + a-CTLA4 2.1e-10 - -
## AD-HER3 + a-PDL1 2.2e-06 0.0016 -
## AD-HER3 + a-CTLA4 + a-PDL1 2.1e-10 0.8631 2.5e-05
## AD-GFP + IgG 9.9e-07 2.1e-10 2.1e-10
## AD-HER3 + a-CTLA4 + a-PDL1
## AD-HER3 + a-CTLA4 -
## AD-HER3 + a-PDL1 -
## AD-HER3 + a-CTLA4 + a-PDL1 -
## AD-GFP + IgG 2.1e-10
##
## P value adjustment method: single-step
## Munzel-Hothorn test
test <- nparcomp(auc ~ group, data = dt,
type = "Tukey",
alternative = "two.sided")
##
## #------Nonparametric Multiple Comparisons for relative contrast effects-----#
##
## - Alternative Hypothesis: True relative contrast effect p is not equal to 1/2
## - Type of Contrast : Tukey
## - Confidence level: 95 %
## - Method = Logit - Transformation
## - Estimation Method: Pairwise rankings
##
## #---------------------------Interpretation----------------------------------#
## p(a,b) > 1/2 : b tends to be larger than a
## #---------------------------------------------------------------------------#
##
summary(test)
##
## #------------Nonparametric Multiple Comparisons for relative contrast effects----------#
##
## - Alternative Hypothesis: True relative contrast effect p is not equal to 1/2
## - Estimation Method: Global Pseudo ranks
## - Type of Contrast : Tukey
## - Confidence Level: 95 %
## - Method = Logit - Transformation
##
## - Estimation Method: Pairwise rankings
##
## #---------------------------Interpretation--------------------------------------------#
## p(a,b) > 1/2 : b tends to be larger than a
## #-------------------------------------------------------------------------------------#
##
## #----Data Info-------------------------------------------------------------------------#
## Sample Size
## 1 AD-HER3 + IgG 104
## 2 AD-HER3 + a-CTLA4 104
## 3 AD-HER3 + a-PDL1 104
## 4 AD-HER3 + a-CTLA4 + a-PDL1 104
## 5 AD-GFP + IgG 104
##
## #----Contrast--------------------------------------------------------------------------#
## AD-HER3 + IgG AD-HER3 + a-CTLA4
## AD-HER3 + a-CTLA4 - AD-HER3 + IgG -1 1
## AD-HER3 + a-PDL1 - AD-HER3 + IgG -1 0
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + IgG -1 0
## AD-GFP + IgG - AD-HER3 + IgG -1 0
## AD-HER3 + a-PDL1 - AD-HER3 + a-CTLA4 0 -1
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + a-CTLA4 0 -1
## AD-GFP + IgG - AD-HER3 + a-CTLA4 0 -1
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + a-PDL1 0 0
## AD-GFP + IgG - AD-HER3 + a-PDL1 0 0
## AD-GFP + IgG - AD-HER3 + a-CTLA4 + a-PDL1 0 0
## AD-HER3 + a-PDL1
## AD-HER3 + a-CTLA4 - AD-HER3 + IgG 0
## AD-HER3 + a-PDL1 - AD-HER3 + IgG 1
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + IgG 0
## AD-GFP + IgG - AD-HER3 + IgG 0
## AD-HER3 + a-PDL1 - AD-HER3 + a-CTLA4 1
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + a-CTLA4 0
## AD-GFP + IgG - AD-HER3 + a-CTLA4 0
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + a-PDL1 -1
## AD-GFP + IgG - AD-HER3 + a-PDL1 -1
## AD-GFP + IgG - AD-HER3 + a-CTLA4 + a-PDL1 0
## AD-HER3 + a-CTLA4 + a-PDL1
## AD-HER3 + a-CTLA4 - AD-HER3 + IgG 0
## AD-HER3 + a-PDL1 - AD-HER3 + IgG 0
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + IgG 1
## AD-GFP + IgG - AD-HER3 + IgG 0
## AD-HER3 + a-PDL1 - AD-HER3 + a-CTLA4 0
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + a-CTLA4 1
## AD-GFP + IgG - AD-HER3 + a-CTLA4 0
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + a-PDL1 1
## AD-GFP + IgG - AD-HER3 + a-PDL1 0
## AD-GFP + IgG - AD-HER3 + a-CTLA4 + a-PDL1 -1
## AD-GFP + IgG
## AD-HER3 + a-CTLA4 - AD-HER3 + IgG 0
## AD-HER3 + a-PDL1 - AD-HER3 + IgG 0
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + IgG 0
## AD-GFP + IgG - AD-HER3 + IgG 1
## AD-HER3 + a-PDL1 - AD-HER3 + a-CTLA4 0
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + a-CTLA4 0
## AD-GFP + IgG - AD-HER3 + a-CTLA4 1
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + a-PDL1 0
## AD-GFP + IgG - AD-HER3 + a-PDL1 1
## AD-GFP + IgG - AD-HER3 + a-CTLA4 + a-PDL1 1
##
## #----Analysis--------------------------------------------------------------------------#
## Comparison Estimator Lower Upper
## 1 p( AD-HER3 + IgG , AD-HER3 + a-CTLA4 ) 0.231 0.154 0.331
## 2 p( AD-HER3 + IgG , AD-HER3 + a-PDL1 ) 0.296 0.203 0.410
## 3 p( AD-HER3 + IgG , AD-HER3 + a-CTLA4 + a-PDL1 ) 0.195 0.124 0.293
## 4 p( AD-HER3 + IgG , AD-GFP + IgG ) 0.686 0.578 0.777
## 5 p( AD-HER3 + a-CTLA4 , AD-HER3 + a-PDL1 ) 0.651 0.533 0.753
## 6 p( AD-HER3 + a-CTLA4 , AD-HER3 + a-CTLA4 + a-PDL1 ) 0.485 0.376 0.596
## 7 p( AD-HER3 + a-CTLA4 , AD-GFP + IgG ) 0.917 0.851 0.955
## 8 p( AD-HER3 + a-PDL1 , AD-HER3 + a-CTLA4 + a-PDL1 ) 0.266 0.174 0.385
## 9 p( AD-HER3 + a-PDL1 , AD-GFP + IgG ) 0.911 0.841 0.952
## 10 p( AD-HER3 + a-CTLA4 + a-PDL1 , AD-GFP + IgG ) 0.923 0.860 0.959
## Statistic p.Value
## 1 -6.5901665 1.975018e-10
## 2 -4.7347273 1.737555e-05
## 3 -7.2284771 1.885381e-12
## 4 4.5863770 5.021890e-05
## 5 3.4797623 4.904029e-03
## 6 -0.3609986 9.998227e-01
## 7 9.9782432 0.000000e+00
## 8 -5.0905335 3.688312e-06
## 9 9.5853066 0.000000e+00
## 10 10.1785005 0.000000e+00
##
## #----Overall---------------------------------------------------------------------------#
## Quantile p.Value
## 1 2.736555 0
##
## #--------------------------------------------------------------------------------------#
# Many-to One Comparisons
## Dunn test
kwManyOneDunnTest(x=dt$auc, g=dt$group)
## Warning in kwManyOneDunnTest.default(x = dt$auc, g = dt$group): Ties are
## present. z-quantiles were corrected for ties.
##
## Pairwise comparisons using Dunn's many-to-one test
##
## data: dt$auc and dt$group
## AD-HER3 + IgG
## AD-HER3 + a-CTLA4 2.7e-12
## AD-HER3 + a-PDL1 0.00015
## AD-HER3 + a-CTLA4 + a-PDL1 1.5e-14
## AD-GFP + IgG 8.2e-05
##
## P value adjustment method: single-step
## alternative hypothesis: two.sided
## ConoverTest test
kwManyOneConoverTest(x=dt$auc, g=dt$group)
## Warning in kwManyOneConoverTest.default(x = dt$auc, g = dt$group): Ties are
## present. Quantiles were corrected for ties.
##
## Pairwise comparisons using Conover's many-to-one test
## data: dt$auc and dt$group
## AD-HER3 + IgG
## AD-HER3 + a-CTLA4 < 2e-16
## AD-HER3 + a-PDL1 9.4e-07
## AD-HER3 + a-CTLA4 + a-PDL1 < 2e-16
## AD-GFP + IgG 3.2e-07
##
## P value adjustment method: single-step
## alternative hypothesis: two.sided
## Munzel-Hothorn test
test <- nparcomp(auc ~ group, data = dt,
type = "Dunnet",
alternative = "two.sided")
##
## #------Nonparametric Multiple Comparisons for relative contrast effects-----#
##
## - Alternative Hypothesis: True relative contrast effect p is not equal to 1/2
## - Type of Contrast : Dunnett
## - Confidence level: 95 %
## - Method = Logit - Transformation
## - Estimation Method: Pairwise rankings
##
## #---------------------------Interpretation----------------------------------#
## p(a,b) > 1/2 : b tends to be larger than a
## #---------------------------------------------------------------------------#
##
summary(test)
##
## #------------Nonparametric Multiple Comparisons for relative contrast effects----------#
##
## - Alternative Hypothesis: True relative contrast effect p is not equal to 1/2
## - Estimation Method: Global Pseudo ranks
## - Type of Contrast : Dunnet
## - Confidence Level: 95 %
## - Method = Logit - Transformation
##
## - Estimation Method: Pairwise rankings
##
## #---------------------------Interpretation--------------------------------------------#
## p(a,b) > 1/2 : b tends to be larger than a
## #-------------------------------------------------------------------------------------#
##
## #----Data Info-------------------------------------------------------------------------#
## Sample Size
## 1 AD-HER3 + IgG 104
## 2 AD-HER3 + a-CTLA4 104
## 3 AD-HER3 + a-PDL1 104
## 4 AD-HER3 + a-CTLA4 + a-PDL1 104
## 5 AD-GFP + IgG 104
##
## #----Contrast--------------------------------------------------------------------------#
## AD-HER3 + IgG AD-HER3 + a-CTLA4
## AD-HER3 + a-CTLA4 - AD-HER3 + IgG -1 1
## AD-HER3 + a-PDL1 - AD-HER3 + IgG -1 0
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + IgG -1 0
## AD-GFP + IgG - AD-HER3 + IgG -1 0
## AD-HER3 + a-PDL1
## AD-HER3 + a-CTLA4 - AD-HER3 + IgG 0
## AD-HER3 + a-PDL1 - AD-HER3 + IgG 1
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + IgG 0
## AD-GFP + IgG - AD-HER3 + IgG 0
## AD-HER3 + a-CTLA4 + a-PDL1
## AD-HER3 + a-CTLA4 - AD-HER3 + IgG 0
## AD-HER3 + a-PDL1 - AD-HER3 + IgG 0
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + IgG 1
## AD-GFP + IgG - AD-HER3 + IgG 0
## AD-GFP + IgG
## AD-HER3 + a-CTLA4 - AD-HER3 + IgG 0
## AD-HER3 + a-PDL1 - AD-HER3 + IgG 0
## AD-HER3 + a-CTLA4 + a-PDL1 - AD-HER3 + IgG 0
## AD-GFP + IgG - AD-HER3 + IgG 1
##
## #----Analysis--------------------------------------------------------------------------#
## Comparison Estimator Lower Upper
## 1 p( AD-HER3 + IgG , AD-HER3 + a-CTLA4 ) 0.231 0.161 0.318
## 2 p( AD-HER3 + IgG , AD-HER3 + a-PDL1 ) 0.296 0.212 0.396
## 3 p( AD-HER3 + IgG , AD-HER3 + a-CTLA4 + a-PDL1 ) 0.195 0.131 0.281
## 4 p( AD-HER3 + IgG , AD-GFP + IgG ) 0.686 0.591 0.768
## Statistic p.Value
## 1 -6.590167 7.543999e-11
## 2 -4.734727 6.412051e-06
## 3 -7.228477 8.731904e-13
## 4 4.586377 1.754250e-05
##
## #----Overall---------------------------------------------------------------------------#
## Quantile p.Value
## 1 2.426172 8.731904e-13
##
## #--------------------------------------------------------------------------------------#
# Specific Contrast
test <- nparcomp(auc ~ group, data = dt,
type = "UserDefined",
contrast.matrix = C,
alternative = "two.sided")
##
## #------Nonparametric Multiple Comparisons for relative contrast effects-----#
##
## - Alternative Hypothesis: True relative contrast effect p is not equal to 1/2
## - Type of Contrast : UserDefined
## - Confidence level: 95 %
## - Method = Logit - Transformation
## - Estimation Method: Pairwise rankings
##
## #---------------------------Interpretation----------------------------------#
## p(a,b) > 1/2 : b tends to be larger than a
## #---------------------------------------------------------------------------#
##
summary(test)
##
## #------------Nonparametric Multiple Comparisons for relative contrast effects----------#
##
## - Alternative Hypothesis: True relative contrast effect p is not equal to 1/2
## - Estimation Method: Global Pseudo ranks
## - Type of Contrast : UserDefined
## - Confidence Level: 95 %
## - Method = Logit - Transformation
##
## - Estimation Method: Pairwise rankings
##
## #---------------------------Interpretation--------------------------------------------#
## p(a,b) > 1/2 : b tends to be larger than a
## #-------------------------------------------------------------------------------------#
##
## #----Data Info-------------------------------------------------------------------------#
## Sample Size
## 1 AD-HER3 + IgG 104
## 2 AD-HER3 + a-CTLA4 104
## 3 AD-HER3 + a-PDL1 104
## 4 AD-HER3 + a-CTLA4 + a-PDL1 104
## 5 AD-GFP + IgG 104
##
## #----Contrast--------------------------------------------------------------------------#
## AD-HER3 + IgG AD-HER3 + a-CTLA4 AD-HER3 + a-PDL1 AD-HER3 + a-CTLA4 + a-PDL1
## C 1 1 0 0 0
## C 2 1 0 -1 0
## C 3 1 -1 0 0
## C 4 1 0 0 -1
## C 5 0 1 -1 0
## C 6 0 1 0 -1
## C 7 0 0 1 -1
## AD-GFP + IgG
## C 1 -1
## C 2 0
## C 3 0
## C 4 0
## C 5 0
## C 6 0
## C 7 0
##
## #----Analysis--------------------------------------------------------------------------#
## Comparison Estimator Lower Upper Statistic p.Value
## 1 C 1 0.314 0.226 0.417 -4.5863770 1.901969e-05
## 2 C 2 0.704 0.596 0.794 4.7347273 9.109058e-06
## 3 C 3 0.769 0.674 0.843 6.5901665 1.434117e-10
## 4 C 4 0.805 0.712 0.873 7.2284771 8.243073e-12
## 5 C 5 0.349 0.251 0.462 -3.4797623 3.219480e-03
## 6 C 6 0.515 0.408 0.620 0.3609986 9.982918e-01
## 7 C 7 0.734 0.621 0.823 5.0905335 1.478274e-06
##
## #----Overall---------------------------------------------------------------------------#
## Quantile p.Value
## 1 2.619199 8.243073e-12
##
## #--------------------------------------------------------------------------------------#