Package: multiverse 0.6.3

Abhraneel Sarma

multiverse: Create 'multiverse analysis' in R

Implement 'multiverse' style analyses (Steegen S., Tuerlinckx F, Gelman A., Vanpaemal, W., 2016) <doi:10.1177/1745691616658637> to show the robustness of statistical inference. 'Multiverse analysis' is a philosophy of statistical reporting where paper authors report the outcomes of many different statistical analyses in order to show how fragile or robust their findings are. The 'multiverse' package (Sarma A., Kale A., Moon M., Taback N., Chevalier F., Hullman J., Kay M., 2021) <doi:10.31219/osf.io/yfbwm> allows users to concisely and flexibly implement 'multiverse-style' analysis, which involve declaring alternate ways of performing an analysis step, in R and R Notebooks.

Authors:Abhraneel Sarma [aut, cre], Matthew Kay [aut], Michael Moon [ctb], Mark Miller [ctb], Kyle Hwang [ctb], Hadley Wickham [ctb]

multiverse_0.6.3.tar.gz
multiverse_0.6.3.zip(r-4.7)multiverse_0.6.3.zip(r-4.6)multiverse_0.6.3.zip(r-4.5)
multiverse_0.6.3.tgz(r-4.6-any)multiverse_0.6.3.tgz(r-4.5-any)
multiverse_0.6.3.tar.gz(r-4.7-any)multiverse_0.6.3.tar.gz(r-4.6-any)
multiverse_0.6.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
multiverse/json (API)

# Install 'multiverse' in R:
install.packages('multiverse', repos = c('https://mucollective.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/mucollective/multiverse/issues

Pkgdown/docs site:https://mucollective.github.io

Datasets:
  • durante - Survey to study the effect of fertility on religiosity and political attitudes
  • hurricane - Survey to study the effect of fertility on religiosity and political attitudes
  • userlogs - Userlogs
  • vis_correlation - Participants responses in the study by Harrison et al., "Ranking Visualizations of correlation according to Weber's law"

On CRAN:

Conda:

9.10 score 65 stars 1 packages 54 scripts 284 downloads 19 exports 59 dependencies

Last updated from:08f71e0c3b. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK194
source / vignettesOK330
linux-release-x86_64OK188
macos-release-arm64OK206
macos-oldrel-arm64OK234
windows-develOK150
windows-releaseOK157
windows-oldrelOK140
wasm-releaseOK144

Exports:codeconditionsexecute_multiverseexecute_universeexpandexport_code_jsonexport_data_jsonexport_results_dist_jsonexport_results_jsonextract_variable_from_universeextract_variablesinsideis_multiverseis.multiverseknit_as_emarmultiverseparameterssizestyle_multiverse_code

Dependencies:abindbase64encberryFunctionsbitbit64clicliprcodetoolscollectionscpp11crayondigestdistributionaldplyrevaluatefastmapformatRfurrrfuturegenericsglobalsgluehighrhmshtmltoolsjsonliteknitrlifecyclelistenvmagrittrnumDerivparallellypillarpkgconfigprettyunitsprogresspurrrR.cacheR.methodsS3R.ooR.utilsR6readrrlangrprojrootrstudioapistringistringrstylertibbletidyrtidyselecttzdbutf8vctrsvroomwithrxfunyaml

A discussion on branches in the multiverse
Branches in a multiverse analysis | The syntax for declaring a branch() | Diving deeper: the multiverse compiler | Going back to branches | Example 1: A branch within functions in a "pipe": %>% | Example 2: Another branch within a function | Example 3: Beware of the flexibility | Example 4: Variable assignment inside a branch statement | Example 5: A branch as a function | Example 6: Defining parameters separately | Example 7: Parameters can be re-used (and alternate ways of declaring the same branch) | Example 8: Declaring continuous variables in branch | Example 9: Nested branch statements and asymmetric trees

Last update: 2025-10-22
Started: 2019-10-08

Declaring conditions in the multiverse
The data | Specifying conditions in the multiverse analysis | The %when% operator | Implementing conditions in a complete analysis

Last update: 2025-10-22
Started: 2021-06-14

Example multiverse implementation: Female hurricanes are deadlier than male hurricanes
Multiverse case study #4 | Introduction | Original analysis | Multiverse Analysis | Excluding outliers | Note | Identifying independent variables | Declaring alternative specifications of regression model | Execution and Results

Last update: 2025-10-22
Started: 2024-09-18

Example multiverse implementation: Re-evaluating the efficiency of physical visualizations
Multiverse case study #2 | Introduction | The data | Analysis #1: Mean and Confidence Intervals for each condition | Average task completion time (arithmetic mean) for each condition. | Note | Results #1 | Extracting the results from the multiverse object | Visualising the results | Sidebar: Using the tidyverse to extract and visualize the results | Analysis #2: Differences between mean completion times between conditions | Extracting and visualizing the results from the multiverse | Results #2 | Conclusion

Last update: 2025-10-22
Started: 2024-09-18

Example multiverse implementation: Recreating Adding inferential treatments to plots using Resampling and Animations using multiverse
Multiverse case study #3 | Introduction | The data | Just Noticeable Differences (JNDs) | Regression results | Implementation in multiverse | Note

Last update: 2025-10-22
Started: 2024-09-18

Execution of multiverse analysis: Sequential and Parallel
Introduction | Data and analysis | Execution | Sequential | Parallel: separate R sessions | Parallel: separate forked processes | Parallel: compute clusters | What if I want to execute only a subset of the specifications?

Last update: 2025-10-22
Started: 2022-05-19

Extracting and Visualising the results of a multiverse analysis
Introduction | Data and Analysis | Model #2: Effect of Fertility and Relationship status on Religiosity | The results | Computing the results in each multiverse | Extracting the results | Visualisations | Animating the coefficients of the model from each multiverse | Histogram of p-values of the Fertility × Relationship status interaction | Specification curve

Last update: 2025-10-22
Started: 2021-06-14

Using the multiverse in RMarkdown: Introduction to multiverse code chunks
Introduction | Inside() and Multiverse analysis in R scripts | Multiverse in RMarkdown | Multiverse code block | Notes on using multiverse code blocks | In RStudio using RMarkdown | Knitting to HTML using knitr | Debugging Keyboard Shortcuts | On OS X Systems

Last update: 2025-10-22
Started: 2020-10-28

Example multiverse implementation: Effect of fertility on religiosity and political attitudes
Multiverse case study #1 | Introduction | The data | A single data set analysis: one possible analysis among many | Multiverse implementation | Note | The multiverse, with declared code and branches | Running a single analysis from the multiverse | A multiverse with all possible combinations specified | Specifying conditions in the multiverse analysis | Putting it all together | Modeling | Model #2: Effect of Fertility and Relationship status on Religiosity

Last update: 2025-10-20
Started: 2024-09-18

Exporting the output of a multiverse to JSON for Milliways, a multiverse visualisation tool
Introduction | Milliways | Analysis | Cycle Length | Certainty | Menstrual Calculation | Fertility | Relationship Status | Regression Model | Visualising the Results | Exporting the JSON files | Exporting the results | A Note on Distributional Assumptions | Exporting the Code | Exporting the Dataset

Last update: 2025-10-20
Started: 2025-10-20

Readme and manuals

Help Manual

Help pageTopics
'Explorable Multiverse' Data Analysis and Reports in Rmultiverse-package
Define constraints for combinations of analysis paths in the multiverse%when%
Accessing contents of the multiverse object$.multiverse $<-.multiverse accessors code code.default code.multiverse conditions conditions.default conditions.multiverse expand expand.default expand.multiverse extract_variable_from_universe parameters parameters.default parameters.multiverse size size.default size.multiverse
Define multiple analysis paths for a step in the multiversebranch
Survey to study the effect of fertility on religiosity and political attitudesdurante
Execute parts of, or the entire multiverseexecute execute_multiverse execute_universe
Exporting results from a multiverse analysis to JSONexport_code_json export_data_json export_json export_results_dist_json export_results_json
Extract variables and objects from the multiverseextract_variables extract_variables.data.frame extract_variables.multiverse
Code corresponding to a single analysisget_code
Survey to study the effect of fertility on religiosity and political attitudeshurricane
Pass code into the multiverseinside
Compile a RMarkdown into an Explorable Multiverse Analysis Reportknit_as_emar
Create custom code blocks for multiverse analysismulitiverse_code_block
Create a new multiverse objectis.multiverse is_multiverse multiverse
Parse the multiverse syntax to identify branchesparse_multiverse
Accessing contents of the multiverse objectprint print.multiverse
Stylises the code of multiverse for printingstyle_multiverse_code
Userlogsuserlogs
Participants responses in the study by Harrison et al., "Ranking Visualizations of correlation according to Weber's law"vis_correlation