Skip to contents

Build, run, summarise, and report multiverse and vibration-of-effects analyses in R. Empirical analysis involves many defensible choices, model form, covariate selection, transformations, and missing-data rules among them. forkflow makes that decision space explicit: enumerate the specifications, fit a model across the whole grid, and summarise the distribution of estimates instead of reporting a single analytic pathway.

forkflow is the engine behind the book Analytic Multiplicity in Epidemiology: A Reproducible Workflow in R, and my useR! 2026 talk and its examples are drawn from that project.

Documentation

Installation

# the package (fast; no vignette):
# install.packages("pak")
pak::pak("acolum/forkflow")

# the package with the vignette built (needs remotes + knitr/rmarkdown):
# install.packages("remotes")
remotes::install_github("acolum/forkflow", build_vignettes = TRUE)

The workflow

Step Function What it does
Enumerate spec_grid(), adjuster_sets() Turn analytic choices into a grid, one row per specification
Fit fit_multiverse() Fit a model across the whole grid, optionally in parallel via furrr
Summarise voe() Relative ratio, Janus fraction, and the spread of estimates
Visualise spec_curve(), voe_volcano() Specification curve and vibration-of-effects volcano
Report report_multiverse() Save shareable figures and a summary table

Quick example

library(forkflow)
library(survival)
library(broom)

d <- colon |> dplyr::filter(etype == 2) |> tidyr::drop_na()

specs <- adjuster_sets(
  c("age", "sex", "obstruct", "perfor", "adhere", "differ", "surg")
)

results <- fit_multiverse(specs, function(spec) {
  f <- reformulate(c("node4", spec$adjusters[[1]]), "Surv(time, status)")
  coxph(f, data = d) |> tidy(conf.int = TRUE) |>
    dplyr::filter(term == "node4")
})

voe(results)          # relative hazard ratio + Janus fraction
spec_curve(results)   # the distribution, ranked
voe_volcano(results, colour = n_adjusters)

Methodological background

  • Steegen, Tuerlinckx, Gelman and Vanpaemel (2016). Increasing transparency through a multiverse analysis. Perspectives on Psychological Science.
  • Patel, Burford and Ioannidis (2015). Assessment of vibration of effects due to model specification. Journal of Clinical Epidemiology.
  • Klau, Hoffmann, Patel, Ioannidis and Boulesteix (2021). Examining the robustness of observational associations with the vibration of effects framework. International Journal of Epidemiology.

Companion book

This repository also contains a Quarto book of tutorials in book/, Analytic Multiplicity in Epidemiology: A Reproducible Workflow in R. You can render it with:

quarto render book

Contributing

Contributions are welcome. forkflow follows tidyverse conventions. Please open an issue before a large pull request.

Citation

citation("forkflow")