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:
When you run this in an interactive R session, artma will:
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:
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 patternsvariable_summary_stats - Summary statistics for
variablesYou can run one method, multiple methods, or all methods in a single call.
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 resultsDuring the interactive session, you’ll be guided through:
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.colnames.effect" = "effect_size",
"data.colnames.se" = "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:
To see what methods are available:
This prints all available methods to the console.
You have several options:
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:
# 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:
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:
?artma - Main function help?artma::methods.list - List available methods?artma::options.create - Create options filesIf something isn’t working, increase verbosity:
This shows everything artma is doing, which helps diagnose issues.
Once you’re comfortable with the basics, read the options vignette for deeper configuration and try a few methods on your own data.