Skip to content

Commit 060b631

Browse files
authored
Meta regression (#21)
* down-weighting * rename main.R->RoBMA.R * RoBMA.reg * summary functions * fixes * rename main.R->RoBMA.R * RoBMA.reg * summary functions * fixes * additional fixes * updating unit tests * plot function * updating diagnostics to BayesTools * fix plots * do_not_fit feature * do_not_fit feature (2) * fixing the weights parameterization * add the students data set * add the students data set (1) * fixes * vignette updates (1) * additional models * additional models II * additional models (3) * updates * updating the vignette --still not done yet * almost finished vignette draft * more model results * Create fit_wPSMA_reg10.RDS * updating vignettte * Update .gitignore * Create fit_PSMA_reg10.RDS * Create fit_3PP_reg10 * changing the multivariate normal C++ implementation to the same one as in bugs * fit_3PP_reg10 (non-converged) * fix multivariate * updating hierarchical model specification & adding a vignette * Update fit_3PP_reg10.RDS * fixes and update unit tests * add AMPPS vignette * updates * updates * include Lui2-15 data data set & update the vignette * adding inverse_sqrt weights * fixing data input checks * ggplot2 unit test updates * Update utilities.R * update with BayesTools * remove old meta-regression viggnete & change defaults priors for factors/covariates * add predictor scaling warning * Update plots.R * Update DESCRIPTION * Update RoBMA.R * check_setup.reg() + fixes * unit tests 3-5 * unit test 6 * unit test 7 * coverage on windows (?) * Revert "coverage on windows (?)" This reverts commit 78b4880. * reparameterization of the `weighted` models experimental feature (vol I) * undo reparameterization of the `weighted` models experimental feature * update documentation * Update check-input-and-settings.R * improving regression specification * update documentation * Update test-2-distributions.R * add unit tests for regression parameters & update R4.3 tests * updating summary.RoBMA.Rd * update with BayesTools * Update test-5-methods.R * marginal functions + unit test update * unit tests + small fixes * change coverage tests * Update utilities.R * add regression CRAN test and mute mesages * small updates * update README * Update prior_informed.Rd * update actions
1 parent 0bd253e commit 060b631

File tree

226 files changed

+14677
-2855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+14677
-2855
lines changed

.RData

2.53 KB
Binary file not shown.

.github/workflows/test-coverage.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
config:
25-
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
25+
- {os: windows-latest, r: 'release'}
2626

2727
env:
2828
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ RoBMA.Rcheck
1717
.Rprofile
1818
/doc/
1919
/Meta/
20+
models/MetaRegression/fit_wPSMA_reg10/*.RDS
21+
models/MetaRegression/fit_PSMA_reg10/*.RDS
22+
models/MetaRegression/fit_3PP_reg10/*.RDS
2023
models/MetaRegression/*

DESCRIPTION

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: RoBMA
22
Title: Robust Bayesian Meta-Analyses
3-
Version: 2.3.2
3+
Version: 3.0.0
44
Maintainer: František Bartoš <f.bartos96@gmail.com>
55
Authors@R: c(
66
person("František", "Bartoš", role = c("aut", "cre"),
@@ -21,9 +21,9 @@ Description: A framework for estimating ensembles of meta-analytic models
2121
combine the competing meta-analytic models into a model ensemble, weights
2222
the posterior parameter distributions based on posterior model probabilities
2323
and uses Bayes factors to test for the presence or absence of the
24-
individual components (e.g., effect vs. no effect; Bartoš et al., 2021,
25-
<doi:10.31234/osf.io/kvsp7>; Maier, Bartoš & Wagenmakers, in press,
26-
<doi:10.31234/osf.io/u4cns>). Users can define a wide range of non-informative
24+
individual components (e.g., effect vs. no effect; Bartoš et al., 2022,
25+
<doi:10.1002/jrsm.1594>; Maier, Bartoš & Wagenmakers, 2022,
26+
<doi:10.1037/met0000405>). Users can define a wide range of non-informative
2727
or informative prior distributions for the effect size, heterogeneity,
2828
and publication bias components (including selection models and PET-PEESE).
2929
The package provides convenient functions for summary, visualizations, and
@@ -40,10 +40,9 @@ NeedsCompilation: yes
4040
Depends:
4141
R (>= 4.0.0)
4242
Imports:
43-
BayesTools (>= 0.2.0),
43+
BayesTools (>= 0.2.14),
4444
runjags,
4545
rjags,
46-
coda,
4746
stats,
4847
graphics,
4948
mvtnorm,
@@ -53,8 +52,11 @@ Imports:
5352
ggplot2
5453
Suggests:
5554
parallel,
56-
rstan,
5755
metaBMA,
56+
metafor,
57+
weightr,
58+
fixest,
59+
metadat,
5860
testthat,
5961
vdiffr,
6062
knitr,

NAMESPACE

+13
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
S3method(plot,RoBMA)
44
S3method(print,RoBMA)
5+
S3method(print,marginal_summary.RoBMA)
56
S3method(print,summary.RoBMA)
67
S3method(summary,RoBMA)
78
S3method(update,RoBMA)
@@ -12,29 +13,40 @@ export(OR2z)
1213
export(RoBMA)
1314
export(RoBMA.get_option)
1415
export(RoBMA.options)
16+
export(RoBMA.reg)
1517
export(check_RoBMA)
1618
export(check_setup)
19+
export(check_setup.reg)
1720
export(combine_data)
21+
export(contr.meandif)
22+
export(contr.orthonormal)
1823
export(d2OR)
1924
export(d2logOR)
2025
export(d2r)
2126
export(d2z)
2227
export(diagnostics)
28+
export(diagnostics_autocorrelation)
29+
export(diagnostics_density)
30+
export(diagnostics_trace)
2331
export(dwnorm)
2432
export(forest)
2533
export(interpret)
2634
export(is.RoBMA)
35+
export(is.RoBMA.reg)
2736
export(logOR2OR)
2837
export(logOR2d)
2938
export(logOR2r)
3039
export(logOR2z)
40+
export(marginal_plot)
41+
export(marginal_summary)
3142
export(n_d)
3243
export(n_r)
3344
export(n_z)
3445
export(plot_models)
3546
export(prior)
3647
export(prior_PEESE)
3748
export(prior_PET)
49+
export(prior_factor)
3850
export(prior_informed)
3951
export(prior_none)
4052
export(prior_weightfunction)
@@ -69,6 +81,7 @@ export(z2r)
6981
importFrom(BayesTools,is.prior)
7082
importFrom(BayesTools,is.prior.PEESE)
7183
importFrom(BayesTools,is.prior.PET)
84+
importFrom(BayesTools,is.prior.factor)
7285
importFrom(BayesTools,is.prior.none)
7386
importFrom(BayesTools,is.prior.point)
7487
importFrom(BayesTools,is.prior.simple)

NEWS.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## version 3.0
2+
### Features
3+
- meta-regression with `RoBMA.reg()` function
4+
- posterior marginal summary and plots for the `RoBMA.reg` models with `summary_marginal()` and `plot_marginal()` functions
5+
- new vignette on hierarchical Bayesian model-averaged meta-analysis
6+
- new vignette on robust Bayesian model-averaged meta-regression
7+
- adding vignette from AMPPS tutorial
8+
- faster implementation of JAGS multivariate normal distribution (based on the BUGS JAGS module)
9+
- incorporating `weight` argument in the `RoBMA` and `combine_data` functions in order to pass `custom` likelihood weights
10+
- ability to use inverse square weights in the weighted meta-analysis by setting a `weighted_type = "inverse_sqrt"` argument
11+
12+
### Changes
13+
- reworked interface for the hierarchical models. Prior distributions are now specified via the `priors_hierarchical` and `priors_hierarchical_null` arguments instead of `priors_rho` and `priors_rho_null`. The model summary now shows `Hierarchical` component summary.
14+
115
## version 2.3.2
216
### Fixes
317
- suppressing start-up message

R/RoBMA-package.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
##' further questions.
2525
##'
2626
##' @references \insertAllCited{}
27-
##' @importFrom BayesTools is.prior is.prior.none is.prior.point is.prior.simple is.prior.PET is.prior.PEESE is.prior.weightfunction
27+
##' @importFrom BayesTools is.prior is.prior.none is.prior.point is.prior.simple is.prior.factor is.prior.PET is.prior.PEESE is.prior.weightfunction
2828
##' @importFrom Rdpack reprompt
2929
##' @importFrom rlang .data
3030
"_PACKAGE"

0 commit comments

Comments
 (0)