```{asis, echo = {{bayes_mcmc_knit}}, eval = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
### Markov chain Monte Carlo
#### For all studies
```

```{r, echo = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
mcmc_all <- bayes_mcmc(bayes_model_all)
mcmc_sub <- bayes_mcmc(bayes_model_sub)
```

```{asis, echo = {{bayes_mcmc_knit}}, eval = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
##### Gelman convergence assessment plots
{r, fig.align='center', fig.width = 9, fig.height = {{bayes_mcmc_height_250}}}
```
```{r, echo = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
patchwork::wrap_plots(
  gelman_plots(mcmc_all$gelman_data, mcmc_all$parameters),
  ncol = 2
)
```
```{asis, echo = {{bayes_mcmc_knit}}, eval = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
##### Trace plots
{r, fig.align='center', fig.width = 9, fig.height = {{bayes_mcmc_height_200}}}
```
```{r, echo = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
patchwork::wrap_plots(
  trace_plots(bayes_model_all$mtcResults, mcmc_all$parameters),
  ncol = 2
)
```
```{asis, echo = {{bayes_mcmc_knit}}, eval = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
##### Posterior density plots
{r, fig.align='center', fig.width = 9, fig.height = {{bayes_mcmc_height_200}}}
```
```{r, echo = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
patchwork::wrap_plots(
  density_plots(bayes_model_all$mtcResults, mcmc_all$parameters),
  ncol = 2
)
```

```{asis, echo = {{bayes_mcmc_knit}}, eval = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
#### Excluding selected studies
##### Gelman convergence assessment plots
{r, fig.align='center', fig.width = 9, fig.height = {{bayes_mcmc_height_250}}}
```
```{r, echo = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
patchwork::wrap_plots(
  gelman_plots(mcmc_sub$gelman_data, mcmc_sub$parameters),
  ncol = 2
)
```
```{asis, echo = {{bayes_mcmc_knit}}, eval = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
##### Trace plots
{r, fig.align='center', fig.width = 9, fig.height = {{bayes_mcmc_height_200}}}
```
```{r, echo = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
patchwork::wrap_plots(
  trace_plots(bayes_model_sub$mtcResults, mcmc_sub$parameters),
  ncol = 2
)
```
```{asis, echo = {{bayes_mcmc_knit}}, eval = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
##### Posterior density plots
{r, fig.align='center', fig.width = 9, fig.height = {{bayes_mcmc_height_200}}}
```
```{r, echo = {{bayes_mcmc_knit}}, include = {{bayes_mcmc_knit}}}
patchwork::wrap_plots(
  density_plots(bayes_model_sub$mtcResults, mcmc_sub$parameters),
  ncol = 2
)
```
