Dear Reza, dear Simon,
yes, indeed, you can also (possibly more easily) work out the solution
via Monte Carlo sampling:
dif <- bma1$rposterior(1e4, tau.sample=FALSE) -
bma2$rposterior(1e4, tau.sample=FALSE)
quantile(dif, probs=c(0.5, 0.025, 0.975))
Note that using "tau.sample=FALSE" accelerates sampling and only
returns the "mu" samples relevant here.
I also spotted an *ERROR* in my previously posted solution (Email from
2020-12-27). In the call to the "convolve()" function, you need to
explicitly specify the function arguments ("mu=..."), otherwise it will
by default pick the first one (which is "tau" here). With this fix, you
get matching results with the numerical convolution and Monte Carlo
approaches -- see the attached code. Sorry for the confusion!
Cheers,
Christian
On Tue, 2020-12-29 at 16:16 -0600, Reza Norouzian wrote:
Dear Christian, Would it be wrong for Simon to do the following to find out the difference: dif <- bma2$rposterior(1e3,tau.sample=T) - bma1$rposterior(1e3,tau.sample=T) and then obtain the HDI of dif to see if it contains 0? Thank you for your expertise, Reza Norouzian On Sun, Dec 27, 2020 at 10:30 AM Simon Harmel <sim.harmel at gmail.com> wrote:
Thank you very much, Christian. I appreciate it. I know and highly appreciate the fact that you've put so much effort into making bayesmeta faster than the MCMC-based equivalents. But, I really hope that one day we would be able to see still much faster algorithms to enable applying Bayesian meta to large-scale research efforts. Once again, thank you very much, Simon On Sun, Dec 27, 2020 at 6:00 AM R?ver, Christian < christian.roever at med.uni-goettingen.de> wrote:
Dear Simon, yes, there is a way to investigate the difference of the two as
well.
Asking for the difference between the two unknowns (the two mean parameters) technically means asking for a *convolution* of their probability distributions. From the "bayesmeta()" output we get
the
probability density functions etc, and from these we can derive
the
convolution. A method to compute the convolution is described
here:
C. Roever and T. Friede. Discrete approximation of a mixture distribution via restricted divergence. Journal of Computational and Graphical Statistics, 26(1):217-222, 2017. https://doi.org/10.1080/10618600.2016.1276840 and R code is provided in the article's supplemental material. I attached some R code to show the computations based on the
"metafor"
example. Cheers, Christian On Sat, 2020-12-26 at 13:49 -0600, Simon Harmel wrote:
Dear Christian, Thank you very much. To be clear, you're suggesting a meta-
analysis
of the subgroup meta-analyses, correct? Well, in my case, I have way too many subgroups, so there will
be
many pairwise comparisons. I wonder if there is a way to get
the
large posterior samples from each subgroup' summary effect and subtract it from the large posterior samples from another
subgroup
summary effect etc.? Perhaps, then we can see if the HDI of the posterior of
difference
includes "0"? Is this possible and/or reasonable given that my goal is to see
if
one subgroup is "different" from another one or not? Thank you, Simon On Sat, Dec 26, 2020 at 12:38 PM R?ver, Christian < christian.roever at med.uni-goettingen.de> wrote:
Dear Simon, you can essentially do an analogous analysis (in two stages)
using
the "bayesmeta" package. Doing the one-stage meta-regression
approach
is not (yet) possible with bayesmeta, but it should be possible
via
"rjags" (of required). For the two-stage approach, we then only need to use a normal approximation for the results from the 1st-stage analyses and proceed from there. I attached some example R code based on the quoted "metafor" example. Cheers, Christian On Sat, 2020-12-26 at 10:46 -0600, Simon Harmel wrote:
Hello All, Using "bayesmeta" package, I want to compare multiple
estimates
of
independent Meta-Analyses (i.e., Subgroups). In metafor, I know we can do this: (
) But I have fit my models in the "bayesmeta" package, so I
was
wondering how to compare across my "bayesmeta" models? Thanks, Simon
[[alternative HTML version deleted]]
_______________________________________________ R-sig-meta-analysis mailing list R-sig-meta-analysis at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
-------------- next part -------------- A non-text attachment was scrubbed... Name: ma-difference.R Type: text/x-r-source Size: 7189 bytes Desc: ma-difference.R URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20210106/393c8026/attachment-0001.bin>