Navigation:  Setting Up a DSGE Model >

 

Measurement Equation File

 

Print this Topic Previous pageReturn to chapter overviewNext page

The measurement equation file is a matlab function that requires 7 input variables and provides 3 output variables. The name that you can use for it is one that matlab supports for functions, i.e., it should only have English alpha-numeric characters.

ModelParameters

Structure with fields given by all the model parameter names and the fields taking scalar values. All model parameters includes the parameters to be estimated, the parameters that are calibrated, and the parameters that are functions of these two types of parameters. This structure also contains the fields "YADA.F" and "YADA.B0" with the current values of the transition matrix and the matrix with parameters on the structural shocks in the state equation. Furthermore, it may contain the field "UserVariables", where the user can pass selected information from one run the next regarding parameters and their calculation.

StateVarNames

String matrix with rows being the names of the variables as they have been assigned in the AiM model file. This will typically include all state variables, as well as the shocks to the state variables (and possibly a constant).

VariableNames

String matrix where each row contains a name of an observed variable.

XVariableNames

String matrix where each row contains a name of an exogenous variable.

n

Integer with the number of observed variables

r

Integer with the number of state variables.

k

Integer with the number of exogenous variables.

Table 4: Required input variables for the measurement equation file.

The required input variables are specified above in Table 4. Please note that the names of the input variables are local to the function and can therefore be any valid names for variables in matlab. The names I have chosen simply reflect the notation used elsewhere in YADA.

The measurement equation file needs to supply 3 output arguments. These are the matrices connected with the measurement equation as it has been defined in the YADA Manual.

A

kxn matrix with parameters on the exogenous variables.

H

rxn matrix with parameters on the state variables. Optionally this matrix can have dimension rxnxTH, where the third dimension measures time.

R

nxn matrix with covariances for the measurement errors. This matrix is required to be positive semi-definite.

Table 5: The required output variables for the measurement equation file.

The dimensions for the matrices implies that the measurement equations in YADA are expressed as:

yt = A'xt + H'ξt+ wt

where y is the n-dimensional vector of observed variables, x the k-dimensional vector of exogenous variables, ξ the r-dimensional vector of state variables, and w the n-dimensional vector of  independent measurement errors identically distributed as N(0,R).

Similarly, the state equations (the solution of the DSGE model) in YADA are expressed as

ξt = Fξt-1+ B0ηt

where η is a q-dimensional vector of independent structural shocks distributed as N(0,I). The matrices F and B0 can be obtained inside the measurement equation file via the the fields YADA.F and YADA.B0 in the ModelParameters structure.

The matrices A, H, and R receive new values through the ModelParameters structure. The string matrices with names of observed, exogenous and state variables can be used to locate the correct positions in these matrices for the parameters that should enter them. The dimensional variables can be used to initialize the output matrices. Note that YADA can handle a time-varying measurement matrix H by letting it be 3-dimensional; cf. Table 5. Whenever the output matrix H is 3-dimensional, YADA treats it as time-varying.

 

Additional Information

A more detailed description about how to setup the measurement file can also be found in Section 17.4 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 "MeasurementEqFile.m".
Further example measurement equation files are located in the "LubikSchorfheide" and "SmetsWoutersAER" directories in the "example" directory.

 

 


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