*! version 1.1.0 January 22, 2024 @ 12:00:00

help euromod getinfo (EUROMOD Connector v1.0.4)

Syntax

euromod getinfo,
model(EUROMOD system name)
country(EU country)

Description

euromod_getinfo allows the user to get information of the EUROMOD model. Depending on the options used the information included in the return list will differ.
By default the information stored in return list will be the most specialized information. For example, when the system option is specified, information corresponding to the country or model will not be included in the return list.
This default behaviour can be overwritten by using the option all.

model(string) This parameter is the root folder of the EUROMOD project, where the model is stored. This parameter is mandatory. When one only passes this parameter to the euromod_getinfo command, the command stores a list of countries available in the model in the return list.

Using this option can add the following information to the r() return list.

local Description

mod_countries A space separated list representing the available country models.

Options

Main

country(string) The official country code of the country of interest. For EU member states see:

https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Tutorial:Country_codes_and_protocol_order#Codes.2C_names_and_protocol_order_of_European_Union_.28EU.29_Member_States.

Using this option can add the following information to the r() return list.

local Description

ctry_systems A space separated list representing the systems.
ctry_datasets A space separated list representing the datasets.
ctry_publicdatasets A space separated list representing the public datasets.
ctry_isBestMatch A space separated list which items, corresponds to ctry_allSystems and ctry_allDatasets.
Every item indicates whether system data combination is a best match.
ctry_allSystems A space separated list corresponding to ctry_isBestMatch and ctry_allDatasets.
Every item indicates the name of the system in a system dataset combination.
ctry_allDatasets A space separated list corresponding to ctry_isBestMatch and ctry_allSystems.
Every item indicates the name of the dataset in a system dataset combination.
ctry_bestMatchSystems A space separated list corresponding to ctry_bestMatchDatasets.
Every item indicates the name of the system in a best match system dataset combination.
ctry_bestMatchDatasets A space separated list corresponding to ctry_bestMatchSystems.
Every item indicates the name of the system in a best match system dataset combination.

system(string) Name of the system of interest

Using this option adds the following information to the r() return list.

local Description

sys_year Year of the system.
sys_private Indicating if the system is private yes/no.
sys_name Name of the system
sys_iD ID of the system.
sys_headDefInc Income variable used to determine who is Head of a HH.
sys_currencyParam Currency of the parameters in the system.
sys_currencyOutput Currency of the output of the simulation.
sys_bestMatchDatasets Best match datasets to the system.

dataset(string) Name of the dataset of interest

Using this option adds the following information to the r() return list.

local Description

data_yearInc Income reference year of the dataset.
data_yearCollection Year of data collection of the dataset.
data_useCommonDefault Does EUROMOD apply a common default when a variable is not present in the dataset? yes/no
data_iD ID of the dataset.
data_readXVariables Do expenditures variables get read? yes/no.
data_private Is the dataset private? yes/no.
data_name Name of the dataset.
data_decimalSign Decimal sign of the dataset.
data_currency Currency of the dataset.

switchvalue When using this option, the command requires fives additional options specified: system(string), dataset(string), extension(string), model(string) and country(string).
When provided with the correct options, the command will look up the value of the switch set for the system,dataset and extension combination and store it in the return list under the local 'switchvalue'.

. euromod getinfo, model(Path to model) system(BE_2020) dataset(BE_2020_c2) country(BE) extension(BTA)

This example, is for retrieving the value of the extension switch set for the system BE_2020, dataset BE_2020_c2 and BTA extension.

Globals

Additional to the information being added to the return list. Some extra globals are being created by the Stata Connector

- All system dataset combinations: $EM_all_systems, $EM_all_datasets, $EM_isBestMatch.

- All Best Match system dataset combinations: $EM_bestmatch_systems, $EM_bestmatch_datasets

These macros are lists separated by spaces. The first item of the $EM_all_systems list corresponds to the first item of $EM_all_datasets and $EM_isBestMatch as portrayed in the next table:

Macro Item 1 Item 2 Item 3 ...

$EM_all_datasets BG_2021_c1 BG_2020_c1 BG_2019_c2 ...
$EM_all_systems BG_2021 BG_2021 BG_2020 ...
$EM_isBestMatch yes no no ...

Examples

For example, the following code snippet would loop over all possible dataset combinations for a given country, load the data into memory and run a simulation. If an error occurs in this example, it would give a warning.

.euromod getinfo, model("PATH/TO/MODEL") country("BG")

.local r : word count $EM_all_datasets

.forvalues i = 1/`r' {

local dataset : word `i' of $EM_all_datasets

local system : word `i' of $EM_all_systems

qui import delimited "$input_data_path`dataset'.txt",clear

di "Generating output for `dataset' with system `system'"

qui euromod_run, dataset(`dataset') model($model_path_new) system(`system') replace

if $EM_n_errors > 0 {

di in r "Warning or error has been returned for running system `system' with dataset `dataset'"

}

}

}

Authors

Hannes Serruys, B2-JRC Seville (Hannes.SERRUYS@ec.europa.eu)