prints the result of a shock simulation
prt_impact_shock(db1,db2,boun,vari,transf,periods,labels)
* db1 = a tsmat, representing the baseline
* db2 = a tsmat, representing the database resulting from the simulation of the shock
* bound = a [2 x 1] string vector, the simulation bounds
* vari = a [n x 1] string vector, collecting the variable names belonging to the simulated model and the databases db1 and db2 that will be displayed
* transf = a [n x 1] string vector, collecting the ways the variables will be compared ('pcer' for in percentages, 'er' for in differences)
* periods = a [k x 1] string vector, collecting the periods over which the results will be displayed, of the type 'pi' with:
- p a period type (m for month', q for quarter, a for year)
- i a integer, the index of the periods
* labels = an (optional) [n x 1] string vector, collecting names the variables will be given in the table (if different from their names in the model)
* Nothing: results are displayed on screen
global GROCERDIR // load the model small: load(GROCERDIR+'data\small.dat') // load the simulation results small_cale load(GROCERDIR+'data\small_db.dat') // recover the simulated database small_cale_db=small_cale('simulation results'); // make a 1% shock on the world demand sh_demmon=simul_shock(small,small_cale_db,'1981q1','2006q4',... list('demmon','pcer',1),'from=1980q1') // recover the corresponding simulated database sh_demmon_db=sh_demmon('simulation results'); // print the results of the shock simulation on variables td_pib1 (in percentage), // td_pib3 (in percentage), td_p6_d1 (in percentage) and tcho (in difference) for // quarters 1 and 2, years 2,5 and 10 and the last year prt_impact_shock(small_cale_db,sh_demmon_db,['1981q1';'2006q4'],... ['td_pib1';'td_pib3';'td_p6_d1';'tcho'],['pcer';'pcer';'pcer';'er'],... ['q1';'q4';'a2';'a5';'a10';'a$']) | ![]() | ![]() |