Options files are the primary mechanism for configuring artma (Automatic Replication Tools for Meta-Analysis) analyses. They store all the settings needed to run your meta-analysis, including data paths, column mappings, method parameters, and output preferences. This vignette explains how options files work, how to create and use them, and provides best practices for managing your analysis configurations.
Options files are hierarchical YAML (YAML Ain’t Markup Language) configuration files that store all settings for an artma analysis. Instead of passing dozens of parameters to functions, you create a single options file that contains everything needed to run your analysis.
Options files use YAML format, which is human-readable and supports hierarchical structures:
Options files are organized into several main sections, each controlling different aspects of your analysis:
generalContains general package information:
artma_version: Version of artma used to create the file
(automatically set)dataControls data loading and preprocessing:
source_path: Path to your dataset file (CSV, Excel,
JSON, Stata, or RDS)columns: Unified per-column records: name mappings
(source_name) plus per-variable analysis configurationna_handling: How to handle missing values (stop,
remove, median, mean, interpolate, mice)config_setup: Whether to auto-configure or manually
configure datawinsorization_level: Outlier treatment level (0, 0.01,
0.05, 0.10)calcCalculation settings:
precision_type: How to calculate precision (‘1/SE’ or
‘DoF’)se_zero_handling: How to handle zero standard errors
(stop, warn, ignore)methodsMethod-specific parameters for each analysis method:
effect_summary_statsconf_level: Confidence level for intervals (default:
0.95)formal_output: Whether to format output for LaTeXlinear_testsbootstrap_replications: Number of bootstrap
replications (default: 100)conf_level: Confidence level for bootstrap
intervalsnonlinear_testsstem_representative_sample: How to select
representative observations (medians, first, all)selection_cutoffs: Publication probability
thresholdsselection_symmetric: Whether to impose symmetry in
selection modelselection_model: Distribution assumption (normal,
t)hierarchical_iterations: Number of posterior drawsexogeneity_testsiv_instrument: Instrument selection (automatic or
specific formula)puniform_alpha: Significance level for p-uniform*puniform_method: Estimation method (ML or P)bma (Bayesian Model Averaging)burn: Burn-in iterations (default: 10000)iter: MCMC iterations (default: 50000)g: Prior specification (default: “UIP”)mprior: Model prior (default: “uniform”)nmodel: Number of top models to retainmcmc: Sampler type (“bd” or “rev.jump”)use_vif_optimization: Whether to use VIF
optimizationprint_results: Output level (none, fast, verbose, all,
table)export_graphics: Whether to export plotsexport_path: Directory for exported graphicsNote on moderator selection: when moderators are selected
automatically, the standard error (se) and sample size
(study_size) are always added to the BMA moderator set on
top of your configured moderators and protected from collinearity
pruning. Including the standard error term inside BMA is a
publication-bias control by convention. These variables therefore appear
in the Model Averaging results (and downstream fma and
best-practice-estimate output) even if you did not flag them yourself; a
note is printed during variable selection when this happens.
p_hacking_testsinclude_caliper: Whether to include Caliper testscaliper_thresholds: T-statistic thresholds to testcaliper_widths: Interval widths around thresholdscaliper_tail: Which tail to inspect (auto,
positive, negative,
absolute)caliper_cluster: Whether to cluster the caliper
p-values by studyinclude_elliott: Whether to include Elliott et
al. testslcm_iterations: Number of simulations for LCM testmaivemethod: Funnel model plugged with the instrumented
variances (1 = FAT-PET, 2 = PEESE, 3 = PET-PEESE, 4 = EK)instrument: Whether reported variances are instrumented
with the inverse sample sizeweight: Weighting schemestudylevel: Study-level correlation structurese: Standard error estimation method (asymptotic or one
of four bootstraps)ar: Whether to compute the weak-instrument-robust
Anderson-Rubin intervalfirst_stage: First-stage functional form (0 = levels, 1
= logs, 2 = chosen automatically from the spread of sample sizes)show_interpretation: Whether to print the
plain-language reading of the resultsoutputControls output formatting:
dir: Directory where tables and graphics are saved
(auto for a temporary directory)save_results: Whether to export tables and graphics
after each runtable_formats: Formats used when exporting tables
(csv, tex, or both)number_of_decimals: Number of decimal places for
numeric outputcliCommand-line interface settings:
editor: Preferred editor for opening options filessave_preference: Whether to save user preferencesverboseControls verbosity levels:
level: How much information to display (1-4)
cacheCaching behavior:
use_cache: Whether to use cachingmax_age: Time-to-live for cached resultstempTemporary file settings (runtime only, not stored)
The easiest way to create an options file is interactively. When you run an artma function without specifying an options file, you’ll be prompted to create one:
You can also create one explicitly:
During creation, you’ll be guided through:
my_analysis, meta_analysis_2025). The
.yaml extension is added automatically.Choose descriptive names that help you identify the analysis:
my_analysis.yaml - Simple, genericmeta_analysis_2025.yaml - Includes datecharity_effects.yaml - Domain-specificproject_config.yaml - DescriptiveNote: The .yaml extension is
automatically added, so you only need to provide the base name.
You can also create options files programmatically by providing values:
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"),
study_id = list(source_name = "study_name")
),
"methods.effect_summary_stats.conf_level" = 0.99
)
)Options files are loaded automatically when you call artma functions:
When an options file is loaded, its values are temporarily stored in
R’s options() namespace with the artma.
prefix:
# Within a function that has loaded an options file
conf_level <- getOption("artma.methods.effect_summary_stats.conf_level")
# Returns: 0.95 (or whatever was set in the options file)You can also use the helper function to get option groups:
Options are loaded only for the duration of the function
call. This prevents different analyses from interfering with
each other. Each time you call artma::artma(), the options
file is freshly loaded.
By default, you should have one dataset per options file. This keeps configurations clear and prevents confusion. If you need to run the same analysis with different parameters, create separate options files:
analysis_default.yaml - Default parametersanalysis_sensitivity.yaml - Sensitivity analysis
parametersanalysis_robustness.yaml - Robustness check
parametersStore related options files together. The default location is a temporary directory, but you can specify a custom directory:
Options files are text files (YAML), making them perfect for version control. Consider:
A minimal options file for a basic analysis:
general:
artma_version: "0.3.2"
data:
source_path: "/data/my_meta_analysis.csv"
columns:
effect:
source_name: "effect_size"
se:
source_name: "standard_error"
study_id:
source_name: "study_name"
n_obs:
source_name: "sample_size"
na_handling: "stop"
config_setup: "auto"
methods:
effect_summary_stats:
conf_level: 0.95An options file with custom method parameters:
general:
artma_version: "0.3.2"
data:
source_path: "/data/complex_analysis.csv"
columns:
effect:
source_name: "beta"
se:
source_name: "se_beta"
study_id:
source_name: "paper_id"
n_obs:
source_name: "n"
na_handling: "median"
winsorization_level: 0.05
config_setup: "manual"
calc:
precision_type: "1/SE"
se_zero_handling: "warn"
methods:
effect_summary_stats:
conf_level: 0.99
formal_output: true
bma:
burn: 20000
iter: 100000
g: "UIP"
mprior: "uniform"
nmodel: 2000
use_vif_optimization: true
print_results: "verbose"
linear_tests:
bootstrap_replications: 500
conf_level: 0.95
p_hacking_tests:
include_caliper: true
caliper_thresholds: [1.645, 1.96, 2.58]
include_elliott: true
maive:
method: 3
instrument: 1
ar: 1
verbose:
level: 3
cache:
use_cache: true
max_age: 86400Called without arguments, artma::options_help() prints
every option the template defines, grouped by top-level section, one
line per option with its type and default:
── artma options ───────────────────────────────────────────────────────
127 options in 10 sections. Call `artma::options_help('<name>')` with an
option or a group name for details.
── calc ──
calc.precision_type enum: '1/SE'|'DoF' 1/SE
calc.se_zero_handling enum: stop|warn|remove|igno… NA
Pass a name to read the full help text of an option:
A name that points at a group rather than a single option expands to everything underneath it, so you do not have to know the full path in advance:
artma::options_help("methods.bma") # every option of the BMA method
artma::options_help("methods") # every method optionNames that match nothing are reported, and the recognized ones are still printed.
artma::options_diff() answers “what is actually
different about this configuration”: it lists the options whose values
differ between two files, then each file’s deviations from the template
defaults.
── Options diff ────────────────────────────────────────────────────────
A: 'baseline.yaml'
B: 'sensitivity.yaml'
── Differing options (2) ──
data.columns.se.source_name standard_error -> se_robust
methods.bma.iter 100000 -> 500000
List-typed options such as data.columns are compared
entry by entry, so the diff names the individual column mappings that
changed. The full comparison is also returned invisibly as a list of
data frames, ready for programmatic use.
See all available options files:
Pass details = TRUE for a data frame describing each
file: the dataset it points at, when it was last modified, when it last
produced results, and how many of its options deviate from the template
defaults.
file data_source_path modified last_run n_non_default
1 bachelor.yaml /data/bachelor_thesis.xlsx 2026-08-06 12:25:38 2026-07-28 03:44:38 11
2 master-thesis.yaml /data/master_thesis.xlsm 2026-07-24 12:21:30 2026-07-17 16:45:18 14
The last run time is read from the file’s output directory, and is
NA for a file that has never produced results.
Create a new options file based on an existing one:
Update an existing options file:
Open an options file in your preferred editor:
.yaml extension is correctartma::options_validate("file.yaml")artma::options_fix() to add missing options with
defaultsdata.columns (each
record’s source_name)Options files are the foundation of reproducible meta-analysis in artma. They:
Remember:
For more information on specific options, see the help documentation
for individual functions or explore the options template using
artma::options_help(), which prints the whole option tree
when called without arguments.