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 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)colnames: Column name mappings (effect, se, study,
n_obs, etc.)na_handling: How to handle missing values (stop,
remove, median, mean, interpolate, mice)config_setup: Whether to auto-configure or manually
configure dataconfig: Detailed data configuration for each
variablewinsorization_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 graphicsp_hacking_testsinclude_caliper: Whether to include Caliper testscaliper_thresholds: T-statistic thresholds to testcaliper_widths: Interval widths around thresholdsinclude_elliott: Whether to include Elliott et
al. testslcm_iterations: Number of simulations for LCM testoutputControls output formatting:
round_to: Number of decimal places for numeric
outputformat: Output format optionscliCommand-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:
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:
An options file with custom method parameters:
general:
artma_version: "0.3.2"
data:
source_path: "/data/complex_analysis.csv"
colnames:
effect: "beta"
se: "se_beta"
study: "paper_id"
n_obs: "n"
study_id: "study_id"
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
verbose:
level: 3
cache:
use_cache: true
max_age: 86400Create 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.colnamesOptions 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().