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, and UserVariables. The first two are used by YADA internally when rewriting the AiM output file "compute_aim_matrices.m". The last two names are reserved for passing information through the ModelParameters structure and will be disregarded as a parameter name. 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.
Additional Information
• | A more detailed description about how to setup the file with parameters to update can also be found in Section 17.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". |
• | Further example files are located in 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