| Title: | Access MetaLab Community-Augmented Meta-Analysis Data |
|---|---|
| Description: | Read released, versioned data from MetaLab (<https://metalab.stanford.edu>), a database of community-augmented meta-analyses of language acquisition and cognitive development; validate candidate datasets against the MetaLab field specification; compute standardized effect sizes; and draw the standard MetaLab visualizations (scatter, violin, forest, and funnel plots) backed by multilevel random-effects models. |
| Authors: | Erik Iverson [aut], Sara El-Shawa [aut], Michael C. Frank [aut, cre] (ORCID: <https://orcid.org/0000-0002-7551-4378>), MetaLab contributors [cph] |
| Maintainer: | Michael C. Frank <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-10-08 22:26:34 UTC |
| Source: | https://github.com/cran/metalabr |
Downloads the current release's effect-size data from the MetaLab site
(no account or extra packages needed) and returns it as a data frame,
one row per effect size across all datasets. The release name is
announced with a message and attached as the metalab_release
attribute.
get_current_metalab_data(rdata_file = get_current_data_url())get_current_metalab_data(rdata_file = get_current_data_url())
rdata_file |
URL or path of the data bundle; defaults to the bundle served by the MetaLab site. |
For versioned, pinnable access use get_metalab_data; for
the dataset registry use get_metalab_metadata.
A data frame (tibble) of effect sizes, or NULL (with a
message) if the bundle could not be downloaded.
metalab_data <- get_current_metalab_data() if (!is.null(metalab_data)) dim(metalab_data)metalab_data <- get_current_metalab_data() if (!is.null(metalab_data)) dim(metalab_data)
By default, reads a released version of the MetaLab database from Redivis (https://stanford.redivis.com/datasets/81tq-8dp5ge6b9) — one row per effect size across all datasets, with all coded and derived columns. Releases are versioned and citable; the release used is announced with a message.
get_metalab_data( metalab_metadata = NULL, short_names = NULL, domains = NULL, specs = NULL, perform_validation = TRUE, version = "current", imputation_seed = 111 )get_metalab_data( metalab_metadata = NULL, short_names = NULL, domains = NULL, specs = NULL, perform_validation = TRUE, version = "current", imputation_seed = 111 )
metalab_metadata |
Optional data frame of dataset metadata (from
|
short_names |
Optional character vector of dataset short names to include. |
domains |
Optional character vector of domains to include (mutually
exclusive with |
specs |
Field specification (live-sheets path only); defaults to the current spec. |
perform_validation |
Whether to validate sheets before inclusion (live-sheets path only). |
version |
A MetaLab release name (e.g. |
imputation_seed |
Seed used when imputing missing within-participant
correlations (live-sheets path only). The default (111) is the value
used to produce every released MetaLab dataset, so effect sizes
reproduce the releases exactly; set to |
Passing metalab_metadata instead selects the legacy curator path: fetch
the live Google Sheets listed in the metadata, validate them against the
field spec, and compute effect sizes. This is how new data releases are
produced and is subject to change between calls as curators edit sheets.
A data frame (tibble) of effect sizes, or NULL (with a message)
if released data could not be fetched.
## Not run: # released data (recommended) metalab_data <- get_metalab_data() metalab_data <- get_metalab_data(version = "2023.1") mutex <- get_metalab_data(short_names = "mutex") # live curator sheets (legacy path) metadata <- get_metalab_metadata(dataset_file = "https://raw.githubusercontent.com/langcog/metalab/main/metadata/datasets.yaml") metalab_data <- get_metalab_data(metadata) ## End(Not run)## Not run: # released data (recommended) metalab_data <- get_metalab_data() metalab_data <- get_metalab_data(version = "2023.1") mutex <- get_metalab_data(short_names = "mutex") # live curator sheets (legacy path) metadata <- get_metalab_metadata(dataset_file = "https://raw.githubusercontent.com/langcog/metalab/main/metadata/datasets.yaml") metalab_data <- get_metalab_data(metadata) ## End(Not run)
By default, reads the dataset registry (one row per dataset: names,
domains, citations, curators, summary counts, and data provenance) from
the released MetaLab data on Redivis. Passing dataset_file instead
parses a datasets.yaml registry file (the legacy curator path used to
build releases).
get_metalab_metadata(dataset_file = NULL, version = "current")get_metalab_metadata(dataset_file = NULL, version = "current")
dataset_file |
Optional path or URL of a |
version |
A MetaLab release name (e.g. |
A data.frame of MetaLab dataset metadata (moderators and
subset are list-columns), or NULL (with a message) if released data
could not be fetched.
## Not run: metadata <- get_metalab_metadata() metalab_data <- get_metalab_data(metadata) ## End(Not run)## Not run: metadata <- get_metalab_metadata() metalab_data <- get_metalab_data(metadata) ## End(Not run)
Fetches the release registry served by the MetaLab site, falling back to a built-in copy if the site is unreachable.
get_metalab_versions()get_metalab_versions()
A list with elements current (release name) and releases
(named list mapping release names to metadata including
redivis_version).
versions <- get_metalab_versions() versions$currentversions <- get_metalab_versions() versions$current
Observed effect sizes (with CIs, sized by precision) alongside the fitted estimates of the canonical MetaLab multilevel model.
metalab_forest_plot( metalab_data, short_name, es_col = "g_calc", es_var_col = "g_var_calc", moderators = NULL, sort_order = "effects", alpha = 0.05 )metalab_forest_plot( metalab_data, short_name, es_col = "g_calc", es_var_col = "g_var_calc", moderators = NULL, sort_order = "effects", alpha = 0.05 )
metalab_data |
MetaLab effect-size data (from
|
short_name |
A dataset short name. |
es_col, es_var_col
|
Effect size and variance columns (e.g. |
moderators |
Optional character vector of moderator columns. |
sort_order |
One of |
alpha |
CI level (default 0.05 for 95% CIs). |
A ggplot object.
With no moderators, a classic funnel (effect size against standard error, with 95% and 99% pseudo-confidence regions around the mean). With moderators, a residual funnel around zero.
metalab_funnel_plot( metalab_data, short_names, es_col = "g_calc", es_var_col = "g_var_calc", moderators = NULL )metalab_funnel_plot( metalab_data, short_names, es_col = "g_calc", es_var_col = "g_var_calc", moderators = NULL )
metalab_data |
MetaLab effect-size data (from
|
short_names |
One or more dataset short names. |
es_col |
Effect size column (e.g. |
es_var_col |
Effect size variance column. |
moderators |
Optional character vector of moderator columns. |
A ggplot object.
Adds the square root of each effect size's variance as a fixed-effect
moderator to the canonical multilevel model and reports its coefficient —
the standard multilevel adaptation of Egger's regression test. (The legacy
application attempted metafor::regtest(), which does not support
multilevel models.)
metalab_funnel_test( metalab_data, short_names, es_col = "g_calc", es_var_col = "g_var_calc", moderators = NULL )metalab_funnel_test( metalab_data, short_names, es_col = "g_calc", es_var_col = "g_var_calc", moderators = NULL )
metalab_data |
MetaLab effect-size data (from
|
short_names |
One or more dataset short names. |
es_col |
Effect size column (e.g. |
es_var_col |
Effect size variance column. |
moderators |
Optional character vector of moderator columns. |
A one-row data.frame with columns z and p.
Effect sizes against mean participant age (months), with a weighted smoothing curve, colored by the selected categorical moderators.
metalab_scatter_plot( metalab_data, short_name, es_col = "g_calc", es_var_col = "g_var_calc", moderators = NULL, scatter_curve = "loess" )metalab_scatter_plot( metalab_data, short_name, es_col = "g_calc", es_var_col = "g_var_calc", moderators = NULL, scatter_curve = "loess" )
metalab_data |
MetaLab effect-size data (from
|
short_name |
A dataset short name. |
es_col, es_var_col
|
Effect size and variance columns (e.g. |
moderators |
Optional character vector of moderator columns. |
scatter_curve |
|
A ggplot object.
Violin plot of effect-size density
metalab_violin_plot( metalab_data, short_names, es_col = "g_calc", moderators = NULL )metalab_violin_plot( metalab_data, short_names, es_col = "g_calc", moderators = NULL )
metalab_data |
MetaLab effect-size data (from
|
short_names |
One or more dataset short names. |
es_col |
Effect size column (e.g. |
moderators |
Optional character vector of moderator columns. |
A ggplot object.
The Shiny applications formerly bundled with metalabr are superseded by the interactive visualizations on the MetaLab website, which run in the browser against released data.
viz_app(...)viz_app(...)
... |
Ignored. |
Called for its message; returns NULL invisibly.