[  Project home |  Index |  Class hierarchy ]

 model.ox

Provides the LiRE_Model class
Author:
Y. Zwols, S. Mavroeidis

 LiRE_Model : LiRE_BaseModel

Represents a LiRE model in canonical form. The canonical form is $$\sum_{i=0}^k \sum_{j=0}^l M_{ij} y_{t+j-i|t-i} + c_y = M_z z_t, \\ \mbox{with}\ z_t = c_z + \Phi z_{t-1} + \varepsilon_t, \\ \varepsilon_t \ \mbox{i.i.d.}$$

Do not instantiate LiRE_Model objects yourself. Use Model instead to get the model within the LiRE object context.

Public methods
 ChangeM Change the matrix \(M_{ij}\) matrix.
 ClearParameters Reset the parameters to their default values.
 ConstY Gets the constant \(c_y\) for \(y\) in the model
 DimPred Gets the number of predetermined variables in \(y_t\) in the model
 LiRE_Model Creates a new LiRE model
 M Returns the \(M_{ij}\) matrix
 MatrixMstr Formats the name of an \(M_{ij}\) matrix.
 MaxI Gets the highest lag in the model, i.e.
 MaxJ Gets the highest lead in the model, i.e.
 Mz Gets the \(M_z\) matrix of the model
 Print Prints the model equations and the values of the coefficients
 SetConstY Sets up the constant \(c_y\)
 SetM Sets up coefficient matrices for \(y\) in the model equation
 SetMz Sets up the parameter \(M_z\) for the driving process \(z_t\)
 SetVariableNames Sets up variable names of the elements of the \(y_t\) vector.
Inherited methods from LiRE_BaseModel:
ClearParameters, ConstZ, CopyElementDescriptors, CopyExogenous, DimEpsilon, DimY, DimZ, ElementName, EpsilonDistribution, GetElementDescriptors, LiRE_BaseModel, Name, Names, Phi, PrintElementDescriptors, ResetElementDescriptors, SetConstZ, SetElementDescriptors, SetEpsilonDistribution, SetName, SetPhi

 LiRE_Model details

 ChangeM

LiRE_Model :: ChangeM ( const i , const j , const M )
Change the matrix \(M_{ij}\) matrix. This is a faster way to update the M matrices, but the matrix \(M_{ij}\) must already be specified in the model.

 ClearParameters

LiRE_Model :: ClearParameters ( )
Reset the parameters to their default values.

 ConstY

LiRE_Model :: ConstY ( )
Gets the constant \(c_y\) for \(y\) in the model

 DimPred

LiRE_Model :: DimPred ( )
Gets the number of predetermined variables in \(y_t\) in the model

 LiRE_Model

LiRE_Model :: LiRE_Model ( const cDimY , const cDimZ , const cPred , const cInit )
Creates a new LiRE model
Parameters:
cDimY Dimension of the \(y\) vector
cDimZ Dimension of the \(z\) vector
cPred Number of predetermined variables in the model. Note that the predetermined variables are assumed to be listed first in the \(y\) vector
cInit Boolean that specifies whether or not to initialize matrices. If set to false, it is up to the use to correctly specify matrices. Failing to do so may lead to run-time errors.
See also:
ClearParameters

 M

LiRE_Model :: M ( const i , const j )
Returns the \(M_{ij}\) matrix

 MatrixMstr

LiRE_Model :: MatrixMstr ( const i , const j )
Formats the name of an \(M_{ij}\) matrix. If the number of leads or the number of lags equals 0, the more useful notation with only one subscript is introduced.
Example:
MatrixMstr(3, 5) returns "M[3,5]".

 MaxI

LiRE_Model :: MaxI ( )
Gets the highest lag in the model, i.e. it returns \(k\)

 MaxJ

LiRE_Model :: MaxJ ( )
Gets the highest lead in the model, i.e. it returns \(l\)

 Mz

LiRE_Model :: Mz ( )
Gets the \(M_z\) matrix of the model

 Print

LiRE_Model :: Print ( )
Prints the model equations and the values of the coefficients

 SetConstY

LiRE_Model :: SetConstY ( const vConstY )
Sets up the constant \(c_y\)

 SetM

LiRE_Model :: SetM ( ... )
Sets up coefficient matrices for \(y\) in the model equation
Parameters:
amiCoef Array of the form { {M1, i1, j1}, {M2, i2, j2}, ...} that specifies the coefficients for \(y\) in the model equation. The M matrices are supposed to be \(n \times n\) square matrices, where \(n\) is the dimension of \(y\). The list of matrices may also be specified as a variable number of arguments list.

Example:
The following two statements are equivalent:
model.SetM(  {A1, 0, 0}, {A2, 1, 0} );
model.SetM( {{A1, 0, 0}, {A2, 1, 0}} );

 SetMz

LiRE_Model :: SetMz ( const mMz )
Sets up the parameter \(M_z\) for the driving process \(z_t\)

 SetVariableNames

LiRE_Model :: SetVariableNames ( const aNames )
Sets up variable names of the elements of the \(y_t\) vector. The variable names are used to initialize the element descriptors that are defined in LiRE_BaseModel.
Parameters:
aNames Array of strings, of dimension DimY()
Example:
To set up a vector \(y_t = (x_t, z_t)\), use:
model.SetVariableNames({"x", "z"});
See also:
LiRE_BaseModel