ppmc_ma: Posterior Predictive Model Check for Meta-Analysis Models

Description Usage Arguments Value Examples

View source: R/MA-PPMC.R

Description

This function performs a posterior predictive model check on meta-analysis results from the metafor package to assess model fit. This function returns posterior predictive p-values (PPP-values) for the following discrepancy measures: mean study-level effects, minimum study-level effects, maximum study-level effects, mean study-level weights, minimum study-level weights, maximum study-level effects and pooled effect size. Graphical results are also saved for each of these discrepancy functions.

Usage

1
ppmc_ma(meta, fixed = FALSE, iter = 17000)

Arguments

meta

An 'rma' object that contains the results of a meta-analysis performed in the metafor package.

fixed

Logical variable specifying whether the meta-analysis results were using a fixed-effect model (default) or a random-effects model.

Value

ppp A vector containing the PPP-values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
library(Rcpp)
library(metafor)
d = c(.2, .3, .25, .3, .4, .15)
w = c(250, 300, 400, 275, 250, 200)
v = 1 / w

re_meta = metafor::rma(yi = d, vi = v, method = "REML")

ppmc_ma(meta = re_meta, fixed = FALSE)

## End(Not run)

JeffreyCHoover/metaModelFitR documentation built on June 9, 2020, 3:24 a.m.