diff --git a/.nojekyll b/.nojekyll index 2dc42aa..eb81149 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -9b24b843 \ No newline at end of file +cb96379f \ No newline at end of file diff --git a/authors.html b/authors.html index b3ad7c6..eea6062 100644 --- a/authors.html +++ b/authors.html @@ -293,14 +293,18 @@

11  +Katrine Strandberg-Larsen +Department of Public Health, University of Copenhagen, Copenhagen, Denmark + + Konstantina Chalkou Institute of Social and Preventive Medicine (ISPM), University of Bern, Bern, Switzerland - + Mohammad Ehsanul Karim School of Population and Public Health, University of British Columbia, Vancouver, Canada - + Tammy Jiang Biogen, Cambridge, MA, United States diff --git a/chapter_03.html b/chapter_03.html index b7b8d74..41e1913 100644 --- a/chapter_03.html +++ b/chapter_03.html @@ -316,7 +316,7 @@

Version info

[21] tibble_3.2.1 lifecycle_1.0.4 farver_2.1.1 ggplot2_3.4.4 [25] purrr_1.0.2 tidyr_1.3.0 htmlwidgets_1.6.3 vctrs_0.6.4 [29] codetools_0.2-19 glue_1.6.2 evaluate_0.23 rmarkdown_2.25 -[33] compiler_4.2.3 pillar_1.9.0 cellranger_1.1.0 scales_1.2.1 +[33] compiler_4.2.3 pillar_1.9.0 cellranger_1.1.0 scales_1.3.0 [37] generics_0.1.3 jsonlite_1.8.7 pkgconfig_2.0.3 diff --git a/chapter_06.html b/chapter_06.html index 9c0f2b9..8d18507 100644 --- a/chapter_06.html +++ b/chapter_06.html @@ -1498,7 +1498,7 @@

Version info

[21] munsell_0.5.0 gtable_0.3.4 htmlwidgets_1.6.3 codetools_0.2-19 [25] evaluate_0.23 labeling_0.4.3 forcats_1.0.0 fastmap_1.1.1 [29] class_7.3-21 fansi_1.0.5 optmatch_0.10.7 Rcpp_1.0.11 -[33] checkmate_2.3.0 backports_1.4.1 scales_1.2.1 jsonlite_1.8.7 +[33] checkmate_2.3.0 backports_1.4.1 scales_1.3.0 jsonlite_1.8.7 [37] farver_2.1.1 chk_0.9.1 hms_1.1.3 digest_0.6.33 [41] insight_0.19.6 cli_3.6.1 tools_4.2.3 magrittr_2.0.3 [45] proxy_0.4-27 tibble_3.2.1 crayon_1.5.2 pkgconfig_2.0.3 diff --git a/chapter_07.html b/chapter_07.html index 7b31140..494b8c5 100644 --- a/chapter_07.html +++ b/chapter_07.html @@ -1835,7 +1835,7 @@

Version info

other attached packages: [1] interactions_1.1.5 survey_4.2-1 survival_3.5-3 Matrix_1.6-3 - [5] interactionR_0.1.6 simcausal_0.5.6 scales_1.2.1 ggplot2_3.4.4 + [5] interactionR_0.1.6 simcausal_0.5.6 scales_1.3.0 ggplot2_3.4.4 [9] xtable_1.8-4 dplyr_1.1.4 kableExtra_1.3.4 knitr_1.45 [13] cowplot_1.1.1 broom_1.0.5 MatchIt_4.5.5 jtools_2.2.2 [17] sandwich_3.0-2 lmtest_0.9-40 zoo_1.8-12 optmatch_0.10.7 @@ -1849,7 +1849,7 @@

Version info

[13] compiler_4.2.3 textshaping_0.3.7 cli_3.6.1 [16] rvest_1.0.3 expm_0.999-7 flextable_0.9.4 [19] xml2_1.3.5 officer_0.6.3 fontBitstreamVera_0.1.1 -[22] labeling_0.4.3 mvtnorm_1.2-3 askpass_1.2.0 +[22] labeling_0.4.3 mvtnorm_1.2-4 askpass_1.2.0 [25] systemfonts_1.0.5 stringr_1.5.1 digest_0.6.33 [28] rmarkdown_2.25 svglite_2.1.2 gfonts_0.2.0 [31] pkgconfig_2.0.3 htmltools_0.5.7 highr_0.10 diff --git a/chapter_09.html b/chapter_09.html index 519ce4d..3bc567d 100644 --- a/chapter_09.html +++ b/chapter_09.html @@ -942,7 +942,7 @@

Version info

[34] iterators_1.0.14 insight_0.19.6 xfun_0.41 [37] stringr_1.5.1 lme4_1.1-35.1 rvest_1.0.3 [40] lifecycle_1.0.4 rngtools_1.5.2 rstatix_0.7.2 -[43] pan_1.9 zoo_1.8-12 scales_1.2.1 +[43] pan_1.9 zoo_1.8-12 scales_1.3.0 [46] rlemon_0.2.1 parallel_4.2.3 RColorBrewer_1.1-3 [49] yaml_2.3.7 gridExtra_2.3 UpSetR_1.4.0 [52] rpart_4.1.19 gam_1.22-2 stringi_1.8.2 diff --git a/chapter_10.html b/chapter_10.html index 0e8e094..db6cd6c 100644 --- a/chapter_10.html +++ b/chapter_10.html @@ -860,16 +860,16 @@

REM vs. STD -0.9 (0.73; 1.09) +0.9 (0.73; 1.08) TOCI vs. STD @@ -893,7 +893,7 @@

REM vs. TOCI -1.02 (0.75; 1.27) +1.02 (0.75; 1.26) @@ -1342,12 +1342,12 @@

sucra.uc$ranking.random
 ADA160/80     FIL100     FIL200 GOL200/100      INF10       INF5    OZA0.92 
-0.25363636 0.19090909 0.41909091 0.63181818 0.61454545 0.75909091 0.75545455 
+0.28727273 0.18909091 0.43909091 0.67363636 0.61818182 0.73909091 0.73090909 
        PBO      TOF10      UPA45       UST6     VED300 
-0.01636364 0.38545455 0.97818182 0.36636364 0.62909091 
+0.01090909 0.39272727 0.98000000 0.31818182 0.62090909
-

These results indicate that 97.8% of the evaluated treatments are worse than UPA45.

+

These results indicate that 98% of the evaluated treatments are worse than UPA45.

@@ -1377,7 +1377,7 @@

Version info

[5] dplyr_1.1.4 kableExtra_1.3.4 loaded via a namespace (and not attached): - [1] Rcpp_1.0.11 mvtnorm_1.2-3 svglite_2.1.2 + [1] Rcpp_1.0.11 mvtnorm_1.2-4 svglite_2.1.2 [4] lattice_0.20-45 digest_0.6.33 utf8_1.2.4 [7] truncnorm_1.0-9 slam_0.1-50 R6_2.5.1 [10] plyr_1.8.9 magic_1.6-1 evaluate_0.23 @@ -1394,7 +1394,7 @@

Version info

[43] viridisLite_0.4.2 withr_2.5.2 MASS_7.3-58.2 [46] grid_4.2.3 nlme_3.1-162 jsonlite_1.8.7 [49] gtable_0.3.4 lifecycle_1.0.4 magrittr_2.0.3 -[52] metafor_4.4-0 scales_1.2.1 metadat_1.2-0 +[52] metafor_4.4-0 scales_1.3.0 metadat_1.2-0 [55] cli_3.6.1 stringi_1.8.2 remotes_2.4.2.1 [58] xml2_1.3.5 generics_0.1.3 vctrs_0.6.4 [61] boot_1.3-28.1 forcats_1.0.0 tools_4.2.3 diff --git a/chapter_11.html b/chapter_11.html index 6510eb2..5f65572 100644 --- a/chapter_11.html +++ b/chapter_11.html @@ -760,7 +760,7 @@

Version info

[22] R2jags_0.7-1 Matrix_1.6-3 mcmcplots_0.4.3 [25] htmltools_0.5.7 httpuv_1.6.12 plyr_1.8.9 [28] pkgconfig_2.0.3 purrr_1.0.2 xtable_1.8-4 -[31] scales_1.2.1 webshot_0.5.5 svglite_2.1.2 +[31] scales_1.3.0 webshot_0.5.5 svglite_2.1.2 [34] rjags_4-14 later_1.3.1 ggstats_0.5.1 [37] metadat_1.2-0 lme4_1.1-35.1 tibble_3.2.1 [40] farver_2.1.1 generics_0.1.3 ellipsis_0.3.2 diff --git a/chapter_12.html b/chapter_12.html index a65de78..a45d72c 100644 --- a/chapter_12.html +++ b/chapter_12.html @@ -505,7 +505,7 @@

Version info

[21] foreach_1.5.2 lifecycle_1.0.4 munsell_0.5.0 gtable_0.3.4 [25] htmlwidgets_1.6.3 codetools_0.2-19 evaluate_0.23 labeling_0.4.3 [29] knitr_1.45 fastmap_1.1.1 fansi_1.0.5 Rcpp_1.0.11 -[33] scales_1.2.1 backports_1.4.1 jsonlite_1.8.7 farver_2.1.1 +[33] scales_1.3.0 backports_1.4.1 jsonlite_1.8.7 farver_2.1.1 [37] lme4_1.1-35.1 digest_0.6.33 grid_4.2.3 cli_3.6.1 [41] tools_4.2.3 magrittr_2.0.3 glmnet_4.1-8 tibble_3.2.1 [45] tidyr_1.3.0 pkgconfig_2.0.3 ellipsis_0.3.2 Matrix_1.6-3 diff --git a/chapter_16.html b/chapter_16.html index 2901bc7..4b3bfcf 100644 --- a/chapter_16.html +++ b/chapter_16.html @@ -293,13 +293,13 @@

head(ds)
-
  studyid treat          z1         z2  y
-1       1     1  0.66357960 -0.4577273  8
-2       1     0  1.31551822 -0.8754736 11
-3       1     0  0.09999125  0.8680711 11
-4       1     1  1.14502875  0.9097141  9
-5       1     0 -0.27793412  0.2742364 11
-6       1     0  0.74722408  0.7883318 11
+
  studyid treat         z1         z2  y
+1       1     1 -1.0979103  1.3313560 11
+2       1     1 -0.2680399  0.2622481  9
+3       1     1 -1.2474858 -0.2392603  9
+4       1     1 -0.4138311 -1.0706763  8
+5       1     1  0.1750534 -0.6511220  8
+6       1     0 -1.6278960 -1.9344096 10

The simulated dataset contains information on the following variables:

@@ -326,9 +326,9 @@

0
-(N=301)
+(N=276)
1
-(N=299)
+(N=324) Overall
(N=600)
@@ -342,15 +342,15 @@

Mean (SD) -0.0102 (0.998) --0.0650 (1.04) --0.0273 (1.02) +-0.109 (1.04) +0.00425 (1.07) +-0.0477 (1.06) Median [Min, Max] -0.0716 [-3.25, 2.28] --0.0613 [-2.69, 2.63] --0.00117 [-3.25, 2.63] +-0.0987 [-3.06, 2.68] +-0.0699 [-3.67, 3.03] +-0.0843 [-3.67, 3.03] z2 @@ -360,15 +360,15 @@

Mean (SD) --0.0735 (1.06) --0.0213 (1.02) --0.0475 (1.04) +-0.0325 (1.03) +0.0330 (1.01) +0.00287 (1.02) Median [Min, Max] --0.0459 [-3.30, 2.55] --0.0524 [-2.44, 2.96] --0.0481 [-3.30, 2.96] +-0.0835 [-2.61, 2.79] +0.0556 [-2.64, 2.38] +-0.0172 [-2.64, 2.79] studyid @@ -378,38 +378,38 @@

1 -47 (15.6%) -53 (17.7%) +37 (13.4%) +63 (19.4%) 100 (16.7%) 2 -56 (18.6%) -44 (14.7%) +53 (19.2%) +47 (14.5%) 100 (16.7%) 3 -48 (15.9%) -52 (17.4%) +48 (17.4%) +52 (16.0%) 100 (16.7%) 4 -48 (15.9%) -52 (17.4%) +40 (14.5%) +60 (18.5%) 100 (16.7%) 5 -54 (17.9%) -46 (15.4%) +56 (20.3%) +44 (13.6%) 100 (16.7%) 6 -48 (15.9%) -52 (17.4%) +42 (15.2%) +58 (17.9%) 100 (16.7%) @@ -462,7 +462,7 @@

+<environment: 0x561171711fc8>

We can fit the treatment effect model as follows:

@@ -485,36 +485,36 @@

+ 2.5% 25% 50% 75% 97.5% +alpha[1] 10.9039 10.961 11.0002 11.0358 11.0789 +alpha[2] 7.9836 8.023 8.0462 8.0725 8.1100 +alpha[3] 10.3476 10.421 10.4531 10.4826 10.5425 +alpha[4] 9.5035 9.564 9.6208 9.6634 9.7010 +alpha[5] 12.7946 12.836 12.8576 12.8878 12.9482 +alpha[6] 15.6457 15.680 15.7192 15.7633 15.8175 +beta[1] 0.1657 0.199 0.2133 0.2346 0.2429 +beta[2] 0.2503 0.276 0.2825 0.3040 0.3374 +delta[1] 0.0000 0.000 0.0000 0.0000 0.0000 +delta[2] -3.8358 -2.835 -2.4340 -2.0173 -1.5221 +gamma[1] -0.6230 -0.588 -0.5708 -0.5454 -0.5066 +gamma[2] 0.5379 0.579 0.5985 0.6225 0.6603 +sd 1.0047 1.272 1.4356 1.6393 1.9115

@@ -525,10 +525,10 @@

round(treatment.effect(ipd, samples, newpatient = c(z1 = 1, z2 = 0.5)), 2)
0.025   0.5 0.975 
--4.94 -3.76 -2.76 
+-4.11 -2.72 -1.78
-

This means that the predicted outcome for patient with covariate values z1 = 1 and z2 = 0.5 will differ by -3.76 units when receiving the active treatment (treat = 1) as compared to the control treatment (treat = 0).

+

This means that the predicted outcome for patient with covariate values z1 = 1 and z2 = 0.5 will differ by -2.72 units when receiving the active treatment (treat = 1) as compared to the control treatment (treat = 0).

We can also predict treatment benefit for all patients in the sample, and look at the distribution of predicted benefit.

library(dplyr)
@@ -590,7 +590,7 @@ 

round(treatment.effect(ipd, samples, newpatient = c(1,0.5)), 2)

0.025   0.5 0.975 
--4.55 -3.86 -2.96 
+-3.79 -2.62 -1.47
@@ -604,13 +604,13 @@

ds2 <- generate_ipdma_example(type = "binary")
 head(ds2)
-
  studyid treat        w1         w2 y
-1       1     1 0.7784257 -1.5231409 0
-2       1     1 0.7991675 -0.6872109 0
-3       1     0 1.8351258  0.8772528 1
-4       1     0 2.0236660  0.4388474 1
-5       1     0 0.7231042 -1.9485631 1
-6       1     1 0.7420041 -0.7778685 0
+
  studyid treat          w1          w2 y
+1       1     1  1.35999376  0.73143406 0
+2       1     1  1.12927801  0.62002345 1
+3       1     1  0.78404964  0.41148700 1
+4       1     0 -0.14616499  2.10316103 1
+5       1     1  0.03563058 -0.06812964 0
+6       1     1 -1.08032820 -0.98945872 0

The simulated dataset contains information on the following variables:

@@ -637,9 +637,9 @@

0
-(N=313)
+(N=281)
1
-(N=287)
+(N=319) Overall
(N=600)
@@ -653,15 +653,15 @@

Mean (SD) -0.0357 (0.976) -0.00133 (1.03) -0.0193 (1.00) +-0.00668 (1.03) +0.00771 (1.05) +0.000970 (1.04) Median [Min, Max] -0.0185 [-3.54, 2.66] --0.00433 [-2.75, 2.69] -0.0174 [-3.54, 2.69] +0.0652 [-3.05, 2.25] +-0.00417 [-3.00, 3.11] +0.0276 [-3.05, 3.11] w2 @@ -671,15 +671,15 @@

Mean (SD) -0.0488 (1.01) -0.118 (0.996) -0.0820 (1.00) +-0.0583 (0.935) +0.0366 (0.982) +-0.00787 (0.960) Median [Min, Max] -0.0627 [-2.98, 2.86] -0.0674 [-2.84, 2.63] -0.0674 [-2.98, 2.86] +-0.114 [-2.64, 2.62] +0.0309 [-2.57, 3.17] +-0.0265 [-2.64, 3.17] studyid @@ -689,38 +689,38 @@

1 -49 (15.7%) -51 (17.8%) +41 (14.6%) +59 (18.5%) 100 (16.7%) 2 -56 (17.9%) -44 (15.3%) +43 (15.3%) +57 (17.9%) 100 (16.7%) 3 -44 (14.1%) -56 (19.5%) +44 (15.7%) +56 (17.6%) 100 (16.7%) 4 -58 (18.5%) -42 (14.6%) +52 (18.5%) +48 (15.0%) 100 (16.7%) 5 -52 (16.6%) -48 (16.7%) +52 (18.5%) +48 (15.0%) 100 (16.7%) 6 -54 (17.3%) -46 (16.0%) +49 (17.4%) +51 (16.0%) 100 (16.7%) @@ -778,7 +778,7 @@

+<environment: 0x561175515cc0>
@@ -797,37 +797,37 @@

+ 2.5% 25% 50% 75% 97.5% +alpha[1] -0.1440 0.188747 0.53962 0.73109 0.92760 +alpha[2] -1.0709 -0.818813 -0.64110 -0.46286 -0.17836 +alpha[3] -1.3032 -1.089755 -0.87444 -0.70553 -0.38455 +alpha[4] -1.1100 -0.733088 -0.61047 -0.41997 -0.29323 +alpha[5] -1.2273 -0.909380 -0.77217 -0.59668 -0.41225 +alpha[6] -1.4128 -1.155018 -0.91217 -0.78489 -0.50260 +beta[1] -0.1295 0.008414 0.09778 0.19075 0.33197 +beta[2] -0.2931 -0.241737 -0.13348 -0.05350 0.07247 +delta[1] 0.0000 0.000000 0.00000 0.00000 0.00000 +delta[2] -1.2790 -0.352368 -0.04383 0.17977 0.94974 +gamma[1] -0.4221 -0.336772 -0.18240 -0.09536 0.02975 +gamma[2] 0.2020 0.331719 0.40058 0.52150 0.66638 +sd 0.5504 0.849041 1.06372 1.32746 1.70934

The predicted treatment benefit for a new patient with covariates w1 = 1.6 and w2 = 1.3 is given as:

@@ -835,10 +835,10 @@

round(treatment.effect(ipd2, samples, newpatient = c(w1 = 1.6, w2 = 1.3)), 2)
0.025   0.5 0.975 
- 0.28  0.65  1.36 
+ 0.56 1.19 3.91
-

In other words, the aforementioned patient 0.65 (95% Credibility Interval: 0.28 to 1.36)

+

In other words, the aforementioned patient 1.19 (95% Credibility Interval: 0.56 to 3.91)

@@ -853,13 +853,13 @@

ds3 <- generate_ipdnma_example(type = "continuous")
 head(ds3)
-
  studyid treat          z1         z2  y
-1       1     1 -0.66008417  1.9658506 11
-2       1     2  0.72678195 -1.4045085  6
-3       1     1 -0.61407931 -3.4432115 10
-4       1     1  1.32732405 -0.0516703 11
-5       1     2 -1.75412839  1.5136265 11
-6       1     2  0.02939798  1.1166710  9
+
  studyid treat         z1          z2  y
+1       1     1  0.2161967  1.76099639 11
+2       1     2 -0.5632438 -0.82201077  8
+3       1     2  0.6338783  1.01859585  9
+4       1     2  2.0654132 -0.46867968  6
+5       1     1 -2.0795661 -2.22359814 10
+6       1     2 -1.0992477  0.03972141  9

Let us look into the data a bit in more detail:

@@ -881,11 +881,11 @@

1
-(N=327)
+(N=357)
2
-(N=343)
+(N=360) 3
-(N=330)
+(N=283) Overall
(N=1000)
@@ -900,17 +900,17 @@

Mean (SD) -0.0415 (1.03) --0.0323 (0.983) -0.0513 (1.00) -0.0194 (1.00) +-0.0313 (1.00) +0.0765 (1.01) +-0.0306 (1.03) +0.00773 (1.01) Median [Min, Max] -0.0928 [-2.76, 3.26] -0.0363 [-3.03, 2.66] -0.0130 [-2.78, 3.33] -0.0458 [-3.03, 3.33] +-0.0411 [-3.13, 3.40] +0.0951 [-3.11, 2.63] +-0.0654 [-2.86, 2.42] +0.00213 [-3.13, 3.40] z2 @@ -921,17 +921,17 @@

Mean (SD) -0.0170 (0.984) --0.0608 (0.974) --0.0176 (1.02) --0.0211 (0.993) +-0.0980 (1.04) +0.0522 (0.923) +0.000392 (1.01) +-0.0161 (0.993) Median [Min, Max] --0.0393 [-3.44, 2.77] --0.113 [-2.32, 2.74] --0.0405 [-3.12, 3.36] --0.0480 [-3.44, 3.36] +-0.124 [-2.85, 3.38] +0.0144 [-2.24, 3.06] +0.0401 [-3.09, 2.56] +-0.0155 [-3.09, 3.38] studyid @@ -942,72 +942,72 @@

1 -51 (15.6%) -49 (14.3%) +48 (13.4%) +52 (14.4%) 0 (0%) 100 (10.0%) 2 -45 (13.8%) -55 (16.0%) +45 (12.6%) +55 (15.3%) 0 (0%) 100 (10.0%) 3 -43 (13.1%) -57 (16.6%) +49 (13.7%) +51 (14.2%) 0 (0%) 100 (10.0%) 4 -45 (13.8%) +54 (15.1%) 0 (0%) -55 (16.7%) +46 (16.3%) 100 (10.0%) 5 -51 (15.6%) +60 (16.8%) 0 (0%) -49 (14.8%) +40 (14.1%) 100 (10.0%) 6 0 (0%) -47 (13.7%) -53 (16.1%) +49 (13.6%) +51 (18.0%) 100 (10.0%) 7 0 (0%) -46 (13.4%) -54 (16.4%) +44 (12.2%) +56 (19.8%) 100 (10.0%) 8 -31 (9.5%) -31 (9.0%) -38 (11.5%) +29 (8.1%) +39 (10.8%) +32 (11.3%) 100 (10.0%) 9 -31 (9.5%) -24 (7.0%) -45 (13.6%) +34 (9.5%) +34 (9.4%) +32 (11.3%) 100 (10.0%) 10 -30 (9.2%) -34 (9.9%) -36 (10.9%) +38 (10.6%) +36 (10.0%) +26 (9.2%) 100 (10.0%) @@ -1078,7 +1078,7 @@

+<environment: 0x5611757e7780>
samples <- ipd.run(ipd3, n.chains = 2, n.iter = 20, 
                    pars.save = c("alpha", "beta", "delta", "sd", "gamma"))
@@ -1105,54 +1105,54 @@

+ 2.5% 25% 50% 75% 97.5% +alpha[1] 10.91963 10.9755 11.0018 11.0236 11.0965 +alpha[2] 8.01898 8.0560 8.0740 8.1030 8.1455 +alpha[3] 10.46305 10.4986 10.5161 10.5431 10.6024 +alpha[4] 9.45244 9.5602 9.5981 9.6326 9.6729 +alpha[5] 12.74635 12.7986 12.8239 12.8428 12.9038 +alpha[6] 13.04801 13.0916 13.1289 13.1556 13.2330 +alpha[7] 7.27966 7.2990 7.3230 7.3554 7.4213 +alpha[8] 11.06441 11.1190 11.1580 11.2117 11.2897 +alpha[9] 10.07002 10.1133 10.1553 10.1841 10.2688 +alpha[10] 9.18155 9.2155 9.2288 9.2508 9.3211 +beta[1] 0.16436 0.1961 0.2096 0.2251 0.2565 +beta[2] 0.28336 0.3011 0.3137 0.3207 0.3371 +delta[1] 0.00000 0.0000 0.0000 0.0000 0.0000 +delta[2] -3.10971 -3.0519 -3.0081 -2.9840 -2.9517 +delta[3] -1.23184 -1.1583 -1.1172 -1.0915 -1.0214 +gamma[1,1] 0.00000 0.0000 0.0000 0.0000 0.0000 +gamma[2,1] -0.72128 -0.6462 -0.6357 -0.6134 -0.5690 +gamma[3,1] -0.37711 -0.3525 -0.3296 -0.3126 -0.2901 +gamma[1,2] 0.00000 0.0000 0.0000 0.0000 0.0000 +gamma[2,2] 0.51798 0.5498 0.5637 0.5833 0.6102 +gamma[3,2] 0.32928 0.3525 0.3653 0.3781 0.4135 +sd 0.09853 0.1120 0.1300 0.1498 0.1694

As before, we can use the treatment.effect() function of bipd to estimate relative effects for new patients.

@@ -1161,11 +1161,11 @@

$`treatment 2`
     0.025       0.5     0.975 
--2.469337 -2.366859 -2.226574 
+-2.657461 -2.479969 -2.382494 
 
 $`treatment 3`
      0.025        0.5      0.975 
--0.6540734 -0.5590274 -0.3852781 
+-0.8781160 -0.6976577 -0.5854561

This gives us the relative effects for all treatments versus the reference. To obtain relative effects between active treatments we need some more coding:

@@ -1182,7 +1182,7 @@

samples.all$gamma.3.2.*newpatient[2]) )
-
[1] -1.812932
+
[1] -1.773384
quantile(samples.all$delta.2.+samples.all$gamma.2.1.*
            newpatient[1]+samples.all$gamma.2.2.*newpatient[2]
@@ -1191,7 +1191,7 @@ 

, probs = 0.025)

     2.5% 
--1.978609 
+-1.955488
quantile(samples.all$delta.2.+samples.all$gamma.2.1.*
            newpatient[1]+samples.all$gamma.2.2.*newpatient[2]
@@ -1200,7 +1200,7 @@ 

, probs = 0.975)

    97.5% 
--1.643765 
+-1.638554
@@ -1226,9 +1226,9 @@

          
            s1 s2 s3
-  treat A: 49 55 33
-  treat B: 51  0 29
-  treat C:  0 45 38
+ treat A: 41 49 36 + treat B: 59 0 32 + treat C: 0 51 32 @@ -1357,18 +1357,18 @@

study 1 --2.925 (SE = 0.053 ) +-3.029 (SE = 0.061 ) study 2 --1.118 (SE = 0.060 ) +-1.097 (SE = 0.048 ) study 3 --2.966 (SE = 0.059 ) --1.033 (SE = 0.054 ) +-2.901 (SE = 0.087 ) +-0.916 (SE = 0.086 ) @@ -1434,23 +1434,23 @@

+delta[2] -3.1093 -3.0394 -3.0055 -2.9685 -2.8799 +delta[3] -1.1400 -1.0811 -1.0587 -1.0093 -0.9512 +gamma[1,1] -0.8979 -0.8354 -0.8034 -0.7816 -0.7112 +gamma[2,1] 0.8466 0.9164 0.9469 0.9655 1.0061 +gamma[1,2] -0.6650 -0.6082 -0.5804 -0.5503 -0.4759 +gamma[2,2] 0.4219 0.5109 0.5429 0.5854 0.6825
# calculate  treatment effects
 samples.all = data.frame(rbind(samps4.3[[1]], samps4.3[[2]]))
@@ -1461,21 +1461,21 @@ 

samples.all$gamma.2.1.*newpatient[2] )

-
[1] -1.968329
+
[1] -1.916582
quantile(samples.all$delta.2.+samples.all$gamma.1.1.*newpatient[1]+
            samples.all$gamma.2.1.*newpatient[2]
          , probs = 0.025)
     2.5% 
--2.150516 
+-2.123473
quantile(samples.all$delta.2.+samples.all$gamma.1.1.*newpatient[1]+
            samples.all$gamma.2.1.*newpatient[2]
          , probs = 0.975)
    97.5% 
--1.722643 
+-1.773523
@@ -1512,13 +1512,13 @@

Version info

[5] digest_0.6.33 gtable_0.3.4 lattice_0.20-45 jsonlite_1.8.7 [9] evaluate_0.23 lifecycle_1.0.4 tibble_3.2.1 viridisLite_0.4.2 [13] pkgconfig_2.0.3 rlang_1.1.2 cli_3.6.1 rstudioapi_0.15.0 -[17] yaml_2.3.7 mvtnorm_1.2-3 xfun_0.41 fastmap_1.1.1 +[17] yaml_2.3.7 mvtnorm_1.2-4 xfun_0.41 fastmap_1.1.1 [21] withr_2.5.2 httr_1.4.7 stringr_1.5.1 knitr_1.45 [25] xml2_1.3.5 generics_0.1.3 vctrs_0.6.4 htmlwidgets_1.6.3 [29] systemfonts_1.0.5 grid_4.2.3 webshot_0.5.5 tidyselect_1.2.0 [33] svglite_2.1.2 glue_1.6.2 R6_2.5.1 fansi_1.0.5 [37] rmarkdown_2.25 Formula_1.2-5 farver_2.1.1 magrittr_2.0.3 -[41] codetools_0.2-19 scales_1.2.1 htmltools_0.5.7 rvest_1.0.3 +[41] codetools_0.2-19 scales_1.3.0 htmltools_0.5.7 rvest_1.0.3 [45] colorspace_2.1-0 labeling_0.4.3 utf8_1.2.4 stringi_1.8.2 [49] munsell_0.5.0 diff --git a/chapter_16_files/figure-html/fig-predben_continuous_outcome-1.png b/chapter_16_files/figure-html/fig-predben_continuous_outcome-1.png index 7f091a8..5d113de 100644 Binary files a/chapter_16_files/figure-html/fig-predben_continuous_outcome-1.png and b/chapter_16_files/figure-html/fig-predben_continuous_outcome-1.png differ diff --git a/chapter_18.html b/chapter_18.html index c9a8290..06cf480 100644 --- a/chapter_18.html +++ b/chapter_18.html @@ -1300,7 +1300,7 @@

Version info

[43] gower_1.0.1 xfun_0.41 globals_0.16.2 [46] rvest_1.0.3 timechange_0.2.0 lifecycle_1.0.4 [49] geeM_0.10.1 mosaicCore_0.9.4.0 rstatix_0.7.2 - [52] future_1.33.0 scales_1.2.1 ipred_0.9-14 + [52] future_1.33.0 scales_1.3.0 ipred_0.9-14 [55] hms_1.1.3 parallel_4.2.3 RColorBrewer_1.1-3 [58] yaml_2.3.7 labelled_2.12.0 gam_1.22-2 [61] stringi_1.8.2 highr_0.10 foreach_1.5.2 diff --git a/index.html b/index.html index 29d059f..577fba0 100644 --- a/index.html +++ b/index.html @@ -223,7 +223,7 @@

Comparative Effectiveness and Personalized Medicine Research U
Published
-

26 November, 2023

+

28 November, 2023

diff --git a/search.json b/search.json index 21b3c2c..3bb1321 100644 --- a/search.json +++ b/search.json @@ -32,7 +32,7 @@ "href": "chapter_03.html#version-info", "title": "2  Validity control and quality assessment of real-world data and real-world evidence", "section": "Version info", - "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] robvis_0.3.0 readxl_1.4.3\n\nloaded via a namespace (and not attached):\n [1] knitr_1.45 magrittr_2.0.3 munsell_0.5.0 tidyselect_1.2.0 \n [5] colorspace_2.1-0 R6_2.5.1 rlang_1.1.2 fastmap_1.1.1 \n [9] fansi_1.0.5 dplyr_1.1.4 tools_4.2.3 grid_4.2.3 \n[13] gtable_0.3.4 xfun_0.41 utf8_1.2.4 cli_3.6.1 \n[17] withr_2.5.2 htmltools_0.5.7 yaml_2.3.7 digest_0.6.33 \n[21] tibble_3.2.1 lifecycle_1.0.4 farver_2.1.1 ggplot2_3.4.4 \n[25] purrr_1.0.2 tidyr_1.3.0 htmlwidgets_1.6.3 vctrs_0.6.4 \n[29] codetools_0.2-19 glue_1.6.2 evaluate_0.23 rmarkdown_2.25 \n[33] compiler_4.2.3 pillar_1.9.0 cellranger_1.1.0 scales_1.2.1 \n[37] generics_0.1.3 jsonlite_1.8.7 pkgconfig_2.0.3" + "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] robvis_0.3.0 readxl_1.4.3\n\nloaded via a namespace (and not attached):\n [1] knitr_1.45 magrittr_2.0.3 munsell_0.5.0 tidyselect_1.2.0 \n [5] colorspace_2.1-0 R6_2.5.1 rlang_1.1.2 fastmap_1.1.1 \n [9] fansi_1.0.5 dplyr_1.1.4 tools_4.2.3 grid_4.2.3 \n[13] gtable_0.3.4 xfun_0.41 utf8_1.2.4 cli_3.6.1 \n[17] withr_2.5.2 htmltools_0.5.7 yaml_2.3.7 digest_0.6.33 \n[21] tibble_3.2.1 lifecycle_1.0.4 farver_2.1.1 ggplot2_3.4.4 \n[25] purrr_1.0.2 tidyr_1.3.0 htmlwidgets_1.6.3 vctrs_0.6.4 \n[29] codetools_0.2-19 glue_1.6.2 evaluate_0.23 rmarkdown_2.25 \n[33] compiler_4.2.3 pillar_1.9.0 cellranger_1.1.0 scales_1.3.0 \n[37] generics_0.1.3 jsonlite_1.8.7 pkgconfig_2.0.3" }, { "objectID": "chapter_06.html#introduction", @@ -95,7 +95,7 @@ "href": "chapter_06.html#version-info", "title": "3  Confounding adjustment using propensity score methods", "section": "Version info", - "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] grid stats graphics grDevices utils datasets methods \n[8] base \n\nother attached packages:\n [1] WeightIt_0.14.2 boot_1.3-28.1 MatchIt_4.5.5 \n [4] sandwich_3.0-2 truncnorm_1.0-9 tableone_0.13.2 \n [7] survey_4.2-1 survival_3.5-3 Matrix_1.6-3 \n[10] MASS_7.3-58.2 marginaleffects_0.16.0 lmtest_0.9-40 \n[13] zoo_1.8-12 knitr_1.45 ggplot2_3.4.4 \n[16] data.table_1.14.8 cobalt_4.5.2 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 xfun_0.41 mitools_2.4 haven_2.5.3 \n [5] splines_4.2.3 lattice_0.20-45 labelled_2.12.0 colorspace_2.1-0 \n [9] vctrs_0.6.4 generics_0.1.3 htmltools_0.5.7 yaml_2.3.7 \n[13] utf8_1.2.4 rlang_1.1.2 e1071_1.7-13 pillar_1.9.0 \n[17] glue_1.6.2 withr_2.5.2 DBI_1.1.3 lifecycle_1.0.4 \n[21] munsell_0.5.0 gtable_0.3.4 htmlwidgets_1.6.3 codetools_0.2-19 \n[25] evaluate_0.23 labeling_0.4.3 forcats_1.0.0 fastmap_1.1.1 \n[29] class_7.3-21 fansi_1.0.5 optmatch_0.10.7 Rcpp_1.0.11 \n[33] checkmate_2.3.0 backports_1.4.1 scales_1.2.1 jsonlite_1.8.7 \n[37] farver_2.1.1 chk_0.9.1 hms_1.1.3 digest_0.6.33 \n[41] insight_0.19.6 cli_3.6.1 tools_4.2.3 magrittr_2.0.3 \n[45] proxy_0.4-27 tibble_3.2.1 crayon_1.5.2 pkgconfig_2.0.3 \n[49] rlemon_0.2.1 rmarkdown_2.25 R6_2.5.1 compiler_4.2.3" + "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] grid stats graphics grDevices utils datasets methods \n[8] base \n\nother attached packages:\n [1] WeightIt_0.14.2 boot_1.3-28.1 MatchIt_4.5.5 \n [4] sandwich_3.0-2 truncnorm_1.0-9 tableone_0.13.2 \n [7] survey_4.2-1 survival_3.5-3 Matrix_1.6-3 \n[10] MASS_7.3-58.2 marginaleffects_0.16.0 lmtest_0.9-40 \n[13] zoo_1.8-12 knitr_1.45 ggplot2_3.4.4 \n[16] data.table_1.14.8 cobalt_4.5.2 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 xfun_0.41 mitools_2.4 haven_2.5.3 \n [5] splines_4.2.3 lattice_0.20-45 labelled_2.12.0 colorspace_2.1-0 \n [9] vctrs_0.6.4 generics_0.1.3 htmltools_0.5.7 yaml_2.3.7 \n[13] utf8_1.2.4 rlang_1.1.2 e1071_1.7-13 pillar_1.9.0 \n[17] glue_1.6.2 withr_2.5.2 DBI_1.1.3 lifecycle_1.0.4 \n[21] munsell_0.5.0 gtable_0.3.4 htmlwidgets_1.6.3 codetools_0.2-19 \n[25] evaluate_0.23 labeling_0.4.3 forcats_1.0.0 fastmap_1.1.1 \n[29] class_7.3-21 fansi_1.0.5 optmatch_0.10.7 Rcpp_1.0.11 \n[33] checkmate_2.3.0 backports_1.4.1 scales_1.3.0 jsonlite_1.8.7 \n[37] farver_2.1.1 chk_0.9.1 hms_1.1.3 digest_0.6.33 \n[41] insight_0.19.6 cli_3.6.1 tools_4.2.3 magrittr_2.0.3 \n[45] proxy_0.4-27 tibble_3.2.1 crayon_1.5.2 pkgconfig_2.0.3 \n[49] rlemon_0.2.1 rmarkdown_2.25 R6_2.5.1 compiler_4.2.3" }, { "objectID": "chapter_06.html#references", @@ -158,7 +158,7 @@ "href": "chapter_07.html#version-info", "title": "4  Effect Modification Analysis within the Propensity score Framework", "section": "Version info", - "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] grid stats graphics grDevices utils datasets methods \n[8] base \n\nother attached packages:\n [1] interactions_1.1.5 survey_4.2-1 survival_3.5-3 Matrix_1.6-3 \n [5] interactionR_0.1.6 simcausal_0.5.6 scales_1.2.1 ggplot2_3.4.4 \n [9] xtable_1.8-4 dplyr_1.1.4 kableExtra_1.3.4 knitr_1.45 \n[13] cowplot_1.1.1 broom_1.0.5 MatchIt_4.5.5 jtools_2.2.2 \n[17] sandwich_3.0-2 lmtest_0.9-40 zoo_1.8-12 optmatch_0.10.7 \n[21] WeightIt_0.14.2 cobalt_4.5.2 table1_1.4.3 \n\nloaded via a namespace (and not attached):\n [1] fontquiver_0.2.1 webshot_0.5.5 httr_1.4.7 \n [4] tools_4.2.3 backports_1.4.1 utf8_1.2.4 \n [7] R6_2.5.1 DBI_1.1.3 colorspace_2.1-0 \n[10] withr_2.5.2 tidyselect_1.2.0 curl_5.1.0 \n[13] compiler_4.2.3 textshaping_0.3.7 cli_3.6.1 \n[16] rvest_1.0.3 expm_0.999-7 flextable_0.9.4 \n[19] xml2_1.3.5 officer_0.6.3 fontBitstreamVera_0.1.1\n[22] labeling_0.4.3 mvtnorm_1.2-3 askpass_1.2.0 \n[25] systemfonts_1.0.5 stringr_1.5.1 digest_0.6.33 \n[28] rmarkdown_2.25 svglite_2.1.2 gfonts_0.2.0 \n[31] pkgconfig_2.0.3 htmltools_0.5.7 highr_0.10 \n[34] fastmap_1.1.1 htmlwidgets_1.6.3 rlang_1.1.2 \n[37] rstudioapi_0.15.0 httpcode_0.3.0 shiny_1.8.0 \n[40] farver_2.1.1 generics_0.1.3 jsonlite_1.8.7 \n[43] car_3.1-2 zip_2.3.0 magrittr_2.0.3 \n[46] Formula_1.2-5 Rcpp_1.0.11 munsell_0.5.0 \n[49] fansi_1.0.5 abind_1.4-5 gdtools_0.3.4 \n[52] lifecycle_1.0.4 chk_0.9.1 stringi_1.8.2 \n[55] yaml_2.3.7 carData_3.0-5 promises_1.2.1 \n[58] crayon_1.5.2 lattice_0.20-45 splines_4.2.3 \n[61] pander_0.6.5 pillar_1.9.0 uuid_1.1-1 \n[64] igraph_1.5.1 codetools_0.2-19 crul_1.4.0 \n[67] glue_1.6.2 evaluate_0.23 msm_1.7.1 \n[70] mitools_2.4 fontLiberation_0.1.0 data.table_1.14.8 \n[73] vctrs_0.6.4 httpuv_1.6.12 gtable_0.3.4 \n[76] openssl_2.1.1 purrr_1.0.2 tidyr_1.3.0 \n[79] assertthat_0.2.1 xfun_0.41 mime_0.12 \n[82] later_1.3.1 ragg_1.2.6 viridisLite_0.4.2 \n[85] tibble_3.2.1 ellipsis_0.3.2 rlemon_0.2.1" + "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] grid stats graphics grDevices utils datasets methods \n[8] base \n\nother attached packages:\n [1] interactions_1.1.5 survey_4.2-1 survival_3.5-3 Matrix_1.6-3 \n [5] interactionR_0.1.6 simcausal_0.5.6 scales_1.3.0 ggplot2_3.4.4 \n [9] xtable_1.8-4 dplyr_1.1.4 kableExtra_1.3.4 knitr_1.45 \n[13] cowplot_1.1.1 broom_1.0.5 MatchIt_4.5.5 jtools_2.2.2 \n[17] sandwich_3.0-2 lmtest_0.9-40 zoo_1.8-12 optmatch_0.10.7 \n[21] WeightIt_0.14.2 cobalt_4.5.2 table1_1.4.3 \n\nloaded via a namespace (and not attached):\n [1] fontquiver_0.2.1 webshot_0.5.5 httr_1.4.7 \n [4] tools_4.2.3 backports_1.4.1 utf8_1.2.4 \n [7] R6_2.5.1 DBI_1.1.3 colorspace_2.1-0 \n[10] withr_2.5.2 tidyselect_1.2.0 curl_5.1.0 \n[13] compiler_4.2.3 textshaping_0.3.7 cli_3.6.1 \n[16] rvest_1.0.3 expm_0.999-7 flextable_0.9.4 \n[19] xml2_1.3.5 officer_0.6.3 fontBitstreamVera_0.1.1\n[22] labeling_0.4.3 mvtnorm_1.2-4 askpass_1.2.0 \n[25] systemfonts_1.0.5 stringr_1.5.1 digest_0.6.33 \n[28] rmarkdown_2.25 svglite_2.1.2 gfonts_0.2.0 \n[31] pkgconfig_2.0.3 htmltools_0.5.7 highr_0.10 \n[34] fastmap_1.1.1 htmlwidgets_1.6.3 rlang_1.1.2 \n[37] rstudioapi_0.15.0 httpcode_0.3.0 shiny_1.8.0 \n[40] farver_2.1.1 generics_0.1.3 jsonlite_1.8.7 \n[43] car_3.1-2 zip_2.3.0 magrittr_2.0.3 \n[46] Formula_1.2-5 Rcpp_1.0.11 munsell_0.5.0 \n[49] fansi_1.0.5 abind_1.4-5 gdtools_0.3.4 \n[52] lifecycle_1.0.4 chk_0.9.1 stringi_1.8.2 \n[55] yaml_2.3.7 carData_3.0-5 promises_1.2.1 \n[58] crayon_1.5.2 lattice_0.20-45 splines_4.2.3 \n[61] pander_0.6.5 pillar_1.9.0 uuid_1.1-1 \n[64] igraph_1.5.1 codetools_0.2-19 crul_1.4.0 \n[67] glue_1.6.2 evaluate_0.23 msm_1.7.1 \n[70] mitools_2.4 fontLiberation_0.1.0 data.table_1.14.8 \n[73] vctrs_0.6.4 httpuv_1.6.12 gtable_0.3.4 \n[76] openssl_2.1.1 purrr_1.0.2 tidyr_1.3.0 \n[79] assertthat_0.2.1 xfun_0.41 mime_0.12 \n[82] later_1.3.1 ragg_1.2.6 viridisLite_0.4.2 \n[85] tibble_3.2.1 ellipsis_0.3.2 rlemon_0.2.1" }, { "objectID": "chapter_07.html#references", @@ -200,7 +200,7 @@ "href": "chapter_09.html#version-info", "title": "5  Dealing with missing data", "section": "Version info", - "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] grid stats graphics grDevices utils datasets methods \n[8] base \n\nother attached packages:\n [1] ranger_0.16.0 ggmice_0.1.0 missForest_1.5 \n [4] mice_3.16.0 marginaleffects_0.16.0 survey_4.2-1 \n [7] survival_3.5-3 Matrix_1.6-3 cobalt_4.5.2 \n[10] sandwich_3.0-2 PSweight_1.1.8 WeightIt_0.14.2 \n[13] MatchThem_1.1.0 MatchIt_4.5.5 optmatch_0.10.7 \n[16] see_0.8.1 naniar_1.0.0 ggpubr_0.6.0 \n[19] ggplot2_3.4.4 mixgb_1.0.2 truncnorm_1.0-9 \n[22] MASS_7.3-58.2 tidyr_1.3.0 dplyr_1.1.4 \n[25] data.table_1.14.8 table1_1.4.3 kableExtra_1.3.4 \n\nloaded via a namespace (and not attached):\n [1] minqa_1.2.6 colorspace_2.1-0 ggsignif_0.6.4 \n [4] visdat_0.6.0 rstudioapi_0.15.0 farver_2.1.1 \n [7] fansi_1.0.5 xml2_1.3.5 codetools_0.2-19 \n[10] splines_4.2.3 knitr_1.45 itertools_0.1-3 \n[13] Formula_1.2-5 jsonlite_1.8.7 nloptr_2.0.3 \n[16] broom_1.0.5 compiler_4.2.3 httr_1.4.7 \n[19] backports_1.4.1 RcppZiggurat_0.1.6 fastmap_1.1.1 \n[22] cli_3.6.1 htmltools_0.5.7 tools_4.2.3 \n[25] gtable_0.3.4 glue_1.6.2 doRNG_1.8.6 \n[28] Rcpp_1.0.11 carData_3.0-5 SuperLearner_2.0-28.1\n[31] vctrs_0.6.4 svglite_2.1.2 nlme_3.1-162 \n[34] iterators_1.0.14 insight_0.19.6 xfun_0.41 \n[37] stringr_1.5.1 lme4_1.1-35.1 rvest_1.0.3 \n[40] lifecycle_1.0.4 rngtools_1.5.2 rstatix_0.7.2 \n[43] pan_1.9 zoo_1.8-12 scales_1.2.1 \n[46] rlemon_0.2.1 parallel_4.2.3 RColorBrewer_1.1-3 \n[49] yaml_2.3.7 gridExtra_2.3 UpSetR_1.4.0 \n[52] rpart_4.1.19 gam_1.22-2 stringi_1.8.2 \n[55] foreach_1.5.2 randomForest_4.7-1.1 checkmate_2.3.0 \n[58] boot_1.3-28.1 shape_1.4.6 rlang_1.1.2 \n[61] pkgconfig_2.0.3 systemfonts_1.0.5 evaluate_0.23 \n[64] lattice_0.20-45 purrr_1.0.2 chk_0.9.1 \n[67] labeling_0.4.3 htmlwidgets_1.6.3 cowplot_1.1.1 \n[70] Rfast_2.1.0 tidyselect_1.2.0 gbm_2.1.8.1 \n[73] plyr_1.8.9 magrittr_2.0.3 R6_2.5.1 \n[76] generics_0.1.3 nnls_1.5 mitml_0.4-5 \n[79] DBI_1.1.3 pillar_1.9.0 withr_2.5.2 \n[82] abind_1.4-5 nnet_7.3-18 tibble_3.2.1 \n[85] crayon_1.5.2 car_3.1-2 jomo_2.7-6 \n[88] xgboost_1.7.5.1 utf8_1.2.4 rmarkdown_2.25 \n[91] digest_0.6.33 webshot_0.5.5 numDeriv_2016.8-1.1 \n[94] RcppParallel_5.1.7 munsell_0.5.0 glmnet_4.1-8 \n[97] viridisLite_0.4.2 mitools_2.4" + "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] grid stats graphics grDevices utils datasets methods \n[8] base \n\nother attached packages:\n [1] ranger_0.16.0 ggmice_0.1.0 missForest_1.5 \n [4] mice_3.16.0 marginaleffects_0.16.0 survey_4.2-1 \n [7] survival_3.5-3 Matrix_1.6-3 cobalt_4.5.2 \n[10] sandwich_3.0-2 PSweight_1.1.8 WeightIt_0.14.2 \n[13] MatchThem_1.1.0 MatchIt_4.5.5 optmatch_0.10.7 \n[16] see_0.8.1 naniar_1.0.0 ggpubr_0.6.0 \n[19] ggplot2_3.4.4 mixgb_1.0.2 truncnorm_1.0-9 \n[22] MASS_7.3-58.2 tidyr_1.3.0 dplyr_1.1.4 \n[25] data.table_1.14.8 table1_1.4.3 kableExtra_1.3.4 \n\nloaded via a namespace (and not attached):\n [1] minqa_1.2.6 colorspace_2.1-0 ggsignif_0.6.4 \n [4] visdat_0.6.0 rstudioapi_0.15.0 farver_2.1.1 \n [7] fansi_1.0.5 xml2_1.3.5 codetools_0.2-19 \n[10] splines_4.2.3 knitr_1.45 itertools_0.1-3 \n[13] Formula_1.2-5 jsonlite_1.8.7 nloptr_2.0.3 \n[16] broom_1.0.5 compiler_4.2.3 httr_1.4.7 \n[19] backports_1.4.1 RcppZiggurat_0.1.6 fastmap_1.1.1 \n[22] cli_3.6.1 htmltools_0.5.7 tools_4.2.3 \n[25] gtable_0.3.4 glue_1.6.2 doRNG_1.8.6 \n[28] Rcpp_1.0.11 carData_3.0-5 SuperLearner_2.0-28.1\n[31] vctrs_0.6.4 svglite_2.1.2 nlme_3.1-162 \n[34] iterators_1.0.14 insight_0.19.6 xfun_0.41 \n[37] stringr_1.5.1 lme4_1.1-35.1 rvest_1.0.3 \n[40] lifecycle_1.0.4 rngtools_1.5.2 rstatix_0.7.2 \n[43] pan_1.9 zoo_1.8-12 scales_1.3.0 \n[46] rlemon_0.2.1 parallel_4.2.3 RColorBrewer_1.1-3 \n[49] yaml_2.3.7 gridExtra_2.3 UpSetR_1.4.0 \n[52] rpart_4.1.19 gam_1.22-2 stringi_1.8.2 \n[55] foreach_1.5.2 randomForest_4.7-1.1 checkmate_2.3.0 \n[58] boot_1.3-28.1 shape_1.4.6 rlang_1.1.2 \n[61] pkgconfig_2.0.3 systemfonts_1.0.5 evaluate_0.23 \n[64] lattice_0.20-45 purrr_1.0.2 chk_0.9.1 \n[67] labeling_0.4.3 htmlwidgets_1.6.3 cowplot_1.1.1 \n[70] Rfast_2.1.0 tidyselect_1.2.0 gbm_2.1.8.1 \n[73] plyr_1.8.9 magrittr_2.0.3 R6_2.5.1 \n[76] generics_0.1.3 nnls_1.5 mitml_0.4-5 \n[79] DBI_1.1.3 pillar_1.9.0 withr_2.5.2 \n[82] abind_1.4-5 nnet_7.3-18 tibble_3.2.1 \n[85] crayon_1.5.2 car_3.1-2 jomo_2.7-6 \n[88] xgboost_1.7.5.1 utf8_1.2.4 rmarkdown_2.25 \n[91] digest_0.6.33 webshot_0.5.5 numDeriv_2016.8-1.1 \n[94] RcppParallel_5.1.7 munsell_0.5.0 glmnet_4.1-8 \n[97] viridisLite_0.4.2 mitools_2.4" }, { "objectID": "chapter_09.html#references", @@ -228,14 +228,14 @@ "href": "chapter_10.html#network-meta-analysis-of-clinical-trials", "title": "6  Systematic review and meta-analysis of Real-World Evidence", "section": "6.3 Network meta-analysis of clinical trials", - "text": "6.3 Network meta-analysis of clinical trials\nWe here use the R packages netmeta for conducting a frequentist network meta-analysis. A detailed tutorial on the use of netmeta is available from the book Doing Meta-Analysis with R: A Hands-On Guide.\n\n6.3.1 Interventions for coronavirus disease 2019\nWe here consider data from a study which aimed to assess the comparative effectiveness of remdesivir and tocilizumab for reducing mortality in hospitalised COVID-19 patients. 80 trials were identified from two published network meta-analyses (Selvarajan et al. 2022), (Siemieniuk et al. 2020), a living COVID-19 trial database (COVID-NMA Initiative) [Covid-NMA.com], and a clinical trial database [clinicaltrials.gov]. Trials were included in this study if the patient population included hospitalized COVID-19 patients, active treatment was remdesivir or tocilizumab, comparator treatment was placebo or standard care, short-term mortality data was available, and the trial was published. 21 trials were included. For included trials, a risk of bias score was extracted from the COVID-NMA Initiative.\n\n\n\n\n\nstudlab\ntreat1\ntreat2\nevent1\nn1\nevent2\nn2\n\n\n\n\nAder\nREM\nSTD\n34\n414\n37\n418\n\n\nBeigel (ACTT-1)\nREM\nSTD\n59\n541\n77\n521\n\n\nBroman\nTOCI\nSTD\n1\n57\n0\n29\n\n\nCriner\nREM\nSTD\n4\n384\n4\n200\n\n\nDeclerq (COV-AID)\nTOCI\nSTD\n10\n81\n9\n74\n\n\nGordon (REMAP-CAP)\nTOCI\nSTD\n83\n353\n116\n358\n\n\nHermine (CORIMUNO)\nTOCI\nSTD\n7\n63\n8\n67\n\n\nHorby (RECOVERY)\nTOCI\nSTD\n621\n2022\n729\n2094\n\n\nIslam\nREM\nSTD\n0\n30\n0\n30\n\n\nMahajan\nREM\nSTD\n5\n34\n3\n36\n\n\nPan (WHO Solidarity)\nREM\nSTD\n602\n4146\n643\n4129\n\n\nRosas (COVACTA)\nTOCI\nSTD\n58\n294\n28\n144\n\n\nRutgers\nTOCI\nSTD\n21\n174\n34\n180\n\n\nSalama (EMPACTA)\nTOCI\nSTD\n26\n249\n11\n128\n\n\nSalvarani\nTOCI\nSTD\n2\n60\n1\n63\n\n\nSoin (COVINTOC)\nTOCI\nSTD\n11\n92\n15\n88\n\n\nSpinner\nREM\nSTD\n5\n384\n4\n200\n\n\nStone (BACC-BAY)\nTOCI\nSTD\n9\n161\n4\n82\n\n\nTalaschian\nTOCI\nSTD\n5\n17\n4\n19\n\n\nVeiga (TOCIBRAS)\nTOCI\nSTD\n14\n65\n6\n64\n\n\nWang\nREM\nSTD\n22\n158\n10\n78\n\n\n\n\n\n\n\nThe corresponding network is displayed below:\n\n\n\n\n\nEvidence network of the 21 coronavirus-19 trials\n\n\n\n\nWe use the following command to calculate the log odds ratios and corresponding standard errors for each study:\n\ncovid <- pairwise(treat = treat, \n event = event, \n n = n, \n studlab = studlab, \n sm = \"OR\")\nhead(covid)\n\n\n\n\n\n\nTE\nseTE\nstudlab\ntreat1\ntreat2\nevent1\nn1\nevent2\nn2\nincr\nallstudies\n\n\n\n\n-0.0819293\n0.2483849\nAder\nREM\nSTD\n34\n414\n37\n418\n0.0\nFALSE\n\n\n-0.3483875\n0.1851030\nBeigel (ACTT-1)\nREM\nSTD\n59\n541\n77\n521\n0.0\nFALSE\n\n\n0.4487619\n1.6487159\nBroman\nTOCI\nSTD\n1\n57\n0\n29\n0.5\nFALSE\n\n\n-0.6620566\n0.7125543\nCriner\nREM\nSTD\n4\n384\n4\n200\n0.0\nFALSE\n\n\n0.0170679\n0.4904898\nDeclerq (COV-AID)\nTOCI\nSTD\n10\n81\n9\n74\n0.0\nFALSE\n\n\n-0.4442338\n0.1688337\nGordon (REMAP-CAP)\nTOCI\nSTD\n83\n353\n116\n358\n0.0\nFALSE\n\n\n\n\n\n\n\nBelow, we conduct a random effects network meta-analysis where we consider standard care (STD) as the control treatment. Note that we have one study where zero cell counts occur, this study will not contribute to the NMA as the log odds ratio and its standard error cannot be determined.\n\nNMA.covid <- netmeta(TE = TE, seTE = seTE, treat1 = treat1, treat2 = treat2,\n studlab = studlab, data = covid, sm = \"OR\", ref = \"STD\",\n comb.random = TRUE, common = FALSE, warn = FALSE)\nNMA.covid \n\nNumber of studies: k = 20\nNumber of pairwise comparisons: m = 20\nNumber of treatments: n = 3\nNumber of designs: d = 2\n\nRandom effects model\n\nTreatment estimate (sm = 'OR', comparison: other treatments vs 'STD'):\n OR 95%-CI z p-value\nREM 0.8999 [0.8067; 1.0039] -1.89 0.0588\nSTD . . . .\nTOCI 0.8301 [0.7434; 0.9268] -3.31 0.0009\n\nQuantifying heterogeneity / inconsistency:\ntau^2 = 0; tau = 0; I^2 = 0% [0.0%; 48.9%]\n\nTests of heterogeneity (within designs) and inconsistency (between designs):\n Q d.f. p-value\nTotal 16.38 18 0.5663\nWithin designs 16.38 18 0.5663\nBetween designs 0.00 0 --\n\n\nA league table of the treatment effect estimates is given below:\n\nnetleague(NMA.covid)\n\nLeague table (random effects model):\n \n REM 0.8999 [0.8067; 1.0039] .\n 0.8999 [0.8067; 1.0039] STD 1.2047 [1.0789; 1.3451]\n 1.0842 [0.9282; 1.2663] 1.2047 [1.0789; 1.3451] TOCI\n\n\nWe can also present the results in a forest plot:\n\n\n\n\n\nWe now consider a Bayesian random effects network meta-analysis that analyzes the observed event counts using a binomial link function.\n\nbdata <- data.frame(study = studlab,\n treatment = treat,\n responders = event,\n sampleSize = n)\n\nnetwork <- mtc.network(data.ab = bdata)\n\nmodel <- mtc.model(network,\n likelihood = \"binom\",\n link = \"log\",\n linearModel = \"random\",\n n.chain = 3)\n\n\n# Adaptation\nmcmc1 <- mtc.run(model, n.adapt = 1000, n.iter = 1000, thin = 10)\n\nCompiling model graph\n Resolving undeclared variables\n Allocating nodes\nGraph information:\n Observed stochastic nodes: 42\n Unobserved stochastic nodes: 45\n Total graph size: 930\n\nInitializing model\n\n# Sampling\nmcmc2 <- mtc.run(model, n.adapt = 10000, n.iter = 100000, thin = 10)\n\nCompiling model graph\n Resolving undeclared variables\n Allocating nodes\nGraph information:\n Observed stochastic nodes: 42\n Unobserved stochastic nodes: 45\n Total graph size: 930\n\nInitializing model\n\n\nWe can extract the pooled treatment effect estimates from the posterior distribution. When using STD as control group, we have:\n\nsummary(relative.effect(mcmc2, t1 = \"STD\"))\n\n\nResults on the Log Risk Ratio scale\n\nIterations = 10010:110000\nThinning interval = 10 \nNumber of chains = 3 \nSample size per chain = 10000 \n\n1. Empirical mean and standard deviation for each variable,\n plus standard error of the mean:\n\n Mean SD Naive SE Time-series SE\nd.STD.REM -0.1066 0.09616 0.0005552 0.0008684\nd.STD.TOCI -0.1119 0.08161 0.0004712 0.0008437\nsd.d 0.1095 0.08823 0.0005094 0.0018423\n\n2. Quantiles for each variable:\n\n 2.5% 25% 50% 75% 97.5%\nd.STD.REM -0.311484 -0.15787 -0.10301 -0.05115 0.08329\nd.STD.TOCI -0.256815 -0.16239 -0.11937 -0.06918 0.07421\nsd.d 0.003311 0.04062 0.09003 0.15741 0.32930\n\n\nThe corresponding odds ratios are as follows:\n\n\n\n\n\nComparison\n95% CrI\n\n\n\n\nREM vs. STD\n0.9 (0.73; 1.09)\n\n\nTOCI vs. STD\n0.89 (0.77; 1.08)\n\n\nREM vs. TOCI\n1.02 (0.75; 1.27)\n\n\n\n\n\n\n\nFinally, we expand the COVID-19 network with trials investigating the effectiveness of hydroxychloroquine (HCQ), lopinavir/ritonavir (LOPI), dexamethasone (DEXA) or interferon-\\(\\beta\\) (INTB) (Selvarajan et al. 2022). The corresponding network is displayed below:\n\n\n\n\n\nEvidence network of the 33 coronavirus-19 trials\n\n\n\n\nWe conducted a random effects network meta-analysis, results are depicted below:\n\n\nNumber of studies: k = 33\nNumber of pairwise comparisons: m = 33\nNumber of treatments: n = 7\nNumber of designs: d = 6\n\nRandom effects model\n\nTreatment estimate (sm = 'OR', comparison: other treatments vs 'STD'):\n OR 95%-CI z p-value 95%-PI\nDEXA 0.8557 [0.7558; 0.9688] -2.46 0.0139 [0.7463; 0.9812]\nHCQ 1.1809 [0.8934; 1.5610] 1.17 0.2428 [0.8786; 1.5872]\nINTB 1.1606 [0.9732; 1.3841] 1.66 0.0973 [0.9604; 1.4026]\nLOPI 1.0072 [0.8906; 1.1392] 0.11 0.9085 [0.8794; 1.1537]\nREM 0.8983 [0.8014; 1.0070] -1.84 0.0658 [0.7913; 1.0199]\nSTD . . . . .\nTOCI 0.8304 [0.7410; 0.9306] -3.20 0.0014 [0.7316; 0.9426]\n\nQuantifying heterogeneity / inconsistency:\ntau^2 = 0.0004; tau = 0.0205; I^2 = 0.6% [0.0%; 42.3%]\n\nTests of heterogeneity (within designs) and inconsistency (between designs):\n Q d.f. p-value\nTotal 27.18 27 0.4543\nWithin designs 27.18 27 0.4543\nBetween designs 0.00 0 --\n\n\nWe can calculate the P score for each treatment as follows:\n\nnetrank(NMA.covidf)\n\n P-score\nTOCI 0.9070\nDEXA 0.8357\nREM 0.7143\nSTD 0.4027\nLOPI 0.3899\nHCQ 0.1336\nINTB 0.1166\n\n\n\n\n6.3.2 Pharmacologic treatments for chronic obstructive pulmonary disease\nIn this example, we consider the resuls from a systematic review of randomized controlled trials on pharmacologic treatments for chronic obstructive pulmonary disease (Baker, Baker, and Coleman 2009). The primary outcome, occurrence of one or more episodes of COPD exacerbation, is binary (yes / no). For this outcome, five drug treatments (fluticasone, budesonide, salmeterol, formoterol, tiotropium) and two combinations (fluticasone + salmeterol, budesonide + formoterol) were compared to placebo. The authors considered the two combinations as separate treatments instead of evaluating the individual components.\n\ndata(Baker2009)\n\n\n\n\n\n\nstudy\nyear\nid\ntreatment\nexac\ntotal\n\n\n\n\nLlewellyn-Jones 1996\n1996\n1\nFluticasone\n0\n8\n\n\nLlewellyn-Jones 1996\n1996\n1\nPlacebo\n3\n8\n\n\nBoyd 1997\n1997\n2\nSalmeterol\n47\n229\n\n\nBoyd 1997\n1997\n2\nPlacebo\n59\n227\n\n\nPaggiaro 1998\n1998\n3\nFluticasone\n45\n142\n\n\nPaggiaro 1998\n1998\n3\nPlacebo\n51\n139\n\n\n\n\n\n\n\n\nBaker <- pairwise(treat = treatment,\n event = exac,\n n = total,\n studlab = id,\n sm = \"OR\",\n data = Baker2009)\n\nNMA.COPD <- netmeta(TE = TE, seTE = seTE, treat1 = treat1, treat2 = treat2,\n studlab = studlab, data = Baker, sm = \"OR\", ref = \"Placebo\",\n comb.random = TRUE)\n\nWarning: Comparisons with missing TE / seTE or zero seTE not considered in\nnetwork meta-analysis.\n\n\nComparisons not considered in network meta-analysis:\n studlab treat1 treat2 TE seTE\n 39 Fluticasone+Salmeterol Placebo NA NA\n 39 Fluticasone+Salmeterol Salmeterol NA NA\n 39 Salmeterol Placebo NA NA\n\nnetgraph(NMA.COPD)\n\n\n\n\n\n\n6.3.3 Advanced Therapies for Ulcerative Colitis\nIn this example, we consider a systematic literature review of Phase 3 randomized controlled trials investigating the following advanced therapies: infliximab, adalimumab, vedolizumab, golimumab, tofacitinib, ustekinumab, filgotinib, ozanimod, and upadacitinib (Panaccione et al. 2023). This review included 48 RCTs, from which 23 were found eligible for inclusion in a network meta-analysis. The included RCT populations were largely comparable in their baseline characteristics, though some heterogeneity was noted in weight, disease duration, extent of disease, and concomitant medications. A risk of bias assessment showed a low risk of bias for all included RCTs, which were all industry sponsored.\nWe here focus on the synthesis of 18 trials that contributed efficacy data for induction in bio-naive populations. The following FDA- and/or EMA-approved biologic or SMD doses were investigated:\n\nAdalimumab subcutaneous 160 mg at week 0, 80 mg at week 2, and 40 mg at week 4 (ADA160/80)\nInfliximab intravenous 5 mg/kg (INF5) at weeks 0, 2, and 6 then every 8 weeks\nInfliximab intravenous 10 mg/kg (INF10) at weeks 0, 2, and 6 then every 8 weeks\nFilgotinib oral 100 mg once daily (FIL100)\nFilgotinib oral 200 mg once daily (FIL200)\nGolimumab subcutaneous 200 mg at week 0 and 100 mg at week 2 (GOL200/100)\nOzanimod oral 0.23 mg once daily for 4 days, 0.46 mg once daily for 3 days, then 0.92 mg once daily (OZA0.92)\nTofacitinib oral 10 mg twice daily for 8 weeks (TOF10)\nUpadacitinib oral 45 mg once daily for 8 weeks (UPA45)\nUstekinumab intravenous 6 mg/kg at week 0 (UST6)\nVedolizumab intravenous 300 mg at weeks 0, 2, and 6 (VED300)\n\nThe reference treatment is placebo (PBO).\n\n\n\nEfficacy outcomes (i.e., clinical remission) data of induction bio-naïve populations \n\n\nstudlab\ntreat1\ntreat2\nevent1\nn1\nevent2\nn2\n\n\n\n\nACT-1\nINF10\nINF5\n39\n122\n47\n121\n\n\nACT-1\nINF10\nPBO\n39\n122\n18\n121\n\n\nACT-1\nINF5\nPBO\n47\n121\n18\n121\n\n\nACT-2\nINF10\nINF5\n33\n120\n41\n121\n\n\nACT-2\nINF10\nPBO\n33\n120\n7\n123\n\n\nACT-2\nINF5\nPBO\n41\n121\n7\n123\n\n\nGEMINI 1\nVED300\nPBO\n30\n130\n5\n76\n\n\nJapic CTI-060298\nINF5\nPBO\n21\n104\n11\n104\n\n\nJiang 2015\nINF5\nPBO\n22\n41\n9\n41\n\n\nM10-447\nADA160/80\nPBO\n9\n90\n11\n96\n\n\nNCT01551290\nINF5\nPBO\n11\n50\n5\n49\n\n\nNCT02039505\nVED300\nPBO\n22\n79\n6\n41\n\n\nOCTAVE 1\nTOF10\nPBO\n56\n222\n9\n57\n\n\nOCTAVE 2\nTOF10\nPBO\n43\n195\n4\n47\n\n\nPURSUIT-SC\nGOL200/100\nPBO\n45\n253\n16\n251\n\n\nSELECTION\nFIL100\nFIL200\n47\n277\n60\n245\n\n\nSELECTION\nFIL100\nPBO\n47\n277\n17\n137\n\n\nSELECTION\nFIL200\nPBO\n60\n245\n17\n137\n\n\nTRUE NORTH\nOZA0.92\nPBO\n66\n299\n10\n151\n\n\nU-ACCOMPLISH\nUPA45\nPBO\n54\n166\n3\n81\n\n\nU-ACHIEVE Study 2\nUPA45\nPBO\n41\n145\n4\n72\n\n\nULTRA-1\nADA160/80\nPBO\n24\n130\n12\n130\n\n\nULTRA-2\nADA160/80\nPBO\n32\n150\n16\n145\n\n\nUNIFI\nUST6\nPBO\n27\n147\n15\n151\n\n\n\n\n\n\n\nThe corresponding network is displayed below:\n\n\n\n\n\nEvidence network of 18 trials that contributed efficacy data for induction in bio-naive populations\n\n\n\n\nBelow, we conduct a random effects network meta-analysis of the reported study effects (expressed as odds ratio) and consider placebo (treat = \"PBO\") as the control treatment.\n\nNMA.uc <- netmeta(TE = TE, seTE = seTE, treat1 = treat1, treat2 = treat2,\n studlab = studlab, data = UlcerativeColitis, sm = \"OR\", \n ref = \"PBO\", common = FALSE, comb.random = TRUE)\nNMA.uc\n\nAll treatments except FIL100 and UST6 are significantly more efficacious than PBO at inducing clinical remission. We can now estimate the probabilities of each treatment being at each possible rank and the SUCRAs (Surface Under the Cumulative RAnking curve):\n\nsucra.uc <- rankogram(NMA.uc, nsim = 100, random = TRUE, common = FALSE, \n small.values = \"undesirable\")\n\n# Exctract the SUCRA values\nsucra.uc$ranking.random\n\n ADA160/80 FIL100 FIL200 GOL200/100 INF10 INF5 OZA0.92 \n0.25363636 0.19090909 0.41909091 0.63181818 0.61454545 0.75909091 0.75545455 \n PBO TOF10 UPA45 UST6 VED300 \n0.01636364 0.38545455 0.97818182 0.36636364 0.62909091 \n\n\nThese results indicate that 97.8% of the evaluated treatments are worse than UPA45." + "text": "6.3 Network meta-analysis of clinical trials\nWe here use the R packages netmeta for conducting a frequentist network meta-analysis. A detailed tutorial on the use of netmeta is available from the book Doing Meta-Analysis with R: A Hands-On Guide.\n\n6.3.1 Interventions for coronavirus disease 2019\nWe here consider data from a study which aimed to assess the comparative effectiveness of remdesivir and tocilizumab for reducing mortality in hospitalised COVID-19 patients. 80 trials were identified from two published network meta-analyses (Selvarajan et al. 2022), (Siemieniuk et al. 2020), a living COVID-19 trial database (COVID-NMA Initiative) [Covid-NMA.com], and a clinical trial database [clinicaltrials.gov]. Trials were included in this study if the patient population included hospitalized COVID-19 patients, active treatment was remdesivir or tocilizumab, comparator treatment was placebo or standard care, short-term mortality data was available, and the trial was published. 21 trials were included. For included trials, a risk of bias score was extracted from the COVID-NMA Initiative.\n\n\n\n\n\nstudlab\ntreat1\ntreat2\nevent1\nn1\nevent2\nn2\n\n\n\n\nAder\nREM\nSTD\n34\n414\n37\n418\n\n\nBeigel (ACTT-1)\nREM\nSTD\n59\n541\n77\n521\n\n\nBroman\nTOCI\nSTD\n1\n57\n0\n29\n\n\nCriner\nREM\nSTD\n4\n384\n4\n200\n\n\nDeclerq (COV-AID)\nTOCI\nSTD\n10\n81\n9\n74\n\n\nGordon (REMAP-CAP)\nTOCI\nSTD\n83\n353\n116\n358\n\n\nHermine (CORIMUNO)\nTOCI\nSTD\n7\n63\n8\n67\n\n\nHorby (RECOVERY)\nTOCI\nSTD\n621\n2022\n729\n2094\n\n\nIslam\nREM\nSTD\n0\n30\n0\n30\n\n\nMahajan\nREM\nSTD\n5\n34\n3\n36\n\n\nPan (WHO Solidarity)\nREM\nSTD\n602\n4146\n643\n4129\n\n\nRosas (COVACTA)\nTOCI\nSTD\n58\n294\n28\n144\n\n\nRutgers\nTOCI\nSTD\n21\n174\n34\n180\n\n\nSalama (EMPACTA)\nTOCI\nSTD\n26\n249\n11\n128\n\n\nSalvarani\nTOCI\nSTD\n2\n60\n1\n63\n\n\nSoin (COVINTOC)\nTOCI\nSTD\n11\n92\n15\n88\n\n\nSpinner\nREM\nSTD\n5\n384\n4\n200\n\n\nStone (BACC-BAY)\nTOCI\nSTD\n9\n161\n4\n82\n\n\nTalaschian\nTOCI\nSTD\n5\n17\n4\n19\n\n\nVeiga (TOCIBRAS)\nTOCI\nSTD\n14\n65\n6\n64\n\n\nWang\nREM\nSTD\n22\n158\n10\n78\n\n\n\n\n\n\n\nThe corresponding network is displayed below:\n\n\n\n\n\nEvidence network of the 21 coronavirus-19 trials\n\n\n\n\nWe use the following command to calculate the log odds ratios and corresponding standard errors for each study:\n\ncovid <- pairwise(treat = treat, \n event = event, \n n = n, \n studlab = studlab, \n sm = \"OR\")\nhead(covid)\n\n\n\n\n\n\nTE\nseTE\nstudlab\ntreat1\ntreat2\nevent1\nn1\nevent2\nn2\nincr\nallstudies\n\n\n\n\n-0.0819293\n0.2483849\nAder\nREM\nSTD\n34\n414\n37\n418\n0.0\nFALSE\n\n\n-0.3483875\n0.1851030\nBeigel (ACTT-1)\nREM\nSTD\n59\n541\n77\n521\n0.0\nFALSE\n\n\n0.4487619\n1.6487159\nBroman\nTOCI\nSTD\n1\n57\n0\n29\n0.5\nFALSE\n\n\n-0.6620566\n0.7125543\nCriner\nREM\nSTD\n4\n384\n4\n200\n0.0\nFALSE\n\n\n0.0170679\n0.4904898\nDeclerq (COV-AID)\nTOCI\nSTD\n10\n81\n9\n74\n0.0\nFALSE\n\n\n-0.4442338\n0.1688337\nGordon (REMAP-CAP)\nTOCI\nSTD\n83\n353\n116\n358\n0.0\nFALSE\n\n\n\n\n\n\n\nBelow, we conduct a random effects network meta-analysis where we consider standard care (STD) as the control treatment. Note that we have one study where zero cell counts occur, this study will not contribute to the NMA as the log odds ratio and its standard error cannot be determined.\n\nNMA.covid <- netmeta(TE = TE, seTE = seTE, treat1 = treat1, treat2 = treat2,\n studlab = studlab, data = covid, sm = \"OR\", ref = \"STD\",\n comb.random = TRUE, common = FALSE, warn = FALSE)\nNMA.covid \n\nNumber of studies: k = 20\nNumber of pairwise comparisons: m = 20\nNumber of treatments: n = 3\nNumber of designs: d = 2\n\nRandom effects model\n\nTreatment estimate (sm = 'OR', comparison: other treatments vs 'STD'):\n OR 95%-CI z p-value\nREM 0.8999 [0.8067; 1.0039] -1.89 0.0588\nSTD . . . .\nTOCI 0.8301 [0.7434; 0.9268] -3.31 0.0009\n\nQuantifying heterogeneity / inconsistency:\ntau^2 = 0; tau = 0; I^2 = 0% [0.0%; 48.9%]\n\nTests of heterogeneity (within designs) and inconsistency (between designs):\n Q d.f. p-value\nTotal 16.38 18 0.5663\nWithin designs 16.38 18 0.5663\nBetween designs 0.00 0 --\n\n\nA league table of the treatment effect estimates is given below:\n\nnetleague(NMA.covid)\n\nLeague table (random effects model):\n \n REM 0.8999 [0.8067; 1.0039] .\n 0.8999 [0.8067; 1.0039] STD 1.2047 [1.0789; 1.3451]\n 1.0842 [0.9282; 1.2663] 1.2047 [1.0789; 1.3451] TOCI\n\n\nWe can also present the results in a forest plot:\n\n\n\n\n\nWe now consider a Bayesian random effects network meta-analysis that analyzes the observed event counts using a binomial link function.\n\nbdata <- data.frame(study = studlab,\n treatment = treat,\n responders = event,\n sampleSize = n)\n\nnetwork <- mtc.network(data.ab = bdata)\n\nmodel <- mtc.model(network,\n likelihood = \"binom\",\n link = \"log\",\n linearModel = \"random\",\n n.chain = 3)\n\n\n# Adaptation\nmcmc1 <- mtc.run(model, n.adapt = 1000, n.iter = 1000, thin = 10)\n\nCompiling model graph\n Resolving undeclared variables\n Allocating nodes\nGraph information:\n Observed stochastic nodes: 42\n Unobserved stochastic nodes: 45\n Total graph size: 930\n\nInitializing model\n\n# Sampling\nmcmc2 <- mtc.run(model, n.adapt = 10000, n.iter = 100000, thin = 10)\n\nCompiling model graph\n Resolving undeclared variables\n Allocating nodes\nGraph information:\n Observed stochastic nodes: 42\n Unobserved stochastic nodes: 45\n Total graph size: 930\n\nInitializing model\n\n\nWe can extract the pooled treatment effect estimates from the posterior distribution. When using STD as control group, we have:\n\nsummary(relative.effect(mcmc2, t1 = \"STD\"))\n\n\nResults on the Log Risk Ratio scale\n\nIterations = 10010:110000\nThinning interval = 10 \nNumber of chains = 3 \nSample size per chain = 10000 \n\n1. Empirical mean and standard deviation for each variable,\n plus standard error of the mean:\n\n Mean SD Naive SE Time-series SE\nd.STD.REM -0.1078 0.09518 0.0005495 0.0008224\nd.STD.TOCI -0.1134 0.08176 0.0004721 0.0008231\nsd.d 0.1089 0.08673 0.0005007 0.0016185\n\n2. Quantiles for each variable:\n\n 2.5% 25% 50% 75% 97.5%\nd.STD.REM -0.312993 -0.15973 -0.10433 -0.05201 0.07768\nd.STD.TOCI -0.256518 -0.16362 -0.12185 -0.07333 0.07843\nsd.d 0.004741 0.04247 0.08995 0.15421 0.32497\n\n\nThe corresponding odds ratios are as follows:\n\n\n\n\n\nComparison\n95% CrI\n\n\n\n\nREM vs. STD\n0.9 (0.73; 1.08)\n\n\nTOCI vs. STD\n0.89 (0.77; 1.08)\n\n\nREM vs. TOCI\n1.02 (0.75; 1.26)\n\n\n\n\n\n\n\nFinally, we expand the COVID-19 network with trials investigating the effectiveness of hydroxychloroquine (HCQ), lopinavir/ritonavir (LOPI), dexamethasone (DEXA) or interferon-\\(\\beta\\) (INTB) (Selvarajan et al. 2022). The corresponding network is displayed below:\n\n\n\n\n\nEvidence network of the 33 coronavirus-19 trials\n\n\n\n\nWe conducted a random effects network meta-analysis, results are depicted below:\n\n\nNumber of studies: k = 33\nNumber of pairwise comparisons: m = 33\nNumber of treatments: n = 7\nNumber of designs: d = 6\n\nRandom effects model\n\nTreatment estimate (sm = 'OR', comparison: other treatments vs 'STD'):\n OR 95%-CI z p-value 95%-PI\nDEXA 0.8557 [0.7558; 0.9688] -2.46 0.0139 [0.7463; 0.9812]\nHCQ 1.1809 [0.8934; 1.5610] 1.17 0.2428 [0.8786; 1.5872]\nINTB 1.1606 [0.9732; 1.3841] 1.66 0.0973 [0.9604; 1.4026]\nLOPI 1.0072 [0.8906; 1.1392] 0.11 0.9085 [0.8794; 1.1537]\nREM 0.8983 [0.8014; 1.0070] -1.84 0.0658 [0.7913; 1.0199]\nSTD . . . . .\nTOCI 0.8304 [0.7410; 0.9306] -3.20 0.0014 [0.7316; 0.9426]\n\nQuantifying heterogeneity / inconsistency:\ntau^2 = 0.0004; tau = 0.0205; I^2 = 0.6% [0.0%; 42.3%]\n\nTests of heterogeneity (within designs) and inconsistency (between designs):\n Q d.f. p-value\nTotal 27.18 27 0.4543\nWithin designs 27.18 27 0.4543\nBetween designs 0.00 0 --\n\n\nWe can calculate the P score for each treatment as follows:\n\nnetrank(NMA.covidf)\n\n P-score\nTOCI 0.9070\nDEXA 0.8357\nREM 0.7143\nSTD 0.4027\nLOPI 0.3899\nHCQ 0.1336\nINTB 0.1166\n\n\n\n\n6.3.2 Pharmacologic treatments for chronic obstructive pulmonary disease\nIn this example, we consider the resuls from a systematic review of randomized controlled trials on pharmacologic treatments for chronic obstructive pulmonary disease (Baker, Baker, and Coleman 2009). The primary outcome, occurrence of one or more episodes of COPD exacerbation, is binary (yes / no). For this outcome, five drug treatments (fluticasone, budesonide, salmeterol, formoterol, tiotropium) and two combinations (fluticasone + salmeterol, budesonide + formoterol) were compared to placebo. The authors considered the two combinations as separate treatments instead of evaluating the individual components.\n\ndata(Baker2009)\n\n\n\n\n\n\nstudy\nyear\nid\ntreatment\nexac\ntotal\n\n\n\n\nLlewellyn-Jones 1996\n1996\n1\nFluticasone\n0\n8\n\n\nLlewellyn-Jones 1996\n1996\n1\nPlacebo\n3\n8\n\n\nBoyd 1997\n1997\n2\nSalmeterol\n47\n229\n\n\nBoyd 1997\n1997\n2\nPlacebo\n59\n227\n\n\nPaggiaro 1998\n1998\n3\nFluticasone\n45\n142\n\n\nPaggiaro 1998\n1998\n3\nPlacebo\n51\n139\n\n\n\n\n\n\n\n\nBaker <- pairwise(treat = treatment,\n event = exac,\n n = total,\n studlab = id,\n sm = \"OR\",\n data = Baker2009)\n\nNMA.COPD <- netmeta(TE = TE, seTE = seTE, treat1 = treat1, treat2 = treat2,\n studlab = studlab, data = Baker, sm = \"OR\", ref = \"Placebo\",\n comb.random = TRUE)\n\nWarning: Comparisons with missing TE / seTE or zero seTE not considered in\nnetwork meta-analysis.\n\n\nComparisons not considered in network meta-analysis:\n studlab treat1 treat2 TE seTE\n 39 Fluticasone+Salmeterol Placebo NA NA\n 39 Fluticasone+Salmeterol Salmeterol NA NA\n 39 Salmeterol Placebo NA NA\n\nnetgraph(NMA.COPD)\n\n\n\n\n\n\n6.3.3 Advanced Therapies for Ulcerative Colitis\nIn this example, we consider a systematic literature review of Phase 3 randomized controlled trials investigating the following advanced therapies: infliximab, adalimumab, vedolizumab, golimumab, tofacitinib, ustekinumab, filgotinib, ozanimod, and upadacitinib (Panaccione et al. 2023). This review included 48 RCTs, from which 23 were found eligible for inclusion in a network meta-analysis. The included RCT populations were largely comparable in their baseline characteristics, though some heterogeneity was noted in weight, disease duration, extent of disease, and concomitant medications. A risk of bias assessment showed a low risk of bias for all included RCTs, which were all industry sponsored.\nWe here focus on the synthesis of 18 trials that contributed efficacy data for induction in bio-naive populations. The following FDA- and/or EMA-approved biologic or SMD doses were investigated:\n\nAdalimumab subcutaneous 160 mg at week 0, 80 mg at week 2, and 40 mg at week 4 (ADA160/80)\nInfliximab intravenous 5 mg/kg (INF5) at weeks 0, 2, and 6 then every 8 weeks\nInfliximab intravenous 10 mg/kg (INF10) at weeks 0, 2, and 6 then every 8 weeks\nFilgotinib oral 100 mg once daily (FIL100)\nFilgotinib oral 200 mg once daily (FIL200)\nGolimumab subcutaneous 200 mg at week 0 and 100 mg at week 2 (GOL200/100)\nOzanimod oral 0.23 mg once daily for 4 days, 0.46 mg once daily for 3 days, then 0.92 mg once daily (OZA0.92)\nTofacitinib oral 10 mg twice daily for 8 weeks (TOF10)\nUpadacitinib oral 45 mg once daily for 8 weeks (UPA45)\nUstekinumab intravenous 6 mg/kg at week 0 (UST6)\nVedolizumab intravenous 300 mg at weeks 0, 2, and 6 (VED300)\n\nThe reference treatment is placebo (PBO).\n\n\n\nEfficacy outcomes (i.e., clinical remission) data of induction bio-naïve populations \n\n\nstudlab\ntreat1\ntreat2\nevent1\nn1\nevent2\nn2\n\n\n\n\nACT-1\nINF10\nINF5\n39\n122\n47\n121\n\n\nACT-1\nINF10\nPBO\n39\n122\n18\n121\n\n\nACT-1\nINF5\nPBO\n47\n121\n18\n121\n\n\nACT-2\nINF10\nINF5\n33\n120\n41\n121\n\n\nACT-2\nINF10\nPBO\n33\n120\n7\n123\n\n\nACT-2\nINF5\nPBO\n41\n121\n7\n123\n\n\nGEMINI 1\nVED300\nPBO\n30\n130\n5\n76\n\n\nJapic CTI-060298\nINF5\nPBO\n21\n104\n11\n104\n\n\nJiang 2015\nINF5\nPBO\n22\n41\n9\n41\n\n\nM10-447\nADA160/80\nPBO\n9\n90\n11\n96\n\n\nNCT01551290\nINF5\nPBO\n11\n50\n5\n49\n\n\nNCT02039505\nVED300\nPBO\n22\n79\n6\n41\n\n\nOCTAVE 1\nTOF10\nPBO\n56\n222\n9\n57\n\n\nOCTAVE 2\nTOF10\nPBO\n43\n195\n4\n47\n\n\nPURSUIT-SC\nGOL200/100\nPBO\n45\n253\n16\n251\n\n\nSELECTION\nFIL100\nFIL200\n47\n277\n60\n245\n\n\nSELECTION\nFIL100\nPBO\n47\n277\n17\n137\n\n\nSELECTION\nFIL200\nPBO\n60\n245\n17\n137\n\n\nTRUE NORTH\nOZA0.92\nPBO\n66\n299\n10\n151\n\n\nU-ACCOMPLISH\nUPA45\nPBO\n54\n166\n3\n81\n\n\nU-ACHIEVE Study 2\nUPA45\nPBO\n41\n145\n4\n72\n\n\nULTRA-1\nADA160/80\nPBO\n24\n130\n12\n130\n\n\nULTRA-2\nADA160/80\nPBO\n32\n150\n16\n145\n\n\nUNIFI\nUST6\nPBO\n27\n147\n15\n151\n\n\n\n\n\n\n\nThe corresponding network is displayed below:\n\n\n\n\n\nEvidence network of 18 trials that contributed efficacy data for induction in bio-naive populations\n\n\n\n\nBelow, we conduct a random effects network meta-analysis of the reported study effects (expressed as odds ratio) and consider placebo (treat = \"PBO\") as the control treatment.\n\nNMA.uc <- netmeta(TE = TE, seTE = seTE, treat1 = treat1, treat2 = treat2,\n studlab = studlab, data = UlcerativeColitis, sm = \"OR\", \n ref = \"PBO\", common = FALSE, comb.random = TRUE)\nNMA.uc\n\nAll treatments except FIL100 and UST6 are significantly more efficacious than PBO at inducing clinical remission. We can now estimate the probabilities of each treatment being at each possible rank and the SUCRAs (Surface Under the Cumulative RAnking curve):\n\nsucra.uc <- rankogram(NMA.uc, nsim = 100, random = TRUE, common = FALSE, \n small.values = \"undesirable\")\n\n# Exctract the SUCRA values\nsucra.uc$ranking.random\n\n ADA160/80 FIL100 FIL200 GOL200/100 INF10 INF5 OZA0.92 \n0.28727273 0.18909091 0.43909091 0.67363636 0.61818182 0.73909091 0.73090909 \n PBO TOF10 UPA45 UST6 VED300 \n0.01090909 0.39272727 0.98000000 0.31818182 0.62090909 \n\n\nThese results indicate that 98% of the evaluated treatments are worse than UPA45." }, { "objectID": "chapter_10.html#version-info", "href": "chapter_10.html#version-info", "title": "6  Systematic review and meta-analysis of Real-World Evidence", "section": "Version info", - "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] netmeta_2.8-2 meta_6.5-0 gemtc_1.0-2 coda_0.19-4 \n[5] dplyr_1.1.4 kableExtra_1.3.4\n\nloaded via a namespace (and not attached):\n [1] Rcpp_1.0.11 mvtnorm_1.2-3 svglite_2.1.2 \n [4] lattice_0.20-45 digest_0.6.33 utf8_1.2.4 \n [7] truncnorm_1.0-9 slam_0.1-50 R6_2.5.1 \n[10] plyr_1.8.9 magic_1.6-1 evaluate_0.23 \n[13] httr_1.4.7 ggplot2_3.4.4 highr_0.10 \n[16] pillar_1.9.0 rlang_1.1.2 rstudioapi_0.15.0 \n[19] minqa_1.2.6 nloptr_2.0.3 rjags_4-14 \n[22] Matrix_1.6-3 rmarkdown_2.25 mathjaxr_1.6-0 \n[25] splines_4.2.3 lme4_1.1-35.1 webshot_0.5.5 \n[28] stringr_1.5.1 htmlwidgets_1.6.3 igraph_1.5.1 \n[31] munsell_0.5.0 compiler_4.2.3 numDeriv_2016.8-1.1\n[34] xfun_0.41 pkgconfig_2.0.3 systemfonts_1.0.5 \n[37] Rglpk_0.6-5 htmltools_0.5.7 tidyselect_1.2.0 \n[40] tibble_3.2.1 codetools_0.2-19 fansi_1.0.5 \n[43] viridisLite_0.4.2 withr_2.5.2 MASS_7.3-58.2 \n[46] grid_4.2.3 nlme_3.1-162 jsonlite_1.8.7 \n[49] gtable_0.3.4 lifecycle_1.0.4 magrittr_2.0.3 \n[52] metafor_4.4-0 scales_1.2.1 metadat_1.2-0 \n[55] cli_3.6.1 stringi_1.8.2 remotes_2.4.2.1 \n[58] xml2_1.3.5 generics_0.1.3 vctrs_0.6.4 \n[61] boot_1.3-28.1 forcats_1.0.0 tools_4.2.3 \n[64] CompQuadForm_1.4.3 glue_1.6.2 abind_1.4-5 \n[67] fastmap_1.1.1 yaml_2.3.7 colorspace_2.1-0 \n[70] rvest_1.0.3 knitr_1.45" + "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] netmeta_2.8-2 meta_6.5-0 gemtc_1.0-2 coda_0.19-4 \n[5] dplyr_1.1.4 kableExtra_1.3.4\n\nloaded via a namespace (and not attached):\n [1] Rcpp_1.0.11 mvtnorm_1.2-4 svglite_2.1.2 \n [4] lattice_0.20-45 digest_0.6.33 utf8_1.2.4 \n [7] truncnorm_1.0-9 slam_0.1-50 R6_2.5.1 \n[10] plyr_1.8.9 magic_1.6-1 evaluate_0.23 \n[13] httr_1.4.7 ggplot2_3.4.4 highr_0.10 \n[16] pillar_1.9.0 rlang_1.1.2 rstudioapi_0.15.0 \n[19] minqa_1.2.6 nloptr_2.0.3 rjags_4-14 \n[22] Matrix_1.6-3 rmarkdown_2.25 mathjaxr_1.6-0 \n[25] splines_4.2.3 lme4_1.1-35.1 webshot_0.5.5 \n[28] stringr_1.5.1 htmlwidgets_1.6.3 igraph_1.5.1 \n[31] munsell_0.5.0 compiler_4.2.3 numDeriv_2016.8-1.1\n[34] xfun_0.41 pkgconfig_2.0.3 systemfonts_1.0.5 \n[37] Rglpk_0.6-5 htmltools_0.5.7 tidyselect_1.2.0 \n[40] tibble_3.2.1 codetools_0.2-19 fansi_1.0.5 \n[43] viridisLite_0.4.2 withr_2.5.2 MASS_7.3-58.2 \n[46] grid_4.2.3 nlme_3.1-162 jsonlite_1.8.7 \n[49] gtable_0.3.4 lifecycle_1.0.4 magrittr_2.0.3 \n[52] metafor_4.4-0 scales_1.3.0 metadat_1.2-0 \n[55] cli_3.6.1 stringi_1.8.2 remotes_2.4.2.1 \n[58] xml2_1.3.5 generics_0.1.3 vctrs_0.6.4 \n[61] boot_1.3-28.1 forcats_1.0.0 tools_4.2.3 \n[64] CompQuadForm_1.4.3 glue_1.6.2 abind_1.4-5 \n[67] fastmap_1.1.1 yaml_2.3.7 colorspace_2.1-0 \n[70] rvest_1.0.3 knitr_1.45" }, { "objectID": "chapter_10.html#references", @@ -263,7 +263,7 @@ "href": "chapter_11.html#version-info", "title": "7  Individual Participant Data Meta-analysis of clinical trials and real-world data", "section": "Version info", - "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] meta_6.5-0 jarbes_2.0.0 dplyr_1.1.4 ggplot2_3.4.4 \n[5] table1_1.4.3 kableExtra_1.3.4\n\nloaded via a namespace (and not attached):\n [1] httr_1.4.7 tidyr_1.3.0 sfsmisc_1.1-16 \n [4] jsonlite_1.8.7 viridisLite_0.4.2 splines_4.2.3 \n [7] Formula_1.2-5 shiny_1.8.0 metafor_4.4-0 \n[10] yaml_2.3.7 numDeriv_2016.8-1.1 R2WinBUGS_2.1-21 \n[13] pillar_1.9.0 lattice_0.20-45 glue_1.6.2 \n[16] digest_0.6.33 RColorBrewer_1.1-3 promises_1.2.1 \n[19] minqa_1.2.6 rvest_1.0.3 colorspace_2.1-0 \n[22] R2jags_0.7-1 Matrix_1.6-3 mcmcplots_0.4.3 \n[25] htmltools_0.5.7 httpuv_1.6.12 plyr_1.8.9 \n[28] pkgconfig_2.0.3 purrr_1.0.2 xtable_1.8-4 \n[31] scales_1.2.1 webshot_0.5.5 svglite_2.1.2 \n[34] rjags_4-14 later_1.3.1 ggstats_0.5.1 \n[37] metadat_1.2-0 lme4_1.1-35.1 tibble_3.2.1 \n[40] farver_2.1.1 generics_0.1.3 ellipsis_0.3.2 \n[43] withr_2.5.2 cli_3.6.1 magrittr_2.0.3 \n[46] mime_0.12 evaluate_0.23 GGally_2.2.0 \n[49] fansi_1.0.5 nlme_3.1-162 MASS_7.3-58.2 \n[52] xml2_1.3.5 tools_4.2.3 lifecycle_1.0.4 \n[55] stringr_1.5.1 munsell_0.5.0 compiler_4.2.3 \n[58] systemfonts_1.0.5 rlang_1.1.2 nloptr_2.0.3 \n[61] grid_4.2.3 rstudioapi_0.15.0 CompQuadForm_1.4.3 \n[64] htmlwidgets_1.6.3 miniUI_0.1.1.1 labeling_0.4.3 \n[67] rmarkdown_2.25 boot_1.3-28.1 gtable_0.3.4 \n[70] codetools_0.2-19 abind_1.4-5 R6_2.5.1 \n[73] gridExtra_2.3 knitr_1.45 denstrip_1.5.4 \n[76] fastmap_1.1.1 utf8_1.2.4 mathjaxr_1.6-0 \n[79] ggExtra_0.10.1 stringi_1.8.2 parallel_4.2.3 \n[82] Rcpp_1.0.11 vctrs_0.6.4 tidyselect_1.2.0 \n[85] xfun_0.41 coda_0.19-4" + "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] meta_6.5-0 jarbes_2.0.0 dplyr_1.1.4 ggplot2_3.4.4 \n[5] table1_1.4.3 kableExtra_1.3.4\n\nloaded via a namespace (and not attached):\n [1] httr_1.4.7 tidyr_1.3.0 sfsmisc_1.1-16 \n [4] jsonlite_1.8.7 viridisLite_0.4.2 splines_4.2.3 \n [7] Formula_1.2-5 shiny_1.8.0 metafor_4.4-0 \n[10] yaml_2.3.7 numDeriv_2016.8-1.1 R2WinBUGS_2.1-21 \n[13] pillar_1.9.0 lattice_0.20-45 glue_1.6.2 \n[16] digest_0.6.33 RColorBrewer_1.1-3 promises_1.2.1 \n[19] minqa_1.2.6 rvest_1.0.3 colorspace_2.1-0 \n[22] R2jags_0.7-1 Matrix_1.6-3 mcmcplots_0.4.3 \n[25] htmltools_0.5.7 httpuv_1.6.12 plyr_1.8.9 \n[28] pkgconfig_2.0.3 purrr_1.0.2 xtable_1.8-4 \n[31] scales_1.3.0 webshot_0.5.5 svglite_2.1.2 \n[34] rjags_4-14 later_1.3.1 ggstats_0.5.1 \n[37] metadat_1.2-0 lme4_1.1-35.1 tibble_3.2.1 \n[40] farver_2.1.1 generics_0.1.3 ellipsis_0.3.2 \n[43] withr_2.5.2 cli_3.6.1 magrittr_2.0.3 \n[46] mime_0.12 evaluate_0.23 GGally_2.2.0 \n[49] fansi_1.0.5 nlme_3.1-162 MASS_7.3-58.2 \n[52] xml2_1.3.5 tools_4.2.3 lifecycle_1.0.4 \n[55] stringr_1.5.1 munsell_0.5.0 compiler_4.2.3 \n[58] systemfonts_1.0.5 rlang_1.1.2 nloptr_2.0.3 \n[61] grid_4.2.3 rstudioapi_0.15.0 CompQuadForm_1.4.3 \n[64] htmlwidgets_1.6.3 miniUI_0.1.1.1 labeling_0.4.3 \n[67] rmarkdown_2.25 boot_1.3-28.1 gtable_0.3.4 \n[70] codetools_0.2-19 abind_1.4-5 R6_2.5.1 \n[73] gridExtra_2.3 knitr_1.45 denstrip_1.5.4 \n[76] fastmap_1.1.1 utf8_1.2.4 mathjaxr_1.6-0 \n[79] ggExtra_0.10.1 stringi_1.8.2 parallel_4.2.3 \n[82] Rcpp_1.0.11 vctrs_0.6.4 tidyselect_1.2.0 \n[85] xfun_0.41 coda_0.19-4" }, { "objectID": "chapter_11.html#references", @@ -312,7 +312,7 @@ "href": "chapter_12.html#version-info", "title": "8  Dealing with irregular and informative visits", "section": "Version info", - "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] sparseMVN_0.2.2 truncnorm_1.0-9 MASS_7.3-58.2 nlme_3.1-162 \n[5] mice_3.16.0 ggplot2_3.4.4 broom_1.0.5 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] shape_1.4.6 tidyselect_1.2.0 xfun_0.41 purrr_1.0.2 \n [5] splines_4.2.3 lattice_0.20-45 colorspace_2.1-0 vctrs_0.6.4 \n [9] generics_0.1.3 htmltools_0.5.7 yaml_2.3.7 pan_1.9 \n[13] utf8_1.2.4 survival_3.5-3 rlang_1.1.2 jomo_2.7-6 \n[17] pillar_1.9.0 nloptr_2.0.3 withr_2.5.2 glue_1.6.2 \n[21] foreach_1.5.2 lifecycle_1.0.4 munsell_0.5.0 gtable_0.3.4 \n[25] htmlwidgets_1.6.3 codetools_0.2-19 evaluate_0.23 labeling_0.4.3 \n[29] knitr_1.45 fastmap_1.1.1 fansi_1.0.5 Rcpp_1.0.11 \n[33] scales_1.2.1 backports_1.4.1 jsonlite_1.8.7 farver_2.1.1 \n[37] lme4_1.1-35.1 digest_0.6.33 grid_4.2.3 cli_3.6.1 \n[41] tools_4.2.3 magrittr_2.0.3 glmnet_4.1-8 tibble_3.2.1 \n[45] tidyr_1.3.0 pkgconfig_2.0.3 ellipsis_0.3.2 Matrix_1.6-3 \n[49] minqa_1.2.6 rmarkdown_2.25 iterators_1.0.14 mitml_0.4-5 \n[53] R6_2.5.1 boot_1.3-28.1 rpart_4.1.19 nnet_7.3-18 \n[57] compiler_4.2.3" + "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] sparseMVN_0.2.2 truncnorm_1.0-9 MASS_7.3-58.2 nlme_3.1-162 \n[5] mice_3.16.0 ggplot2_3.4.4 broom_1.0.5 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] shape_1.4.6 tidyselect_1.2.0 xfun_0.41 purrr_1.0.2 \n [5] splines_4.2.3 lattice_0.20-45 colorspace_2.1-0 vctrs_0.6.4 \n [9] generics_0.1.3 htmltools_0.5.7 yaml_2.3.7 pan_1.9 \n[13] utf8_1.2.4 survival_3.5-3 rlang_1.1.2 jomo_2.7-6 \n[17] pillar_1.9.0 nloptr_2.0.3 withr_2.5.2 glue_1.6.2 \n[21] foreach_1.5.2 lifecycle_1.0.4 munsell_0.5.0 gtable_0.3.4 \n[25] htmlwidgets_1.6.3 codetools_0.2-19 evaluate_0.23 labeling_0.4.3 \n[29] knitr_1.45 fastmap_1.1.1 fansi_1.0.5 Rcpp_1.0.11 \n[33] scales_1.3.0 backports_1.4.1 jsonlite_1.8.7 farver_2.1.1 \n[37] lme4_1.1-35.1 digest_0.6.33 grid_4.2.3 cli_3.6.1 \n[41] tools_4.2.3 magrittr_2.0.3 glmnet_4.1-8 tibble_3.2.1 \n[45] tidyr_1.3.0 pkgconfig_2.0.3 ellipsis_0.3.2 Matrix_1.6-3 \n[49] minqa_1.2.6 rmarkdown_2.25 iterators_1.0.14 mitml_0.4-5 \n[53] R6_2.5.1 boot_1.3-28.1 rpart_4.1.19 nnet_7.3-18 \n[57] compiler_4.2.3" }, { "objectID": "chapter_12.html#references", @@ -326,21 +326,21 @@ "href": "chapter_16.html#estimating-heterogeneous-treatment-effects-in-pairwise-meta-analysis", "title": "9  Prediction of individual treatment effect using data from multiple studies", "section": "9.1 Estimating heterogeneous treatment effects in pairwise meta-analysis", - "text": "9.1 Estimating heterogeneous treatment effects in pairwise meta-analysis\nWe hereby provide code for estimating patient-level treatment effects for the case when we have patient-level data from multiple randomized trials.\n\n9.1.1 Example of a continuous outcome\n\n9.1.1.1 Setup\nWe start by simulating an artificial dataset using the R package bipd:\n\nlibrary(bipd)\nds <- generate_ipdma_example(type = \"continuous\")\n\nLet us have a look at the dataset:\n\nhead(ds)\n\n studyid treat z1 z2 y\n1 1 1 0.66357960 -0.4577273 8\n2 1 0 1.31551822 -0.8754736 11\n3 1 0 0.09999125 0.8680711 11\n4 1 1 1.14502875 0.9097141 9\n5 1 0 -0.27793412 0.2742364 11\n6 1 0 0.74722408 0.7883318 11\n\n\nThe simulated dataset contains information on the following variables:\n\nthe trial indicator studyid\nthe treatment indicator treat, which takes the values 0 for control and 1 for active treatment\ntwo prognostic variables z1 and z2\nthe continuous outcome y\n\n\n\n\n\n\n\nTable 9.1: The simulated dataset with a continuous outcome\n\n\n\n\n\n\n\n\n\n0\n(N=301)\n1\n(N=299)\nOverall\n(N=600)\n\n\n\n\nz1\n\n\n\n\n\nMean (SD)\n0.0102 (0.998)\n-0.0650 (1.04)\n-0.0273 (1.02)\n\n\nMedian [Min, Max]\n0.0716 [-3.25, 2.28]\n-0.0613 [-2.69, 2.63]\n-0.00117 [-3.25, 2.63]\n\n\nz2\n\n\n\n\n\nMean (SD)\n-0.0735 (1.06)\n-0.0213 (1.02)\n-0.0475 (1.04)\n\n\nMedian [Min, Max]\n-0.0459 [-3.30, 2.55]\n-0.0524 [-2.44, 2.96]\n-0.0481 [-3.30, 2.96]\n\n\nstudyid\n\n\n\n\n\n1\n47 (15.6%)\n53 (17.7%)\n100 (16.7%)\n\n\n2\n56 (18.6%)\n44 (14.7%)\n100 (16.7%)\n\n\n3\n48 (15.9%)\n52 (17.4%)\n100 (16.7%)\n\n\n4\n48 (15.9%)\n52 (17.4%)\n100 (16.7%)\n\n\n5\n54 (17.9%)\n46 (15.4%)\n100 (16.7%)\n\n\n6\n48 (15.9%)\n52 (17.4%)\n100 (16.7%)\n\n\n\n\n\n\n\n\n\n\n9.1.1.2 Model fitting\nWe synthesize the evidence using a Bayesian random effects meta-analysis model. The model is given in Equation 16.7 of the book. First we need set up the data and create the model:\n\nipd <- with(ds, ipdma.model.onestage(y = y, study = studyid, treat = treat,\n X = cbind(z1, z2), \n response = \"normal\", \n shrinkage = \"none\"), \n type = \"random\")\n\nThe JAGS model can be accessed as follows:\n\nipd$model.JAGS\n\nfunction () \n{\n for (i in 1:Np) {\n y[i] ~ dnorm(mu[i], sigma)\n mu[i] <- alpha[studyid[i]] + inprod(beta[], X[i, ]) + \n (1 - equals(treat[i], 1)) * inprod(gamma[], X[i, \n ]) + d[studyid[i], treat[i]]\n }\n sigma ~ dgamma(0.001, 0.001)\n for (j in 1:Nstudies) {\n d[j, 1] <- 0\n d[j, 2] ~ dnorm(delta[2], tau)\n }\n sd ~ dnorm(0, 1)\n T(0, )\n tau <- pow(sd, -2)\n delta[1] <- 0\n delta[2] ~ dnorm(0, 0.001)\n for (j in 1:Nstudies) {\n alpha[j] ~ dnorm(0, 0.001)\n }\n for (k in 1:Ncovariate) {\n beta[k] ~ dnorm(0, 0.001)\n }\n for (k in 1:Ncovariate) {\n gamma[k] ~ dnorm(0, 0.001)\n }\n}\n<environment: 0x56436527c9b0>\n\n\nWe can fit the treatment effect model as follows:\n\nsamples <- ipd.run(ipd, n.chains = 2, n.iter = 20,\n pars.save = c(\"alpha\", \"beta\", \"delta\", \"sd\", \"gamma\"))\ntrtbenefit <- round(treatment.effect(ipd, samples, newpatient = c(z1 = 1, z2 = 0.5)), 2)\n\nHere are the estimated model parameters:\n\nsummary(samples)\n\n\nIterations = 2001:2020\nThinning interval = 1 \nNumber of chains = 2 \nSample size per chain = 20 \n\n1. Empirical mean and standard deviation for each variable,\n plus standard error of the mean:\n\n Mean SD Naive SE Time-series SE\nalpha[1] 10.9296 0.06913 0.010931 0.024950\nalpha[2] 7.9285 0.04590 0.007258 0.007295\nalpha[3] 10.5125 0.06249 0.009881 0.007388\nalpha[4] 9.6159 0.04413 0.006978 0.006472\nalpha[5] 12.8345 0.06585 0.010411 0.018175\nalpha[6] 15.7558 0.04926 0.007789 0.007210\nbeta[1] 0.1921 0.02507 0.003964 0.006998\nbeta[2] 0.3448 0.02129 0.003366 0.005640\ndelta[1] 0.0000 0.00000 0.000000 0.000000\ndelta[2] -3.5614 0.60289 0.095325 0.107806\ngamma[1] -0.4836 0.02989 0.004726 0.006272\ngamma[2] 0.5403 0.03005 0.004752 0.007927\nsd 1.2461 0.36837 0.058245 0.113460\n\n2. Quantiles for each variable:\n\n 2.5% 25% 50% 75% 97.5%\nalpha[1] 10.7764 10.8894 10.9301 10.9753 11.0453\nalpha[2] 7.8530 7.8974 7.9325 7.9602 7.9947\nalpha[3] 10.4082 10.4600 10.5173 10.5500 10.6146\nalpha[4] 9.5493 9.5805 9.6209 9.6458 9.7043\nalpha[5] 12.7065 12.7934 12.8372 12.8793 12.9329\nalpha[6] 15.6663 15.7256 15.7538 15.7916 15.8359\nbeta[1] 0.1486 0.1745 0.1886 0.2062 0.2342\nbeta[2] 0.3003 0.3310 0.3504 0.3606 0.3795\ndelta[1] 0.0000 0.0000 0.0000 0.0000 0.0000\ndelta[2] -4.7407 -3.9333 -3.5857 -3.2504 -2.6095\ngamma[1] -0.5414 -0.5018 -0.4891 -0.4671 -0.4231\ngamma[2] 0.4875 0.5196 0.5334 0.5710 0.5902\nsd 0.7783 0.9904 1.1664 1.4194 2.1475\n\n\n\n\n9.1.1.3 Prection\nWe can now predict the individualized treatment effect for a new patient with covariate values z1 = 1 and z2 = 0.5.\n\nround(treatment.effect(ipd, samples, newpatient = c(z1 = 1, z2 = 0.5)), 2)\n\n0.025 0.5 0.975 \n-4.94 -3.76 -2.76 \n\n\nThis means that the predicted outcome for patient with covariate values z1 = 1 and z2 = 0.5 will differ by -3.76 units when receiving the active treatment (treat = 1) as compared to the control treatment (treat = 0).\nWe can also predict treatment benefit for all patients in the sample, and look at the distribution of predicted benefit.\n\nlibrary(dplyr)\nlibrary(ggplot2)\n\nds <- ds %>% mutate(benefit = NA,\n study = paste(\"Trial\", studyid)) \n\nfor (i in seq(nrow(ds))) {\n newpat <- as.matrix(ds[i, c(\"z1\", \"z2\")])\n ds$benefit[i] <- treatment.effect(ipd, samples, newpatient = newpat)[\"0.5\"]\n}\n\nsummbenefit <- ds %>% group_by(study) %>% \n summarize(mediabenefit = median(benefit), meanbenefit = mean(benefit))\n\nggplot(ds, aes(x = benefit)) + \n geom_histogram(aes(y = after_stat(density)), alpha = 0.3) + \n geom_density() +\n geom_vline(data = summbenefit, aes(xintercept = meanbenefit), \n linewidth = 0.5, lty = 2) + \n facet_wrap(~study) + \n ylab(\"Density\") +\n xlab(\"Predicted treatment benefit\") + theme_bw()\n\n\n\n\nFigure 9.1: Distribution of predicted treatment benefit in each trial. Dashed lines represent the trial mean.\n\n\n\n\n\n\n9.1.1.4 Penalization\nLet us repeat the analysis, but this time while penalizing the treatment-covariate coefficients using a Bayesian LASSO prior.\n\nipd <- with(ds, ipdma.model.onestage(y = y, study = studyid, \n treat = treat,\n X = cbind(z1, z2), \n response = \"normal\", \n shrinkage = \"laplace\"), \n type = \"random\")\n\nsamples <- ipd.run(ipd, n.chains = 2, n.iter = 20, \n pars.save = c(\"alpha\", \"beta\", \"delta\", \"sd\", \"gamma\"))\n\nCompiling model graph\n Resolving undeclared variables\n Allocating nodes\nGraph information:\n Observed stochastic nodes: 600\n Unobserved stochastic nodes: 20\n Total graph size: 6039\n\nInitializing model\n\nround(treatment.effect(ipd, samples, newpatient = c(1,0.5)), 2)\n\n0.025 0.5 0.975 \n-4.55 -3.86 -2.96 \n\n\n\n\n\n9.1.2 Example of a binary outcome\n\n9.1.2.1 Setup\nWe now present the case of a binary outcome. We first generate a dataset as before, using the bipd package.\n\nds2 <- generate_ipdma_example(type = \"binary\")\nhead(ds2)\n\n studyid treat w1 w2 y\n1 1 1 0.7784257 -1.5231409 0\n2 1 1 0.7991675 -0.6872109 0\n3 1 0 1.8351258 0.8772528 1\n4 1 0 2.0236660 0.4388474 1\n5 1 0 0.7231042 -1.9485631 1\n6 1 1 0.7420041 -0.7778685 0\n\n\nThe simulated dataset contains information on the following variables:\n\nthe trial indicator studyid\nthe treatment indicator treat, which takes the values 0 for control and 1 for active treatment\ntwo prognostic variables w1 and w2\nthe binary outcome y\n\n\n\n\n\n\n\nTable 9.2: The simulated dataset with a binary outcome\n\n\n\n\n\n\n\n\n\n0\n(N=313)\n1\n(N=287)\nOverall\n(N=600)\n\n\n\n\nw1\n\n\n\n\n\nMean (SD)\n0.0357 (0.976)\n0.00133 (1.03)\n0.0193 (1.00)\n\n\nMedian [Min, Max]\n0.0185 [-3.54, 2.66]\n-0.00433 [-2.75, 2.69]\n0.0174 [-3.54, 2.69]\n\n\nw2\n\n\n\n\n\nMean (SD)\n0.0488 (1.01)\n0.118 (0.996)\n0.0820 (1.00)\n\n\nMedian [Min, Max]\n0.0627 [-2.98, 2.86]\n0.0674 [-2.84, 2.63]\n0.0674 [-2.98, 2.86]\n\n\nstudyid\n\n\n\n\n\n1\n49 (15.7%)\n51 (17.8%)\n100 (16.7%)\n\n\n2\n56 (17.9%)\n44 (15.3%)\n100 (16.7%)\n\n\n3\n44 (14.1%)\n56 (19.5%)\n100 (16.7%)\n\n\n4\n58 (18.5%)\n42 (14.6%)\n100 (16.7%)\n\n\n5\n52 (16.6%)\n48 (16.7%)\n100 (16.7%)\n\n\n6\n54 (17.3%)\n46 (16.0%)\n100 (16.7%)\n\n\n\n\n\n\n\n\n\n\n9.1.2.2 Model fitting\nWe use a Bayesian random effects model with binomial likelihood. This is similar to the model 16.7 of the book, but with a Binomial likelihood, i.e. \n\\[\ny_{ij}\\sim \\text{Binomial}(\\pi_{ij}) \\\\\n\\] \\[\n\\text{logit}(\\pi_{ij})=a_j+\\delta_j t_{ij}+ \\sum_{l=1}^{L}\\beta_l x_{ij}+ \\sum_{l=1}^{L}\\gamma_l x_{ij} t_{ij}\n\\] The remaining of the model is as in the book. We can penalize the estimated parameters for effect modification (\\(\\gamma\\)’s), using a Bayesian LASSO. We can do this using again the bipd package:\n\nipd2 <- with(ds2, ipdma.model.onestage(y = y, study = studyid, treat = treat,\n X = cbind(w1, w2), \n response = \"binomial\", \n shrinkage = \"laplace\"), \n type = \"random\", hy.prior = list(\"dunif\", 0, 1))\n\nipd2$model.JAGS\n\nfunction () \n{\n for (i in 1:Np) {\n y[i] ~ dbern(p[i])\n logit(p[i]) <- alpha[studyid[i]] + inprod(beta[], X[i, \n ]) + (1 - equals(treat[i], 1)) * inprod(gamma[], \n X[i, ]) + d[studyid[i], treat[i]]\n }\n for (j in 1:Nstudies) {\n d[j, 1] <- 0\n d[j, 2] ~ dnorm(delta[2], tau)\n }\n sd ~ dnorm(0, 1)\n T(0, )\n tau <- pow(sd, -2)\n delta[1] <- 0\n delta[2] ~ dnorm(0, 0.001)\n for (j in 1:Nstudies) {\n alpha[j] ~ dnorm(0, 0.001)\n }\n for (k in 1:Ncovariate) {\n beta[k] ~ dnorm(0, 0.001)\n }\n tt <- lambda\n lambda <- pow(lambda.inv, -1)\n lambda.inv ~ dunif(0, 5)\n for (k in 1:Ncovariate) {\n gamma[k] ~ ddexp(0, tt)\n }\n}\n<environment: 0x564369123018>\n\n\n\nsamples <- ipd.run(ipd2, n.chains = 2, n.iter = 20, \n pars.save = c(\"alpha\", \"beta\", \"delta\", \"sd\", \"gamma\"))\nsummary(samples)\n\n\n\n\nIterations = 2001:2020\nThinning interval = 1 \nNumber of chains = 2 \nSample size per chain = 20 \n\n1. Empirical mean and standard deviation for each variable,\n plus standard error of the mean:\n\n Mean SD Naive SE Time-series SE\nalpha[1] -0.0777601 0.2900 0.04585 0.07594\nalpha[2] -0.6739023 0.2373 0.03752 0.06705\nalpha[3] -0.2894545 0.2814 0.04449 0.05766\nalpha[4] -0.4746006 0.2493 0.03942 0.04008\nalpha[5] -0.4667742 0.1822 0.02881 0.03594\nalpha[6] -0.7728001 0.2865 0.04530 0.11065\nbeta[1] 0.0347552 0.1330 0.02103 0.03572\nbeta[2] 0.1415347 0.1383 0.02186 0.06136\ndelta[1] 0.0000000 0.0000 0.00000 0.00000\ndelta[2] -0.2725732 0.2915 0.04609 0.04462\ngamma[1] 0.0004385 0.1812 0.02865 0.06067\ngamma[2] -0.1048801 0.1328 0.02100 0.03854\nsd 0.6497185 0.3004 0.04750 0.08741\n\n2. Quantiles for each variable:\n\n 2.5% 25% 50% 75% 97.5%\nalpha[1] -0.57064 -0.27353 -0.104969 0.09793 0.64420\nalpha[2] -1.17968 -0.79739 -0.661550 -0.56794 -0.09491\nalpha[3] -0.90944 -0.45251 -0.224282 -0.10073 0.06020\nalpha[4] -0.84260 -0.64436 -0.463653 -0.30079 0.04459\nalpha[5] -0.71445 -0.63584 -0.476179 -0.35776 -0.05332\nalpha[6] -1.18205 -1.01382 -0.796486 -0.50222 -0.32730\nbeta[1] -0.20537 -0.07229 0.066296 0.14593 0.22292\nbeta[2] -0.07544 0.04080 0.158226 0.24547 0.41404\ndelta[1] 0.00000 0.00000 0.000000 0.00000 0.00000\ndelta[2] -0.77549 -0.43008 -0.249511 -0.13809 0.22392\ngamma[1] -0.26699 -0.12484 -0.007093 0.10637 0.29197\ngamma[2] -0.38613 -0.15989 -0.098391 -0.01668 0.11530\nsd 0.33809 0.42371 0.540628 0.80383 1.40253\n\n\nThe predicted treatment benefit for a new patient with covariates w1 = 1.6 and w2 = 1.3 is given as:\n\nround(treatment.effect(ipd2, samples, newpatient = c(w1 = 1.6, w2 = 1.3)), 2)\n\n0.025 0.5 0.975 \n 0.28 0.65 1.36 \n\n\nIn other words, the aforementioned patient 0.65 (95% Credibility Interval: 0.28 to 1.36)" + "text": "9.1 Estimating heterogeneous treatment effects in pairwise meta-analysis\nWe hereby provide code for estimating patient-level treatment effects for the case when we have patient-level data from multiple randomized trials.\n\n9.1.1 Example of a continuous outcome\n\n9.1.1.1 Setup\nWe start by simulating an artificial dataset using the R package bipd:\n\nlibrary(bipd)\nds <- generate_ipdma_example(type = \"continuous\")\n\nLet us have a look at the dataset:\n\nhead(ds)\n\n studyid treat z1 z2 y\n1 1 1 -1.0979103 1.3313560 11\n2 1 1 -0.2680399 0.2622481 9\n3 1 1 -1.2474858 -0.2392603 9\n4 1 1 -0.4138311 -1.0706763 8\n5 1 1 0.1750534 -0.6511220 8\n6 1 0 -1.6278960 -1.9344096 10\n\n\nThe simulated dataset contains information on the following variables:\n\nthe trial indicator studyid\nthe treatment indicator treat, which takes the values 0 for control and 1 for active treatment\ntwo prognostic variables z1 and z2\nthe continuous outcome y\n\n\n\n\n\n\n\nTable 9.1: The simulated dataset with a continuous outcome\n\n\n\n\n\n\n\n\n\n0\n(N=276)\n1\n(N=324)\nOverall\n(N=600)\n\n\n\n\nz1\n\n\n\n\n\nMean (SD)\n-0.109 (1.04)\n0.00425 (1.07)\n-0.0477 (1.06)\n\n\nMedian [Min, Max]\n-0.0987 [-3.06, 2.68]\n-0.0699 [-3.67, 3.03]\n-0.0843 [-3.67, 3.03]\n\n\nz2\n\n\n\n\n\nMean (SD)\n-0.0325 (1.03)\n0.0330 (1.01)\n0.00287 (1.02)\n\n\nMedian [Min, Max]\n-0.0835 [-2.61, 2.79]\n0.0556 [-2.64, 2.38]\n-0.0172 [-2.64, 2.79]\n\n\nstudyid\n\n\n\n\n\n1\n37 (13.4%)\n63 (19.4%)\n100 (16.7%)\n\n\n2\n53 (19.2%)\n47 (14.5%)\n100 (16.7%)\n\n\n3\n48 (17.4%)\n52 (16.0%)\n100 (16.7%)\n\n\n4\n40 (14.5%)\n60 (18.5%)\n100 (16.7%)\n\n\n5\n56 (20.3%)\n44 (13.6%)\n100 (16.7%)\n\n\n6\n42 (15.2%)\n58 (17.9%)\n100 (16.7%)\n\n\n\n\n\n\n\n\n\n\n9.1.1.2 Model fitting\nWe synthesize the evidence using a Bayesian random effects meta-analysis model. The model is given in Equation 16.7 of the book. First we need set up the data and create the model:\n\nipd <- with(ds, ipdma.model.onestage(y = y, study = studyid, treat = treat,\n X = cbind(z1, z2), \n response = \"normal\", \n shrinkage = \"none\"), \n type = \"random\")\n\nThe JAGS model can be accessed as follows:\n\nipd$model.JAGS\n\nfunction () \n{\n for (i in 1:Np) {\n y[i] ~ dnorm(mu[i], sigma)\n mu[i] <- alpha[studyid[i]] + inprod(beta[], X[i, ]) + \n (1 - equals(treat[i], 1)) * inprod(gamma[], X[i, \n ]) + d[studyid[i], treat[i]]\n }\n sigma ~ dgamma(0.001, 0.001)\n for (j in 1:Nstudies) {\n d[j, 1] <- 0\n d[j, 2] ~ dnorm(delta[2], tau)\n }\n sd ~ dnorm(0, 1)\n T(0, )\n tau <- pow(sd, -2)\n delta[1] <- 0\n delta[2] ~ dnorm(0, 0.001)\n for (j in 1:Nstudies) {\n alpha[j] ~ dnorm(0, 0.001)\n }\n for (k in 1:Ncovariate) {\n beta[k] ~ dnorm(0, 0.001)\n }\n for (k in 1:Ncovariate) {\n gamma[k] ~ dnorm(0, 0.001)\n }\n}\n<environment: 0x561171711fc8>\n\n\nWe can fit the treatment effect model as follows:\n\nsamples <- ipd.run(ipd, n.chains = 2, n.iter = 20,\n pars.save = c(\"alpha\", \"beta\", \"delta\", \"sd\", \"gamma\"))\ntrtbenefit <- round(treatment.effect(ipd, samples, newpatient = c(z1 = 1, z2 = 0.5)), 2)\n\nHere are the estimated model parameters:\n\nsummary(samples)\n\n\nIterations = 2001:2020\nThinning interval = 1 \nNumber of chains = 2 \nSample size per chain = 20 \n\n1. Empirical mean and standard deviation for each variable,\n plus standard error of the mean:\n\n Mean SD Naive SE Time-series SE\nalpha[1] 10.9979 0.04926 0.007789 0.015173\nalpha[2] 8.0468 0.03843 0.006077 0.006603\nalpha[3] 10.4481 0.05038 0.007966 0.011157\nalpha[4] 9.6145 0.06076 0.009606 0.013120\nalpha[5] 12.8619 0.04131 0.006532 0.004880\nalpha[6] 15.7236 0.05121 0.008097 0.010879\nbeta[1] 0.2131 0.02283 0.003609 0.006235\nbeta[2] 0.2887 0.02339 0.003699 0.004204\ndelta[1] 0.0000 0.00000 0.000000 0.000000\ndelta[2] -2.4678 0.59641 0.094301 0.072792\ngamma[1] -0.5657 0.03223 0.005097 0.007189\ngamma[2] 0.5999 0.03324 0.005255 0.010773\nsd 1.4458 0.26155 0.041354 0.052604\n\n2. Quantiles for each variable:\n\n 2.5% 25% 50% 75% 97.5%\nalpha[1] 10.9039 10.961 11.0002 11.0358 11.0789\nalpha[2] 7.9836 8.023 8.0462 8.0725 8.1100\nalpha[3] 10.3476 10.421 10.4531 10.4826 10.5425\nalpha[4] 9.5035 9.564 9.6208 9.6634 9.7010\nalpha[5] 12.7946 12.836 12.8576 12.8878 12.9482\nalpha[6] 15.6457 15.680 15.7192 15.7633 15.8175\nbeta[1] 0.1657 0.199 0.2133 0.2346 0.2429\nbeta[2] 0.2503 0.276 0.2825 0.3040 0.3374\ndelta[1] 0.0000 0.000 0.0000 0.0000 0.0000\ndelta[2] -3.8358 -2.835 -2.4340 -2.0173 -1.5221\ngamma[1] -0.6230 -0.588 -0.5708 -0.5454 -0.5066\ngamma[2] 0.5379 0.579 0.5985 0.6225 0.6603\nsd 1.0047 1.272 1.4356 1.6393 1.9115\n\n\n\n\n9.1.1.3 Prection\nWe can now predict the individualized treatment effect for a new patient with covariate values z1 = 1 and z2 = 0.5.\n\nround(treatment.effect(ipd, samples, newpatient = c(z1 = 1, z2 = 0.5)), 2)\n\n0.025 0.5 0.975 \n-4.11 -2.72 -1.78 \n\n\nThis means that the predicted outcome for patient with covariate values z1 = 1 and z2 = 0.5 will differ by -2.72 units when receiving the active treatment (treat = 1) as compared to the control treatment (treat = 0).\nWe can also predict treatment benefit for all patients in the sample, and look at the distribution of predicted benefit.\n\nlibrary(dplyr)\nlibrary(ggplot2)\n\nds <- ds %>% mutate(benefit = NA,\n study = paste(\"Trial\", studyid)) \n\nfor (i in seq(nrow(ds))) {\n newpat <- as.matrix(ds[i, c(\"z1\", \"z2\")])\n ds$benefit[i] <- treatment.effect(ipd, samples, newpatient = newpat)[\"0.5\"]\n}\n\nsummbenefit <- ds %>% group_by(study) %>% \n summarize(mediabenefit = median(benefit), meanbenefit = mean(benefit))\n\nggplot(ds, aes(x = benefit)) + \n geom_histogram(aes(y = after_stat(density)), alpha = 0.3) + \n geom_density() +\n geom_vline(data = summbenefit, aes(xintercept = meanbenefit), \n linewidth = 0.5, lty = 2) + \n facet_wrap(~study) + \n ylab(\"Density\") +\n xlab(\"Predicted treatment benefit\") + theme_bw()\n\n\n\n\nFigure 9.1: Distribution of predicted treatment benefit in each trial. Dashed lines represent the trial mean.\n\n\n\n\n\n\n9.1.1.4 Penalization\nLet us repeat the analysis, but this time while penalizing the treatment-covariate coefficients using a Bayesian LASSO prior.\n\nipd <- with(ds, ipdma.model.onestage(y = y, study = studyid, \n treat = treat,\n X = cbind(z1, z2), \n response = \"normal\", \n shrinkage = \"laplace\"), \n type = \"random\")\n\nsamples <- ipd.run(ipd, n.chains = 2, n.iter = 20, \n pars.save = c(\"alpha\", \"beta\", \"delta\", \"sd\", \"gamma\"))\n\nCompiling model graph\n Resolving undeclared variables\n Allocating nodes\nGraph information:\n Observed stochastic nodes: 600\n Unobserved stochastic nodes: 20\n Total graph size: 6039\n\nInitializing model\n\nround(treatment.effect(ipd, samples, newpatient = c(1,0.5)), 2)\n\n0.025 0.5 0.975 \n-3.79 -2.62 -1.47 \n\n\n\n\n\n9.1.2 Example of a binary outcome\n\n9.1.2.1 Setup\nWe now present the case of a binary outcome. We first generate a dataset as before, using the bipd package.\n\nds2 <- generate_ipdma_example(type = \"binary\")\nhead(ds2)\n\n studyid treat w1 w2 y\n1 1 1 1.35999376 0.73143406 0\n2 1 1 1.12927801 0.62002345 1\n3 1 1 0.78404964 0.41148700 1\n4 1 0 -0.14616499 2.10316103 1\n5 1 1 0.03563058 -0.06812964 0\n6 1 1 -1.08032820 -0.98945872 0\n\n\nThe simulated dataset contains information on the following variables:\n\nthe trial indicator studyid\nthe treatment indicator treat, which takes the values 0 for control and 1 for active treatment\ntwo prognostic variables w1 and w2\nthe binary outcome y\n\n\n\n\n\n\n\nTable 9.2: The simulated dataset with a binary outcome\n\n\n\n\n\n\n\n\n\n0\n(N=281)\n1\n(N=319)\nOverall\n(N=600)\n\n\n\n\nw1\n\n\n\n\n\nMean (SD)\n-0.00668 (1.03)\n0.00771 (1.05)\n0.000970 (1.04)\n\n\nMedian [Min, Max]\n0.0652 [-3.05, 2.25]\n-0.00417 [-3.00, 3.11]\n0.0276 [-3.05, 3.11]\n\n\nw2\n\n\n\n\n\nMean (SD)\n-0.0583 (0.935)\n0.0366 (0.982)\n-0.00787 (0.960)\n\n\nMedian [Min, Max]\n-0.114 [-2.64, 2.62]\n0.0309 [-2.57, 3.17]\n-0.0265 [-2.64, 3.17]\n\n\nstudyid\n\n\n\n\n\n1\n41 (14.6%)\n59 (18.5%)\n100 (16.7%)\n\n\n2\n43 (15.3%)\n57 (17.9%)\n100 (16.7%)\n\n\n3\n44 (15.7%)\n56 (17.6%)\n100 (16.7%)\n\n\n4\n52 (18.5%)\n48 (15.0%)\n100 (16.7%)\n\n\n5\n52 (18.5%)\n48 (15.0%)\n100 (16.7%)\n\n\n6\n49 (17.4%)\n51 (16.0%)\n100 (16.7%)\n\n\n\n\n\n\n\n\n\n\n9.1.2.2 Model fitting\nWe use a Bayesian random effects model with binomial likelihood. This is similar to the model 16.7 of the book, but with a Binomial likelihood, i.e. \n\\[\ny_{ij}\\sim \\text{Binomial}(\\pi_{ij}) \\\\\n\\] \\[\n\\text{logit}(\\pi_{ij})=a_j+\\delta_j t_{ij}+ \\sum_{l=1}^{L}\\beta_l x_{ij}+ \\sum_{l=1}^{L}\\gamma_l x_{ij} t_{ij}\n\\] The remaining of the model is as in the book. We can penalize the estimated parameters for effect modification (\\(\\gamma\\)’s), using a Bayesian LASSO. We can do this using again the bipd package:\n\nipd2 <- with(ds2, ipdma.model.onestage(y = y, study = studyid, treat = treat,\n X = cbind(w1, w2), \n response = \"binomial\", \n shrinkage = \"laplace\"), \n type = \"random\", hy.prior = list(\"dunif\", 0, 1))\n\nipd2$model.JAGS\n\nfunction () \n{\n for (i in 1:Np) {\n y[i] ~ dbern(p[i])\n logit(p[i]) <- alpha[studyid[i]] + inprod(beta[], X[i, \n ]) + (1 - equals(treat[i], 1)) * inprod(gamma[], \n X[i, ]) + d[studyid[i], treat[i]]\n }\n for (j in 1:Nstudies) {\n d[j, 1] <- 0\n d[j, 2] ~ dnorm(delta[2], tau)\n }\n sd ~ dnorm(0, 1)\n T(0, )\n tau <- pow(sd, -2)\n delta[1] <- 0\n delta[2] ~ dnorm(0, 0.001)\n for (j in 1:Nstudies) {\n alpha[j] ~ dnorm(0, 0.001)\n }\n for (k in 1:Ncovariate) {\n beta[k] ~ dnorm(0, 0.001)\n }\n tt <- lambda\n lambda <- pow(lambda.inv, -1)\n lambda.inv ~ dunif(0, 5)\n for (k in 1:Ncovariate) {\n gamma[k] ~ ddexp(0, tt)\n }\n}\n<environment: 0x561175515cc0>\n\n\n\nsamples <- ipd.run(ipd2, n.chains = 2, n.iter = 20, \n pars.save = c(\"alpha\", \"beta\", \"delta\", \"sd\", \"gamma\"))\nsummary(samples)\n\n\n\n\nIterations = 2001:2020\nThinning interval = 1 \nNumber of chains = 2 \nSample size per chain = 20 \n\n1. Empirical mean and standard deviation for each variable,\n plus standard error of the mean:\n\n Mean SD Naive SE Time-series SE\nalpha[1] 0.45831 0.3301 0.05219 0.07915\nalpha[2] -0.62295 0.2393 0.03784 0.03752\nalpha[3] -0.87933 0.2575 0.04072 0.08038\nalpha[4] -0.60450 0.2284 0.03611 0.04114\nalpha[5] -0.76798 0.2352 0.03718 0.03346\nalpha[6] -0.93794 0.2698 0.04265 0.08550\nbeta[1] 0.09926 0.1272 0.02011 0.04027\nbeta[2] -0.12892 0.1238 0.01958 0.02188\ndelta[1] 0.00000 0.0000 0.00000 0.00000\ndelta[2] -0.08678 0.5531 0.08745 0.08816\ngamma[1] -0.21134 0.1505 0.02380 0.03024\ngamma[2] 0.42391 0.1475 0.02332 0.02059\nsd 1.09296 0.3420 0.05407 0.05822\n\n2. Quantiles for each variable:\n\n 2.5% 25% 50% 75% 97.5%\nalpha[1] -0.1440 0.188747 0.53962 0.73109 0.92760\nalpha[2] -1.0709 -0.818813 -0.64110 -0.46286 -0.17836\nalpha[3] -1.3032 -1.089755 -0.87444 -0.70553 -0.38455\nalpha[4] -1.1100 -0.733088 -0.61047 -0.41997 -0.29323\nalpha[5] -1.2273 -0.909380 -0.77217 -0.59668 -0.41225\nalpha[6] -1.4128 -1.155018 -0.91217 -0.78489 -0.50260\nbeta[1] -0.1295 0.008414 0.09778 0.19075 0.33197\nbeta[2] -0.2931 -0.241737 -0.13348 -0.05350 0.07247\ndelta[1] 0.0000 0.000000 0.00000 0.00000 0.00000\ndelta[2] -1.2790 -0.352368 -0.04383 0.17977 0.94974\ngamma[1] -0.4221 -0.336772 -0.18240 -0.09536 0.02975\ngamma[2] 0.2020 0.331719 0.40058 0.52150 0.66638\nsd 0.5504 0.849041 1.06372 1.32746 1.70934\n\n\nThe predicted treatment benefit for a new patient with covariates w1 = 1.6 and w2 = 1.3 is given as:\n\nround(treatment.effect(ipd2, samples, newpatient = c(w1 = 1.6, w2 = 1.3)), 2)\n\n0.025 0.5 0.975 \n 0.56 1.19 3.91 \n\n\nIn other words, the aforementioned patient 1.19 (95% Credibility Interval: 0.56 to 3.91)" }, { "objectID": "chapter_16.html#estimating-heterogeous-treatment-effects-in-network-meta-analysis", "href": "chapter_16.html#estimating-heterogeous-treatment-effects-in-network-meta-analysis", "title": "9  Prediction of individual treatment effect using data from multiple studies", "section": "9.2 Estimating heterogeous treatment effects in network meta-analysis", - "text": "9.2 Estimating heterogeous treatment effects in network meta-analysis\n\n9.2.1 Example of a continuous outcome\n\n9.2.1.1 Setup\nWe use again the bipd package to simulate a dataset:\n\nds3 <- generate_ipdnma_example(type = \"continuous\")\nhead(ds3)\n\n studyid treat z1 z2 y\n1 1 1 -0.66008417 1.9658506 11\n2 1 2 0.72678195 -1.4045085 6\n3 1 1 -0.61407931 -3.4432115 10\n4 1 1 1.32732405 -0.0516703 11\n5 1 2 -1.75412839 1.5136265 11\n6 1 2 0.02939798 1.1166710 9\n\n\nLet us look into the data a bit in more detail:\n\n\n\n\n\n\nTable 9.3: The simulated dataset with a continuous outcome\n\n\n\n\n\n\n\n\n\n\n1\n(N=327)\n2\n(N=343)\n3\n(N=330)\nOverall\n(N=1000)\n\n\n\n\nz1\n\n\n\n\n\n\nMean (SD)\n0.0415 (1.03)\n-0.0323 (0.983)\n0.0513 (1.00)\n0.0194 (1.00)\n\n\nMedian [Min, Max]\n0.0928 [-2.76, 3.26]\n0.0363 [-3.03, 2.66]\n0.0130 [-2.78, 3.33]\n0.0458 [-3.03, 3.33]\n\n\nz2\n\n\n\n\n\n\nMean (SD)\n0.0170 (0.984)\n-0.0608 (0.974)\n-0.0176 (1.02)\n-0.0211 (0.993)\n\n\nMedian [Min, Max]\n-0.0393 [-3.44, 2.77]\n-0.113 [-2.32, 2.74]\n-0.0405 [-3.12, 3.36]\n-0.0480 [-3.44, 3.36]\n\n\nstudyid\n\n\n\n\n\n\n1\n51 (15.6%)\n49 (14.3%)\n0 (0%)\n100 (10.0%)\n\n\n2\n45 (13.8%)\n55 (16.0%)\n0 (0%)\n100 (10.0%)\n\n\n3\n43 (13.1%)\n57 (16.6%)\n0 (0%)\n100 (10.0%)\n\n\n4\n45 (13.8%)\n0 (0%)\n55 (16.7%)\n100 (10.0%)\n\n\n5\n51 (15.6%)\n0 (0%)\n49 (14.8%)\n100 (10.0%)\n\n\n6\n0 (0%)\n47 (13.7%)\n53 (16.1%)\n100 (10.0%)\n\n\n7\n0 (0%)\n46 (13.4%)\n54 (16.4%)\n100 (10.0%)\n\n\n8\n31 (9.5%)\n31 (9.0%)\n38 (11.5%)\n100 (10.0%)\n\n\n9\n31 (9.5%)\n24 (7.0%)\n45 (13.6%)\n100 (10.0%)\n\n\n10\n30 (9.2%)\n34 (9.9%)\n36 (10.9%)\n100 (10.0%)\n\n\n\n\n\n\n\n\n\n\n9.2.1.2 Model fitting\nWe will use the model shown in Equation 16.8 in the book. In addition, we will use Bayesian LASSO to penalize the treatment-covariate interactions.\n\nipd3 <- with(ds3, ipdnma.model.onestage(y = y, study = studyid, treat = treat, \n X = cbind(z1, z2), \n response = \"normal\", \n shrinkage = \"laplace\", \n type = \"random\"))\nipd3$model.JAGS\n\nfunction () \n{\n for (i in 1:Np) {\n y[i] ~ dnorm(mu[i], sigma)\n mu[i] <- alpha[studyid[i]] + inprod(beta[], X[i, ]) + \n inprod(gamma[treat[i], ], X[i, ]) + d[studyid[i], \n treatment.arm[i]]\n }\n sigma ~ dgamma(0.001, 0.001)\n for (i in 1:Nstudies) {\n w[i, 1] <- 0\n d[i, 1] <- 0\n for (k in 2:na[i]) {\n d[i, k] ~ dnorm(mdelta[i, k], taudelta[i, k])\n mdelta[i, k] <- delta[t[i, k]] - delta[t[i, 1]] + \n sw[i, k]\n taudelta[i, k] <- tau * 2 * (k - 1)/k\n w[i, k] <- d[i, k] - delta[t[i, k]] + delta[t[i, \n 1]]\n sw[i, k] <- sum(w[i, 1:(k - 1)])/(k - 1)\n }\n }\n sd ~ dnorm(0, 1)\n T(0, )\n tau <- pow(sd, -2)\n delta[1] <- 0\n for (k in 2:Ntreat) {\n delta[k] ~ dnorm(0, 0.001)\n }\n for (j in 1:Nstudies) {\n alpha[j] ~ dnorm(0, 0.001)\n }\n for (k in 1:Ncovariate) {\n beta[k] ~ dnorm(0, 0.001)\n }\n lambda[1] <- 0\n lambda.inv[1] <- 0\n for (m in 2:Ntreat) {\n tt[m] <- lambda[m] * sigma\n lambda[m] <- pow(lambda.inv[m], -1)\n lambda.inv[m] ~ dunif(0, 5)\n }\n for (k in 1:Ncovariate) {\n gamma[1, k] <- 0\n for (m in 2:Ntreat) {\n gamma[m, k] ~ ddexp(0, tt[m])\n }\n }\n}\n<environment: 0x564369413e38>\n\nsamples <- ipd.run(ipd3, n.chains = 2, n.iter = 20, \n pars.save = c(\"alpha\", \"beta\", \"delta\", \"sd\", \"gamma\"))\n\nCompiling model graph\n Resolving undeclared variables\n Allocating nodes\nGraph information:\n Observed stochastic nodes: 1000\n Unobserved stochastic nodes: 35\n Total graph size: 10141\n\nInitializing model\n\nsummary(samples)\n\n\nIterations = 2001:2020\nThinning interval = 1 \nNumber of chains = 2 \nSample size per chain = 20 \n\n1. Empirical mean and standard deviation for each variable,\n plus standard error of the mean:\n\n Mean SD Naive SE Time-series SE\nalpha[1] 10.9677 0.05362 0.008477 0.012633\nalpha[2] 7.9965 0.04237 0.006700 0.006598\nalpha[3] 10.5814 0.04407 0.006969 0.009689\nalpha[4] 9.6109 0.04258 0.006732 0.009433\nalpha[5] 12.8797 0.06277 0.009925 0.017919\nalpha[6] 13.0960 0.05173 0.008179 0.012106\nalpha[7] 7.4242 0.04106 0.006492 0.006866\nalpha[8] 11.1889 0.04789 0.007572 0.012093\nalpha[9] 10.1681 0.05110 0.008080 0.011901\nalpha[10] 9.2562 0.05067 0.008011 0.007960\nbeta[1] 0.1987 0.01264 0.001999 0.002899\nbeta[2] 0.3108 0.02337 0.003695 0.009724\ndelta[1] 0.0000 0.00000 0.000000 0.000000\ndelta[2] -2.9560 0.05677 0.008977 0.012215\ndelta[3] -1.1215 0.05748 0.009088 0.012277\ngamma[1,1] 0.0000 0.00000 0.000000 0.000000\ngamma[2,1] -0.5851 0.02171 0.003432 0.004402\ngamma[3,1] -0.2693 0.01665 0.002633 0.003055\ngamma[1,2] 0.0000 0.00000 0.000000 0.000000\ngamma[2,2] 0.5731 0.03052 0.004826 0.011556\ngamma[3,2] 0.4100 0.03128 0.004946 0.009657\nsd 0.1165 0.04584 0.007248 0.014289\n\n2. Quantiles for each variable:\n\n 2.5% 25% 50% 75% 97.5%\nalpha[1] 10.8713 10.93528 10.9770 10.9957 11.0564\nalpha[2] 7.8914 7.98224 7.9952 8.0194 8.0640\nalpha[3] 10.4897 10.55539 10.5789 10.6047 10.6674\nalpha[4] 9.5556 9.57870 9.6041 9.6420 9.6946\nalpha[5] 12.7620 12.84730 12.8659 12.9303 13.0014\nalpha[6] 13.0186 13.05556 13.0884 13.1373 13.1875\nalpha[7] 7.3506 7.38837 7.4354 7.4488 7.4889\nalpha[8] 11.0971 11.15935 11.1877 11.2169 11.2628\nalpha[9] 10.0780 10.13356 10.1745 10.2050 10.2600\nalpha[10] 9.1503 9.22480 9.2645 9.2842 9.3348\nbeta[1] 0.1757 0.18981 0.1971 0.2077 0.2191\nbeta[2] 0.2777 0.28754 0.3087 0.3246 0.3552\ndelta[1] 0.0000 0.00000 0.0000 0.0000 0.0000\ndelta[2] -3.0496 -3.00345 -2.9629 -2.9149 -2.8592\ndelta[3] -1.1981 -1.15550 -1.1289 -1.0864 -1.0305\ngamma[1,1] 0.0000 0.00000 0.0000 0.0000 0.0000\ngamma[2,1] -0.6166 -0.60441 -0.5832 -0.5723 -0.5511\ngamma[3,1] -0.2977 -0.28106 -0.2688 -0.2562 -0.2478\ngamma[1,2] 0.0000 0.00000 0.0000 0.0000 0.0000\ngamma[2,2] 0.5275 0.54940 0.5698 0.6014 0.6188\ngamma[3,2] 0.3643 0.37990 0.4102 0.4374 0.4599\nsd 0.0596 0.08422 0.1028 0.1245 0.2309\n\n\nAs before, we can use the treatment.effect() function of bipd to estimate relative effects for new patients.\n\ntreatment.effect(ipd3, samples, newpatient= c(1,2))\n\n$`treatment 2`\n 0.025 0.5 0.975 \n-2.469337 -2.366859 -2.226574 \n\n$`treatment 3`\n 0.025 0.5 0.975 \n-0.6540734 -0.5590274 -0.3852781 \n\n\nThis gives us the relative effects for all treatments versus the reference. To obtain relative effects between active treatments we need some more coding:\n\nsamples.all=data.frame(rbind(samples[[1]], samples[[2]]))\nnewpatient= c(1,2)\nnewpatient <- (newpatient - ipd3$scale_mean)/ipd3$scale_sd\n\nmedian(\n samples.all$delta.2.+samples.all$gamma.2.1.*\n newpatient[1]+samples.all$gamma.2.2.*newpatient[2]\n-\n (samples.all$delta.3.+samples.all$gamma.3.1.*newpatient[1]+\n samples.all$gamma.3.2.*newpatient[2])\n)\n\n[1] -1.812932\n\nquantile(samples.all$delta.2.+samples.all$gamma.2.1.*\n newpatient[1]+samples.all$gamma.2.2.*newpatient[2]\n -(samples.all$delta.3.+samples.all$gamma.3.1.*newpatient[1]+\n samples.all$gamma.3.2.*newpatient[2])\n , probs = 0.025)\n\n 2.5% \n-1.978609 \n\nquantile(samples.all$delta.2.+samples.all$gamma.2.1.*\n newpatient[1]+samples.all$gamma.2.2.*newpatient[2]\n -(samples.all$delta.3.+samples.all$gamma.3.1.*newpatient[1]+\n samples.all$gamma.3.2.*newpatient[2])\n , probs = 0.975)\n\n 97.5% \n-1.643765 \n\n\n\n\n\n9.2.2 Modeling patient-level relative effects using randomized and observational evidence for a network of treatments\nWe will now follow Chapter 16.3.5 from the book. In this analysis we will not use penalization, and we will assume fixed effects. For an example with penalization and random effects, see part 2 of this vignettte.\n\n9.2.2.1 Setup\nWe generate a very simple dataset of three studies comparing three treatments. We will assume 2 RCTs and 1 non-randomized trial:\n\nds4 <- generate_ipdnma_example(type = \"continuous\")\nds4 <- ds4 %>% filter(studyid %in% c(1,4,10)) %>%\n mutate(studyid = factor(studyid) %>%\n recode_factor(\n \"1\" = \"1\",\n \"4\" = \"2\",\n \"10\" = \"3\"),\n design = ifelse(studyid == \"3\", \"nrs\", \"rct\"))\n\nThe sample size is as follows:\n\n\n \n s1 s2 s3\n treat A: 49 55 33\n treat B: 51 0 29\n treat C: 0 45 38\n\n\n\n\n9.2.2.2 Model fitting\nWe will use the design-adjusted model, equation 16.9 in the book. We will fit a two-stage fixed effects meta-analysis and we will use a variance inflation factor. The code below is used to specify the analysis of each individual study. Briefly, in each study we adjust the treatment effect for the prognostic factors z1 and z2, as well as their interaction with treat.\n\nlibrary(rjags)\n\nLoading required package: coda\n\n\nLinked to JAGS 4.3.0\n\n\nLoaded modules: basemod,bugs\n\nfirst.stage <- \"\nmodel{\n\nfor (i in 1:N){\n y[i] ~ dnorm(mu[i], tau) \n mu[i] <- a + inprod(b[], X[i,]) + inprod(c[,treat[i]], X[i,]) + d[treat[i]] \n}\nsigma ~ dunif(0, 5)\ntau <- pow(sigma, -2)\n\na ~ dnorm(0, 0.001)\n\nfor(k in 1:Ncovariate){\n b[k] ~ dnorm(0,0.001)\n}\n\nfor(k in 1:Ncovariate){\n c[k,1] <- 0\n}\n\ntauGamma <- pow(sdGamma,-1)\nsdGamma ~ dunif(0, 5)\n\nfor(k in 1:Ncovariate){\n for(t in 2:Ntreat){\n c[k,t] ~ ddexp(0, tauGamma)\n }\n}\n\nd[1] <- 0\nfor(t in 2:Ntreat){\n d[t] ~ dnorm(0, 0.001)\n}\n}\"\n\nSubsequently, we estimate the relative treatment effects in the first (randomized) study comparing treatments A and B:\n\nmodel1.spec <- textConnection(first.stage) \ndata1 <- with(ds4 %>% filter(studyid == 1), \n list(y = y,\n N = length(y), \n X = cbind(z1,z2), \n treat = treat,\n Ncovariate = 2, \n Ntreat = 2))\njags.m <- jags.model(model1.spec, data = data1, n.chains = 2, n.adapt = 500,\n quiet = TRUE)\nparams <- c(\"d\", \"c\") \nsamps4.1 <- coda.samples(jags.m, params, n.iter = 50)\nsamps.all.s1 <- data.frame(as.matrix(samps4.1))\n\nsamps.all.s1 <- samps.all.s1[, c(\"c.1.2.\", \"c.2.2.\", \"d.2.\")]\ndelta.1 <- colMeans(samps.all.s1)\ncov.1 <- var(samps.all.s1)\n\nWe repeat the analysis for the second (randomized) study comparing treatments A and C:\n\nmodel1.spec <- textConnection(first.stage) \ndata2 <- with(ds4 %>% filter(studyid == 2), \n list(y = y,\n N = length(y), \n X = cbind(z1,z2), \n treat = ifelse(treat == 3, 2, treat),\n Ncovariate = 2, \n Ntreat = 2))\njags.m <- jags.model(model1.spec, data = data2, n.chains = 2, n.adapt = 100,\n quiet = TRUE)\nparams <- c(\"d\", \"c\") \nsamps4.2 <- coda.samples(jags.m, params, n.iter = 50)\nsamps.all.s2 <- data.frame(as.matrix(samps4.2))\nsamps.all.s2 <- samps.all.s2[, c(\"c.1.2.\", \"c.2.2.\", \"d.2.\")]\ndelta.2 <- colMeans(samps.all.s2)\ncov.2 <- var(samps.all.s2)\n\nFinally, we analyze the third (non-randomized) study comparing treatments A, B, and C:\n\nmodel1.spec <- textConnection(first.stage) \ndata3 <- with(ds4 %>% filter(studyid == 3), \n list(y = y,\n N = length(y), \n X = cbind(z1,z2), \n treat = treat,\n Ncovariate = 2, \n Ntreat = 3))\njags.m <- jags.model(model1.spec, data = data3, n.chains = 2, n.adapt = 100,\n quiet = TRUE)\nparams <- c(\"d\", \"c\") \nsamps4.3 <- coda.samples(jags.m, params, n.iter = 50)\nsamps.all.s3 <- data.frame(as.matrix(samps4.3))\n\nsamps.all.s3 <- samps.all.s3[, c(\"c.1.2.\", \"c.2.2.\", \"d.2.\", \"c.1.3.\", \n \"c.2.3.\", \"d.3.\")]\ndelta.3 <- colMeans(samps.all.s3)\ncov.3 <- var(samps.all.s3)\n\nThe corresponding treatment effect estimates are depicted below:\n\n\n\n\nTable 9.4: Treatment effect estimates.\n\n\nstudy\nB versus A\nC versus A\n\n\n\n\nstudy 1\n-2.925 (SE = 0.053 )\n\n\n\nstudy 2\n\n-1.118 (SE = 0.060 )\n\n\nstudy 3\n-2.966 (SE = 0.059 )\n-1.033 (SE = 0.054 )\n\n\n\n\n\n\n\n\nWe can now fit the second stage of the network meta-analysis. The corresponding JAGS model is specified below:\n\nsecond.stage <-\n\"model{\n \n #likelihood\n y1 ~ dmnorm(Mu1, Omega1)\n y2 ~ dmnorm(Mu2, Omega2)\n y3 ~ dmnorm(Mu3, Omega3*W)\n\n \n Omega1 <- inverse(cov.1)\n Omega2 <- inverse(cov.2)\n Omega3 <- inverse(cov.3)\n\n Mu1 <- c(gamma[,1], delta[2])\n Mu2 <- c(gamma[,2], delta[3]) \n Mu3 <- c(gamma[,1], delta[2],gamma[,2], delta[3])\n \n #parameters\n for(i in 1:2){\n gamma[i,1] ~ dnorm(0, 0.001)\n gamma[i,2] ~ dnorm(0, 0.001)\n }\n \n delta[1] <- 0\n delta[2] ~ dnorm(0, 0.001)\n delta[3] ~ dnorm(0, 0.001)\n \n}\n\"\n\nWe can fit as follows:\n\nmodel1.spec <- textConnection(second.stage) \ndata3 <- list(y1 = delta.1, y2 = delta.2, y3 = delta.3, \n cov.1 = cov.1, cov.2 = cov.2, cov.3 = cov.3, W = 0.5)\n\njags.m <- jags.model(model1.spec, data = data3, n.chains = 2, n.adapt = 50,\n quiet = TRUE)\nparams <- c(\"delta\", \"gamma\") \nsamps4.3 <- coda.samples(jags.m, params, n.iter = 50)\n\n\nsummary(samps4.3)\n\n\nIterations = 1:50\nThinning interval = 1 \nNumber of chains = 2 \nSample size per chain = 50 \n\n1. Empirical mean and standard deviation for each variable,\n plus standard error of the mean:\n\n Mean SD Naive SE Time-series SE\ndelta[1] 0.0000 0.00000 0.000000 0.000000\ndelta[2] -2.9350 0.06288 0.006288 0.006319\ndelta[3] -1.1050 0.04409 0.004409 0.004059\ngamma[1,1] -0.8160 0.04711 0.004711 0.004727\ngamma[2,1] 0.8857 0.10500 0.010500 0.010550\ngamma[1,2] -0.4524 0.05131 0.005131 0.005144\ngamma[2,2] 0.3154 0.05123 0.005123 0.005085\n\n2. Quantiles for each variable:\n\n 2.5% 25% 50% 75% 97.5%\ndelta[1] 0.0000 0.0000 0.0000 0.0000 0.0000\ndelta[2] -3.0155 -2.9691 -2.9371 -2.9134 -2.8454\ndelta[3] -1.2058 -1.1311 -1.0996 -1.0732 -1.0298\ngamma[1,1] -0.9083 -0.8393 -0.8133 -0.7887 -0.7247\ngamma[2,1] 0.8242 0.8727 0.8931 0.9269 0.9740\ngamma[1,2] -0.5746 -0.4779 -0.4419 -0.4224 -0.3735\ngamma[2,2] 0.2235 0.2758 0.3189 0.3489 0.4153\n\n# calculate treatment effects\nsamples.all = data.frame(rbind(samps4.3[[1]], samps4.3[[2]]))\nnewpatient = c(1,2)\n\nmedian(\n samples.all$delta.2. + samples.all$gamma.1.1.*newpatient[1] +\n samples.all$gamma.2.1.*newpatient[2]\n)\n\n[1] -1.968329\n\nquantile(samples.all$delta.2.+samples.all$gamma.1.1.*newpatient[1]+\n samples.all$gamma.2.1.*newpatient[2]\n , probs = 0.025)\n\n 2.5% \n-2.150516 \n\nquantile(samples.all$delta.2.+samples.all$gamma.1.1.*newpatient[1]+\n samples.all$gamma.2.1.*newpatient[2]\n , probs = 0.975)\n\n 97.5% \n-1.722643" + "text": "9.2 Estimating heterogeous treatment effects in network meta-analysis\n\n9.2.1 Example of a continuous outcome\n\n9.2.1.1 Setup\nWe use again the bipd package to simulate a dataset:\n\nds3 <- generate_ipdnma_example(type = \"continuous\")\nhead(ds3)\n\n studyid treat z1 z2 y\n1 1 1 0.2161967 1.76099639 11\n2 1 2 -0.5632438 -0.82201077 8\n3 1 2 0.6338783 1.01859585 9\n4 1 2 2.0654132 -0.46867968 6\n5 1 1 -2.0795661 -2.22359814 10\n6 1 2 -1.0992477 0.03972141 9\n\n\nLet us look into the data a bit in more detail:\n\n\n\n\n\n\nTable 9.3: The simulated dataset with a continuous outcome\n\n\n\n\n\n\n\n\n\n\n1\n(N=357)\n2\n(N=360)\n3\n(N=283)\nOverall\n(N=1000)\n\n\n\n\nz1\n\n\n\n\n\n\nMean (SD)\n-0.0313 (1.00)\n0.0765 (1.01)\n-0.0306 (1.03)\n0.00773 (1.01)\n\n\nMedian [Min, Max]\n-0.0411 [-3.13, 3.40]\n0.0951 [-3.11, 2.63]\n-0.0654 [-2.86, 2.42]\n0.00213 [-3.13, 3.40]\n\n\nz2\n\n\n\n\n\n\nMean (SD)\n-0.0980 (1.04)\n0.0522 (0.923)\n0.000392 (1.01)\n-0.0161 (0.993)\n\n\nMedian [Min, Max]\n-0.124 [-2.85, 3.38]\n0.0144 [-2.24, 3.06]\n0.0401 [-3.09, 2.56]\n-0.0155 [-3.09, 3.38]\n\n\nstudyid\n\n\n\n\n\n\n1\n48 (13.4%)\n52 (14.4%)\n0 (0%)\n100 (10.0%)\n\n\n2\n45 (12.6%)\n55 (15.3%)\n0 (0%)\n100 (10.0%)\n\n\n3\n49 (13.7%)\n51 (14.2%)\n0 (0%)\n100 (10.0%)\n\n\n4\n54 (15.1%)\n0 (0%)\n46 (16.3%)\n100 (10.0%)\n\n\n5\n60 (16.8%)\n0 (0%)\n40 (14.1%)\n100 (10.0%)\n\n\n6\n0 (0%)\n49 (13.6%)\n51 (18.0%)\n100 (10.0%)\n\n\n7\n0 (0%)\n44 (12.2%)\n56 (19.8%)\n100 (10.0%)\n\n\n8\n29 (8.1%)\n39 (10.8%)\n32 (11.3%)\n100 (10.0%)\n\n\n9\n34 (9.5%)\n34 (9.4%)\n32 (11.3%)\n100 (10.0%)\n\n\n10\n38 (10.6%)\n36 (10.0%)\n26 (9.2%)\n100 (10.0%)\n\n\n\n\n\n\n\n\n\n\n9.2.1.2 Model fitting\nWe will use the model shown in Equation 16.8 in the book. In addition, we will use Bayesian LASSO to penalize the treatment-covariate interactions.\n\nipd3 <- with(ds3, ipdnma.model.onestage(y = y, study = studyid, treat = treat, \n X = cbind(z1, z2), \n response = \"normal\", \n shrinkage = \"laplace\", \n type = \"random\"))\nipd3$model.JAGS\n\nfunction () \n{\n for (i in 1:Np) {\n y[i] ~ dnorm(mu[i], sigma)\n mu[i] <- alpha[studyid[i]] + inprod(beta[], X[i, ]) + \n inprod(gamma[treat[i], ], X[i, ]) + d[studyid[i], \n treatment.arm[i]]\n }\n sigma ~ dgamma(0.001, 0.001)\n for (i in 1:Nstudies) {\n w[i, 1] <- 0\n d[i, 1] <- 0\n for (k in 2:na[i]) {\n d[i, k] ~ dnorm(mdelta[i, k], taudelta[i, k])\n mdelta[i, k] <- delta[t[i, k]] - delta[t[i, 1]] + \n sw[i, k]\n taudelta[i, k] <- tau * 2 * (k - 1)/k\n w[i, k] <- d[i, k] - delta[t[i, k]] + delta[t[i, \n 1]]\n sw[i, k] <- sum(w[i, 1:(k - 1)])/(k - 1)\n }\n }\n sd ~ dnorm(0, 1)\n T(0, )\n tau <- pow(sd, -2)\n delta[1] <- 0\n for (k in 2:Ntreat) {\n delta[k] ~ dnorm(0, 0.001)\n }\n for (j in 1:Nstudies) {\n alpha[j] ~ dnorm(0, 0.001)\n }\n for (k in 1:Ncovariate) {\n beta[k] ~ dnorm(0, 0.001)\n }\n lambda[1] <- 0\n lambda.inv[1] <- 0\n for (m in 2:Ntreat) {\n tt[m] <- lambda[m] * sigma\n lambda[m] <- pow(lambda.inv[m], -1)\n lambda.inv[m] ~ dunif(0, 5)\n }\n for (k in 1:Ncovariate) {\n gamma[1, k] <- 0\n for (m in 2:Ntreat) {\n gamma[m, k] ~ ddexp(0, tt[m])\n }\n }\n}\n<environment: 0x5611757e7780>\n\nsamples <- ipd.run(ipd3, n.chains = 2, n.iter = 20, \n pars.save = c(\"alpha\", \"beta\", \"delta\", \"sd\", \"gamma\"))\n\nCompiling model graph\n Resolving undeclared variables\n Allocating nodes\nGraph information:\n Observed stochastic nodes: 1000\n Unobserved stochastic nodes: 35\n Total graph size: 10141\n\nInitializing model\n\nsummary(samples)\n\n\nIterations = 2001:2020\nThinning interval = 1 \nNumber of chains = 2 \nSample size per chain = 20 \n\n1. Empirical mean and standard deviation for each variable,\n plus standard error of the mean:\n\n Mean SD Naive SE Time-series SE\nalpha[1] 11.0054 0.04657 0.007363 0.012764\nalpha[2] 8.0765 0.03547 0.005608 0.005559\nalpha[3] 10.5203 0.03557 0.005624 0.006145\nalpha[4] 9.5929 0.05702 0.009016 0.006777\nalpha[5] 12.8219 0.04349 0.006877 0.009105\nalpha[6] 13.1271 0.04599 0.007272 0.012103\nalpha[7] 7.3314 0.04014 0.006347 0.005912\nalpha[8] 11.1654 0.06891 0.010895 0.015310\nalpha[9] 10.1536 0.05152 0.008146 0.011122\nalpha[10] 9.2352 0.03315 0.005242 0.004732\nbeta[1] 0.2107 0.02439 0.003857 0.009089\nbeta[2] 0.3100 0.01551 0.002452 0.004458\ndelta[1] 0.0000 0.00000 0.000000 0.000000\ndelta[2] -3.0186 0.04908 0.007760 0.007798\ndelta[3] -1.1271 0.06164 0.009745 0.009625\ngamma[1,1] 0.0000 0.00000 0.000000 0.000000\ngamma[2,1] -0.6337 0.03889 0.006149 0.015685\ngamma[3,1] -0.3310 0.02730 0.004316 0.010507\ngamma[1,2] 0.0000 0.00000 0.000000 0.000000\ngamma[2,2] 0.5642 0.02534 0.004007 0.004891\ngamma[3,2] 0.3652 0.02139 0.003382 0.005746\nsd 0.1302 0.02514 0.003975 0.003567\n\n2. Quantiles for each variable:\n\n 2.5% 25% 50% 75% 97.5%\nalpha[1] 10.91963 10.9755 11.0018 11.0236 11.0965\nalpha[2] 8.01898 8.0560 8.0740 8.1030 8.1455\nalpha[3] 10.46305 10.4986 10.5161 10.5431 10.6024\nalpha[4] 9.45244 9.5602 9.5981 9.6326 9.6729\nalpha[5] 12.74635 12.7986 12.8239 12.8428 12.9038\nalpha[6] 13.04801 13.0916 13.1289 13.1556 13.2330\nalpha[7] 7.27966 7.2990 7.3230 7.3554 7.4213\nalpha[8] 11.06441 11.1190 11.1580 11.2117 11.2897\nalpha[9] 10.07002 10.1133 10.1553 10.1841 10.2688\nalpha[10] 9.18155 9.2155 9.2288 9.2508 9.3211\nbeta[1] 0.16436 0.1961 0.2096 0.2251 0.2565\nbeta[2] 0.28336 0.3011 0.3137 0.3207 0.3371\ndelta[1] 0.00000 0.0000 0.0000 0.0000 0.0000\ndelta[2] -3.10971 -3.0519 -3.0081 -2.9840 -2.9517\ndelta[3] -1.23184 -1.1583 -1.1172 -1.0915 -1.0214\ngamma[1,1] 0.00000 0.0000 0.0000 0.0000 0.0000\ngamma[2,1] -0.72128 -0.6462 -0.6357 -0.6134 -0.5690\ngamma[3,1] -0.37711 -0.3525 -0.3296 -0.3126 -0.2901\ngamma[1,2] 0.00000 0.0000 0.0000 0.0000 0.0000\ngamma[2,2] 0.51798 0.5498 0.5637 0.5833 0.6102\ngamma[3,2] 0.32928 0.3525 0.3653 0.3781 0.4135\nsd 0.09853 0.1120 0.1300 0.1498 0.1694\n\n\nAs before, we can use the treatment.effect() function of bipd to estimate relative effects for new patients.\n\ntreatment.effect(ipd3, samples, newpatient= c(1,2))\n\n$`treatment 2`\n 0.025 0.5 0.975 \n-2.657461 -2.479969 -2.382494 \n\n$`treatment 3`\n 0.025 0.5 0.975 \n-0.8781160 -0.6976577 -0.5854561 \n\n\nThis gives us the relative effects for all treatments versus the reference. To obtain relative effects between active treatments we need some more coding:\n\nsamples.all=data.frame(rbind(samples[[1]], samples[[2]]))\nnewpatient= c(1,2)\nnewpatient <- (newpatient - ipd3$scale_mean)/ipd3$scale_sd\n\nmedian(\n samples.all$delta.2.+samples.all$gamma.2.1.*\n newpatient[1]+samples.all$gamma.2.2.*newpatient[2]\n-\n (samples.all$delta.3.+samples.all$gamma.3.1.*newpatient[1]+\n samples.all$gamma.3.2.*newpatient[2])\n)\n\n[1] -1.773384\n\nquantile(samples.all$delta.2.+samples.all$gamma.2.1.*\n newpatient[1]+samples.all$gamma.2.2.*newpatient[2]\n -(samples.all$delta.3.+samples.all$gamma.3.1.*newpatient[1]+\n samples.all$gamma.3.2.*newpatient[2])\n , probs = 0.025)\n\n 2.5% \n-1.955488 \n\nquantile(samples.all$delta.2.+samples.all$gamma.2.1.*\n newpatient[1]+samples.all$gamma.2.2.*newpatient[2]\n -(samples.all$delta.3.+samples.all$gamma.3.1.*newpatient[1]+\n samples.all$gamma.3.2.*newpatient[2])\n , probs = 0.975)\n\n 97.5% \n-1.638554 \n\n\n\n\n\n9.2.2 Modeling patient-level relative effects using randomized and observational evidence for a network of treatments\nWe will now follow Chapter 16.3.5 from the book. In this analysis we will not use penalization, and we will assume fixed effects. For an example with penalization and random effects, see part 2 of this vignettte.\n\n9.2.2.1 Setup\nWe generate a very simple dataset of three studies comparing three treatments. We will assume 2 RCTs and 1 non-randomized trial:\n\nds4 <- generate_ipdnma_example(type = \"continuous\")\nds4 <- ds4 %>% filter(studyid %in% c(1,4,10)) %>%\n mutate(studyid = factor(studyid) %>%\n recode_factor(\n \"1\" = \"1\",\n \"4\" = \"2\",\n \"10\" = \"3\"),\n design = ifelse(studyid == \"3\", \"nrs\", \"rct\"))\n\nThe sample size is as follows:\n\n\n \n s1 s2 s3\n treat A: 41 49 36\n treat B: 59 0 32\n treat C: 0 51 32\n\n\n\n\n9.2.2.2 Model fitting\nWe will use the design-adjusted model, equation 16.9 in the book. We will fit a two-stage fixed effects meta-analysis and we will use a variance inflation factor. The code below is used to specify the analysis of each individual study. Briefly, in each study we adjust the treatment effect for the prognostic factors z1 and z2, as well as their interaction with treat.\n\nlibrary(rjags)\n\nLoading required package: coda\n\n\nLinked to JAGS 4.3.0\n\n\nLoaded modules: basemod,bugs\n\nfirst.stage <- \"\nmodel{\n\nfor (i in 1:N){\n y[i] ~ dnorm(mu[i], tau) \n mu[i] <- a + inprod(b[], X[i,]) + inprod(c[,treat[i]], X[i,]) + d[treat[i]] \n}\nsigma ~ dunif(0, 5)\ntau <- pow(sigma, -2)\n\na ~ dnorm(0, 0.001)\n\nfor(k in 1:Ncovariate){\n b[k] ~ dnorm(0,0.001)\n}\n\nfor(k in 1:Ncovariate){\n c[k,1] <- 0\n}\n\ntauGamma <- pow(sdGamma,-1)\nsdGamma ~ dunif(0, 5)\n\nfor(k in 1:Ncovariate){\n for(t in 2:Ntreat){\n c[k,t] ~ ddexp(0, tauGamma)\n }\n}\n\nd[1] <- 0\nfor(t in 2:Ntreat){\n d[t] ~ dnorm(0, 0.001)\n}\n}\"\n\nSubsequently, we estimate the relative treatment effects in the first (randomized) study comparing treatments A and B:\n\nmodel1.spec <- textConnection(first.stage) \ndata1 <- with(ds4 %>% filter(studyid == 1), \n list(y = y,\n N = length(y), \n X = cbind(z1,z2), \n treat = treat,\n Ncovariate = 2, \n Ntreat = 2))\njags.m <- jags.model(model1.spec, data = data1, n.chains = 2, n.adapt = 500,\n quiet = TRUE)\nparams <- c(\"d\", \"c\") \nsamps4.1 <- coda.samples(jags.m, params, n.iter = 50)\nsamps.all.s1 <- data.frame(as.matrix(samps4.1))\n\nsamps.all.s1 <- samps.all.s1[, c(\"c.1.2.\", \"c.2.2.\", \"d.2.\")]\ndelta.1 <- colMeans(samps.all.s1)\ncov.1 <- var(samps.all.s1)\n\nWe repeat the analysis for the second (randomized) study comparing treatments A and C:\n\nmodel1.spec <- textConnection(first.stage) \ndata2 <- with(ds4 %>% filter(studyid == 2), \n list(y = y,\n N = length(y), \n X = cbind(z1,z2), \n treat = ifelse(treat == 3, 2, treat),\n Ncovariate = 2, \n Ntreat = 2))\njags.m <- jags.model(model1.spec, data = data2, n.chains = 2, n.adapt = 100,\n quiet = TRUE)\nparams <- c(\"d\", \"c\") \nsamps4.2 <- coda.samples(jags.m, params, n.iter = 50)\nsamps.all.s2 <- data.frame(as.matrix(samps4.2))\nsamps.all.s2 <- samps.all.s2[, c(\"c.1.2.\", \"c.2.2.\", \"d.2.\")]\ndelta.2 <- colMeans(samps.all.s2)\ncov.2 <- var(samps.all.s2)\n\nFinally, we analyze the third (non-randomized) study comparing treatments A, B, and C:\n\nmodel1.spec <- textConnection(first.stage) \ndata3 <- with(ds4 %>% filter(studyid == 3), \n list(y = y,\n N = length(y), \n X = cbind(z1,z2), \n treat = treat,\n Ncovariate = 2, \n Ntreat = 3))\njags.m <- jags.model(model1.spec, data = data3, n.chains = 2, n.adapt = 100,\n quiet = TRUE)\nparams <- c(\"d\", \"c\") \nsamps4.3 <- coda.samples(jags.m, params, n.iter = 50)\nsamps.all.s3 <- data.frame(as.matrix(samps4.3))\n\nsamps.all.s3 <- samps.all.s3[, c(\"c.1.2.\", \"c.2.2.\", \"d.2.\", \"c.1.3.\", \n \"c.2.3.\", \"d.3.\")]\ndelta.3 <- colMeans(samps.all.s3)\ncov.3 <- var(samps.all.s3)\n\nThe corresponding treatment effect estimates are depicted below:\n\n\n\n\nTable 9.4: Treatment effect estimates.\n\n\nstudy\nB versus A\nC versus A\n\n\n\n\nstudy 1\n-3.029 (SE = 0.061 )\n\n\n\nstudy 2\n\n-1.097 (SE = 0.048 )\n\n\nstudy 3\n-2.901 (SE = 0.087 )\n-0.916 (SE = 0.086 )\n\n\n\n\n\n\n\n\nWe can now fit the second stage of the network meta-analysis. The corresponding JAGS model is specified below:\n\nsecond.stage <-\n\"model{\n \n #likelihood\n y1 ~ dmnorm(Mu1, Omega1)\n y2 ~ dmnorm(Mu2, Omega2)\n y3 ~ dmnorm(Mu3, Omega3*W)\n\n \n Omega1 <- inverse(cov.1)\n Omega2 <- inverse(cov.2)\n Omega3 <- inverse(cov.3)\n\n Mu1 <- c(gamma[,1], delta[2])\n Mu2 <- c(gamma[,2], delta[3]) \n Mu3 <- c(gamma[,1], delta[2],gamma[,2], delta[3])\n \n #parameters\n for(i in 1:2){\n gamma[i,1] ~ dnorm(0, 0.001)\n gamma[i,2] ~ dnorm(0, 0.001)\n }\n \n delta[1] <- 0\n delta[2] ~ dnorm(0, 0.001)\n delta[3] ~ dnorm(0, 0.001)\n \n}\n\"\n\nWe can fit as follows:\n\nmodel1.spec <- textConnection(second.stage) \ndata3 <- list(y1 = delta.1, y2 = delta.2, y3 = delta.3, \n cov.1 = cov.1, cov.2 = cov.2, cov.3 = cov.3, W = 0.5)\n\njags.m <- jags.model(model1.spec, data = data3, n.chains = 2, n.adapt = 50,\n quiet = TRUE)\nparams <- c(\"delta\", \"gamma\") \nsamps4.3 <- coda.samples(jags.m, params, n.iter = 50)\n\n\nsummary(samps4.3)\n\n\nIterations = 1:50\nThinning interval = 1 \nNumber of chains = 2 \nSample size per chain = 50 \n\n1. Empirical mean and standard deviation for each variable,\n plus standard error of the mean:\n\n Mean SD Naive SE Time-series SE\ndelta[1] 0.0000 0.00000 0.000000 0.000000\ndelta[2] -2.9990 0.06271 0.006271 0.006288\ndelta[3] -1.0496 0.04920 0.004920 0.004900\ngamma[1,1] -0.8046 0.04553 0.004553 0.004557\ngamma[2,1] 0.9338 0.06545 0.006545 0.006558\ngamma[1,2] -0.5747 0.06981 0.006981 0.006998\ngamma[2,2] 0.5486 0.07140 0.007140 0.008008\n\n2. Quantiles for each variable:\n\n 2.5% 25% 50% 75% 97.5%\ndelta[1] 0.0000 0.0000 0.0000 0.0000 0.0000\ndelta[2] -3.1093 -3.0394 -3.0055 -2.9685 -2.8799\ndelta[3] -1.1400 -1.0811 -1.0587 -1.0093 -0.9512\ngamma[1,1] -0.8979 -0.8354 -0.8034 -0.7816 -0.7112\ngamma[2,1] 0.8466 0.9164 0.9469 0.9655 1.0061\ngamma[1,2] -0.6650 -0.6082 -0.5804 -0.5503 -0.4759\ngamma[2,2] 0.4219 0.5109 0.5429 0.5854 0.6825\n\n# calculate treatment effects\nsamples.all = data.frame(rbind(samps4.3[[1]], samps4.3[[2]]))\nnewpatient = c(1,2)\n\nmedian(\n samples.all$delta.2. + samples.all$gamma.1.1.*newpatient[1] +\n samples.all$gamma.2.1.*newpatient[2]\n)\n\n[1] -1.916582\n\nquantile(samples.all$delta.2.+samples.all$gamma.1.1.*newpatient[1]+\n samples.all$gamma.2.1.*newpatient[2]\n , probs = 0.025)\n\n 2.5% \n-2.123473 \n\nquantile(samples.all$delta.2.+samples.all$gamma.1.1.*newpatient[1]+\n samples.all$gamma.2.1.*newpatient[2]\n , probs = 0.975)\n\n 97.5% \n-1.773523" }, { "objectID": "chapter_16.html#version-info", "href": "chapter_16.html#version-info", "title": "9  Prediction of individual treatment effect using data from multiple studies", "section": "Version info", - "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] rjags_4-14 coda_0.19-4 ggplot2_3.4.4 bipd_0.3 \n[5] kableExtra_1.3.4 dplyr_1.1.4 table1_1.4.3 \n\nloaded via a namespace (and not attached):\n [1] highr_0.10 pillar_1.9.0 compiler_4.2.3 tools_4.2.3 \n [5] digest_0.6.33 gtable_0.3.4 lattice_0.20-45 jsonlite_1.8.7 \n [9] evaluate_0.23 lifecycle_1.0.4 tibble_3.2.1 viridisLite_0.4.2\n[13] pkgconfig_2.0.3 rlang_1.1.2 cli_3.6.1 rstudioapi_0.15.0\n[17] yaml_2.3.7 mvtnorm_1.2-3 xfun_0.41 fastmap_1.1.1 \n[21] withr_2.5.2 httr_1.4.7 stringr_1.5.1 knitr_1.45 \n[25] xml2_1.3.5 generics_0.1.3 vctrs_0.6.4 htmlwidgets_1.6.3\n[29] systemfonts_1.0.5 grid_4.2.3 webshot_0.5.5 tidyselect_1.2.0 \n[33] svglite_2.1.2 glue_1.6.2 R6_2.5.1 fansi_1.0.5 \n[37] rmarkdown_2.25 Formula_1.2-5 farver_2.1.1 magrittr_2.0.3 \n[41] codetools_0.2-19 scales_1.2.1 htmltools_0.5.7 rvest_1.0.3 \n[45] colorspace_2.1-0 labeling_0.4.3 utf8_1.2.4 stringi_1.8.2 \n[49] munsell_0.5.0" + "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] rjags_4-14 coda_0.19-4 ggplot2_3.4.4 bipd_0.3 \n[5] kableExtra_1.3.4 dplyr_1.1.4 table1_1.4.3 \n\nloaded via a namespace (and not attached):\n [1] highr_0.10 pillar_1.9.0 compiler_4.2.3 tools_4.2.3 \n [5] digest_0.6.33 gtable_0.3.4 lattice_0.20-45 jsonlite_1.8.7 \n [9] evaluate_0.23 lifecycle_1.0.4 tibble_3.2.1 viridisLite_0.4.2\n[13] pkgconfig_2.0.3 rlang_1.1.2 cli_3.6.1 rstudioapi_0.15.0\n[17] yaml_2.3.7 mvtnorm_1.2-4 xfun_0.41 fastmap_1.1.1 \n[21] withr_2.5.2 httr_1.4.7 stringr_1.5.1 knitr_1.45 \n[25] xml2_1.3.5 generics_0.1.3 vctrs_0.6.4 htmlwidgets_1.6.3\n[29] systemfonts_1.0.5 grid_4.2.3 webshot_0.5.5 tidyselect_1.2.0 \n[33] svglite_2.1.2 glue_1.6.2 R6_2.5.1 fansi_1.0.5 \n[37] rmarkdown_2.25 Formula_1.2-5 farver_2.1.1 magrittr_2.0.3 \n[41] codetools_0.2-19 scales_1.3.0 htmltools_0.5.7 rvest_1.0.3 \n[45] colorspace_2.1-0 labeling_0.4.3 utf8_1.2.4 stringi_1.8.2 \n[49] munsell_0.5.0" }, { "objectID": "chapter_16.html#references", @@ -389,7 +389,7 @@ "href": "chapter_18.html#version-info", "title": "10  Visualization and interpretation of individualized treatment rule results", "section": "Version info", - "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] fastDummies_1.7.3 reshape2_1.4.4 truncnorm_1.0-9 table1_1.4.3 \n [5] kableExtra_1.3.4 knitr_1.45 ggpubr_0.6.0 MASS_7.3-58.2 \n [9] corrplot_0.92 caret_6.0-94 lattice_0.20-45 gbm_2.1.8.1 \n[13] tableone_0.13.2 rpart.plot_3.1.1 rpart_4.1.19 precmed_1.0.0 \n[17] DTRreg_2.0 magrittr_2.0.3 lubridate_1.9.3 forcats_1.0.0 \n[21] stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2 readr_2.1.4 \n[25] tidyr_1.3.0 tibble_3.2.1 ggplot2_3.4.4 tidyverse_2.0.0 \n\nloaded via a namespace (and not attached):\n [1] colorspace_2.1-0 ggsignif_0.6.4 class_7.3-21 \n [4] ggridges_0.5.4 proxy_0.4-27 rstudioapi_0.15.0 \n [7] farver_2.1.1 listenv_0.9.0 prodlim_2023.08.28 \n [10] fansi_1.0.5 xml2_1.3.5 codetools_0.2-19 \n [13] splines_4.2.3 Formula_1.2-5 jsonlite_1.8.7 \n [16] pROC_1.18.5 broom_1.0.5 geepack_1.3.9 \n [19] data.tree_1.1.0 httr_1.4.7 DiagrammeR_1.0.10 \n [22] clipr_0.8.0 compiler_4.2.3 randomForestSRC_3.2.2\n [25] backports_1.4.1 Matrix_1.6-3 fastmap_1.1.1 \n [28] survey_4.2-1 cli_3.6.1 visNetwork_2.1.2 \n [31] htmltools_0.5.7 tools_4.2.3 gtable_0.3.4 \n [34] glue_1.6.2 MESS_0.5.12 Rcpp_1.0.11 \n [37] carData_3.0-5 vctrs_0.6.4 svglite_2.1.2 \n [40] nlme_3.1-162 iterators_1.0.14 timeDate_4022.108 \n [43] gower_1.0.1 xfun_0.41 globals_0.16.2 \n [46] rvest_1.0.3 timechange_0.2.0 lifecycle_1.0.4 \n [49] geeM_0.10.1 mosaicCore_0.9.4.0 rstatix_0.7.2 \n [52] future_1.33.0 scales_1.2.1 ipred_0.9-14 \n [55] hms_1.1.3 parallel_4.2.3 RColorBrewer_1.1-3 \n [58] yaml_2.3.7 labelled_2.12.0 gam_1.22-2 \n [61] stringi_1.8.2 highr_0.10 foreach_1.5.2 \n [64] e1071_1.7-13 hardhat_1.3.0 lava_1.7.3 \n [67] shape_1.4.6 systemfonts_1.0.5 rlang_1.1.2 \n [70] pkgconfig_2.0.3 evaluate_0.23 labeling_0.4.3 \n [73] recipes_1.0.8 htmlwidgets_1.6.3 cowplot_1.1.1 \n [76] tidyselect_1.2.0 parallelly_1.36.0 ggformula_0.12.0 \n [79] plyr_1.8.9 R6_2.5.1 generics_0.1.3 \n [82] DBI_1.1.3 pillar_1.9.0 haven_2.5.3 \n [85] withr_2.5.2 survival_3.5-3 abind_1.4-5 \n [88] nnet_7.3-18 future.apply_1.11.0 car_3.1-2 \n [91] utf8_1.2.4 tzdb_0.4.0 rmarkdown_2.25 \n [94] grid_4.2.3 data.table_1.14.8 ModelMetrics_1.2.2.2 \n [97] webshot_0.5.5 digest_0.6.33 stats4_4.2.3 \n[100] munsell_0.5.0 glmnet_4.1-8 viridisLite_0.4.2 \n[103] mitools_2.4" + "text": "Version info\nThis chapter was rendered using the following version of R and its packages:\n\n\nR version 4.2.3 (2023-03-15)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.3 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3\nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so\n\nlocale:\n [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] fastDummies_1.7.3 reshape2_1.4.4 truncnorm_1.0-9 table1_1.4.3 \n [5] kableExtra_1.3.4 knitr_1.45 ggpubr_0.6.0 MASS_7.3-58.2 \n [9] corrplot_0.92 caret_6.0-94 lattice_0.20-45 gbm_2.1.8.1 \n[13] tableone_0.13.2 rpart.plot_3.1.1 rpart_4.1.19 precmed_1.0.0 \n[17] DTRreg_2.0 magrittr_2.0.3 lubridate_1.9.3 forcats_1.0.0 \n[21] stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2 readr_2.1.4 \n[25] tidyr_1.3.0 tibble_3.2.1 ggplot2_3.4.4 tidyverse_2.0.0 \n\nloaded via a namespace (and not attached):\n [1] colorspace_2.1-0 ggsignif_0.6.4 class_7.3-21 \n [4] ggridges_0.5.4 proxy_0.4-27 rstudioapi_0.15.0 \n [7] farver_2.1.1 listenv_0.9.0 prodlim_2023.08.28 \n [10] fansi_1.0.5 xml2_1.3.5 codetools_0.2-19 \n [13] splines_4.2.3 Formula_1.2-5 jsonlite_1.8.7 \n [16] pROC_1.18.5 broom_1.0.5 geepack_1.3.9 \n [19] data.tree_1.1.0 httr_1.4.7 DiagrammeR_1.0.10 \n [22] clipr_0.8.0 compiler_4.2.3 randomForestSRC_3.2.2\n [25] backports_1.4.1 Matrix_1.6-3 fastmap_1.1.1 \n [28] survey_4.2-1 cli_3.6.1 visNetwork_2.1.2 \n [31] htmltools_0.5.7 tools_4.2.3 gtable_0.3.4 \n [34] glue_1.6.2 MESS_0.5.12 Rcpp_1.0.11 \n [37] carData_3.0-5 vctrs_0.6.4 svglite_2.1.2 \n [40] nlme_3.1-162 iterators_1.0.14 timeDate_4022.108 \n [43] gower_1.0.1 xfun_0.41 globals_0.16.2 \n [46] rvest_1.0.3 timechange_0.2.0 lifecycle_1.0.4 \n [49] geeM_0.10.1 mosaicCore_0.9.4.0 rstatix_0.7.2 \n [52] future_1.33.0 scales_1.3.0 ipred_0.9-14 \n [55] hms_1.1.3 parallel_4.2.3 RColorBrewer_1.1-3 \n [58] yaml_2.3.7 labelled_2.12.0 gam_1.22-2 \n [61] stringi_1.8.2 highr_0.10 foreach_1.5.2 \n [64] e1071_1.7-13 hardhat_1.3.0 lava_1.7.3 \n [67] shape_1.4.6 systemfonts_1.0.5 rlang_1.1.2 \n [70] pkgconfig_2.0.3 evaluate_0.23 labeling_0.4.3 \n [73] recipes_1.0.8 htmlwidgets_1.6.3 cowplot_1.1.1 \n [76] tidyselect_1.2.0 parallelly_1.36.0 ggformula_0.12.0 \n [79] plyr_1.8.9 R6_2.5.1 generics_0.1.3 \n [82] DBI_1.1.3 pillar_1.9.0 haven_2.5.3 \n [85] withr_2.5.2 survival_3.5-3 abind_1.4-5 \n [88] nnet_7.3-18 future.apply_1.11.0 car_3.1-2 \n [91] utf8_1.2.4 tzdb_0.4.0 rmarkdown_2.25 \n [94] grid_4.2.3 data.table_1.14.8 ModelMetrics_1.2.2.2 \n [97] webshot_0.5.5 digest_0.6.33 stats4_4.2.3 \n[100] munsell_0.5.0 glmnet_4.1-8 viridisLite_0.4.2 \n[103] mitools_2.4" }, { "objectID": "chapter_18.html#references", @@ -403,6 +403,6 @@ "href": "authors.html", "title": "11  Book Authors", "section": "", - "text": "We gratefully acknowledge the contribution from the following authors:\n\nAuthors\n\n\n\n\n\n\nAuthor\nAffiliation\n\n\n\n\nAlf Scotland\nBiogen Digital Health International GmbH, Baar, Switzerland\n\n\nAmr Makady\nThe Janssen Pharmaceutical Companies of Johnson & Johnson, Breda, The Netherlands\n\n\nCarl de Moor\nCertara, Cambridge, MA, United States\n\n\nChangyu Shen\nBiogen, Cambridge, MA, United States\n\n\nChristina Read\nUtrecht University, Utrecht, The Netherlands\n\n\nElvira D’Andrea\nAbbVie Inc., Boston, MA, United States\n\n\nFabio Pellegrini\nBiogen Spain, Madrid, Spain\n\n\nGabrielle Simoneau\nBiogen Canada, Toronto, Canada\n\n\nGerko Vink\nUtrecht University, Utrecht, The Netherlands\n\n\nGrammati Sarri\nCytel Inc., London, United Kingdom\n\n\nHanne Oberman\nUtrecht University, Utrecht, The Netherlands\n\n\nJamie Elvidge\nNational Institute for Health and Care Excellence (NICE), Manchester, United Kingdom\n\n\nJanie Coulombe\nUniversité de Montréal, Montréal, Canada\n\n\nJeremy Dietz\nNational Institute for Health and Care Excellence (NICE), London, United Kingdom\n\n\nJohanna Muñoz\nJulius Center for Health Sciences and Primary Care, University Medical Center Utrecht, Utrecht University, Utrecht, The Netherlands\n\n\nKonstantina Chalkou\nInstitute of Social and Preventive Medicine (ISPM), University of Bern, Bern, Switzerland\n\n\nMohammad Ehsanul Karim\nSchool of Population and Public Health, University of British Columbia, Vancouver, Canada\n\n\nTammy Jiang\nBiogen, Cambridge, MA, United States" + "text": "We gratefully acknowledge the contribution from the following authors:\n\nAuthors\n\n\n\n\n\n\nAuthor\nAffiliation\n\n\n\n\nAlf Scotland\nBiogen Digital Health International GmbH, Baar, Switzerland\n\n\nAmr Makady\nThe Janssen Pharmaceutical Companies of Johnson & Johnson, Breda, The Netherlands\n\n\nCarl de Moor\nCertara, Cambridge, MA, United States\n\n\nChangyu Shen\nBiogen, Cambridge, MA, United States\n\n\nChristina Read\nUtrecht University, Utrecht, The Netherlands\n\n\nElvira D’Andrea\nAbbVie Inc., Boston, MA, United States\n\n\nFabio Pellegrini\nBiogen Spain, Madrid, Spain\n\n\nGabrielle Simoneau\nBiogen Canada, Toronto, Canada\n\n\nGerko Vink\nUtrecht University, Utrecht, The Netherlands\n\n\nGrammati Sarri\nCytel Inc., London, United Kingdom\n\n\nHanne Oberman\nUtrecht University, Utrecht, The Netherlands\n\n\nJamie Elvidge\nNational Institute for Health and Care Excellence (NICE), Manchester, United Kingdom\n\n\nJanie Coulombe\nUniversité de Montréal, Montréal, Canada\n\n\nJeremy Dietz\nNational Institute for Health and Care Excellence (NICE), London, United Kingdom\n\n\nJohanna Muñoz\nJulius Center for Health Sciences and Primary Care, University Medical Center Utrecht, Utrecht University, Utrecht, The Netherlands\n\n\nKatrine Strandberg-Larsen\nDepartment of Public Health, University of Copenhagen, Copenhagen, Denmark\n\n\nKonstantina Chalkou\nInstitute of Social and Preventive Medicine (ISPM), University of Bern, Bern, Switzerland\n\n\nMohammad Ehsanul Karim\nSchool of Population and Public Health, University of British Columbia, Vancouver, Canada\n\n\nTammy Jiang\nBiogen, Cambridge, MA, United States" } ] \ No newline at end of file