Navigation:  Setting Up a DSGE Model >

 

File with Parameters to Update

 

Print this Topic Previous pageReturn to chapter overviewNext page

The file with parameters to update is a matlab function for computing parameters as functions of other parameters. It is executed each time YADA computes the value of the log posterior. This means that it is executed each time a new draw is examined by the posterior sampler, and each time the optimization routine evaluates the log posterior.

The function requires one input, the structure ModelParameters, and provides one output, the structure ModelParameters. This structure has fields that have names equal to the names of the parameters as they are specified in the prior distribution file, in the file with parameters to update, and in the file with parameters to initialize. The exact name of the structure is local to the function and, hence, any valid name for a variable in matlab can be used. What is important is that the same name is used for the output as for the input variable.

For example, your DSGE model may have a parameter called beta which is a function of a parameter rA that is estimated. In this case, the file with parameters to update should present the relationship between the variable ModelParameters.beta and the variable ModelParameters.rA, e.g.,

ModelParameters.beta = 1/(1+(ModelParameters.rA/400));

NOTE: If a parameter is only determined by parameters that are initialized or calibrated, then this parameter should be calculated in the file with parameters to initialize. That file is only executed once and is therefore not executed each time the log posterior is evaluated.

NOTE: The following names may not be used for parameters: YADAg, YADAh, YADA, UserVariables., rhoAL, sigmarAL and sigmaeAL. The first two are used by YADA internally when rewriting the AiM output file "compute_aim_matrices.m". The  next two names are reserved for passing information through the ModelParameters structure and will be disregarded as a parameter name. The last three names are reserved for the adaptive learning implementation Specifically, YADA is a field in ModelParameters with subfields F and B0, the state equation matrices, that can be used inside the measurement equation file. Similarly, UserVariables can be a field in ModelParameters with, e.g., subfields having user selected names and that contain information that the user wants to pass on from one run to another of the file with parameters to update. Such information may, for instance, concern initial values when the steady-state of the DSGE model needs to be solved for numerically.

Note also that when the DSGE model is taken from a dynare model file and the model is non-linear, the steady-state values appear as parameters in the "compute_aim_matrices.m" file produced by the dynare parser in YADA. These parameters have the same names as the state variables and therefore need to be specified either in the prior distribution file or more likely in one of the two parameter files, depending on if the steady-state is purely calibrated or if it involves estimated parameters. If the steady-state is calibrated it is recommended to specify the parameters in the file with parameters to initialize, while if a steady-state parameter is a function of some estimated parameters, then it has to be included in the file with parameters to update.

 
Additional Information

A more detailed description about how to setup the file with parameters to update can also be found in Section 18.3 of the YADA Manual.
An example file is located in the directory "example\AnSchorfheide" directly below the base directory for YADA. The file is simply called "MoreASParameters.m".
An example of a DSGE model expressed in non-linear form and requiring dynare to linearize it is shown in the "example\ASNonLinearDynare" directory. The file "InitializeASParameters.m" shows how the steady-state of the state/model variables is calibrated.
Further example files are located in, e.g., the "LubikSchorfheide" and "SmetsWoutersAER" directories in the "example" directory.

 

 


Page url: http://www.texlips.net/yada/help/index.html?file_with_parameters_to_update.htm