Skip to contents

metaUI 0.2.0

This release consolidates all changes since 0.1.1, including the unreleased 0.1.2 development versions.

Breaking changes

  • Packages used only by generated apps (clubSandwich, DT, ggplot2, meta, plotly, puniform, readxl, robumeta, shinycssloaders, shinyjs, weightr, writexl, and zcurve) moved from Imports to Suggests. generate_shiny() checks them up front and prints the install command for any that are missing.
  • generate_shiny() and build_app() refuse a nonempty output folder unless overwrite = TRUE, protecting hand edits to generated apps. With overwrite = TRUE, generated files (including www/metaui.css and www/metaui.js) are replaced while unrelated files are kept.
  • Generated apps verify their dependencies at startup and record build versions in dependencies.csv, but no longer install packages automatically.
  • prepare_data() enforces explicit effect-size and variance-scale contracts: COR requires variance_scale = "r" (transformed once to Fisher’s z with delta-method variance), ZCOR requires variance_scale = "z" (not transformed twice), and directional bias models require an explicit direction ("positive" or "negative").
  • Multilevel models nest effects within genuine per-effect IDs (es_id, defaulting to input row numbers); display labels may repeat. Summed sample sizes are no longer inferred.
  • Generated apps no longer use shinyBS or waffle, and metaUI no longer depends on forcats, psych, or bayesmeta. Filter help uses accessible inline disclosures, and categorical breakdowns use inline count bars.
  • Study-level aggregation for bias models, the opt-in Bayesian model, and combined forest-plot rows now defaults to unweighted study averages with correlated sampling variances (Borenstein et al., 2009; metafor::aggregate.escalc(..., weighted = FALSE)) instead of inverse-covariance GLS. Choose "unweighted" (default), "gls", or "first" via options = list(aggregation_method = ...) in generate_shiny() or build_app(). The legacy "aggregate" method name has been removed.
  • The Barroso et al. (2021) CSV (inst/extdata/barroso2021.csv), whose redistribution terms could not be verified, has been replaced with a stub pointing to the bundled licensed examples (coles2019.csv and inst/examples/dannheim).

New features

  • Odds and risk ratios: prepare_data() supports es_type = "OR" and "RR", from log ratios (variance_scale = "log") or 2x2 counts (counts, converted with metafor::escalc()). Double-zero tables are excluded by default (double_zero = "exclude", following the Cochrane Handbook) or kept with double_zero = "keep". Models fit on the log scale; estimates, intervals, plots, equivalence bounds (x vs 1/x and x), and forest exports display ratios on log axes, while slopes, variances, and Egger’s test remain on the log scale and are labelled as such. Count columns are editable in downloaded workbooks and recomputed on upload.
  • Static (serverless) website export (experimental): generate_shiny(static_folder = ...), JSON static_folder, and export_static() publish generated apps as static shinylive/webR sites that run in the reader’s browser without a Shiny server. Precomputed Summary results appear immediately while webR loads; selection links, downloads, and mobile layout work inside the static frame; include_sources = TRUE bundles copyleft source archives for deposits such as Zenodo. Every visitor downloads the full dataset and app code, so publish only shareable material; with overwrite = TRUE, the static site folder is deleted and rewritten. Requires the suggested shinylive package.
  • Headless JSON builds (build_app()): Create apps from a versioned JSON configuration (inst/examples/config.schema.json). Schema version 2 adds alternative effect-size computations, Bayesian analysis, build-time study_info, and 2x2 counts / double_zero; both versions support design, primary_model, static_folder, eff_size_type_label, filter_popups, options, and about.
  • Author design helper (design_app(), app_design()): Preview WCAG AA contrast-checked colour palettes, fonts (including bundled open-licensed Source Sans 3 and Source Serif 4), text size, spacing, and corner radii, and pass them via generate_shiny(design = ...) or JSON design. Apps in the default design also follow dark mode (prefers-color-scheme: dark or data-theme="dark"), including dark server-rendered plots.
  • Primary model declaration: Pass primary_model to generate_shiny() or JSON configs to lead the Summary and Forest plot with the authors’ primary analysis and label other estimators as explorations. If the primary model cannot be estimated for a selection, the app reports why and never substitutes another model.
  • Opt-in Bayesian analysis by grid quadrature: Enable a study-level normal-normal model (bayesian = list(enabled = TRUE, tau_scale = ...)) with a flat mean prior, half-normal heterogeneity prior (default scale 0.5 for SMD and log OR/RR, 0.25 for Fisher’s z), posterior medians, 95% central credible intervals, and half/double prior sensitivity. Computed directly via 2,000-point grid quadrature over between-study SD (no bayesmeta required, sub-second even at 646 studies natively and in webR, no default study cap; validation/bayesian-grid.md).
  • Leave-one-out influence diagnostics: Under Outlier diagnostics, readers can inspect the average effect leaving out each study (or source, when article_label is provided) in turn, with changes in standard errors, flags when the CI crosses the null or the estimate crosses a chosen equivalence bound, CSV export, fast WLS updates for large selections, and automatic or on-demand full refits reporting changes in the prediction interval or τ (validation/leave-one-out.md).
  • Reproducible code export: Readers can download a standalone R script or Quarto (.qmd) file that reproduces the applied selection (filters, missing-value choices, effect computation, and equivalence bound) and Summary model rows from the downloaded workbook without metaUI, recording package versions (with an optional commented-out groundhog call) and comparing reproduced values against the app (validation/code-export.md).
  • Study details (fetch_study_metadata(), study_info): Look up Crossref/OpenAlex metadata from DOIs at build time (with CSV caching and open-licence filtering for abstracts) or supply your own table via study_info. Studies in the Sample table expand to show APA-formatted references (with copy buttons), DOI links, and permitted abstracts, and readers can download selected references as .txt, .bib, or .xlsx. Generated apps never query external services.
  • Alternative effect-size computations: Supply up to five author-defined computations via prepare_data(alternatives = ...), compared on a dedicated tab with shared effect identities, provenance, and workbook/link restoration.
  • Practical equivalence assessment: Readers can enter a symmetric smallest effect size of interest on the displayed scale (no default) to assess each model’s 90% interval (matching two one-sided tests at .05 for frequentist intervals, or at least 90% posterior probability within the bounds for Bayesian credible intervals; custom models can supply LCL90 and UCL90) without refitting; bounds are recorded in workbooks and shareable links.
  • Shareable selection links: Short, readable, build-validated query links (?metaui=...) restore filters, missing-value choices, computation, and equivalence bound. Links made for earlier data versions still apply as far as they fit and report what changed.
  • Forest plot pagination and exports: Interactive paginated forest table (50 studies per page, expandable multi-effect studies, Find a study search, sorting by name or estimate) paired with multi-page PDF (max_forest_plot_rows, default 60 effects per page, with plain-PDF fallback when Cairo cannot load), current-page PNG, and full CSV downloads.
  • Additional authoring options: generate_shiny() gains options (intro, shiny_theme, max_forest_plot_rows, selection_list_threshold, correlation_dependent, aggregation_method, fit_cache_entries) and validates them up front. prepare_data() gains arrange_filters, categorical_filters, es_id, counts, double_zero, and HTML entity decoding (&, –, etc.). Apps can be built without any filters or moderators. Custom model tables can supply interval_type, LCL90/UCL90, and description.

Statistical improvements

  • Unweighted study-level aggregation and GLS diagnostics: Bias models, the opt-in Bayesian model, and combined forest-plot rows default to unweighted study averages with correlated sampling variances (options$aggregation_method = "unweighted", matching metafor::aggregate.escalc(..., weighted = FALSE)), avoiding negative weights and attenuation bias under within-study heterogeneity. Authors opting into options$aggregation_method = "gls" receive build-time warnings, validation.json diagnostics, and reader notes in Methods and the Forest plot whenever negative GLS weights occur. Numeric study IDs now sort numerically in the Forest plot and study search. Univariate ML/REML helpers retry once with damped Fisher scoring on convergence failure, and leave-one-out shortcuts reject trim-and-fill fits even when zero studies are imputed.
  • Correlated and hierarchical effects (CHE) default multilevel model: The default multilevel model correlates sampling errors within studies at options$correlation_dependent (default 0.6) via metafor::vcalc(), matching the within-study correlation used for study-level aggregation and RVE. Multilevel t tests use containment degrees of freedom (dfs = "contain"), and RVE uses Tipton’s (2015) small-sample correction (small = TRUE, flagging df < 4).
  • One effect per study default: When every study has a single effect, generate_shiny() defaults to a single standard random-effects model (metafor::rma.uni, REML, Hartung-Knapp interval; get_model_tibble(one_effect_per_study = TRUE)), replacing the multilevel/RVE pair and refusing uploads with multiple effects per study. Pass models = get_model_tibble() to retain the multilevel/RVE pair.
  • Dependent-effect moderator tests: Moderator models extend the primary metafor::rma.mv model (or default CHE model) with cluster-robust CR2 standard errors (clubSandwich) and a fast equivalent HTZ omnibus test (sub-second on 33 categories / 2,628 effects). Single-study categories and categories below 4 small-sample df omit unstable intervals; single-study categories are excluded from the omnibus test; numeric moderators require at least three studies; one-effect-per-study selections use REML with Hartung-Knapp intervals. Missing/excluded moderator values are dropped before testing rather than tested as a level.
  • Heterogeneity and prediction intervals: Intercept-only metafor models report 95% prediction intervals (PI_LCL, PI_UCL). Heterogeneity reports I² (using the CHE sampling covariance, split between and within studies where identified), τ, and plain caveats on Q test power and I² interpretation.
  • Publication bias refinements: Generated apps use metafor for trim-and-fill (reporting observed-study k and imputed count, noting when filling moves estimates away from the null), funnel plots, and Egger’s test (meta is only needed when author model code calls it). The Summary marks the conditional PET-PEESE estimate (Stanley & Doucouliagos, 2014; Stanley, 2017). P-curve runs on Fisher’s z for correlations and log ratios for OR/RR (effect estimation stays SMD-only and rejects negative estimates instead of flipping their sign).

Generated app interface and accessibility

  • Redesigned reader interface: Generated apps open directly on build-time precomputed results (opening_results.rds, invalidated automatically if app files or R/model package versions change) with Update results quiet until filters change. The Summary leads with one headline sentence and draws all model intervals as diamonds on a shared axis (clipping extreme broken intervals with edge arrows so other rows stay readable).
  • Phone and mobile support: Filters collapse behind a toggle on phones, wide tables reflow into labelled cards, forest labels wrap, plots scale to fit, and static previews render at phone width.
  • Sample and Outlier views: Sample tables switch between one row per effect, study, or source, showing effect-size ranges rather than averages for grouped rows; breakdowns preserve author factor ordering and keep (Missing) distinct. Outlier diagnostics show an interactive histogram with 1.5 IQR points and an accessible table of flagged effects with N, 95% CI, and z.
  • Workbooks and uploads: Downloaded workbooks lead with an instructions sheet marking Edit, Derived, Fixed, and Other columns. Uploads validate sheets and types by row, recompute derived columns (including 2x2 counts and z-scores), number added effect IDs, keep ordered factors and leading/trailing whitespace, widen full-extent ranges outward to keep added extreme values, restore saved equivalence bounds, and clear cached fits.
  • Accessibility: WCAG AA contrast, single top-level heading, skip link, keyboard-accessible dual-handle sliders with typed range editing, accessible names on pickers/inputs/iframes, descriptive plot alt text, and screen-reader status announcements.

Performance

  • Dense vs sparse multilevel fits: Multilevel and moderator fits use dense matrices up to 250 effects (2–10x faster on small datasets natively and in webR) and sparse matrices above 250 effects (20x faster at 2,600 effects), with identical estimates.
  • Single-threaded BLAS: Generated apps set BLAS to one thread via RhpcBLASctl when installed on a server (avoiding ~60x OpenBLAS contention slowdowns); build-time precomputation restores the author’s BLAS setting afterwards.
  • Fit caching and background tabs: Compatible fits are reused across diagnostics and cached per session (up to 3 entries for default models; 0 by default for custom models). After each update, remaining tabs pre-render one at a time in the background; moderator tests for the default selection are saved at build time.
  • P-curve deduplication: Identical noncentrality solves in pcurve() are deduplicated without changing results.

Bug fixes

  • Fixed prepare_data() handling of na.rm = TRUE (ignores unmapped columns), arrange_filters = "alphabetical" (sorts by label), NULL optional mapping arguments (url, article_label, es_label), DOI prefix/whitespace normalisation, and non-ASCII/punctuation filter labels.
  • Fixed se.from.p() handling of NA inputs and inverted CIs for negative effect sizes, pcurve() restoration of graphical par(mar) and global options, and metaUI_parse_crossref() / metaUI_normalise_doi() edge cases.
  • Fixed create_about() handling of custom list_packages character vectors (including 1–2 packages) and NULL metadata fields, added input guards in generate_shiny(), and handled equal-SE selections cleanly in Egger’s test.
  • Fixed to_tribble() round-tripping of backslashes and quotes in custom model code, and eliminated temporary-file leaks in code export and app warm-up.
  • Fixed forest PDF clipping of top summary diamonds, non-converging funnel/Egger error handling, single-effect and empty-selection messaging, double-escaping on the leave-one-out refit button, and Reset behaviour after uploads.
  • Corrected the Effect computations comparison table formatting to match the Summary and Bayesian sensitivity tables.

Examples and testing

  • Added the CC-BY-4.0 Dannheim et al. (2025) mental-health example (inst/examples/dannheim) with a verified source-reference REML/Hartung-Knapp model, a synthetic correlation example (inst/examples/correlations), and updated inst/extdata/coles2019.csv with the paq outcome-type column.
  • Expanded automated tests to over 2,600 assertions covering statistical contracts against metafor, headless server tests, static export, and Chromium browser smoke checks on Linux, macOS, and Windows.

metaUI 0.1.1

  • Fixed issue where k was not displayed for moderators with spaces in names
  • Simplified implementation of generate_shiny() - it is now always saved, either to provided path or to temporary files, and launched from file. This should increase robustness. Also, removed unnecessary app.R so that globals.R does not need to be called explicitly.
  • Added a NEWS.md file to track changes to the package.
  • Added explicit option to include or exclude NAs on filters and report NA share in Sample descriptives
  • Added Reset button to reset all filters
  • Added option to add popups to filter, by specifying filter_popups in generate_shiny()