Chapter 2 Mean Difference

2.1 はじめに

LeVasseur et al. (2021) は、ダイエットに関する介入研究のネットワークメタ分析である。介入方法としては、運動、栄養、運動および栄養など多岐にわたる。

今回のデータでは、3群RCTであっても、有酸素運動(AER)が2群ある研究がいくつか含まれている。

2.2 データ

Contrast based を読み込む。

library(readxl)
library(esc)
dfPrepostCont1 <- read_excel("data/MD.xlsx", 
    sheet = "data4r_prepost_cont")

dfPrepostCont2 <- as.data.frame(
  esc_mean_gain(pre1mean = dfPrepostCont1$y1b,
                       pre1sd  = dfPrepostCont1$sd1b,
                       post1mean = dfPrepostCont1$y1e,
                       post1sd = dfPrepostCont1$sd1e,
                       grp1n = dfPrepostCont1$N1,
                       pre2mean = dfPrepostCont1$y2b,
                       pre2sd  = dfPrepostCont1$sd2b,
                       post2mean = dfPrepostCont1$y2e,
                       post2sd = dfPrepostCont1$sd2e,
                       grp2n = dfPrepostCont1$N2,
                       study = dfPrepostCont1$Study,
                       es.type = "d"))

Arm based を読み込む。

データは、「介入前後の体重の差と標準誤差」と「介入前後の体重と標準偏差」の2種類がある。まず前者を読み込み、後者は esc パッケージを使用し前者に変換して結合する。

library(readxl)
library(esc)
dfMeanArm <- read_excel("data/MD.xlsx", 
    sheet = "data4r_mean_arm")
df_prepost <- read_excel("data/MD.xlsx", 
    sheet = "data4r_prepost_arm")

SP_calc <- as.data.frame(esc_mean_sd(grp1m = df_prepost$weight1,
                       grp1sd  = df_prepost$sd1,
                       grp1n = df_prepost$N,
                       grp2m = df_prepost$weight2,
                       grp2sd  = df_prepost$sd2,
                       grp2n = df_prepost$N,
                       study = df_prepost$Study,
                       es.type = "d"))

dfTemp2 <- data.frame(Diff = SP_calc$es,
                      StdErr = SP_calc$se,
                      N = SP_calc$sample.size,
                      Treatment = df_prepost$treatment,
                      Study = SP_calc$study)

df <- rbind(dfMeanArm,dfTemp2)

さらに、group 列を作成する。

df$group <- "Combination Interventions"
df[df$Treatment == "SC",]$group <- "Control"
df[df$Treatment == "AER",]$group <- "Exercise Interventions"
df[df$Treatment == "RES",]$group <- "Exercise Interventions"
df[df$Treatment == "AER+RES",]$group <- "Exercise Interventions"
df[df$Treatment == "LOCAL",]$group <- "Dietary Interventions"
df[df$Treatment == "LOFAT",]$group <- "Dietary Interventions"
df[df$Treatment == "LOCARB",]$group <- "Dietary Interventions"
df[df$Treatment == "NCI",]$group <- "Dietary Interventions"
df[df$Treatment == "PHYTO/PLANT",]$group <- "Dietary Interventions"
df[df$Treatment == "MEDIT",]$group <- "Dietary Interventions"
df[df$Treatment == "LOCAL+LOCARB",]$group <- "Dietary Interventions"
df[df$Treatment == "LOFAT+PYTO",]$group <- "Dietary Interventions"

2.3 netmeta 頻度論

2.3.1 データ

arm-based データのため、contrast-based (pairwise) データに変換する。

library(netmeta)
dfCB <- pairwise(
  treat = Treatment,
  n = N,
  mean = Diff,
  sd = StdErr,
  studlab = Study,
  reference.group = "SC",
  data = df)
エラー: Identical treatments for the following studies: 'Demark-Wahnefried et al 2014' - 'Dolan et al 2016' - 'Harrigan et al 2016' - 'Segal et al 2001' Please check dataset.

やはり、同じ治療名なのでエラーが出た。

df[6,]$Treatment <- "LOWCAL+AER/RES2"
df[34,]$Treatment <- "AER2"
df[39,]$Treatment <- "AER2"
df[42,]$Treatment <- "LOWCAL+LOWFAT+AER2"
df[95,]$Treatment <- "AER2"
df[143,]$Treatment <- "AER2"
#df <- df[-c(6,34,39,42),]

arm based 形式のデータフレームから、pairwise() 関数を用いて contrast-based のデータフレームを作成する。

library(netmeta)
dfCB <- pairwise(
  treat = Treatment,
  n = N,
  TE = Diff,
  seTE = StdErr,
  studlab = Study,
  reference.group = "SC",
  data = df)
nc1 <- netconnection(treat1, treat2, data = dfCB)
nc1
## Number of studies: k = 88
## Number of pairwise comparisons: m = 88
## Number of treatments: n = 22
## Number of designs: d = 30
## Number of subnetworks: 1

サブネットワーク数が1であることを確認した。サブネットワークが2以上であると、ネットワークが二つ以上あることになり、すべての治療の比較ができなくなる。

なお、サブネットワークがある場合、subset = nc1$subnet == 2 で指定する。

library(netmeta)
netmetaLeV <- netmeta(TE = TE,
                     seTE = seTE,
                     treat1 = treat1,
                     treat2 = treat2,
                     studlab = studlab,
                     data = dfCB,
                     sm = "MD",
                     fixed = TRUE,
                     random = FALSE,
                     reference.group = "SC",
                     details.chkmultiarm = TRUE,
                     sep.trts = " vs ")

2.3.2 Network plot

グラフを描く。

netgraph(netmetaLeV,
         plastic = FALSE,                    # 3Dではなくする
         points = TRUE,                      # ノードを表示する
         thickness = "number.of.studies",    # 線の太さを研究数にする
         multiarm = TRUE)

ネットワークグラフの3次元版。環境によっては RStudio が落ちることがある。

library(rgl)
netgraph(netmetaLeV, dim = "3d")

2.3.3 要約

要約。データが多いため出力は省略。最後に tau^2I^2Q といった指標が表示される。これらは NMA ではなくメタ分析の指標である。tau^2 は、「真の効果の分散」を表す。I^2 は、異質性の指標であり、25%以下であれば低い、50%で中程度、75%でかなりの異質性と判断される。QI^2 を計算するために用いられる。

summary(netmetaLeV)

2.3.4 一貫性の評価

decomp.design(netmetaLeV)
## Q statistics to assess homogeneity / consistency
## 
##                      Q df  p-value
## Total           179.08 56 < 0.0001
## Within designs  157.24 42 < 0.0001
## Between designs  21.84 14   0.0819
## 
## Design-specific decomposition of within-designs Q statistic
## 
##                      Design     Q df  p-value
##                   SC vs AER  9.93  8   0.2701
##               SC vs AER+RES 43.34 12 < 0.0001
##            SC vs LOWCAL+AER 36.67  4 < 0.0001
##        SC vs LOWCAL+AER/RES  6.76  3   0.0798
##  SC vs LOWFAT/PHYTO+AER/RES 17.03  1 < 0.0001
##            SC vs LOWFAT+AER 32.73  4 < 0.0001
##                 SC vs MEDIT  0.12  1   0.7260
##                   SC vs RES  0.19  3   0.9788
##           SC vs AER vs AER2 10.46  6   0.1066
## 
## Between-designs Q statistic after detaching of single designs
## 
##                        Detached design     Q df p-value
##                    LOWFAT+PHYTO vs NCI 20.81 13  0.0769
##                     NCI vs PHYTO/PLANT 20.81 13  0.0769
##                              SC vs AER 21.12 13  0.0706
##                          SC vs AER+RES 21.66 13  0.0609
##                           SC vs LOWCAL 21.55 13  0.0628
##                   SC vs LOWCAL+AER/RES 19.09 13  0.1202
##                SC vs LOWCAL+LOWFAT+AER 21.80 13  0.0585
##                           SC vs LOWFAT 15.66 13  0.2682
##             SC vs LOWFAT/PHYTO+AER/RES 21.56 13  0.0626
##                     SC vs LOWFAT+PHYTO 20.81 13  0.0769
##                            SC vs MEDIT 20.74 13  0.0782
##                      SC vs PHYTO/PLANT 20.81 13  0.0769
##                              SC vs RES 21.63 13  0.0614
##                   SC vs AER vs AER+RES 14.53 12  0.2679
##                       SC vs AER vs RES 21.63 12  0.0419
##  SC vs AER+RES vs LOWFAT/PHYTO+AER/RES 21.56 12  0.0428
##                 SC vs LOWCAL vs LOWFAT 17.50 12  0.1316
##                  SC vs LOWFAT vs MEDIT 16.11 12  0.1864
## 
## Q statistic to assess consistency under the assumption of
## a full design-by-treatment interaction random effects model
## 
##                     Q df p-value tau.within tau2.within
## Between designs 11.36 14  0.6573     0.7808      0.6096

次の図はあまり必要ないかもしれない。直接か間接かを示す(結果は示さず)。

library(dmetar)
d.evidence <- direct.evidence.plot(netmetaLeV)
plot(d.evidence)
print(netsplit(netmetaLeV), digits=3)
## Separate indirect from direct evidence (SIDE) using back-calculation method
## 
## Common effects model: 
## 
##                                  comparison  k prop     nma  direct  indir.   Diff     z p-value
##                              AER vs AER+RES  1 0.08  -0.141  -0.745  -0.089 -0.656 -0.97  0.3322
##                                 AER vs AER2  4 0.84   0.190   0.184   0.226 -0.042 -0.07  0.9468
##                               AER vs LOWCAL  0    0   2.191       .   2.191      .     .       .
##                           AER vs LOWCAL+AER  0    0   1.020       .   1.020      .     .       .
##                       AER vs LOWCAL+AER/RES  0    0   0.728       .   0.728      .     .       .
##                      AER vs LOWCAL+AER/RES2  0    0   0.370       .   0.370      .     .       .
##                        AER vs LOWCAL+LOWFAT  0    0  -0.250       .  -0.250      .     .       .
##                    AER vs LOWCAL+LOWFAT+AER  0    0   3.547       .   3.547      .     .       .
##                   AER vs LOWCAL+LOWFAT+AER2  0    0   2.824       .   2.824      .     .       .
##                              AER vs LOWCARB  0    0  -0.736       .  -0.736      .     .       .
##                          AER vs LOWCARB+AER  0    0  10.396       .  10.396      .     .       .
##                               AER vs LOWFAT  0    0  -0.336       .  -0.336      .     .       .
##                 AER vs LOWFAT/PHYTO+AER/RES  0    0  -0.117       .  -0.117      .     .       .
##                           AER vs LOWFAT+AER  0    0  -0.235       .  -0.235      .     .       .
##                         AER vs LOWFAT+PHYTO  0    0  -0.832       .  -0.832      .     .       .
##                                AER vs MEDIT  0    0  -0.459       .  -0.459      .     .       .
##                            AER vs MEDIT+AER  0    0  -0.162       .  -0.162      .     .       .
##                                  AER vs NCI  0    0  -0.844       .  -0.844      .     .       .
##                          AER vs PHYTO/PLANT  0    0  -0.147       .  -0.147      .     .       .
##                                  AER vs RES  1 0.06  -0.337  -0.600  -0.321 -0.279 -0.40  0.6901
##                                   AER vs SC 15 0.96  -0.204  -0.198  -0.339  0.141  0.19  0.8463
##                             AER+RES vs AER2  0    0   0.331       .   0.331      .     .       .
##                           AER+RES vs LOWCAL  0    0   2.332       .   2.332      .     .       .
##                       AER+RES vs LOWCAL+AER  0    0   1.161       .   1.161      .     .       .
##                   AER+RES vs LOWCAL+AER/RES  0    0   0.868       .   0.868      .     .       .
##                  AER+RES vs LOWCAL+AER/RES2  0    0   0.510       .   0.510      .     .       .
##                    AER+RES vs LOWCAL+LOWFAT  0    0  -0.110       .  -0.110      .     .       .
##                AER+RES vs LOWCAL+LOWFAT+AER  0    0   3.687       .   3.687      .     .       .
##               AER+RES vs LOWCAL+LOWFAT+AER2  0    0   2.965       .   2.965      .     .       .
##                          AER+RES vs LOWCARB  0    0  -0.596       .  -0.596      .     .       .
##                      AER+RES vs LOWCARB+AER  0    0  10.537       .  10.537      .     .       .
##                           AER+RES vs LOWFAT  0    0  -0.196       .  -0.196      .     .       .
##             AER+RES vs LOWFAT/PHYTO+AER/RES  1 0.17   0.024  -0.137   0.058 -0.195 -0.46  0.6423
##                       AER+RES vs LOWFAT+AER  0    0  -0.095       .  -0.095      .     .       .
##                     AER+RES vs LOWFAT+PHYTO  0    0  -0.692       .  -0.692      .     .       .
##                            AER+RES vs MEDIT  0    0  -0.319       .  -0.319      .     .       .
##                        AER+RES vs MEDIT+AER  0    0  -0.021       .  -0.021      .     .       .
##                              AER+RES vs NCI  0    0  -0.704       .  -0.704      .     .       .
##                      AER+RES vs PHYTO/PLANT  0    0  -0.006       .  -0.006      .     .       .
##                              AER+RES vs RES  0    0  -0.197       .  -0.197      .     .       .
##                               AER+RES vs SC 15 0.95  -0.063  -0.083   0.337 -0.421 -0.74  0.4616
##                              AER2 vs LOWCAL  0    0   2.001       .   2.001      .     .       .
##                          AER2 vs LOWCAL+AER  0    0   0.830       .   0.830      .     .       .
##                      AER2 vs LOWCAL+AER/RES  0    0   0.537       .   0.537      .     .       .
##                     AER2 vs LOWCAL+AER/RES2  0    0   0.180       .   0.180      .     .       .
##                       AER2 vs LOWCAL+LOWFAT  0    0  -0.441       .  -0.441      .     .       .
##                   AER2 vs LOWCAL+LOWFAT+AER  0    0   3.356       .   3.356      .     .       .
##                  AER2 vs LOWCAL+LOWFAT+AER2  0    0   2.634       .   2.634      .     .       .
##                             AER2 vs LOWCARB  0    0  -0.927       .  -0.927      .     .       .
##                         AER2 vs LOWCARB+AER  0    0  10.206       .  10.206      .     .       .
##                              AER2 vs LOWFAT  0    0  -0.527       .  -0.527      .     .       .
##                AER2 vs LOWFAT/PHYTO+AER/RES  0    0  -0.307       .  -0.307      .     .       .
##                          AER2 vs LOWFAT+AER  0    0  -0.425       .  -0.425      .     .       .
##                        AER2 vs LOWFAT+PHYTO  0    0  -1.023       .  -1.023      .     .       .
##                               AER2 vs MEDIT  0    0  -0.650       .  -0.650      .     .       .
##                           AER2 vs MEDIT+AER  0    0  -0.352       .  -0.352      .     .       .
##                                 AER2 vs NCI  0    0  -1.034       .  -1.034      .     .       .
##                         AER2 vs PHYTO/PLANT  0    0  -0.337       .  -0.337      .     .       .
##                                 AER2 vs RES  0    0  -0.527       .  -0.527      .     .       .
##                                  AER2 vs SC  4 0.78  -0.394  -0.392  -0.401  0.009  0.02  0.9873
##                        LOWCAL vs LOWCAL+AER  0    0  -1.171       .  -1.171      .     .       .
##                    LOWCAL vs LOWCAL+AER/RES  0    0  -1.464       .  -1.464      .     .       .
##                   LOWCAL vs LOWCAL+AER/RES2  0    0  -1.822       .  -1.822      .     .       .
##                     LOWCAL vs LOWCAL+LOWFAT  0    0  -2.442       .  -2.442      .     .       .
##                 LOWCAL vs LOWCAL+LOWFAT+AER  0    0   1.355       .   1.355      .     .       .
##                LOWCAL vs LOWCAL+LOWFAT+AER2  0    0   0.633       .   0.633      .     .       .
##                           LOWCAL vs LOWCARB  0    0  -2.928       .  -2.928      .     .       .
##                       LOWCAL vs LOWCARB+AER  0    0   8.205       .   8.205      .     .       .
##                            LOWCAL vs LOWFAT  1 0.67  -2.528  -1.400  -4.801  3.401  2.05  0.0404
##              LOWCAL vs LOWFAT/PHYTO+AER/RES  0    0  -2.308       .  -2.308      .     .       .
##                        LOWCAL vs LOWFAT+AER  0    0  -2.427       .  -2.427      .     .       .
##                      LOWCAL vs LOWFAT+PHYTO  0    0  -3.024       .  -3.024      .     .       .
##                             LOWCAL vs MEDIT  0    0  -2.651       .  -2.651      .     .       .
##                         LOWCAL vs MEDIT+AER  0    0  -2.353       .  -2.353      .     .       .
##                               LOWCAL vs NCI  0    0  -3.036       .  -3.036      .     .       .
##                       LOWCAL vs PHYTO/PLANT  0    0  -2.338       .  -2.338      .     .       .
##                               LOWCAL vs RES  0    0  -2.528       .  -2.528      .     .       .
##                                LOWCAL vs SC  2 0.70  -2.395  -3.447   0.108 -3.555 -2.08  0.0377
##                LOWCAL+AER vs LOWCAL+AER/RES  0    0  -0.293       .  -0.293      .     .       .
##               LOWCAL+AER vs LOWCAL+AER/RES2  0    0  -0.651       .  -0.651      .     .       .
##                 LOWCAL+AER vs LOWCAL+LOWFAT  0    0  -1.271       .  -1.271      .     .       .
##             LOWCAL+AER vs LOWCAL+LOWFAT+AER  0    0   2.526       .   2.526      .     .       .
##            LOWCAL+AER vs LOWCAL+LOWFAT+AER2  0    0   1.804       .   1.804      .     .       .
##                       LOWCAL+AER vs LOWCARB  0    0  -1.757       .  -1.757      .     .       .
##                   LOWCAL+AER vs LOWCARB+AER  0    0   9.376       .   9.376      .     .       .
##                        LOWCAL+AER vs LOWFAT  0    0  -1.357       .  -1.357      .     .       .
##          LOWCAL+AER vs LOWFAT/PHYTO+AER/RES  0    0  -1.137       .  -1.137      .     .       .
##                    LOWCAL+AER vs LOWFAT+AER  0    0  -1.256       .  -1.256      .     .       .
##                  LOWCAL+AER vs LOWFAT+PHYTO  0    0  -1.853       .  -1.853      .     .       .
##                         LOWCAL+AER vs MEDIT  0    0  -1.480       .  -1.480      .     .       .
##                     LOWCAL+AER vs MEDIT+AER  0    0  -1.183       .  -1.183      .     .       .
##                           LOWCAL+AER vs NCI  0    0  -1.865       .  -1.865      .     .       .
##                   LOWCAL+AER vs PHYTO/PLANT  0    0  -1.167       .  -1.167      .     .       .
##                           LOWCAL+AER vs RES  0    0  -1.358       .  -1.358      .     .       .
##                            LOWCAL+AER vs SC  5 1.00  -1.224  -1.224       .      .     .       .
##           LOWCAL+AER/RES vs LOWCAL+AER/RES2  1 0.65  -0.358  -1.680   2.072 -3.752 -1.66  0.0974
##             LOWCAL+AER/RES vs LOWCAL+LOWFAT  0    0  -0.978       .  -0.978      .     .       .
##         LOWCAL+AER/RES vs LOWCAL+LOWFAT+AER  0    0   2.819       .   2.819      .     .       .
##        LOWCAL+AER/RES vs LOWCAL+LOWFAT+AER2  0    0   2.096       .   2.096      .     .       .
##                   LOWCAL+AER/RES vs LOWCARB  0    0  -1.464       .  -1.464      .     .       .
##               LOWCAL+AER/RES vs LOWCARB+AER  0    0   9.669       .   9.669      .     .       .
##                    LOWCAL+AER/RES vs LOWFAT  0    0  -1.064       .  -1.064      .     .       .
##      LOWCAL+AER/RES vs LOWFAT/PHYTO+AER/RES  0    0  -0.844       .  -0.844      .     .       .
##                LOWCAL+AER/RES vs LOWFAT+AER  0    0  -0.963       .  -0.963      .     .       .
##              LOWCAL+AER/RES vs LOWFAT+PHYTO  0    0  -1.560       .  -1.560      .     .       .
##                     LOWCAL+AER/RES vs MEDIT  0    0  -1.187       .  -1.187      .     .       .
##                 LOWCAL+AER/RES vs MEDIT+AER  0    0  -0.890       .  -0.890      .     .       .
##                       LOWCAL+AER/RES vs NCI  0    0  -1.572       .  -1.572      .     .       .
##               LOWCAL+AER/RES vs PHYTO/PLANT  0    0  -0.875       .  -0.875      .     .       .
##                       LOWCAL+AER/RES vs RES  0    0  -1.065       .  -1.065      .     .       .
##                        LOWCAL+AER/RES vs SC  5 1.00  -0.931  -0.931       .      .     .       .
##            LOWCAL+AER/RES2 vs LOWCAL+LOWFAT  0    0  -0.620       .  -0.620      .     .       .
##        LOWCAL+AER/RES2 vs LOWCAL+LOWFAT+AER  0    0   3.177       .   3.177      .     .       .
##       LOWCAL+AER/RES2 vs LOWCAL+LOWFAT+AER2  0    0   2.454       .   2.454      .     .       .
##                  LOWCAL+AER/RES2 vs LOWCARB  0    0  -1.106       .  -1.106      .     .       .
##              LOWCAL+AER/RES2 vs LOWCARB+AER  0    0  10.027       .  10.027      .     .       .
##                   LOWCAL+AER/RES2 vs LOWFAT  0    0  -0.706       .  -0.706      .     .       .
##     LOWCAL+AER/RES2 vs LOWFAT/PHYTO+AER/RES  0    0  -0.486       .  -0.486      .     .       .
##               LOWCAL+AER/RES2 vs LOWFAT+AER  0    0  -0.605       .  -0.605      .     .       .
##             LOWCAL+AER/RES2 vs LOWFAT+PHYTO  0    0  -1.202       .  -1.202      .     .       .
##                    LOWCAL+AER/RES2 vs MEDIT  0    0  -0.829       .  -0.829      .     .       .
##                LOWCAL+AER/RES2 vs MEDIT+AER  0    0  -0.532       .  -0.532      .     .       .
##                      LOWCAL+AER/RES2 vs NCI  0    0  -1.214       .  -1.214      .     .       .
##              LOWCAL+AER/RES2 vs PHYTO/PLANT  0    0  -0.517       .  -0.517      .     .       .
##                      LOWCAL+AER/RES2 vs RES  0    0  -0.707       .  -0.707      .     .       .
##                       LOWCAL+AER/RES2 vs SC  1 0.88  -0.573  -1.220   4.277 -5.497 -1.66  0.0974
##          LOWCAL+LOWFAT vs LOWCAL+LOWFAT+AER  0    0   3.797       .   3.797      .     .       .
##         LOWCAL+LOWFAT vs LOWCAL+LOWFAT+AER2  0    0   3.074       .   3.074      .     .       .
##                    LOWCAL+LOWFAT vs LOWCARB  0    0  -0.486       .  -0.486      .     .       .
##                LOWCAL+LOWFAT vs LOWCARB+AER  0    0  10.647       .  10.647      .     .       .
##                     LOWCAL+LOWFAT vs LOWFAT  0    0  -0.086       .  -0.086      .     .       .
##       LOWCAL+LOWFAT vs LOWFAT/PHYTO+AER/RES  0    0   0.134       .   0.134      .     .       .
##                 LOWCAL+LOWFAT vs LOWFAT+AER  0    0   0.015       .   0.015      .     .       .
##               LOWCAL+LOWFAT vs LOWFAT+PHYTO  0    0  -0.582       .  -0.582      .     .       .
##                      LOWCAL+LOWFAT vs MEDIT  0    0  -0.209       .  -0.209      .     .       .
##                  LOWCAL+LOWFAT vs MEDIT+AER  0    0   0.088       .   0.088      .     .       .
##                        LOWCAL+LOWFAT vs NCI  0    0  -0.594       .  -0.594      .     .       .
##                LOWCAL+LOWFAT vs PHYTO/PLANT  0    0   0.103       .   0.103      .     .       .
##                        LOWCAL+LOWFAT vs RES  0    0  -0.087       .  -0.087      .     .       .
##                         LOWCAL+LOWFAT vs SC  1 1.00   0.047   0.047       .      .     .       .
##     LOWCAL+LOWFAT+AER vs LOWCAL+LOWFAT+AER2  1 0.89  -0.723  -0.800  -0.115 -0.685 -0.20  0.8421
##                LOWCAL+LOWFAT+AER vs LOWCARB  0    0  -4.283       .  -4.283      .     .       .
##            LOWCAL+LOWFAT+AER vs LOWCARB+AER  0    0   6.850       .   6.850      .     .       .
##                 LOWCAL+LOWFAT+AER vs LOWFAT  0    0  -3.883       .  -3.883      .     .       .
##   LOWCAL+LOWFAT+AER vs LOWFAT/PHYTO+AER/RES  0    0  -3.663       .  -3.663      .     .       .
##             LOWCAL+LOWFAT+AER vs LOWFAT+AER  0    0  -3.782       .  -3.782      .     .       .
##           LOWCAL+LOWFAT+AER vs LOWFAT+PHYTO  0    0  -4.379       .  -4.379      .     .       .
##                  LOWCAL+LOWFAT+AER vs MEDIT  0    0  -4.006       .  -4.006      .     .       .
##              LOWCAL+LOWFAT+AER vs MEDIT+AER  0    0  -3.709       .  -3.709      .     .       .
##                    LOWCAL+LOWFAT+AER vs NCI  0    0  -4.391       .  -4.391      .     .       .
##            LOWCAL+LOWFAT+AER vs PHYTO/PLANT  0    0  -3.693       .  -3.693      .     .       .
##                    LOWCAL+LOWFAT+AER vs RES  0    0  -3.884       .  -3.884      .     .       .
##                     LOWCAL+LOWFAT+AER vs SC  2 1.00  -3.750  -3.750       .      .     .       .
##               LOWCAL+LOWFAT+AER2 vs LOWCARB  0    0  -3.560       .  -3.560      .     .       .
##           LOWCAL+LOWFAT+AER2 vs LOWCARB+AER  0    0   7.572       .   7.572      .     .       .
##                LOWCAL+LOWFAT+AER2 vs LOWFAT  0    0  -3.160       .  -3.160      .     .       .
##  LOWCAL+LOWFAT+AER2 vs LOWFAT/PHYTO+AER/RES  0    0  -2.941       .  -2.941      .     .       .
##            LOWCAL+LOWFAT+AER2 vs LOWFAT+AER  0    0  -3.059       .  -3.059      .     .       .
##          LOWCAL+LOWFAT+AER2 vs LOWFAT+PHYTO  0    0  -3.656       .  -3.656      .     .       .
##                 LOWCAL+LOWFAT+AER2 vs MEDIT  0    0  -3.283       .  -3.283      .     .       .
##             LOWCAL+LOWFAT+AER2 vs MEDIT+AER  0    0  -2.986       .  -2.986      .     .       .
##                   LOWCAL+LOWFAT+AER2 vs NCI  0    0  -3.668       .  -3.668      .     .       .
##           LOWCAL+LOWFAT+AER2 vs PHYTO/PLANT  0    0  -2.971       .  -2.971      .     .       .
##                   LOWCAL+LOWFAT+AER2 vs RES  0    0  -3.161       .  -3.161      .     .       .
##                    LOWCAL+LOWFAT+AER2 vs SC  1 0.90  -3.028  -3.100  -2.388 -0.712 -0.20  0.8421
##                      LOWCARB vs LOWCARB+AER  0    0  11.133       .  11.133      .     .       .
##                           LOWCARB vs LOWFAT  1 1.00   0.400   0.400       .      .     .       .
##             LOWCARB vs LOWFAT/PHYTO+AER/RES  0    0   0.620       .   0.620      .     .       .
##                       LOWCARB vs LOWFAT+AER  0    0   0.501       .   0.501      .     .       .
##                     LOWCARB vs LOWFAT+PHYTO  0    0  -0.096       .  -0.096      .     .       .
##                            LOWCARB vs MEDIT  0    0   0.277       .   0.277      .     .       .
##                        LOWCARB vs MEDIT+AER  0    0   0.574       .   0.574      .     .       .
##                              LOWCARB vs NCI  0    0  -0.108       .  -0.108      .     .       .
##                      LOWCARB vs PHYTO/PLANT  0    0   0.590       .   0.590      .     .       .
##                              LOWCARB vs RES  0    0   0.399       .   0.399      .     .       .
##                               LOWCARB vs SC  0    0   0.533       .   0.533      .     .       .
##                       LOWCARB+AER vs LOWFAT  0    0 -10.733       . -10.733      .     .       .
##         LOWCARB+AER vs LOWFAT/PHYTO+AER/RES  0    0 -10.513       . -10.513      .     .       .
##                   LOWCARB+AER vs LOWFAT+AER  0    0 -10.632       . -10.632      .     .       .
##                 LOWCARB+AER vs LOWFAT+PHYTO  0    0 -11.229       . -11.229      .     .       .
##                        LOWCARB+AER vs MEDIT  0    0 -10.856       . -10.856      .     .       .
##                    LOWCARB+AER vs MEDIT+AER  0    0 -10.558       . -10.558      .     .       .
##                          LOWCARB+AER vs NCI  0    0 -11.241       . -11.241      .     .       .
##                  LOWCARB+AER vs PHYTO/PLANT  0    0 -10.543       . -10.543      .     .       .
##                          LOWCARB+AER vs RES  0    0 -10.733       . -10.733      .     .       .
##                           LOWCARB+AER vs SC  1 1.00 -10.600 -10.600       .      .     .       .
##              LOWFAT vs LOWFAT/PHYTO+AER/RES  0    0   0.220       .   0.220      .     .       .
##                        LOWFAT vs LOWFAT+AER  0    0   0.101       .   0.101      .     .       .
##                      LOWFAT vs LOWFAT+PHYTO  0    0  -0.496       .  -0.496      .     .       .
##                             LOWFAT vs MEDIT  1 0.03  -0.123   0.260  -0.134  0.394  0.27  0.7887
##                         LOWFAT vs MEDIT+AER  0    0   0.174       .   0.174      .     .       .
##                               LOWFAT vs NCI  0    0  -0.508       .  -0.508      .     .       .
##                       LOWFAT vs PHYTO/PLANT  0    0   0.190       .   0.190      .     .       .
##                               LOWFAT vs RES  0    0  -0.001       .  -0.001      .     .       .
##                                LOWFAT vs SC  3 1.00   0.133   0.132   1.709 -1.577 -0.75  0.4562
##          LOWFAT/PHYTO+AER/RES vs LOWFAT+AER  0    0  -0.119       .  -0.119      .     .       .
##        LOWFAT/PHYTO+AER/RES vs LOWFAT+PHYTO  0    0  -0.716       .  -0.716      .     .       .
##               LOWFAT/PHYTO+AER/RES vs MEDIT  0    0  -0.343       .  -0.343      .     .       .
##           LOWFAT/PHYTO+AER/RES vs MEDIT+AER  0    0  -0.046       .  -0.046      .     .       .
##                 LOWFAT/PHYTO+AER/RES vs NCI  0    0  -0.728       .  -0.728      .     .       .
##         LOWFAT/PHYTO+AER/RES vs PHYTO/PLANT  0    0  -0.030       .  -0.030      .     .       .
##                 LOWFAT/PHYTO+AER/RES vs RES  0    0  -0.221       .  -0.221      .     .       .
##                  LOWFAT/PHYTO+AER/RES vs SC  3 0.98  -0.087  -0.092   0.100 -0.191 -0.27  0.7860
##                  LOWFAT+AER vs LOWFAT+PHYTO  0    0  -0.597       .  -0.597      .     .       .
##                         LOWFAT+AER vs MEDIT  0    0  -0.224       .  -0.224      .     .       .
##                     LOWFAT+AER vs MEDIT+AER  0    0   0.073       .   0.073      .     .       .
##                           LOWFAT+AER vs NCI  0    0  -0.609       .  -0.609      .     .       .
##                   LOWFAT+AER vs PHYTO/PLANT  0    0   0.088       .   0.088      .     .       .
##                           LOWFAT+AER vs RES  0    0  -0.102       .  -0.102      .     .       .
##                            LOWFAT+AER vs SC  5 1.00   0.032   0.032       .      .     .       .
##                       LOWFAT+PHYTO vs MEDIT  0    0   0.373       .   0.373      .     .       .
##                   LOWFAT+PHYTO vs MEDIT+AER  0    0   0.670       .   0.670      .     .       .
##                         LOWFAT+PHYTO vs NCI  1 1.00  -0.012  -0.011  -2.011  2.001  1.02  0.3088
##                 LOWFAT+PHYTO vs PHYTO/PLANT  0    0   0.685       .   0.685      .     .       .
##                         LOWFAT+PHYTO vs RES  0    0   0.495       .   0.495      .     .       .
##                          LOWFAT+PHYTO vs SC  1 0.14   0.629  -1.100   0.901 -2.001 -1.02  0.3088
##                          MEDIT vs MEDIT+AER  0    0   0.297       .   0.297      .     .       .
##                                MEDIT vs NCI  0    0  -0.385       .  -0.385      .     .       .
##                        MEDIT vs PHYTO/PLANT  0    0   0.312       .   0.312      .     .       .
##                                MEDIT vs RES  0    0   0.122       .   0.122      .     .       .
##                                 MEDIT vs SC  3 0.99   0.256   0.229   4.427 -4.198 -1.43  0.1536
##                            MEDIT+AER vs NCI  0    0  -0.682       .  -0.682      .     .       .
##                    MEDIT+AER vs PHYTO/PLANT  0    0   0.015       .   0.015      .     .       .
##                            MEDIT+AER vs RES  0    0  -0.175       .  -0.175      .     .       .
##                             MEDIT+AER vs SC  1 1.00  -0.042  -0.042       .      .     .       .
##                          NCI vs PHYTO/PLANT  1 0.90   0.697   0.900  -1.101  2.001  1.02  0.3088
##                                  NCI vs RES  0    0   0.507       .   0.507      .     .       .
##                                   NCI vs SC  0    0   0.641       .   0.641      .     .       .
##                          PHYTO/PLANT vs RES  0    0  -0.190       .  -0.190      .     .       .
##                           PHYTO/PLANT vs SC  1 0.97  -0.057   0.011  -1.989  2.001  1.02  0.3088
##                                   RES vs SC  5 0.99   0.133   0.132   0.408 -0.276 -0.23  0.8201
## 
## Legend:
##  comparison - Treatment comparison
##  k          - Number of studies providing direct evidence
##  prop       - Direct evidence proportion
##  nma        - Estimated treatment effect (MD) in network meta-analysis
##  direct     - Estimated treatment effect (MD) derived from direct evidence
##  indir.     - Estimated treatment effect (MD) derived from indirect evidence
##  Diff       - Difference between direct and indirect treatment estimates
##  z          - z-value of test for disagreement (direct versus indirect)
##  p-value    - p-value of test for disagreement (direct versus indirect)

p < 0.05 であると、非一貫である。

2.3.5 Ranking

P-スコアによるランク表を作成する。ダイエット目的のためは、低い方が良い small.values = "good

netrank(netmetaLeV, small.values = "bad")
##                      P-score
## NCI                   0.8456
## LOWFAT+PHYTO          0.8337
## MEDIT                 0.7933
## LOWFAT                0.7550
## RES                   0.7503
## LOWCARB               0.7094
## LOWFAT+AER            0.6503
## LOWCAL+LOWFAT         0.6386
## SC                    0.6187
## MEDIT+AER             0.6031
## PHYTO/PLANT           0.5869
## AER+RES               0.5665
## LOWFAT/PHYTO+AER/RES  0.5432
## AER                   0.4664
## LOWCAL+AER/RES2       0.4543
## AER2                  0.3907
## LOWCAL+AER/RES        0.2622
## LOWCAL+AER            0.2212
## LOWCAL                0.1366
## LOWCAL+LOWFAT+AER2    0.1088
## LOWCAL+LOWFAT+AER     0.0654
## LOWCARB+AER           0.0001

2.3.6 Forest plot

フォレストプロットを描く。参照は SC とする。

library(netmeta)
library(metafor)
metafor::forest(netmetaLeV, 
       reference.group = "SC",
       sortvar = TE,
       xlim = c(-10, 2),
       smlab = "Other treatments vs. SC",
       drop.reference.group = FALSE,
       label.left = "Favors Alternative",
       label.right = "Favors SC")

netheat(netmetaLeV)

2.4 gemtc ベイズ

{gemtc} を使う場合には、4つの決まった列(study, mean, std.err, treatment)を持つデータフレームをあらかじめ準備する必要がある。

library(data.table)
library(gemtc)
dfGemtc <- data.table(
        study = df$Study,
        mean = df$Diff,
        std.err = df$StdErr,
        treatment = df$Treatment,
        description = df$Treatment,
        group = df$group)

treatment では + や - など記号はダメらしい。許されているのは _ だけなので、置換する。

dfGemtc$treatment <- gsub("\\+", "_", dfGemtc$treatment)
dfGemtc$treatment <- gsub("\\-", "_", dfGemtc$treatment)
dfGemtc$treatment <- gsub("\\/", "_", dfGemtc$treatment)

2.4.1 Network plot

library(gemtc)
mtcNetwork <- mtc.network(data.ab  = dfGemtc)
summary(mtcNetwork)
## $Description
## [1] "MTC dataset: Network"
## 
## $`Studies per treatment`
##                  AER              AER_RES                 AER2 
##                   15                   15                    4 
##               LOWCAL           LOWCAL_AER       LOWCAL_AER_RES 
##                    2                    5                    5 
##      LOWCAL_AER_RES2        LOWCAL_LOWFAT    LOWCAL_LOWFAT_AER 
##                    1                    1                    2 
##   LOWCAL_LOWFAT_AER2              LOWCARB          LOWCARB_AER 
##                    1                    1                    1 
##               LOWFAT           LOWFAT_AER         LOWFAT_PHYTO 
##                    4                    5                    2 
## LOWFAT_PHYTO_AER_RES                MEDIT            MEDIT_AER 
##                    3                    3                    1 
##                  NCI          PHYTO_PLANT                  RES 
##                    2                    2                    5 
##                   SC 
##                   63 
## 
## $`Number of n-arm studies`
## 2-arm 3-arm 
##    55    11 
## 
## $`Studies per treatment comparison`
##                      t1                   t2 nr
## 1                   AER              AER_RES  1
## 2                   AER                 AER2  4
## 3                   AER                  RES  1
## 4                   AER                   SC 15
## 5               AER_RES LOWFAT_PHYTO_AER_RES  1
## 6               AER_RES                   SC 15
## 7                  AER2                   SC  4
## 8                LOWCAL               LOWFAT  1
## 9                LOWCAL                   SC  2
## 10           LOWCAL_AER                   SC  5
## 11       LOWCAL_AER_RES      LOWCAL_AER_RES2  1
## 12       LOWCAL_AER_RES                   SC  5
## 13      LOWCAL_AER_RES2                   SC  1
## 14        LOWCAL_LOWFAT                   SC  1
## 15    LOWCAL_LOWFAT_AER   LOWCAL_LOWFAT_AER2  1
## 16    LOWCAL_LOWFAT_AER                   SC  2
## 17   LOWCAL_LOWFAT_AER2                   SC  1
## 18              LOWCARB               LOWFAT  1
## 19          LOWCARB_AER                   SC  1
## 20               LOWFAT                MEDIT  1
## 21               LOWFAT                   SC  3
## 22           LOWFAT_AER                   SC  5
## 23         LOWFAT_PHYTO                  NCI  1
## 24         LOWFAT_PHYTO                   SC  1
## 25 LOWFAT_PHYTO_AER_RES                   SC  3
## 26                MEDIT                   SC  3
## 27            MEDIT_AER                   SC  1
## 28                  NCI          PHYTO_PLANT  1
## 29          PHYTO_PLANT                   SC  1
## 30                  RES                   SC  5

線の太さは調査中。

plot(mtcNetwork, 
     use.description = TRUE,
     vertex.size = 10,
     edge.width = 100)

2.4.2 モデル作成

モデルを作成する。

mtcModelFixed <- mtc.model(mtcNetwork, likelihood = "normal", linearModel="fixed", n.chain=4)
mtcModelRandom <- mtc.model(mtcNetwork, likelihood = "normal", linearModel="random", n.chain=4)

2.4.3 モデル実行

mtcResFixed <- mtc.run(mtcModelFixed, n.adapt=5000, n.iter=10000, thin=10)
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 143
##    Unobserved stochastic nodes: 87
##    Total graph size: 2050
## 
## Initializing model
summary(mtcResFixed)
## 
## Results on the Mean Difference scale
## 
## Iterations = 10:10000
## Thinning interval = 10 
## Number of chains = 4 
## Sample size per chain = 1000 
## 
## 1. Empirical mean and standard deviation for each variable,
##    plus standard error of the mean:
## 
##                                Mean      SD  Naive SE Time-series SE
## d.LOWFAT_PHYTO.NCI          0.01184 0.05149 0.0008141      0.0008132
## d.LOWFAT.LOWCARB            0.37575 1.57673 0.0249303      0.0249322
## d.SC.AER                   -0.20339 0.13889 0.0021961      0.0021694
## d.SC.AER_RES               -0.06253 0.12467 0.0019712      0.0020128
## d.SC.AER2                  -0.39245 0.23933 0.0037842      0.0037332
## d.SC.LOWCAL                -2.39185 0.77987 0.0123308      0.0126270
## d.SC.LOWCAL_AER            -1.22174 0.35079 0.0055465      0.0054476
## d.SC.LOWCAL_AER_RES        -0.93057 0.28185 0.0044565      0.0043753
## d.SC.LOWCAL_AER_RES2       -0.56561 1.05430 0.0166700      0.0165211
## d.SC.LOWCAL_LOWFAT          0.03242 0.66975 0.0105896      0.0109661
## d.SC.LOWCAL_LOWFAT_AER     -3.74035 0.78362 0.0123901      0.0123945
## d.SC.LOWCAL_LOWFAT_AER2    -3.03893 1.07874 0.0170564      0.0170540
## d.SC.LOWCARB_AER          -10.56979 2.23603 0.0353548      0.0376567
## d.SC.LOWFAT                 0.13351 0.06253 0.0009887      0.0009743
## d.SC.LOWFAT_AER             0.02739 0.18714 0.0029589      0.0029006
## d.SC.LOWFAT_PHYTO           0.61617 0.67400 0.0106569      0.0108093
## d.SC.LOWFAT_PHYTO_AER_RES  -0.08821 0.10990 0.0017376      0.0016981
## d.SC.MEDIT                  0.25562 0.23271 0.0036795      0.0036418
## d.SC.MEDIT_AER             -0.04250 0.44750 0.0070756      0.0069895
## d.SC.PHYTO_PLANT           -0.06628 0.35286 0.0055792      0.0055385
## d.SC.RES                    0.13442 0.08641 0.0013663      0.0013018
## 
## 2. Quantiles for each variable:
## 
##                                2.5%       25%       50%      75%    97.5%
## d.LOWFAT_PHYTO.NCI         -0.08835  -0.02306   0.01152  0.04573  0.11536
## d.LOWFAT.LOWCARB           -2.71178  -0.67066   0.37745  1.41400  3.44765
## d.SC.AER                   -0.48393  -0.29613  -0.19885 -0.11144  0.06150
## d.SC.AER_RES               -0.30554  -0.14389  -0.06369  0.02082  0.18198
## d.SC.AER2                  -0.84994  -0.55336  -0.39668 -0.23595  0.07394
## d.SC.LOWCAL                -3.92108  -2.90730  -2.38965 -1.86907 -0.91452
## d.SC.LOWCAL_AER            -1.90757  -1.45431  -1.21851 -0.99045 -0.55214
## d.SC.LOWCAL_AER_RES        -1.47123  -1.12064  -0.92881 -0.74111 -0.37768
## d.SC.LOWCAL_AER_RES2       -2.60848  -1.28880  -0.54549  0.12962  1.51885
## d.SC.LOWCAL_LOWFAT         -1.26066  -0.41796   0.02256  0.47910  1.36938
## d.SC.LOWCAL_LOWFAT_AER     -5.21858  -4.26806  -3.74662 -3.21792 -2.24841
## d.SC.LOWCAL_LOWFAT_AER2    -5.15455  -3.77357  -3.02928 -2.33329 -0.93459
## d.SC.LOWCARB_AER          -14.87484 -12.03606 -10.54932 -9.10729 -6.34106
## d.SC.LOWFAT                 0.01823   0.09537   0.13174  0.17133  0.24615
## d.SC.LOWFAT_AER            -0.32088  -0.10156   0.02950  0.15201  0.38449
## d.SC.LOWFAT_PHYTO          -0.70450   0.16541   0.60412  1.06239  1.95072
## d.SC.LOWFAT_PHYTO_AER_RES  -0.30876  -0.16113  -0.08794 -0.01649  0.12794
## d.SC.MEDIT                 -0.20691   0.10135   0.25392  0.41116  0.72290
## d.SC.MEDIT_AER             -0.93457  -0.34404  -0.04964  0.25289  0.84271
## d.SC.PHYTO_PLANT           -0.78254  -0.30630  -0.06296  0.16908  0.63622
## d.SC.RES                   -0.03939   0.07485   0.13545  0.19406  0.30074
## 
## -- Model fit (residual deviance):
## 
##      Dbar        pD       DIC 
## 266.72953  87.62463 354.35416 
## 
## 143 data points, ratio 1.865, I^2 = 47%
mtcResRandom <- mtc.run(mtcModelRandom, n.adapt=5000, n.iter=10000, thin=10)
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 143
##    Unobserved stochastic nodes: 165
##    Total graph size: 2287
## 
## Initializing model
summary(mtcResRandom)
## 
## Results on the Mean Difference scale
## 
## Iterations = 5010:15000
## Thinning interval = 10 
## Number of chains = 4 
## Sample size per chain = 1000 
## 
## 1. Empirical mean and standard deviation for each variable,
##    plus standard error of the mean:
## 
##                                Mean     SD Naive SE Time-series SE
## d.LOWFAT_PHYTO.NCI          0.25700 0.9371 0.014817       0.015598
## d.LOWFAT.LOWCARB            0.41990 1.8362 0.029033       0.030211
## d.SC.AER                   -0.37590 0.3122 0.004937       0.005029
## d.SC.AER_RES               -0.28127 0.3151 0.004981       0.004821
## d.SC.AER2                  -0.76719 0.5640 0.008917       0.009206
## d.SC.LOWCAL                -2.91999 1.1786 0.018635       0.020043
## d.SC.LOWCAL_AER            -1.53641 0.5824 0.009209       0.009107
## d.SC.LOWCAL_AER_RES        -1.16902 0.5654 0.008940       0.009168
## d.SC.LOWCAL_AER_RES2       -0.56959 1.3940 0.022042       0.021852
## d.SC.LOWCAL_LOWFAT          0.01427 1.2088 0.019113       0.019118
## d.SC.LOWCAL_LOWFAT_AER     -3.74887 1.0382 0.016415       0.016505
## d.SC.LOWCAL_LOWFAT_AER2    -3.05220 1.4565 0.023029       0.022762
## d.SC.LOWCARB_AER          -10.57754 2.3427 0.037042       0.049127
## d.SC.LOWFAT                -0.77241 0.7145 0.011297       0.011494
## d.SC.LOWFAT_AER            -0.56573 0.5181 0.008192       0.008195
## d.SC.LOWFAT_PHYTO           0.04207 1.4104 0.022301       0.024682
## d.SC.LOWFAT_PHYTO_AER_RES  -0.31857 0.5884 0.009303       0.009196
## d.SC.MEDIT                 -0.05068 0.7014 0.011091       0.011093
## d.SC.MEDIT_AER             -0.04492 1.1263 0.017809       0.018228
## d.SC.PHYTO_PLANT           -0.26464 0.9862 0.015593       0.015595
## d.SC.RES                    0.19442 0.4941 0.007813       0.007814
## sd.d                        1.00163 0.1636 0.002586       0.003300
## 
## 2. Quantiles for each variable:
## 
##                               2.5%      25%       50%      75%    97.5%
## d.LOWFAT_PHYTO.NCI         -1.5759  -0.3730   0.25625  0.88446  2.08536
## d.LOWFAT.LOWCARB           -3.1927  -0.8132   0.41240  1.66227  4.04420
## d.SC.AER                   -0.9938  -0.5737  -0.37675 -0.17159  0.24634
## d.SC.AER_RES               -0.9004  -0.4857  -0.28574 -0.07434  0.35134
## d.SC.AER2                  -1.9037  -1.1359  -0.76474 -0.39578  0.36476
## d.SC.LOWCAL                -5.2499  -3.7024  -2.90951 -2.11722 -0.61468
## d.SC.LOWCAL_AER            -2.6831  -1.9350  -1.53928 -1.14204 -0.40561
## d.SC.LOWCAL_AER_RES        -2.2790  -1.5347  -1.17020 -0.80005 -0.06168
## d.SC.LOWCAL_AER_RES2       -3.3105  -1.4873  -0.55853  0.37493  2.21778
## d.SC.LOWCAL_LOWFAT         -2.4450  -0.7681   0.03449  0.81012  2.38405
## d.SC.LOWCAL_LOWFAT_AER     -5.7964  -4.4380  -3.73896 -3.03847 -1.73100
## d.SC.LOWCAL_LOWFAT_AER2    -5.9241  -3.9994  -3.06288 -2.07883 -0.20416
## d.SC.LOWCARB_AER          -15.1403 -12.1589 -10.58009 -9.04338 -6.10325
## d.SC.LOWFAT                -2.2056  -1.2396  -0.76138 -0.28550  0.59919
## d.SC.LOWFAT_AER            -1.6020  -0.8995  -0.56080 -0.21956  0.42306
## d.SC.LOWFAT_PHYTO          -2.7614  -0.8891   0.05689  0.98351  2.71592
## d.SC.LOWFAT_PHYTO_AER_RES  -1.4800  -0.6997  -0.31307  0.05626  0.84134
## d.SC.MEDIT                 -1.4973  -0.5149  -0.01339  0.41399  1.28791
## d.SC.MEDIT_AER             -2.2303  -0.8049  -0.05287  0.70126  2.24581
## d.SC.PHYTO_PLANT           -2.2805  -0.9138  -0.24440  0.40566  1.59774
## d.SC.RES                   -0.8013  -0.1207   0.19522  0.51366  1.19799
## sd.d                        0.7085   0.8875   0.99144  1.10656  1.34923
## 
## -- Model fit (residual deviance):
## 
##     Dbar       pD      DIC 
## 149.6516 125.0159 274.6675 
## 
## 143 data points, ratio 1.047, I^2 = 5%

2.4.4 収束の評価

plot(mtcResFixed)
plot(mtcResRandom)
gelman.diag(mtcResFixed)$mpsrf
gelman.diag(mtcResRandom)$mpsrf

より 1 に近いランダム効果を使う。

2.4.5 適合度の評価

mtc.levplot(mtc.deviance(mtcResRandom))

2.4.6 一貫性の評価

nodesplit <- mtc.nodesplit(mtcNetwork, 
                           linearModel = "random", 
                           likelihood = "normal",
                           link = "identity",
                           n.adapt = 5000, 
                           n.iter = 1e5, 
                           thin = 10)
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 142
##    Unobserved stochastic nodes: 165
##    Total graph size: 3343
## 
## Initializing model
## 
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 142
##    Unobserved stochastic nodes: 165
##    Total graph size: 3345
## 
## Initializing model
## 
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 142
##    Unobserved stochastic nodes: 165
##    Total graph size: 3343
## 
## Initializing model
## 
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 142
##    Unobserved stochastic nodes: 165
##    Total graph size: 3343
## 
## Initializing model
## 
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 142
##    Unobserved stochastic nodes: 165
##    Total graph size: 3343
## 
## Initializing model
## 
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 143
##    Unobserved stochastic nodes: 166
##    Total graph size: 3358
## 
## Initializing model
## 
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 143
##    Unobserved stochastic nodes: 166
##    Total graph size: 3359
## 
## Initializing model
## 
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 143
##    Unobserved stochastic nodes: 166
##    Total graph size: 3358
## 
## Initializing model
## 
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 143
##    Unobserved stochastic nodes: 166
##    Total graph size: 3359
## 
## Initializing model
## 
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 143
##    Unobserved stochastic nodes: 165
##    Total graph size: 2287
## 
## Initializing model
plot(summary(nodesplit))

2.4.7 Ranking

rank <- rank.probability(mtcResRandom, preferredDirection = -1)
plot(rank, beside=TRUE)

LOWCARB/AER が最もよい。そう判断する根拠は、一番左の棒(1位を表す)が最も大きいため。

library(dmetar)
dmetar::sucra(rank, lower.is.better = FALSE)
##                          SUCRA
## LOWCARB_AER          0.9995119
## LOWCAL_LOWFAT_AER    0.9134762
## LOWCAL               0.8519524
## LOWCAL_LOWFAT_AER2   0.8427381
## LOWCAL_AER           0.7226071
## LOWCAL_AER_RES       0.6486190
## AER2                 0.5399048
## LOWFAT               0.5263214
## LOWFAT_AER           0.4739167
## LOWCAL_AER_RES2      0.4567738
## LOWCARB              0.4155833
## AER                  0.4155714
## LOWFAT_PHYTO_AER_RES 0.3943333
## PHYTO_PLANT          0.3860357
## AER_RES              0.3778810
## MEDIT_AER            0.3348571
## LOWFAT_PHYTO         0.3289167
## LOWCAL_LOWFAT        0.3218214
## MEDIT                0.3076667
## NCI                  0.2626429
## SC                   0.2568452
## RES                  0.2220238

2.4.8 Forest plot

最後に、フォレストプロットを生成する。

gemtc::forest(relative.effect(mtcResRandom, t1 = "SC"), 
       use.description = TRUE, # Use long treatment names
       xlim = c(-10, 5))

2.5 BUGSnet ベイズ

2.5.1 データ

BUGSnet を用いてネットワークメタ分析を行う。途中エラーが出ないため、disconnected でも分析を行うようである。これはよくないかもしれない。

df$SD <- df$StdErr * sqrt(df$N)
library(BUGSnet)
myBUGObject <- data.prep(arm.data = df,
                     varname.t = "Treatment",
                     varname.s = "Study")

2.5.2 要約

myBUGNetwork <- net.tab(data = myBUGObject,
                        outcome = "Diff",
                        N = "N", 
                        type.outcome = "continuous",
                        time = NULL)
myBUGNetwork$intervention
## # A tibble: 22 × 6
##    Treatment          n.studies n.patients min.outcome max.outcome av.outcome
##    <chr>                  <int>      <int>       <dbl>       <dbl>      <dbl>
##  1 AER                       15        729      -2         1.2          0.176
##  2 AER+RES                   15        739      -3.69      3.6          0.289
##  3 AER2                       4        162      -1.4       0.00866     -0.465
##  4 LOWCAL                     2         27      -4        -2.7         -3.61 
##  5 LOWCAL+AER                 5        285     -12.2       0.301       -5.73 
##  6 LOWCAL+AER/RES             5        128      -3.77      0.640       -1.93 
##  7 LOWCAL+AER/RES2            1         23      -2.09     -2.09        -2.09 
##  8 LOWCAL+LOWFAT              1         20       0.131     0.131        0.131
##  9 LOWCAL+LOWFAT+AER          2         78      -5.6      -4.7         -5.08 
## 10 LOWCAL+LOWFAT+AER2         1         34      -4.8      -4.8         -4.8  
## # … with 12 more rows

2.5.3 Network plot

ラベルの順は、AER から反時計回り。最後は SC。

これは、Console で実行すると Plots に表示され、PNG や PDF で保存することができる。なお、このコードだけ実行してもうまくいかない。このファイル内の前のコードも実行する必要がある。

線が細い場合は edge.scale を大きくする。丸が小さい場合は、node.scale を大きくする。

net.plot(myBUGObject, 
  label.offset1 = c(5,5,5,10,5,10,5,5,5,10,5,0,5,0,5,5,5,5,5,5,5,0),
  node.scale = 1, 
  edge.scale=2)

label.offset1 で、外側にずらすことができる。順序は、Combination から反時計回り。

2.5.4 モデル作成

主要な統計分析を行う。

BugsModelFixed <- nma.model(data=myBUGObject,
                     outcome="Diff",
                     sd = "SD",
                     N="N",
                     reference="SC",
                     family="normal",
                     link = "identity",
                     effects="fixed")

BugsModelRandom <- nma.model(data=myBUGObject,
                     outcome="Diff",
                     sd = "SD",
                     N="N",
                     reference="SC",
                     family="normal",
                     link = "identity",
                     effects="random")

2.5.5 モデル実行

set.seed(20190829)
BugsResFixed <- nma.run(BugsModelFixed,
                           n.adapt=1000,
                           n.burnin=1000,
                           n.iter=10000)
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 143
##    Unobserved stochastic nodes: 87
##    Total graph size: 1436
## 
## Initializing model
BugsResRandom <- nma.run(BugsModelRandom,
                           n.adapt=1000,
                           n.burnin=1000,
                           n.iter=10000)
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 143
##    Unobserved stochastic nodes: 165
##    Total graph size: 1622
## 
## Initializing model

2.5.6 収束の評価

nma.diag(BugsResFixed)

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## $gelman.rubin
## $psrf
##       Point est. Upper C.I.
## d[2]    1.000855   1.003279
## d[3]    1.000131   1.000250
## d[4]    1.000146   1.000710
## d[5]    1.000297   1.001237
## d[6]    1.000327   1.001390
## d[7]    1.000206   1.000972
## d[8]    1.000147   1.000200
## d[9]    1.000541   1.002068
## d[10]   1.000584   1.002178
## d[11]   1.000034   1.000244
## d[12]   1.000179   1.000665
## d[13]   1.000463   1.001734
## d[14]   1.000005   1.000043
## d[15]   1.000671   1.002433
## d[16]   1.001382   1.004899
## d[17]   1.037845   1.095484
## d[18]   1.000219   1.000365
## d[19]   1.000487   1.001989
## d[20]   1.037620   1.094587
## d[21]   1.001993   1.006094
## d[22]   1.000106   1.000599
## 
## $mpsrf
## [1] 1.018203
## 
## attr(,"class")
## [1] "gelman.rubin.results"
## 
## $geweke
## $stats
##           Chain 1     Chain 2    Chain 3
## d[2]  -1.22793886  0.84507427  0.1748677
## d[3]  -0.19974493 -0.16148999 -0.4834795
## d[4]   0.15610742  0.09378271  0.7326202
## d[5]   3.37533962 -0.16656331  1.3612966
## d[6]  -0.19221998  0.30668316 -0.2580536
## d[7]   0.67264434 -0.46392214 -1.0775495
## d[8]   0.18965524 -0.35625297  0.3693987
## d[9]  -1.52267675  0.08757218 -0.2973917
## d[10]  0.27428249  1.51828735 -0.1837647
## d[11] -0.08355538  2.30596737  0.1927937
## d[12] -0.78334912  0.02445912 -0.5177188
## d[13] -0.56074273  1.21301400  1.1559579
## d[14] -1.63477305 -2.47980856 -0.2468580
## d[15]  0.26589271 -0.50098978  0.3023942
## d[16] -1.01085023 -1.18202421  1.6440975
## d[17]  1.62646430  1.74260110 -0.6769758
## d[18]  0.24697207  1.14101249  0.7042523
## d[19] -1.04082982  0.94172555  1.4361752
## d[20]  1.61379626  1.80413198 -0.6923763
## d[21]  4.18218071  4.28623520 -1.1254334
## d[22] -0.27936584  1.06191208  0.6665324
## 
## $frac1
## [1] 0.1
## 
## $frac2
## [1] 0.5
## 
## attr(,"class")
## [1] "geweke.results"
nma.diag(BugsResRandom)

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## Press [ENTER] to continue plotting trace plots (or type 'stop' to end plotting)>

## $gelman.rubin
## $psrf
##       Point est. Upper C.I.
## d[2]    1.000883   1.003166
## d[3]    1.000039   1.000081
## d[4]    1.000308   1.001221
## d[5]    1.001876   1.005977
## d[6]    1.000034   1.000295
## d[7]    1.000513   1.001914
## d[8]    1.001541   1.003873
## d[9]    1.000021   1.000295
## d[10]   1.000185   1.000340
## d[11]   1.000433   1.001476
## d[12]   1.000298   1.000351
## d[13]   1.000814   1.002194
## d[14]   1.001970   1.007012
## d[15]   1.000094   1.000258
## d[16]   1.000001   1.000156
## d[17]   1.000795   1.002073
## d[18]   1.000188   1.000682
## d[19]   1.000267   1.000825
## d[20]   1.000524   1.001148
## d[21]   1.000286   1.001210
## d[22]   1.000003   1.000096
## sigma   1.001765   1.004612
## 
## $mpsrf
## [1] 1.004918
## 
## attr(,"class")
## [1] "gelman.rubin.results"
## 
## $geweke
## $stats
##          Chain 1     Chain 2      Chain 3
## d[2]  -1.1387149 -0.32109744 -1.275685835
## d[3]   0.1038653  0.06575749  0.679167788
## d[4]  -1.1137324  0.33926486  0.881586871
## d[5]   0.1756987 -0.61716716 -0.850665096
## d[6]   0.6112799  0.66425924 -0.007816367
## d[7]  -1.0047223 -1.20264462 -0.080682388
## d[8]  -1.3196623 -0.28093493  0.034340874
## d[9]   1.0287735 -0.82265591  0.624435884
## d[10]  0.4389147  1.52071887 -0.508515900
## d[11]  0.4755243 -0.13009136 -0.470537401
## d[12]  0.1826059 -0.04684242 -1.465234264
## d[13]  0.1347647  0.37295187  0.836175124
## d[14] -0.4281452  0.04058775 -0.995622050
## d[15]  0.8228528  0.15189129  0.182046562
## d[16] -1.0368279  0.01679456 -0.153768108
## d[17]  1.0336100 -0.88980011 -0.729133309
## d[18]  1.6938124 -0.08555454  0.827789105
## d[19] -0.1939262  0.98113732  2.229989324
## d[20]  1.2592893 -0.79657844 -1.173656515
## d[21]  1.6266364 -0.32300369 -2.070883282
## d[22] -0.5506279 -1.80055611 -0.226751509
## sigma  1.0449493  0.36177835 -0.495099277
## 
## $frac1
## [1] 0.1
## 
## $frac2
## [1] 0.5
## 
## attr(,"class")
## [1] "geweke.results"

2.5.7 適合度の評価

モデルの適合度を評価する。

par(mfrow = c(1,2))
nma.fit(BugsResFixed, main = "Fixed Effects Model" )
## $DIC
## [1] 353.0021
## 
## $Dres
## [1] 266.0431
## 
## $pD
## [1] 86.95902
## 
## $leverage
##                                                                       
## 1 0.6063229 0.5774828 0.5058759 0.2981493 0.3288017 0.380981 0.8369764
##                                                                               
## 1 0.3530878 0.485577 0.5830936 0.9981901 0.9634338 0.5494841 0.60446 0.3485115
##                                                                               
## 1 0.42866 0.3726717 0.870057 0.6924688 0.3563894 0.5059716 0.9144239 0.4261503
##                                                                               
## 1 0.934877 0.9973525 0.673202 0.632422 0.6007998 0.7723965 0.5863764 0.5168365
##                                                                        
## 1 0.5209857 0.4024556 0.6054808 0.6343793 0.5617729 0.5874121 0.5524987
##                                                                        
## 1 0.3949877 0.2248529 0.5620927 0.4877972 0.7062412 0.3094156 0.9913838
##                                                                       
## 1 0.7370944 0.9899069 0.925073 0.7638499 0.2208911 0.4564475 0.5807863
##                                                                       
## 1 0.6540076 0.6371303 0.4693068 1.008665 0.3044174 0.4933898 0.3681409
##                                                                               
## 1 0.5230902 0.8166216 0.589567 0.622958 0.5721204 0.4799247 1.006973 0.5953724
##                                                                        
## 1 0.5893942 0.7074263 0.7308389 0.4961075 0.6715385 0.3107523 0.6679188
##                                                                        
## 1 0.5184202 0.5889901 0.9862808 0.9626024 0.5665062 0.4712453 0.3765704
##                                                                       
## 1 0.5833293 0.4212035 0.8799119 0.3668009 0.722736 0.5191738 0.1187612
##                                                                       
## 1 0.2892446 0.8648639 1.003892 0.5584683 0.4731381 0.5121417 0.7459201
##                                                                        
## 1 0.5903336 0.5168495 0.5962405 0.6453628 0.5887031 0.4419084 0.4822879
##                                                                        
## 1 0.4509002 0.4907092 0.6400474 0.3896176 0.6025337 0.5736884 0.7002431
##                                                                       
## 1 0.7291264 0.9942646 0.7752378 0.995911 0.9058777 0.7196975 0.5846969
##                                                                               
## 1 0.9643337 0.4990761 0.6755949 0.7052999 0.544982 1.01116 0.4903371 0.5573537
##                                                                        
## 1 0.6350837 0.4829992 0.8218932 0.5952529 0.6830653 0.5994546 0.5648885
##                                                                                
## 1 1.003071 0.2087369 0.3588077 0.4422027 0.9983414 0.6549061 0.4120096 1.006574
##                                         
## 1 0.4950603 0.2392605 0.517518 0.6143665
## 
## $w
##     y.1.1.     y.2.1.     y.3.1.     y.4.1.     y.5.1.     y.6.1.     y.7.1. 
## -1.5185694 -0.8998112 -2.4641635  1.2007086  2.0356752  0.6255535  1.9684874 
##     y.8.1.     y.9.1.    y.10.1.    y.11.1.    y.12.1.    y.13.1.    y.14.1. 
## -0.6430022 -0.8346272 -0.7663473 -1.0064087 -0.9891356 -0.7666993  0.9142090 
##    y.15.1.    y.16.1.    y.17.1.    y.18.1.    y.19.1.    y.20.1.    y.21.1. 
## -0.6208560 -1.4987531 -0.6471575 -1.4443472  1.2402995  0.9961907 -1.0454501 
##    y.22.1.    y.23.1.    y.24.1.    y.25.1.    y.26.1.    y.27.1.    y.28.1. 
##  2.0043327  2.0995421  0.9903597  0.9987105  1.6600655  0.8804338  0.9992386 
##    y.29.1.    y.30.1.    y.31.1.    y.32.1.    y.33.1.    y.34.1.    y.35.1. 
##  0.8851737  1.3935510 -0.7310578 -1.7904929 -0.8732447 -0.9361461  0.8631855 
##    y.36.1.    y.37.1.    y.38.1.    y.39.1.    y.40.1.    y.41.1.    y.42.1. 
## -0.7938284  1.4060940  0.9537340 -0.6555587  2.2839658  2.8653764 -0.7549912 
##    y.43.1.    y.44.1.    y.45.1.    y.46.1.    y.47.1.    y.48.1.    y.49.1. 
## -1.1292098  4.7637243  0.9961052 -0.8635564  0.9949497  0.9674995 -0.9668918 
##    y.50.1.    y.51.1.    y.52.1.    y.53.1.    y.54.1.    y.55.1.    y.56.1. 
##  0.5825195  1.5447196 -0.7622557 -0.8566832 -2.0679218  1.1753375  1.0043245 
##    y.57.1.    y.58.1.    y.59.1.    y.60.1.    y.61.1.    y.62.1.    y.63.1. 
## -0.8073056 -0.9561221 -0.6206575 -0.7970579  0.9048670 -0.7720887 -0.8875381 
##    y.64.1.    y.65.1.    y.66.1.     y.1.2.     y.2.2.     y.3.2.     y.4.2. 
## -0.8647732 -0.6928015  1.0036042  1.5470393  0.8991809  2.0063066 -1.0830079 
##     y.5.2.     y.6.2.     y.7.2.     y.8.2.     y.9.2.    y.10.2.    y.11.2. 
## -1.2301703 -0.8231217 -3.5781522  0.8358592  0.8474290  0.7694108  1.0046956 
##    y.12.2.    y.13.2.    y.14.2.    y.15.2.    y.16.2.    y.17.2.    y.18.2. 
##  0.9908517  0.7763135 -0.8829247 -0.6408750  1.3808477 -0.6815615  1.4629617 
##    y.19.2.    y.20.2.    y.21.2.    y.22.2.    y.23.2.    y.24.2.    y.25.2. 
## -1.4533679 -1.0068393  0.8259930 -5.5631739 -1.1313092 -0.9660314  1.0019449 
##    y.26.2.    y.27.2.    y.28.2.    y.29.2.    y.30.2.    y.31.2.    y.32.2. 
## -1.8386029 -0.8242105 -1.0003858 -0.8710267 -1.3980569  0.7313309  1.6813047 
##    y.33.2.    y.34.2.    y.35.2.    y.36.2.    y.37.2.    y.38.2.    y.39.2. 
##  0.9270478  0.9284811 -0.7751254  0.7470944 -1.5139207 -0.9488553  0.8135922 
##    y.40.2.    y.41.2.    y.42.2.    y.43.2.    y.44.2.    y.45.2.    y.46.2. 
## -1.5699266 -2.7469703  0.8072074  1.1334928 -3.1000469 -0.9973825  0.8847400 
##    y.47.2.    y.48.2.    y.49.2.    y.50.2.    y.51.2.    y.52.2.    y.53.2. 
## -0.9980508 -0.9571194  0.9500470  0.9565518  0.9890999  0.7067587  0.8627482 
##    y.54.2.    y.55.2.    y.56.2.    y.57.2.    y.58.2.    y.59.2.    y.60.2. 
##  1.8678589 -1.1459115  1.0055795 -0.7421597  0.9610192  0.8042575  0.7808863 
##    y.61.2.    y.62.2.    y.63.2.    y.64.2.    y.65.2.    y.66.2.     y.5.3. 
## -0.9077824  0.7755284  0.9037910  0.8815667  0.7517191 -1.0015431 -1.0361175 
##    y.15.3.    y.17.3.    y.19.3.    y.21.3.    y.23.3.    y.29.3.    y.40.3. 
##  0.6998336  0.7689718 -0.9991740  0.8825808 -1.4182498 -1.0032852 -0.7420236 
##    y.50.3.    y.51.3.    y.57.3. 
## -1.4006907 -1.6208787  1.0273046 
## 
## $pmdev
##  dev_a.1.1.  dev_a.2.1.  dev_a.3.1.  dev_a.4.1.  dev_a.5.1.  dev_a.6.1. 
##   2.3060532   0.8096602   6.0721019   1.4417012   4.1439733   0.3913172 
##  dev_a.7.1.  dev_a.8.1.  dev_a.9.1. dev_a.10.1. dev_a.11.1. dev_a.12.1. 
##   3.8749425   0.4134519   0.6966026   0.5872882   1.0128584   0.9783893 
## dev_a.13.1. dev_a.14.1. dev_a.15.1. dev_a.16.1. dev_a.17.1. dev_a.18.1. 
##   0.5878278   0.8357781   0.3854622   2.2462608   0.4188128   2.0861388 
## dev_a.19.1. dev_a.20.1. dev_a.21.1. dev_a.22.1. dev_a.23.1. dev_a.24.1. 
##   1.5383428   0.9923959   1.0929658   4.0173494   4.4080771   0.9808123 
## dev_a.25.1. dev_a.26.1. dev_a.27.1. dev_a.28.1. dev_a.29.1. dev_a.30.1. 
##   0.9974227   2.7558173   0.7751637   0.9984778   0.7835325   1.9419844 
## dev_a.31.1. dev_a.32.1. dev_a.33.1. dev_a.34.1. dev_a.35.1. dev_a.36.1. 
##   0.5344455   3.2058649   0.7625563   0.8763695   0.7450892   0.6301635 
## dev_a.37.1. dev_a.38.1. dev_a.39.1. dev_a.40.1. dev_a.41.1. dev_a.42.1. 
##   1.9771004   0.9096085   0.4297572   5.2164998   8.2103819   0.5700118 
## dev_a.43.1. dev_a.44.1. dev_a.45.1. dev_a.46.1. dev_a.47.1. dev_a.48.1. 
##   1.2751148  22.6930692   0.9922256   0.7457296   0.9899249   0.9360553 
## dev_a.49.1. dev_a.50.1. dev_a.51.1. dev_a.52.1. dev_a.53.1. dev_a.54.1. 
##   0.9348797   0.3393290   2.3861586   0.5810338   0.7339060   4.2763007 
## dev_a.55.1. dev_a.56.1. dev_a.57.1. dev_a.58.1. dev_a.59.1. dev_a.60.1. 
##   1.3814181   1.0086677   0.6517424   0.9141695   0.3852157   0.6353014 
## dev_a.61.1. dev_a.62.1. dev_a.63.1. dev_a.64.1. dev_a.65.1. dev_a.66.1. 
##   0.8187842   0.5961209   0.7877238   0.7478327   0.4799739   1.0072215 
##  dev_a.1.2.  dev_a.2.2.  dev_a.3.2.  dev_a.4.2.  dev_a.5.2.  dev_a.6.2. 
##   2.3933305   0.8085264   4.0252662   1.1729061   1.5133190   0.6775293 
##  dev_a.7.2.  dev_a.8.2.  dev_a.9.2. dev_a.10.2. dev_a.11.2. dev_a.12.2. 
##  12.8031728   0.6986606   0.7181359   0.5919930   1.0094132   0.9817870 
## dev_a.13.2. dev_a.14.2. dev_a.15.2. dev_a.16.2. dev_a.17.2. dev_a.18.2. 
##   0.6026627   0.7795560   0.4107208   1.9067403   0.4645261   2.1402570 
## dev_a.19.2. dev_a.20.2. dev_a.21.2. dev_a.22.2. dev_a.23.2. dev_a.24.2. 
##   2.1122783   1.0137254   0.6822644  30.9489033   1.2798605   0.9332166 
## dev_a.25.2. dev_a.26.2. dev_a.27.2. dev_a.28.2. dev_a.29.2. dev_a.30.2. 
##   1.0038936   3.3804607   0.6793230   1.0007717   0.7586875   1.9545631 
## dev_a.31.2. dev_a.32.2. dev_a.33.2. dev_a.34.2. dev_a.35.2. dev_a.36.2. 
##   0.5348448   2.8267855   0.8594177   0.8620771   0.6008195   0.5581501 
## dev_a.37.2. dev_a.38.2. dev_a.39.2. dev_a.40.2. dev_a.41.2. dev_a.42.2. 
##   2.2919560   0.9003265   0.6619323   2.4646695   7.5458459   0.6515837 
## dev_a.43.2. dev_a.44.2. dev_a.45.2. dev_a.46.2. dev_a.47.2. dev_a.48.2. 
##   1.2848060   9.6102906   0.9947719   0.7827648   0.9961054   0.9160776 
## dev_a.49.2. dev_a.50.2. dev_a.51.2. dev_a.52.2. dev_a.53.2. dev_a.54.2. 
##   0.9025893   0.9149914   0.9783186   0.4995079   0.7443345   3.4888969 
## dev_a.55.2. dev_a.56.2. dev_a.57.2. dev_a.58.2. dev_a.59.2. dev_a.60.2. 
##   1.3131133   1.0111901   0.5508010   0.9235579   0.6468302   0.6097834 
## dev_a.61.2. dev_a.62.2. dev_a.63.2. dev_a.64.2. dev_a.65.2. dev_a.66.2. 
##   0.8240688   0.6014444   0.8168382   0.7771599   0.5650816   1.0030886 
##  dev_a.5.3. dev_a.15.3. dev_a.17.3. dev_a.19.3. dev_a.21.3. dev_a.23.3. 
##   1.0735395   0.4897670   0.5913176   0.9983487   0.7789488   2.0114325 
## dev_a.29.3. dev_a.40.3. dev_a.50.3. dev_a.51.3. dev_a.57.3. 
##   1.0065812   0.5505990   1.9619346   2.6272476   1.0553548
nma.fit(BugsResRandom, main= "Random Effects Model")

## $DIC
## [1] 274.893
## 
## $Dres
## [1] 149.6142
## 
## $pD
## [1] 125.2788
## 
## $leverage
##                                                                        
## 1 0.8988032 0.9540628 0.8376804 0.7120861 0.6550371 0.9291984 0.9567615
##                                                                        
## 1 0.7849735 0.5880161 0.9564061 0.9932357 0.9924454 0.9572515 0.9068734
##                                                                                
## 1 0.7880912 0.7662898 0.9010339 0.9924731 0.843809 0.6133398 0.9342777 0.997218
##                                                                              
## 1 0.811939 0.9918073 1.00302 0.8957868 0.8603898 0.8134507 0.879131 0.8550764
##                                                                        
## 1 0.8363575 0.9425714 0.8158897 0.9626811 0.7001798 0.9041459 0.8394724
##                                                                                
## 1 0.917016 0.8000173 0.7114252 0.9731975 0.9150171 0.9611097 0.8245008 1.000376
##                                                                        
## 1 0.8567207 0.9948933 0.9980646 0.9557324 0.5452404 0.7726819 0.9093028
##                                                                       
## 1 0.9678342 0.9014759 0.7280166 1.010407 0.8385855 0.8993494 0.4928376
##                                                                                
## 1 0.6547035 0.9393819 0.925586 0.9598195 0.9557304 0.9369643 1.004054 0.8823212
##                                                                        
## 1 0.9610394 0.9039586 0.8892313 0.7831076 0.9479493 0.7776574 0.8935892
##                                                                       
## 1 0.6181369 0.9607789 1.002259 0.9948885 0.9331316 0.8726117 0.7981475
##                                                                                
## 1 0.8390499 0.9443625 1.01005 0.6588563 0.8272606 0.9384111 0.8666421 0.7163865
##                                                                       
## 1 0.9656346 1.000158 0.8651191 0.7999123 0.7755102 0.8556048 0.8755837
##                                                                                
## 1 0.8491827 0.9530067 0.8804009 0.946678 0.5540831 0.871809 0.8006002 0.9031279
##                                                                       
## 1 0.8933688 0.8244476 0.9764426 0.9493705 0.9706101 0.9388507 1.005176
##                                                                                
## 1 0.8934701 1.004677 1.007153 0.9530125 0.7925524 0.9499678 0.8747185 0.9596015
##                                                                               
## 1 0.9208456 0.7653249 1.009062 0.911996 0.9054673 0.712921 0.6183411 0.9709663
##                                                                        
## 1 0.9441354 0.9720652 0.9615042 0.9549423 0.9975798 0.5499835 0.8284853
##                                                                       
## 1 0.9396294 1.013977 0.9507604 0.8172359 0.9957437 0.8550516 0.6005843
##                      
## 1 0.8177862 0.9334622
## 
## $w
##     y.1.1.     y.2.1.     y.3.1.     y.4.1.     y.5.1.     y.6.1.     y.7.1. 
## -1.0574750 -0.9820931 -1.3520907  0.9342115  1.2188868  0.9652960  1.2145528 
##     y.8.1.     y.9.1.    y.10.1.    y.11.1.    y.12.1.    y.13.1.    y.14.1. 
## -0.8942219 -0.8802325 -0.9793046 -0.9976658 -0.9980940 -0.9809916  0.9557163 
##    y.15.1.    y.16.1.    y.17.1.    y.18.1.    y.19.1.    y.20.1.    y.21.1. 
## -0.8904600 -1.1044825 -0.9530440 -0.9969444  1.0367285  0.8732446 -0.9777585 
##    y.22.1.    y.23.1.    y.24.1.    y.25.1.    y.26.1.    y.27.1.    y.28.1. 
##  1.1430964  1.0987114  1.0000909 -1.0015204  1.0265764  0.9325447  0.9576675 
##    y.29.1.    y.30.1.    y.31.1.    y.32.1.    y.33.1.    y.34.1.    y.35.1. 
##  0.9387940  0.9798641 -0.9201621 -0.9969193 -0.9370658 -0.9846902  0.8554880 
##    y.36.1.    y.37.1.    y.38.1.    y.39.1.    y.40.1.    y.41.1.    y.42.1. 
## -0.9596948  1.0091530  0.9608812 -0.9028684  1.1710694  0.9982869 -0.9565735 
##    y.43.1.    y.44.1.    y.45.1.    y.46.1.    y.47.1.    y.48.1.    y.49.1. 
## -0.9959697  2.2811772  1.0004324 -0.9268364  0.9974495  0.9991184 -0.9851080 
##    y.50.1.    y.51.1.    y.52.1.    y.53.1.    y.54.1.    y.55.1.    y.56.1. 
##  0.7621273  0.9650464 -0.9714487 -0.9912404 -1.1345526  0.9623622  1.0051901 
##    y.57.1.    y.58.1.    y.59.1.    y.60.1.    y.61.1.    y.62.1.    y.63.1. 
## -0.9531653 -0.9683918 -0.7234253 -0.8673232 -0.9708724 -0.9777920 -0.9926623 
##    y.64.1.    y.65.1.    y.66.1.     y.1.2.     y.2.2.     y.3.2.     y.4.2. 
## -0.9795805  0.9683011  1.0020275  1.0545269  0.9848318  1.2107182 -0.9774644 
##     y.5.2.     y.6.2.     y.7.2.     y.8.2.     y.9.2.    y.10.2.    y.11.2. 
## -0.9147932 -0.9738294 -1.7155528  0.9508564  0.8923379  0.9813344  1.0021236 
##    y.12.2.    y.13.2.    y.14.2.    y.15.2.    y.16.2.    y.17.2.    y.18.2. 
##  0.9996426  0.9688099 -0.9375423  0.8936181  1.0804335 -0.9717868  1.0058397 
##    y.19.2.    y.20.2.    y.21.2.    y.22.2.    y.23.2.    y.24.2.    y.25.2. 
## -1.0676509 -0.9467886  0.9693863 -2.0044145 -0.9404861 -0.9904277  1.0000996 
##    y.26.2.    y.27.2.    y.28.2.    y.29.2.    y.30.2.    y.31.2.    y.32.2. 
## -1.0395262 -0.9005757 -0.9455687 -0.9268916 -0.9868545  0.9288655  1.0005428 
##    y.33.2.    y.34.2.    y.35.2.    y.36.2.    y.37.2.    y.38.2.    y.39.2. 
##  0.9587809  0.9768295 -0.7767195  0.9439676 -1.0166312 -0.9523155  0.9501106 
##    y.40.2.    y.41.2.    y.42.2.    y.43.2.    y.44.2.    y.45.2.    y.46.2. 
## -1.0569479 -0.9986755  0.9744515  1.0024055 -1.6422439 -1.0026684  0.9462464 
##    y.47.2.    y.48.2.    y.49.2.    y.50.2.    y.51.2.    y.52.2.    y.53.2. 
## -1.0023358 -1.0035826  0.9843445  0.9377274  0.9771178  0.9541465  0.9864877 
##    y.54.2.    y.55.2.    y.56.2.    y.57.2.    y.58.2.    y.59.2.    y.60.2. 
##  1.1036176 -0.9680194 -1.0045723 -0.9556674  0.9706572  0.8541858  0.8544357 
##    y.61.2.    y.62.2.    y.63.2.    y.64.2.    y.65.2.    y.66.2.     y.5.3. 
##  0.9870342  0.9852642  0.9976835  0.9827607 -0.9773422 -0.9988065 -1.0937902 
##    y.15.3.    y.17.3.    y.19.3.    y.21.3.    y.23.3.    y.29.3.    y.40.3. 
##  0.9113973  0.9744482  1.0069915  0.9831328 -0.9558523  0.9978697 -0.9292904 
##    y.50.3.    y.51.3.    y.57.3. 
## -1.0165085 -1.0111071  0.9899559 
## 
## $pmdev
##  dev_a.1.1.  dev_a.2.1.  dev_a.3.1.  dev_a.4.1.  dev_a.5.1.  dev_a.6.1. 
##   1.1182533   0.9645068   1.8281492   0.8727511   1.4856850   0.9317964 
##  dev_a.7.1.  dev_a.8.1.  dev_a.9.1. dev_a.10.1. dev_a.11.1. dev_a.12.1. 
##   1.4751385   0.7996328   0.7748092   0.9590375   0.9953371   0.9961916 
## dev_a.13.1. dev_a.14.1. dev_a.15.1. dev_a.16.1. dev_a.17.1. dev_a.18.1. 
##   0.9623446   0.9133937   0.7929191   1.2198815   0.9082929   0.9938982 
## dev_a.19.1. dev_a.20.1. dev_a.21.1. dev_a.22.1. dev_a.23.1. dev_a.24.1. 
##   1.0748060   0.7625562   0.9560118   1.3066695   1.2071667   1.0001818 
## dev_a.25.1. dev_a.26.1. dev_a.27.1. dev_a.28.1. dev_a.29.1. dev_a.30.1. 
##   1.0030432   1.0538591   0.8696396   0.9171271   0.8813342   0.9601337 
## dev_a.31.1. dev_a.32.1. dev_a.33.1. dev_a.34.1. dev_a.35.1. dev_a.36.1. 
##   0.8466983   0.9938481   0.8780923   0.9696149   0.7318598   0.9210141 
## dev_a.37.1. dev_a.38.1. dev_a.39.1. dev_a.40.1. dev_a.41.1. dev_a.42.1. 
##   1.0183897   0.9232927   0.8151713   1.3714036   0.9965766   0.9150329 
## dev_a.43.1. dev_a.44.1. dev_a.45.1. dev_a.46.1. dev_a.47.1. dev_a.48.1. 
##   0.9919556   5.2037694   1.0008650   0.8590257   0.9949054   0.9982375 
## dev_a.49.1. dev_a.50.1. dev_a.51.1. dev_a.52.1. dev_a.53.1. dev_a.54.1. 
##   0.9704377   0.5808380   0.9313146   0.9437126   0.9825574   1.2872097 
## dev_a.55.1. dev_a.56.1. dev_a.57.1. dev_a.58.1. dev_a.59.1. dev_a.60.1. 
##   0.9261410   1.0104072   0.9085241   0.9377828   0.5233442   0.7522496 
## dev_a.61.1. dev_a.62.1. dev_a.63.1. dev_a.64.1. dev_a.65.1. dev_a.66.1. 
##   0.9425932   0.9560772   0.9853784   0.9595780   0.9376071   1.0040591 
##  dev_a.1.2.  dev_a.2.2.  dev_a.3.2.  dev_a.4.2.  dev_a.5.2.  dev_a.6.2. 
##   1.1120269   0.9698937   1.4658387   0.9554366   0.8368466   0.9483437 
##  dev_a.7.2.  dev_a.8.2.  dev_a.9.2. dev_a.10.2. dev_a.11.2. dev_a.12.2. 
##   2.9431215   0.9041278   0.7962669   0.9630172   1.0042517   0.9992853 
## dev_a.13.2. dev_a.14.2. dev_a.15.2. dev_a.16.2. dev_a.17.2. dev_a.18.2. 
##   0.9385926   0.8789855   0.7985533   1.1673366   0.9443696   1.0117135 
## dev_a.19.2. dev_a.20.2. dev_a.21.2. dev_a.22.2. dev_a.23.2. dev_a.24.2. 
##   1.1398785   0.8964087   0.9397098   4.0176776   0.8845140   0.9809471 
## dev_a.25.2. dev_a.26.2. dev_a.27.2. dev_a.28.2. dev_a.29.2. dev_a.30.2. 
##   1.0001992   1.0806146   0.8110366   0.8941002   0.8591280   0.9738817 
## dev_a.31.2. dev_a.32.2. dev_a.33.2. dev_a.34.2. dev_a.35.2. dev_a.36.2. 
##   0.8627912   1.0010859   0.9192608   0.9541958   0.6032932   0.8910748 
## dev_a.37.2. dev_a.38.2. dev_a.39.2. dev_a.40.2. dev_a.41.2. dev_a.42.2. 
##   1.0335390   0.9069047   0.9027102   1.1171389   0.9973528   0.9495557 
## dev_a.43.2. dev_a.44.2. dev_a.45.2. dev_a.46.2. dev_a.47.2. dev_a.48.2. 
##   1.0048168   2.6969651   1.0053440   0.8953822   1.0046770   1.0071780 
## dev_a.49.2. dev_a.50.2. dev_a.51.2. dev_a.52.2. dev_a.53.2. dev_a.54.2. 
##   0.9689340   0.8793327   0.9547592   0.9103956   0.9731580   1.2179718 
## dev_a.55.2. dev_a.56.2. dev_a.57.2. dev_a.58.2. dev_a.59.2. dev_a.60.2. 
##   0.9370616   1.0091654   0.9133002   0.9421754   0.7296334   0.7300604 
## dev_a.61.2. dev_a.62.2. dev_a.63.2. dev_a.64.2. dev_a.65.2. dev_a.66.2. 
##   0.9742365   0.9707456   0.9953724   0.9658186   0.9551978   0.9976144 
##  dev_a.5.3. dev_a.15.3. dev_a.17.3. dev_a.19.3. dev_a.21.3. dev_a.23.3. 
##   1.1963769   0.8306450   0.9495493   1.0140318   0.9665501   0.9136536 
## dev_a.29.3. dev_a.40.3. dev_a.50.3. dev_a.51.3. dev_a.57.3. 
##   0.9957440   0.8635807   1.0332895   1.0223376   0.9800126

DIC 値が低いほど、適合度が高い。ランダム効果の方が良い。

2.5.8 一貫性の評価

ランダム効果のヒートプロットを作成する。

bugsLeague <- nma.league(BugsResRandom,  
                         central.tdcy="median")
bugsLeague$heatplot

Scura plot 後に order = bugsSucra$order とすると、順序が一致する。

2.5.9 Ranking

ランダム効果の SUCRA プロットを作成する。

bugsSucra <- nma.rank(BugsResRandom, 
                      largerbetter=TRUE, 
                      sucra.palette= "Set1")
bugsSucra$sucraplot

2.5.10 Forest plot

ランダム効果のフォレストプロットを作成する。

nma.forest(BugsResRandom,
           central.tdcy="mean",
           comparator = "SC")

References

LeVasseur, Nathalie, Wei Cheng, Sasha Mazzarello, Mark Clemons, Lisa Vandermeer, Lee Jones, Anil Abraham Joy, et al. 2021. “Optimising Weight-Loss Interventions in Cancer Patients—a Systematic Review and Network Meta-Analysis.” PloS One 16 (2): e0245794.