Constructs and validates the configuration shared by every pipeline stage,
replacing the Stata global macros ($country, $inputdir, $outputdir,
$dominance, $domvars, $dom_num) set once in MASTER_OECD_p2.do and
read implicitly by every downstream .do file. See
Pseudocode/00_conventions.md's CONFIG primitive and
Pseudocode/MASTER_OECD_p2.md.
Usage
config_scaleup(
country,
input_dir,
output_dir,
dominance = FALSE,
dom_vars = c("employment", "turnover"),
dom_num = 2
)Arguments
- country
2-letter ISO country code (e.g.
"FR"). Drives output file naming and several country-specific data patches insidebuild_accounts_indicators()(seecountry_patches).- input_dir
Folder holding
base_financials_<country>.dta(andplants_RAW_<country>.dtaif available),exchange_rates.dta, andtl3_typology.dta. Must already exist.- output_dir
Folder the final CSV outputs and logs are written to. Must already exist.
- dominance
Logical; if
TRUE, every output table gainsdom_<var>disclosure-control columns for each variable indom_vars. DefaultFALSE.- dom_vars
Character vector of variables the dominance ratio is computed on (only used if
dominance = TRUE). Defaultc("employment", "turnover").- dom_num
Number of top units defining the dominance ratio (e.g.
2means "share held by the 2 largest firms"). Default2.