贝叶斯网络元分析 (gemtc) - 指定比较顺序

mkp*_*pcr 5 r bayesian

我正在使用 gemtc 包对类似于以下的数据集进行贝叶斯网络元分析:

df <- data.frame(study = c("A", "A", "B", "B", "C", "C", "D", "D", "E", "E", "F", "F", 
                           "G", "G", "H", "H", "I", "I", "J", "J", "K", "K"),
                                 treatment = c("A", "B", "B", "C", "B", "C", "A", "B", "B", 
                                                "C", "B", "C", "A", "B", "B", "C", "B", "C", 
                                                "A", "C", "B", "C"),
                                 responders = c(1, 5, 0, 0, 3, 1, 0, 2, 0, 2, 0, 2, 0,
                                                0, 1, 2, 0, 0, 2, 9, 1, 1),
                                 sampleSize = c(32, 33, 30, 30, 18, 20, 15, 15, 20,
                                                20, 30, 30, 36, 32, 15, 15, 23, 22, 24, 23, 18, 16))
Run Code Online (Sandbox Code Playgroud)

虽然我已经能够设置网络模型并很好地运行分析,但我一直在努力指定我希望在节点拆分一致性分析中比较处理的顺序。例如,当比较“B”与“A”和“C”作为参考组比较“A”与“ C”和“B”与“C”。下面是我试过的代码:

library(gemtc)
library(rjags)

# Create mtc.network element to be used in modeling ------
network <- mtc.network(data.ab = df)

# Compile model ------
network.mod <- mtc.model(network, 
               linearModel = "random", # random effects model
               n.chain = 4) # 4 Markov chains

# Assess network consistency using nodesplit method ------
nodesplit <- mtc.nodesplit(network.mod, 
                linearModel = "random", # random effects model
                n.adapt = 5000, # burn-in iterations
                n.iter = 100000, # actual simulation iterations
                thin = 10) # extract values of every 10th iteration
summary(nodesplit) # High p-values indicate consistent results

plot(summary(nodesplit))
Run Code Online (Sandbox Code Playgroud)

我的结果提供了以下方面的 OR(95% CrIs):

  • “A”与“C”
  • “B”与“C”
  • “B”与“A”

我创建了一个单独的数据框,指定我希望通过以下方式进行“A”与“B”的比较:

# Specify desired comparisons ------
comparisons = data.frame(t1 = "A", t2 = "B")

# Assess network consistency using nodesplit method, adding comparisons argument ------
nodesplit <- mtc.nodesplit(network.mod, 
                comparisons = comparisons,
                linearModel = "random", # random effects model
                n.adapt = 5000, # burn-in iterations
                n.iter = 100000, # actual simulation iterations
                thin = 10) # extract values of every 10th iteration
summary(nodesplit) # High p-values indicate consistent results
Run Code Online (Sandbox Code Playgroud)

但我仍然得到“B”与“A”的结果。我也试过指定 t1="B", t2="A",我得到了相同的结果。对此的任何帮助将不胜感激。提前致谢。