Skip to contents

Thin extender over metafor::rma that fits a (possibly moderated) random- or fixed-effects meta-analytic model to per-study effect sizes and their sampling variances.

Usage

morie_meta_rma(yi, vi, data = NULL, ...)

Arguments

yi

Numeric vector of study-level effect-size estimates.

vi

Numeric vector of sampling variances corresponding to yi.

data

Optional data frame to evaluate yi, vi and any moderators against; passed straight through to metafor::rma.

...

Further arguments forwarded to metafor::rma (e.g. mods, method, weights, test, level, slab).

Value

A list with $method = "metafor::rma" and $raw (an rma.uni object with the pooled estimate, heterogeneity statistics and moderator effects).

Examples

# \donttest{
  if (requireNamespace("metafor", quietly = TRUE)) {
    set.seed(1)
    k <- 12
    vi <- stats::runif(k, 0.02, 0.10)
    yi <- stats::rnorm(k, mean = 0.3, sd = sqrt(vi))
    morie_meta_rma(yi = yi, vi = vi)
  }
#> $method
#> [1] "metafor::rma"
#> 
#> $raw
#> 
#> Random-Effects Model (k = 12; tau^2 estimator: REML)
#> 
#> tau^2 (estimated amount of total heterogeneity): 0.0000 (SE = 0.0197)
#> tau (square root of estimated tau^2 value):      0.0030
#> I^2 (total heterogeneity / total variability):   0.02%
#> H^2 (total variability / sampling variability):  1.00
#> 
#> Test for Heterogeneity:
#> Q(df = 11) = 10.1778, p-val = 0.5145
#> 
#> Model Results:
#> 
#> estimate      se    zval    pval   ci.lb   ci.ub      
#>   0.3613  0.0640  5.6438  <.0001  0.2358  0.4867  *** 
#> 
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> 
# }