Performs a Bayesian meta-analysis to synthesize standardized mean differences (SMDs) for a continuous outcome and odds ratios (ORs) for a binary outcome.
meta.or.smd(y1, sd1, n1, y0, sd0, n0, r1, m1, r0, m0, id.bin, data,
n.adapt = 1000, n.chains = 3, n.burnin = 5000, n.iter = 20000, n.thin = 2,
seed = 1234)
"This function returns a list of Bayesian estimates, including posterior medians and 95% credible intervals (comprising the 2.5% and 97.5% posterior quantiles) for the overall SMD (d
), the between-study standard deviation (tau
), and the individual studies' SMDs (theta
).
a vector specifying the sample means in the treatment group for the continuous outcome. NA
is allowed and indicates that data are not available for this outcome; the same applies to the other arguments, including sd1
, n1
, y0
, sd0
, n0
, r1
, m1
, r0
, and m0
.
a vector specifying the sample standard deviations in the treatment group for the continuous outcome.
a vector specifying the sample sizes in the treatment group for the continuous outcome.
a vector specifying the sample means in the control group for the continuous outcome.
a vector specifying the sample standard deviations in the control group for the continuous outcome.
a vector specifying the sample sizes in the control group for the continuous outcome.
a vector specifying the event counts in the treatment group for the binary outcome.
a vector specifying the sample sizes in the treatment group for the binary outcome.
a vector specifying the event counts in the control group for the binary outcome.
a vector specifying the sample sizes in the control group for the binary outcome.
a vector indicating whether the outcome is binary (1) or continuous (0).
an optional data frame containing the meta-analysis dataset. If data
is specified, the previous arguments, y1
, sd1
, n1
, y0
, sd0
, n0
, r1
, m1
, r0
, m0
, and id.bin
should be specified as their corresponding column names in data
.
the number of iterations for adaptation in the Markov chain Monte Carlo (MCMC) algorithm. The default is 1,000. This argument and the following n.chains
, n.burnin
, n.iter
, and n.thin
are passed to the functions in the package rjags.
the number of MCMC chains. The default is 3.
the number of iterations for burn-in period. The default is 5,000.
the total number of iterations in each MCMC chain after the burn-in period. The default is 20,000.
a positive integer specifying thinning rate. The default is 2.
an integer for specifying the seed of the random number generation for reproducibility during the MCMC algorithm for performing the Bayesian meta-analysis model.
Yaqi Jing, Lifeng Lin
The Bayesian meta-analysis model implemented by this function is detailed in Section 2.5 of Jing et al. (2023).
Jing Y, Murad MH, Lin L (2023). "A Bayesian model for combining standardized mean differences and odds ratios in the same meta-analysis." Journal of Biopharmaceutical Statistics, 33(2), 167--190. <tools:::Rd_expr_doi("10.1080/10543406.2022.2105345")>
# \donttest{
data("dat.dep")
out <- meta.or.smd(y1, sd1, n1, y0, sd0, n0, r1, m1, r0, m0, id.bin, data = dat.dep)
out
# }
Run the code above in your browser using DataLab