Skip to content

Commit 5ea97e7

Browse files
committed
fix COPD example
1 parent e553168 commit 5ea97e7

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

COPD-NMA.qmd

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,40 @@ nma_consistency <- nma(
9595
# Extract DIC
9696
dic_consistency <- dic(nma_consistency)
9797
98-
# Extract tau (mean)
98+
# Extract tau (posterior mean)
9999
tau_consistency <- summary(nma_consistency)$summary %>%
100100
as.data.frame() %>%
101101
filter(parameter == "tau") %>%
102102
pull(mean)
103103
```
104104

105-
We find the following estimate for tau, the between-study standard deviation: `r round(tau_consistency, 3)`. The DIC for this model is `r round(dic_consistency$DIC, 1)`.
105+
We find the following estimate for tau, the between-study standard deviation: `r round(tau_consistency, 3)`. The DIC for this model is `r round(dic_consistency$dic, 1)`.
106106

107+
## Assessing Inconsistency
108+
To assess local inconsistency, we apply the node-splitting approach to each comparison with both direct and indirect evidence.
107109

110+
```{r}
111+
#| echo: true
112+
#| message: false
113+
#| warning: false
114+
nma_inconsistency <- nma(
115+
net,
116+
consistency = "ume",
117+
trt_effects = "random",
118+
prior_trt = normal(scale = 10),
119+
prior_het = half_normal(scale = 5),
120+
refresh = 0
121+
)
122+
123+
# Extract DIC
124+
dic_inconsistency <- dic(nma_inconsistency)
125+
126+
# Extract tau (posterior mean)
127+
tau_inconsistency <- summary(nma_inconsistency)$summary %>%
128+
as.data.frame() %>%
129+
filter(parameter == "tau") %>%
130+
pull(mean)
131+
```
132+
133+
We find the following estimate for tau, the between-study standard deviation: `r round(tau_inconsistency, 3)`. The DIC for this model is `r round(dic_inconsistency$dic, 1)`.
108134

0 commit comments

Comments
 (0)