<< rhs_minus_lhs Creation and simulation of macroeconometric models simul_shock >>

grocer >> Creation and simulation of macroeconometric models > set_residuals2zero

set_residuals2zero

in a tsmat associated to a model, set all residuals to 0

CALLING SEQUENCE

db=set_residuals2zero(db,model)

PARAMETERS

Input

* db = a tsmat

* model = a model tlist

Output

* db = the original tsmat where all series corresponding to a residuals in the input model are set to 0

DESCRIPTION

In a tsmat associated to a model, sets all residuals to 0 (useful for estimation purposes).

EXAMPLE

global GROCERDIR;
// load the model small:
load(GROCERDIR+'\data\small.dat')
// load the simulation results small_cale
load(GROCERDIR+'\data\small_cale.dat')
small_cale_db=small_cale('simulation results')
// display the value of the residual p3m_d5_cale:
prt_tsmat('level',['1990q1';'2006q4'],list('small_cale_db'),'p3m_d5_cale')
// set residuals of database small_cale_db to 0 and store the result in tsmat small_dbnew:
small_dbnew=set_residuals2zero(small_cale_db,small);
// check that the residual p3m_d5_cale is now equal to 0:
prt_tsmat('level',['1990q1';'2006q4'],list('small_dbnew'),'p3m_d5_cale');

AUTHOR

Éric Dubois 2018

Report an issue
<< rhs_minus_lhs Creation and simulation of macroeconometric models simul_shock >>