artma (Automatic Replication Tools for Meta-Analysis) is an R package designed to make meta-analysis accessible, reproducible, and comprehensive. This vignette will get you up and running quickly, showing you how to use artma for your meta-analysis needs.
The simplest way to use artma is to call the main function:
library(artma) results <- artma()
In an interactive R session this opens the session hub, a menu you stay in for as long as you like. From it you:
artma remembers the options file you last ran on: the next plain artma()
call resumes on it automatically ("Resuming on
If you want artma to open the results folder for you at the end of a run, set open_results = TRUE. You can always access your results later manually using artma::results_open().
That's it! The function handles all the complexity behind the scenes.
Before diving deeper, it helps to understand three key concepts:
artma() Functionartma() is the main entry point for the package. It orchestrates everything:
You can use it in different ways:
# Fully interactive - prompts for everything artma() # Specify methods to run artma(methods = c("funnel_plot", "bma")) # Use a specific options file artma(options = "my_analysis.yaml") # Provide data directly (bypasses file reading) artma(data = my_dataframe, methods = "effect_summary_stats")
Options files are YAML configuration files that store all your analysis settings. Think of them as recipes for your meta-analysis:
The key benefit: reproducibility. Save your options file, and you can rerun the exact same analysis anytime.
Methods are the analytical functions that perform specific meta-analysis tasks. Each method does something different:
effect_summary_stats - Calculate overall effect sizes and confidence intervalsfunnel_plot - Visualize publication biasbma - Bayesian Model Averaginglinear_tests - Test linear relationshipsnonlinear_tests - Test nonlinear relationshipsexogeneity_tests - Test for endogeneityp_hacking_tests - Detect p-hacking patternsmaive - MAIVE estimator, correcting for publication bias, p-hacking, and spurious precisionvariable_summary_stats - Summary statistics for variablesYou can run one method, multiple methods, or all methods in a single call. For a full description of every method, see the Methods Overview vignette.
This is the easiest way to get started:
# Step 1: Load the package library(artma) # Step 2: Run interactively results <- artma() # Step 3: Explore results names(results) # See which methods ran results$effect_summary_stats # Access specific results
During the interactive session, the hub menu lets you:
Once you've created an options file, reuse it:
# Run with a specific options file results <- artma(options = "my_analysis.yaml") # Or specify the directory too results <- artma( options = "my_analysis.yaml", options_dir = "~/my_meta_analyses/configs" )
This is perfect when:
For scripts and automation:
# Create options file programmatically artma::options_create( options_file_name = "analysis_2025", user_input = list( "data.source_path" = "/path/to/data.csv", "data.columns" = list( effect = list(source_name = "effect_size"), se = list(source_name = "standard_error") ), "methods.effect_summary_stats.conf_level" = 0.95 ) ) # Run analysis results <- artma( options = "analysis_2025", methods = c("effect_summary_stats", "funnel_plot") )
If your data is already loaded in R:
# Your data frame my_data <- data.frame( effect = c(0.5, 0.3, 0.7, 0.4), se = c(0.1, 0.15, 0.12, 0.11), study = c("Study A", "Study B", "Study C", "Study D"), n_obs = c(100, 150, 120, 130) ) # Run analysis directly results <- artma( data = my_data, methods = "effect_summary_stats" )
Note: When you provide data directly, you still need options for method parameters, but artma will handle data reading automatically.
The artma() function returns a named list, where each element corresponds to a method that was run:
results <- artma(methods = c("effect_summary_stats", "funnel_plot")) # Structure: # results # ├── effect_summary_stats (results from effect summary statistics) # └── funnel_plot (results from funnel plot analysis)
The structure of each result depends on the method. Some methods return:
To explore results:
# See what methods ran names(results) # Access a specific result effect_results <- results$effect_summary_stats # The structure varies by method - use str() to explore str(effect_results)
A run that saves results writes them into its output directory (tables/ for
the exported tables, graphics/ for the plots) together with a run.json
manifest describing that run: when it happened, which options file and data
source it used, the methods requested, run, skipped and failed, the effective
seed, and the files it wrote.
The file list is recorded as the files are written, so it describes the run
rather than everything that has piled up in the directory. That is what the
HTML report uses to find each method's plots, and what the CLI reports in
--json mode.
Every run also closes with a Run summary block on the console: the same
facts, read from the same sources, so the manifest and what you saw scroll by
never disagree.
run.json is overwritten by every run into the same output directory: it
always describes the latest run, never a history. Runs driven by different
options files already get their own output directory.
To keep every run instead of overwriting it, set output.run_subdirectories
to TRUE. Each run then writes into its own timestamped subdirectory
(<output.dir>/runs/2026-08-25_14-30-12/), with its own tables/,
graphics/, manifest and report, and artma::results_dir() /
artma::results_open() point at the latest one.
To see what methods are available:
artma::methods_list()
This prints all available methods to the console.
You have several options:
# Run specific methods artma(methods = c("effect_summary_stats", "bma")) # Run all methods artma(methods = "all") # Interactive selection (if methods not specified) artma() # Will prompt you to choose
Methods run in a predefined order (you don't need to worry about this, but it's good to know). If you specify multiple methods, they'll execute in the optimal sequence automatically.
Options files are created automatically when needed, but you can also create them explicitly:
# Interactive creation artma::options_create() # Programmatic creation artma::options_create( options_file_name = "my_analysis", user_input = list( "data.source_path" = "/path/to/data.csv", "data.columns" = list( effect = list(source_name = "effect_size"), se = list(source_name = "standard_error") ) ) )
# List all options files artma::options_list() # Copy an options file artma::options_copy( options_file_name_from = "baseline.yaml", options_file_name_to = "sensitivity.yaml" ) # Modify an options file artma::options_modify( options_file_name = "my_analysis.yaml", options_to_modify = list( "methods.effect_summary_stats.conf_level" = 0.99 ) ) # Validate an options file artma::options_validate("my_analysis.yaml")
For detailed information about options files, see the Understanding Options Files vignette.
Your dataset needs certain columns for artma to work. The minimum required columns are:
artma uses flexible column mapping. Your columns don't need specific names - you just need to tell artma which column contains what. For example:
beta, effect_size, r, or dse, standard_error, or se_betastudy, paper_id, or observationartma tries to auto-detect these mappings, but you can always specify them manually.
artma can read data from:
.csv).xlsx, .xls).json).dta).rds)artma automatically handles:
You control these behaviors through your options file.
Begin with a single method to understand the workflow:
results <- artma(methods = "effect_summary_stats")
Once comfortable, add more methods.
Name your options files clearly:
charity_effects_2025.yaml - Better than config1.yamlsensitivity_analysis.yaml - Better than test.yamlOptions files are your analysis recipes. Save them with your project for reproducibility.
Control how much information artma displays:
# In your options file or via options() options(artma.verbose = 3) # Default: informative options(artma.verbose = 1) # Minimal: errors only options(artma.verbose = 4) # Verbose: everything
If you're modifying options files manually, validate them:
artma::options_validate("my_analysis.yaml")
This catches errors before you run the analysis.
?artma - Main function help?artma::methods_list - List available methods?artma::options_create - Create options filesIf something isn't working, increase verbosity:
options(artma.verbose = 4) # Maximum detail results <- artma()
This shows everything artma is doing, which helps diagnose issues.
When in doubt, validate:
# Validate options file artma::options_validate("my_analysis.yaml") # Check available methods artma::methods_list() # Check how artma reads and preprocesses your data artma::data_preview(options = "my_analysis.yaml")
Once you're comfortable with the basics, read the options vignette for deeper configuration and try a few methods on your own data.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.