Meta-analyzing correlations

Note: This vignette is a work in progress.

  collapse = TRUE,
  comment = "#>"
options(width = 160)

This vignette will walk you through estimating barebones meta-analyses of correlations between multiple constructs. For more vignettes, see the psychmeta overview.

Getting Started

To begin, you will need your meta-analytic data sheet for analysis. We recommend the rio package for importing data to R. For an introduction to rio, see vignette("rio", "rio").

psychmeta assumes that your data are in "long" format, with each row corresponding to one effect size. For example, this is the format used in this data frame:


In this table, - sample_id contains labels indicating the sample each effect size is drawn from; - moderator is a moderator variable, each row containing the effect size's level for that moderator; - x_name and y_name are columns indicating the variables/constructs being related in the effect size; - n is the sample size for the effect size; - rxyi is the effect size (the correlation between the two constructs/variables); - rxxi and ryyi are the sample reliability values for the measures of the x_name and y_name variables, respectively; - citekey contains the citations keys for each study (used to generate bibliographies of included studies).

You can see this data set includes correlations among three variables: X, Y, and Z, and that each sample contributes several effect sizes, one each for for different pairs of variables/constructs.

If your data are in a different format, you can use the reshape_wide2long() function to reshape it.

Estimating a Barebones Meta-Analysis

Let's assume your data frame is called coding_sheet.

coding_sheet <- data_r_meas_multi


The primary function to conduct meta-analyses of correlations is ma_r(). To conduct barebones meta-analyses, run:

ma_res <- ma_r(rxyi = rxyi, 
               n = n, 
               construct_x = x_name,
               construct_y = y_name,
               sample_id = sample_id, 
               moderators = moderator,
               data = coding_sheet

To conduct a barebones meta-analysis, at minimum, n and rxyi are needed.

Modeling Options

The psychmeta Meta-Analysis Object

A psychmeta meta-analsyis object is a data frame, with each row being a meta-analysis or subanalysis and each column containing information about or results from that analysis. For example, the results of the analysis above look like this:


Each row corresponds to a different pair of variables/constructs (X-Y; X-Z; Y-Z) and level of the moderator variable (overall/all levels pooled together; moderator = 1; moderator = 2).

Viewing Results Summaries

To view meta-anlaysis results tables, use the summary() function:


In this table,

To view additional results, such as observed variance (var_r) or standard deviation of sampling errors (sd_e), use the get_metatab() function and select the appropriate columns:



To view all columns of this table, convert it to a data.frame or tibble:


Moderator Analyses

Results for subgroup analyses for different levels of categorical moderators are shown in the rows of the meta-analysis results table. To estimate confidence intervals for differences between levels or an omnibus ANOVA statistic, use the anova() function:


Correcting for Statistical Artifacts

See Artifact corrections](artifact_corrections.html).

Outputting Results

To output the main meta-analysis results table to RMarkdown, Word, HTML, PDF, or other formats, use the metabulate() function. For example, to output the above results to a Word document, run:

metabulate(ma_res, file = "meta-analysis_results.docx", output_format = "word")

Follow-Up Analyses


You can add plots for each meta-analysis in ma_res using the plot_forest() and plot_funnel() functions:

ma_res <- plot_funnel(ma_res)
ma_res <- plot_forest(ma_res)

You can view these plots using the get_plots() function. This will return a list of all of the plots in this results. Specify which meta-analysis you want to view plots for by passing its analysis_id to [[:


For forest plots, if you select an "Overall" meta-analysis, it will include plots faceted by moderator levels ("moderated") and not ("unmoderated"):


Heterogeneity Analyses

psychmeta reports the random-effects standard deviaton (τ or SD_res_) and credibility intervals (mean_r ± crit × SD~res~) in the main meta-analaysis results tables. To view confidence intervals for SD_res_ or additional heterogeneity statistics, use the heterogeneity() function:

ma_res <- heterogeneity(ma_res)

Publication Bias and Sensitivity Analyses

psychmeta supports cumulative meta-analysis for publication/small-sample bias detection, leave-1-out sensitivity analyses, and bootstrap confidence intervals using the sensitivity function:

ma_res <- sensitivity(ma_res)

Try the psychmeta package in your browser

Any scripts or data that you put into this service are public.

psychmeta documentation built on Aug. 26, 2022, 5:14 p.m.