<< create_emptymodel Creation and simulation of macroeconometric models deleq >>

grocer >> Creation and simulation of macroeconometric models > create_model

create_model

create a model from a a text file

CALLING SEQUENCE

model=create_model(filein)

PARAMETERS

Input

* filein = the text file of the model

Output

* model = a model tlist, with:

   - model('namemod') = a string, the name of the model

   - model('name endo') = a string vector, the names of the endogenous variables

   - model('name exo') = a string vector, the names of the exogenous variables

   - model('name resid') = a string vector, the names of the residuals

   - model('name coeff') = a string vector, the names of the coefficients

   - model('name param') = a string vector, the names of the parameters

   - model('name eq') = a string vector, the names of the equations

   - model('equations') = a string vector, the texts of the equations

   - model('coeffs') = a tlist, whose type is 'coeffs' with:

         model('coeffs')(i) = name of the i-th coeff

   - model('params') = a tlist, the equivalent of model('coeffs') for parameters

   - model('eq coeffs') = a (ncoeffs x neqs) sparse matrix, with

             the (i,j) non zero value corresponding to the coefficient i being present in the equation j

   - model('eq endos') = a (nendo x neqs) sparse matrix, with

             the (i,j) non zero value corresponding to the endogenous i being present in the equation j

   - model('eq exos') = a (nexo x neqs) sparse matrix, with

             the (i,j) non zero value corresponding to the exogenous i being present in the equation j

   - model('eq resids') = a (nresid x neqs) sparse matrix, with

             the (i,j) non zero value corresponding to the residual i being present in the equation j

   - model('eq params') = a (nparam x neqs) sparse matrix, with

             the (i,j) non zero value corresponding to the parameter i being present in the equation j

   - model('lags endos') = a list of vectors, each vector collecting the various lags the corresponding

            endogenous variable appears in the model

   - model('lags exos') = a list of vectors, each vector collecting the various lags the corresponding

            exogenous variable appears in the model

   - model('non empty lagged endos') = a vector of integers, collecting the endogenous that is lagged at least in an equation

   - model('maxlag') = the lag maximum in the model

   - model('names for regressions') = a list of (2 x n_i) matrix that for each equation collects on column 1 the names of the coefficients

            in this equation (equivalent to the names of the exogenous variables in an ols estimation)

            and in column 2 the derivative of the equation with respect to each coefficient

   - model('linearity') = a (neq x 1) vector of booleans, set to %f if the equation is non linear with respect

            to its coefficients, %t if it is (or has no coefficients)

   - model('transf') = a boolean, set to %t if the model has been transformed for simulation, %f if not

   - model('prolog string2run') = a (k x 1) string vector, collecting the equations that will be incorporated in the text

            of the function called by function simulate to run the prologue

   - model('prolog func txts') = a (k x 1) string vector, collecting the texts of the functions that are to be

            solved for equations in the prologue that cannot be solved directly as 'endogenous=rhs'

   - model('prolog Jac txts') = a (k x 1) string vector, collecting the texts of the corresponding Jacobians

   - model('prolog endo') = a (k x 1) vector of integers, collecting the indexes of the endogenous variables that are calculated by the prologue

   - model('prolog eq') = a (k x 1) vector of integers, collecting the indexes of the equations that are solved by the prologue

   - model('prolog string2run') = a (m x 1) string vector, collecting the equations that will be incorporated in the text

            of the function called by function simulate to run the epilogue

   - model('prolog func txts') = a (m x 1) string vector, collecting the texts of the functions that are to be

            solved for equations in the epilogue that cannot be solved directly as 'endogenous=rhs'

   - model('prolog Jac txts') = a (m x 1) string vector, collecting the texts of the corresponding Jacobians

   - model('prolog endo') = a (m x 1) vector of integers, collecting the indexes of the endogenous variables that are calculated by the epilogue

   - model('prolog eq') = a (m x 1) vector of integers, collecting the indexes of the equations that are solved by the epilogue

   - model('heart func txt') = a (n x 1) string vector,collecting the equations that will be incorporated in

             the text of the function called by function simulate to run the heart of the model

   - model('heart Jac txt') = a (p x 1) string vector, collecting the equations of the non zero Jacobian matrix values

   - model('heart Jac trhs') = a (p x 1) string vector, collecting only the rhs of the equations of the non zero Jacobian matrix values

   - model('heart Jac indexes') = a (p x 2) matrix of integers, collecting the corresponding coordinates in the Jacabian matrix

   - model('heart endogenous') = a (n x 1) vector of integers, collecting the indexes of the endogenous variables that are calculated by the heart

   - model('heart equations') = a (n x 1) vector of integers, collecting the indexes of the equations that are solved by the heart

   - model('gs string2run') = a (q x 1) string vector, collecting the equations that will be calculated by the Gauss-Seidel method (if option 'GS' has been entered)

   - model('gs func txts') = a (q x 1) string vector, collecting the texts of the functions that are to be solved at each Gsuss-Seidel step

   - model('gs Jac txts') = a (q x 1) string vector, collecting the texts of the corresponding Jacobians

DESCRIPTION

Creates a model from a txt file.

EXAMPLE

global GROCERDIR;
small=create_model(GROCERDIR+'\data\smallmod.txt')

AUTHOR

Éric Dubois 2018

Report an issue
<< create_emptymodel Creation and simulation of macroeconometric models deleq >>