Accessing MetaLab data

MetaLab is a database of community-augmented meta-analyses of language acquisition and cognitive development: thousands of standardized effect sizes, coded from the primary literature by dataset curators, with the moderators needed to analyze them. metalabr reads MetaLab data into R.

library(metalabr)

Released data

MetaLab data are published as versioned, citable releases (hosted on Redivis). get_metalab_data() reads a release — one row per effect size across all datasets — and announces which release it used:

metalab_data <- get_metalab_data()
if (!is.null(metalab_data)) {
  dim(metalab_data)
}

For reproducible analyses, pin the release your paper used rather than tracking "current":

metalab_2023 <- get_metalab_data(version = "2023.1")
if (!is.null(metalab_2023)) {
  nrow(metalab_2023)
}

get_metalab_versions() lists the available releases:

str(get_metalab_versions(), max.level = 2)

Reading released data requires the redivis package (not on CRAN):

install.packages("redivis",
                 repos = c("https://langcog.r-universe.dev",
                           "https://cloud.r-project.org"))

The dataset registry

get_metalab_metadata() reads the registry: one row per dataset, with domains, citations, curators, summary counts, and each dataset’s coded moderators:

metadata <- get_metalab_metadata()
if (!is.null(metadata)) {
  metadata[1:5, c("name", "domain", "num_papers", "num_experiments")]
}

Working with effect sizes

Individual datasets can be selected on read. Every dataset carries the calculated effect sizes (d_calc, g_calc, r_calc, log_odds_calc), their variances, and the standard MetaLab derived columns (mean_age_months, same_infant_calc for clustering, and so on):

mutex <- get_metalab_data(short_names = "mutex", version = "2023.1")
if (!is.null(mutex)) {
  summary(mutex$g_calc)
}

The package includes the standard MetaLab visualizations, backed by the same multilevel random-effects models (metafor::rma.mv with effect sizes nested in participant groups nested in papers) used on the MetaLab site — scatter, violin, forest, and funnel plots, plus Egger’s regression test for funnel asymmetry:

if (!is.null(mutex)) {
  metalab_funnel_plot(mutex, "mutex")
}
if (!is.null(mutex)) {
  metalab_funnel_test(mutex, "mutex")
}

Current data without dependencies

get_current_metalab_data() downloads the current release’s effect sizes from the MetaLab site with no account or extra packages — the same data frame get_metalab_data() returns, restricted to the current release:

current <- get_current_metalab_data()
if (!is.null(current)) {
  dim(current)
}

Citing MetaLab

If you use MetaLab data, please cite the release you used (shown in every data-access message), the dataset(s) you analyzed (citations are in the registry’s full_citation column), and the MetaLab platform papers — see metalab.stanford.edu for the current citation policy.