The University of Southampton
University of Southampton Institutional Repository

BayesGmed: an R-package for Bayesian causal mediation analysis

BayesGmed: an R-package for Bayesian causal mediation analysis
BayesGmed: an R-package for Bayesian causal mediation analysis
Background: the past decade has seen an explosion of research in causal mediation analysis. However, most analytic tools developed so far rely on frequentist methods which may not be robust in the case of small sample sizes. In this paper, we propose a Bayesian approach for causal mediation analysis based on Bayesian g-formula, which will overcome the limitations of the frequentist methods.

Methods: we created BayesGmed, an R-package for fitting Bayesian mediation models in R. The application of the methodology (and software tool) is demonstrated by a secondary analysis of data collected as part of the MUSICIAN study, a randomised controlled trial of remotely delivered cognitive behavioural therapy (tCBT) for people with chronic pain. We tested the hypothesis that the effect of tCBT would be mediated by improvements in active coping, passive coping, fear of movement and sleep problems. We then demonstrate the use of informative priors to conduct probabilistic sensitivity analysis around violations of causal identification assumptions.

Result: the analysis of MUSICIAN data shows that tCBT has better-improved patients’ self-perceived change in health status compared to treatment as usual (TAU). The adjusted log-odds of tCBT compared to TAU range from 1.491 (95% CI: 0.452–2.612) when adjusted for sleep problems to 2.264 (95% CI: 1.063–3.610) when adjusted for fear of movement. Higher scores of fear of movement (log-odds, -0.141 [95% CI: -0.245, -0.048]), passive coping (log-odds, -0.217 [95% CI: -0.351, -0.104]), and sleep problem (log-odds, -0.179 [95% CI: -0.291, -0.078]) leads to lower odds of a positive self-perceived change in health status. The result of BayesGmed, however, shows that none of the mediated effects are statistically significant. We compared BayesGmed with the mediation R- package, and the results were comparable. Finally, our sensitivity analysis using the BayesGmed tool shows that the direct and total effect of tCBT persists even for a large departure in the assumption of no unmeasured confounding.

Conclusion: this paper comprehensively overviews causal mediation analysis and provides an open-source software package to fit Bayesian causal mediation models.
1932-6203
Yimer, Belay B.
58d2b62f-6d29-4e30-978a-f82569f57250
Lunt, Mark
c2b3288c-62f9-4a6c-aca5-ad0c1cc76ce5
Beasley, Marcus
a40436eb-bd78-4d2a-889f-6b99d7755091
Macfarlane, Gary J.
332acabb-a9cf-4434-b375-c8dd3a659e9f
McBeth, John
98012716-66ba-480b-9e43-ac53b51dce61
Yimer, Belay B.
58d2b62f-6d29-4e30-978a-f82569f57250
Lunt, Mark
c2b3288c-62f9-4a6c-aca5-ad0c1cc76ce5
Beasley, Marcus
a40436eb-bd78-4d2a-889f-6b99d7755091
Macfarlane, Gary J.
332acabb-a9cf-4434-b375-c8dd3a659e9f
McBeth, John
98012716-66ba-480b-9e43-ac53b51dce61

Yimer, Belay B., Lunt, Mark, Beasley, Marcus, Macfarlane, Gary J. and McBeth, John (2023) BayesGmed: an R-package for Bayesian causal mediation analysis. PLoS ONE. (doi:10.1371/journal.pone.0287037).

Record type: Article

Abstract

Background: the past decade has seen an explosion of research in causal mediation analysis. However, most analytic tools developed so far rely on frequentist methods which may not be robust in the case of small sample sizes. In this paper, we propose a Bayesian approach for causal mediation analysis based on Bayesian g-formula, which will overcome the limitations of the frequentist methods.

Methods: we created BayesGmed, an R-package for fitting Bayesian mediation models in R. The application of the methodology (and software tool) is demonstrated by a secondary analysis of data collected as part of the MUSICIAN study, a randomised controlled trial of remotely delivered cognitive behavioural therapy (tCBT) for people with chronic pain. We tested the hypothesis that the effect of tCBT would be mediated by improvements in active coping, passive coping, fear of movement and sleep problems. We then demonstrate the use of informative priors to conduct probabilistic sensitivity analysis around violations of causal identification assumptions.

Result: the analysis of MUSICIAN data shows that tCBT has better-improved patients’ self-perceived change in health status compared to treatment as usual (TAU). The adjusted log-odds of tCBT compared to TAU range from 1.491 (95% CI: 0.452–2.612) when adjusted for sleep problems to 2.264 (95% CI: 1.063–3.610) when adjusted for fear of movement. Higher scores of fear of movement (log-odds, -0.141 [95% CI: -0.245, -0.048]), passive coping (log-odds, -0.217 [95% CI: -0.351, -0.104]), and sleep problem (log-odds, -0.179 [95% CI: -0.291, -0.078]) leads to lower odds of a positive self-perceived change in health status. The result of BayesGmed, however, shows that none of the mediated effects are statistically significant. We compared BayesGmed with the mediation R- package, and the results were comparable. Finally, our sensitivity analysis using the BayesGmed tool shows that the direct and total effect of tCBT persists even for a large departure in the assumption of no unmeasured confounding.

Conclusion: this paper comprehensively overviews causal mediation analysis and provides an open-source software package to fit Bayesian causal mediation models.

Text
journal.pone.0287037 - Version of Record
Available under License Creative Commons Attribution.
Download (869kB)

More information

Accepted/In Press date: 28 May 2023
Published date: 14 June 2023

Identifiers

Local EPrints ID: 491120
URI: http://eprints.soton.ac.uk/id/eprint/491120
ISSN: 1932-6203
PURE UUID: bbe92f28-2a10-47cc-b33d-f9eadee3b8b7
ORCID for John McBeth: ORCID iD orcid.org/0000-0001-7047-2183

Catalogue record

Date deposited: 13 Jun 2024 16:30
Last modified: 14 Jun 2024 02:11

Export record

Altmetrics

Contributors

Author: Belay B. Yimer
Author: Mark Lunt
Author: Marcus Beasley
Author: Gary J. Macfarlane
Author: John McBeth ORCID iD

Download statistics

Downloads from ePrints over the past year. Other digital versions may also be available to download e.g. from the publisher's website.

View more statistics

Atom RSS 1.0 RSS 2.0

Contact ePrints Soton: eprints@soton.ac.uk

ePrints Soton supports OAI 2.0 with a base URL of http://eprints.soton.ac.uk/cgi/oai2

This repository has been built using EPrints software, developed at the University of Southampton, but available to everyone to use.

We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we will assume that you are happy to receive cookies on the University of Southampton website.

×