Skip to content

Commit 0ca284d

Browse files
committed
fix requirement
1 parent 4e325a8 commit 0ca284d

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

covid-network-meta-analysis.qmd

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,32 @@ We first define the network of interventions and visualize the geometry of avail
6363
#| message: false
6464
#| warning: false
6565
library(multinma)
66+
library(ggplot2)
67+
6668
net <- set_agd_arm(data = covid,
6769
study = studlab,
6870
trt = trt,
6971
r = events,
7072
n = n)
73+
7174
plot(net, weight_edges = TRUE, weight_nodes = TRUE) +
7275
theme(legend.position = "none")
7376
```
77+
78+
## Random-Effects Network Meta-Analysis
79+
80+
Fit a random-effects model using the binomial likelihood with logit link. We use vague priors for heterogeneity and relative effects.
81+
82+
```{r}
83+
#| echo: true
84+
#| message: false
85+
#| warning: false
86+
nma_model <- nma(
87+
net,
88+
trt_effects = "random",
89+
prior_trt = normal(scale = 10),
90+
prior_het = half_normal(scale = 5),
91+
refresh = 0
92+
)
93+
```
94+

0 commit comments

Comments
 (0)