1.12. Automatic translation of files
RISE can automatically translate files from other DSGE software
such as Dynare and YADA. The same translators ship with the
modern toolbox; only the way you call the resulting RISE model
differs (dsge_model(...) rather than the legacy rise(...)).
1.12.1. Dynare files
dynare2rise – converts a basic Dynare file into a RISE one.
duplicates = dynare2rise(dynFileName)
duplicates = dynare2rise(dynFileName, riseFileName)
duplicates = dynare2rise(dynFileName, riseFileName, stderr_name)
duplicates = dynare2rise(dynFileName, riseFileName, stderr_name, detrend)
[duplicates, listOfFilesCreated] = dynare2rise(...)
Args:
dynFileName [char] : name of the Dynare model file with or without extension (
.dynor.mod).riseFileName [char | {
'dynFileName.rs'}] : name of the created RISE file.stderr_name [char | {
'std'}] : prepended name for the newly created parameters (RISE transforms every variance / standard deviation in the Dynare file into a parameter).detrend [true | {false}] :
when
true, the model is written in stationary form (the way Dynare would do it behind the scenes). For log-growth variables,y --> (y * trend). For linear-growth variables,y --> (y + trend). The steady state model in Dynare then corresponds exactly to the steady state file produced by RISE, except that trend variables are added as new variables.when
false, the model is kept in non-stationary form. For log-growth variables the growth rate in an expression of the formf(x)becomeslog(f(exp(x))). The growth rate for linear-growth variables is unchanged. Variables detected to have steady state0but that need to be stationarized are assigned a growth rate of0and declared asLEVELvariables. The steady state is unchanged.The steady state for all trend variables with log growth is normalized to
1; the steady state for trend variables with linear growth is normalized to0.
Returns:
duplicates [struct] : structure containing information on the redundancies.
listOfFilesCreated [cellstr] : list of files created.
Note
The created files are:
riseFileName.rsriseFileName_params.m– parameter function file with calibration and priors as separate outputs.riseFileName_sstate.m(optional) – steady-state function file.
After translation, build the model with the modern factory:
m = dsge_model('riseFileName');
(The legacy documentation invoked the model with
rise('riseFileName') – only the constructor differs.)
See also
1.12.2. Dynare steady state files
dynare_sstate_file2rise – translates a Dynare steady-state
file into a RISE-compatible function handle. The translator is a
thin wrapper.
Syntax:
risefile = dynare_sstate_file2rise(dynfile)
Inputs:
dynfile[char | function_handle] : Dynare steady-state file. If provided as a character array, it is converted to a function handle.
Outputs:
risefile[function handle] : RISE-compatible function handle thatset(m, sstate_file = risefile)accepts directly.
Example:
risefile = dynare_sstate_file2rise('NK_baseline_steadystate');
m = set(m, sstate_file = risefile);
1.12.3. AIM/YADA files
aim2rise – converts a basic AIM/YADA file into a RISE one.
duplicates = aim2rise(aimFileName)
duplicates = aim2rise(aimFileName, riseFileName)
duplicates = aim2rise(aimFileName, riseFileName, stderr_name)
Args:
aimFileName [char] : name of the AIM/YADA model file with or without extension (
.aim).riseFileName [char | {
'aimFileName.rs'}] : name of the created RISE file.stderr_name [char | {
'std'}] : prepended name for the newly created parameters.
Returns:
duplicates [struct] : structure containing information on the redundancies.
The created files are:
riseFileName.rsriseFileName_params.m– parameter function file with calibration and priors as separate outputs.riseFileName_sstate.m(optional) – steady-state function file.
After translation, build with:
m = dsge_model('riseFileName');
See also