2005-09-11 11:43:58 +02:00
function info= stoch_simul ( var_list)
2008-08-01 20:53:30 +02:00
2015-02-10 03:39:18 +01:00
% Copyright (C) 2001-2015 Dynare Team
2008-08-01 20:53:30 +02:00
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
2009-12-16 18:17:34 +01:00
global M_ options_ oo_ it_
2006-11-18 08:37:22 +01:00
2013-11-28 10:57:54 +01:00
% Test if the order of approximation is nonzero (the preprocessor tests if order is non negative).
2013-11-28 10:51:20 +01:00
if isequal ( options_ . order , 0 )
error ( ' stoch_simul:: The order of the Taylor approximation cannot be 0!' )
end
2010-11-17 17:09:39 +01:00
test_for_deep_parameters_calibration ( M_ ) ;
2011-12-10 20:10:31 +01:00
dr = oo_ . dr ;
2009-12-16 18:17:34 +01:00
options_old = options_ ;
if options_ . linear
options_ . order = 1 ;
end
if options_ . order == 1
options_ . replic = 1 ;
end
2005-02-18 20:54:39 +01:00
2010-12-23 08:34:13 +01:00
if isempty ( options_ . qz_criterium )
options_ . qz_criterium = 1 + 1e-6 ;
end
2010-03-23 11:09:59 +01:00
if options_ . partial_information == 1 || options_ . ACES_solver == 1
2010-03-25 00:26:05 +01:00
PI_PCL_solver = 1 ;
2010-03-29 12:44:38 +02:00
if options_ . order ~= 1
2013-11-28 10:57:54 +01:00
warning ( ' stoch_simul:: forcing order=1 since you are using partial_information or ACES solver' )
2010-03-29 12:44:38 +02:00
options_ . order = 1 ;
end
2010-03-23 11:09:59 +01:00
else
2010-03-25 00:26:05 +01:00
PI_PCL_solver = 0 ;
2010-03-23 11:09:59 +01:00
end
2005-09-11 11:43:58 +02:00
2009-12-16 18:17:34 +01:00
TeX = options_ . TeX ;
2010-03-23 11:09:59 +01:00
if size ( var_list , 1 ) == 0
2010-03-24 12:54:02 +01:00
var_list = M_ . endo_names ( 1 : M_ . orig_endo_nbr , : ) ;
2010-03-23 11:09:59 +01:00
end
[ i_var , nvar ] = varlist_indices ( var_list , M_ . endo_names ) ;
2009-12-16 18:17:34 +01:00
iter_ = max ( options_ . periods , 1 ) ;
if M_ . exo_nbr > 0
2005-09-11 11:43:58 +02:00
oo_ . exo_simul = ones ( iter_ + M_ . maximum_lag + M_ . maximum_lead , 1 ) * oo_ . exo_steady_state ' ;
2009-12-16 18:17:34 +01:00
end
2005-02-18 20:54:39 +01:00
2012-06-28 18:05:24 +02:00
check_model ( M_ ) ;
2005-09-11 11:43:58 +02:00
2012-06-29 12:32:54 +02:00
oo_ . dr = set_state_space ( dr , M_ , options_ ) ;
2010-07-09 12:54:06 +02:00
2010-03-25 00:26:05 +01:00
if PI_PCL_solver
2010-03-23 11:09:59 +01:00
[ oo_ . dr , info ] = PCL_resol ( oo_ . steady_state , 0 ) ;
2011-03-13 21:19:55 +01:00
elseif options_ . discretionary_policy
if ~ options_ . linear
2013-11-29 17:49:57 +01:00
error ( ' discretionary_policy: only linear-quadratic problems can be solved' ) ;
2011-03-13 21:19:55 +01:00
end
[ oo_ . dr , ys , info ] = discretionary_policy_1 ( oo_ , options_ . instruments ) ;
2010-03-23 11:09:59 +01:00
else
2014-01-30 09:07:28 +01:00
if options_ . logged_steady_state %if steady state was previously logged, undo this
2014-01-29 19:52:20 +01:00
oo_ . dr . ys = exp ( oo_ . dr . ys ) ;
oo_ . steady_state = exp ( oo_ . steady_state ) ;
end
2011-12-19 22:33:25 +01:00
[ oo_ . dr , info , M_ , options_ , oo_ ] = resol ( 0 , M_ , options_ , oo_ ) ;
2010-03-23 11:09:59 +01:00
end
2005-09-11 11:43:58 +02:00
2015-03-25 09:42:59 +01:00
if options_ . loglinear && isfield ( oo_ . dr , ' ys' ) %log steady state for correct display of decision rules and simulations
2014-01-29 19:21:16 +01:00
oo_ . dr . ys = log ( oo_ . dr . ys ) ;
oo_ . steady_state = log ( oo_ . steady_state ) ;
2014-01-29 19:52:20 +01:00
options_old . logged_steady_state = 1 ;
2014-01-29 19:21:16 +01:00
end
2009-12-16 18:17:34 +01:00
if info ( 1 )
2006-11-18 08:37:22 +01:00
options_ = options_old ;
2013-06-12 10:54:33 +02:00
print_info ( info , options_ . noprint , options_ ) ;
2005-09-11 11:43:58 +02:00
return
2010-11-17 17:09:39 +01:00
end
2005-09-11 11:43:58 +02:00
2009-12-16 18:17:34 +01:00
if ~ options_ . noprint
2013-07-10 17:12:34 +02:00
skipline ( )
2005-09-11 11:43:58 +02:00
disp ( ' MODEL SUMMARY' )
2013-07-10 17:12:34 +02:00
skipline ( )
2005-09-11 11:43:58 +02:00
disp ( [ ' Number of variables: ' int2str ( M_ . endo_nbr ) ] )
disp ( [ ' Number of stochastic shocks: ' int2str ( M_ . exo_nbr ) ] )
2012-11-16 20:05:13 +01:00
disp ( [ ' Number of state variables: ' int2str ( M_ . nspred ) ] )
disp ( [ ' Number of jumpers: ' int2str ( M_ . nsfwrd ) ] )
disp ( [ ' Number of static variables: ' int2str ( M_ . nstatic ) ] )
2005-09-11 11:43:58 +02:00
my_title = ' MATRIX OF COVARIANCE OF EXOGENOUS SHOCKS' ;
2005-09-22 16:28:25 +02:00
labels = deblank ( M_ . exo_names ) ;
2010-09-26 13:42:41 +02:00
headers = char ( ' Variables' , labels ) ;
2005-09-11 11:43:58 +02:00
lh = size ( labels , 2 ) + 2 ;
2009-04-24 17:15:18 +02:00
dyntable ( my_title , headers , labels , M_ . Sigma_e , lh , 10 , 6 ) ;
2015-08-17 13:12:22 +02:00
if options_ . TeX
labels = deblank ( M_ . exo_names_tex ) ;
headers = char ( ' Variables' , labels ) ;
lh = size ( labels , 2 ) + 2 ;
dyn_latex_table ( M_ , my_title , ' covar_ex_shocks' , headers , labels , M_ . Sigma_e , lh , 10 , 6 ) ;
end
2010-03-23 11:09:59 +01:00
if options_ . partial_information
2013-07-10 17:12:34 +02:00
skipline ( )
2010-03-25 11:20:34 +01:00
disp ( ' SOLUTION UNDER PARTIAL INFORMATION' )
2013-07-10 17:12:34 +02:00
skipline ( )
2010-03-25 00:26:05 +01:00
if isfield ( options_ , ' varobs' ) && ~ isempty ( options_ . varobs )
2013-05-21 16:38:17 +02:00
PCL_varobs = char ( options_ . varobs ) ;
2011-02-04 17:17:48 +01:00
disp ( ' OBSERVED VARIABLES' )
2010-03-25 00:26:05 +01:00
else
2011-02-04 17:17:48 +01:00
PCL_varobs = M_ . endo_names ;
disp ( ' VAROBS LIST NOT SPECIFIED' )
disp ( ' ASSUMED OBSERVED VARIABLES' )
2010-03-25 00:26:05 +01:00
end
for i = 1 : size ( PCL_varobs , 1 )
2011-02-04 17:17:48 +01:00
disp ( [ ' ' PCL_varobs ( i , : ) ] )
2010-03-23 11:09:59 +01:00
end
end
2013-07-10 17:12:34 +02:00
skipline ( )
2010-03-25 00:26:05 +01:00
if options_ . order < = 2 && ~ PI_PCL_solver
2013-09-10 16:35:50 +02:00
if ~ options_ . nofunctions
disp_dr ( oo_ . dr , options_ . order , var_list ) ;
end
2009-11-29 22:05:16 +01:00
end
2009-12-16 18:17:34 +01:00
end
2005-02-18 20:54:39 +01:00
2010-03-25 00:26:05 +01:00
if options_ . periods > 0 && ~ PI_PCL_solver
2011-01-02 16:54:08 +01:00
if options_ . periods < = options_ . drop
2014-03-03 19:50:25 +01:00
fprintf ( ' \nSTOCH_SIMUL error: The horizon of simulation is shorter than the number of observations to be dropped.\n' )
fprintf ( ' STOCH_SIMUL error: Either increase options_.periods or decrease options_.drop.\n' )
2009-12-16 18:17:34 +01:00
options_ = options_old ;
return
2005-02-18 20:54:39 +01:00
end
2011-12-28 11:11:06 +01:00
if isempty ( M_ . endo_histval )
2011-12-21 18:37:45 +01:00
y0 = oo_ . dr . ys ;
else
2011-12-28 11:11:06 +01:00
y0 = M_ . endo_histval ;
2011-12-21 18:37:45 +01:00
end
2012-06-29 13:05:53 +02:00
[ ys , oo_ ] = simult ( y0 , oo_ . dr , M_ , options_ , oo_ ) ;
oo_ . endo_simul = ys ;
2015-05-28 11:53:50 +02:00
if ~ options_ . minimal_workspace
dyn2vec ;
end
2010-03-23 11:09:59 +01:00
end
if options_ . nomoments == 0
2010-03-25 00:26:05 +01:00
if PI_PCL_solver
PCL_Part_info_moments ( 0 , PCL_varobs , oo_ . dr , i_var ) ;
2010-03-23 11:09:59 +01:00
elseif options_ . periods == 0
2011-10-27 18:03:42 +02:00
% There is no code for theoretical moments at 3rd order
if options_ . order < = 2
2015-08-17 08:57:07 +02:00
oo_ = disp_th_moments ( oo_ . dr , var_list , M_ , options_ , oo_ ) ;
2011-10-27 18:03:42 +02:00
end
2010-03-23 11:09:59 +01:00
else
2015-08-07 16:57:28 +02:00
oo_ = disp_moments ( oo_ . endo_simul , var_list , M_ , options_ , oo_ ) ;
2005-02-18 20:54:39 +01:00
end
2009-12-16 18:17:34 +01:00
end
2005-02-18 20:54:39 +01:00
2005-09-11 11:43:58 +02:00
2011-09-17 12:33:07 +02:00
if options_ . irf
2010-03-23 11:09:59 +01:00
var_listTeX = M_ . endo_names_tex ( i_var , : ) ;
Fixes for ticket #57
preprocessor:
* add a field "M_.orig_endo_nbr" containing the nbr of endogenous before adding aux vars
* always provide "M_.aux_vars" (define it to "[]" when there is no aux var)
* rename "M_.aux_vars().orig_endo_index" to "M_.aux_vars().orig_index"
M-files:
* for commands which accept a list of variables (stoch_simul, osr, estimation, dynasave, dynatype, datatomfile), when no variable is given, use only the set of original endogenous (without aux vars) as the default
* when displaying the decision rule, when there is aux vars in the state variables, replace them by their original name (with the right lag)
* in "steady", don't display aux vars
* special exception for ramsey policy: all vars (including aux vars) are displayed, because the system of aux vars from ramsey policy is not compatible with the aux vars from the preprocessor
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3166 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-11-25 11:22:39 +01:00
2015-05-12 08:53:57 +02:00
if TeX && any ( strcmp ( ' eps' , cellstr ( options_ . graph_format ) ) )
2009-12-16 18:17:34 +01:00
fidTeX = fopen ( [ M_ . fname ' _IRF.TeX' ] , ' w' ) ;
fprintf ( fidTeX , ' %% TeX eps-loader file generated by stoch_simul.m (Dynare).\n' ) ;
fprintf ( fidTeX , [ ' %% ' datestr ( now , 0 ) ' \n' ] ) ;
fprintf ( fidTeX , ' \n' ) ;
2005-09-11 11:43:58 +02:00
end
2005-09-26 14:40:14 +02:00
SS ( M_ . exo_names_orig_ord , M_ . exo_names_orig_ord ) = M_ . Sigma_e + 1e-14 * eye ( M_ . exo_nbr ) ;
2005-09-11 11:43:58 +02:00
cs = transpose ( chol ( SS ) ) ;
2005-09-26 14:40:14 +02:00
tit ( M_ . exo_names_orig_ord , : ) = M_ . exo_names ;
2005-09-11 11:43:58 +02:00
if TeX
2009-12-16 18:17:34 +01:00
titTeX ( M_ . exo_names_orig_ord , : ) = M_ . exo_names_tex ;
2005-02-18 20:54:39 +01:00
end
2011-03-31 16:33:47 +02:00
irf_shocks_indx = getIrfShocksIndx ( ) ;
for i = irf_shocks_indx
2009-12-16 18:17:34 +01:00
if SS ( i , i ) > 1e-13
2010-03-25 00:26:05 +01:00
if PI_PCL_solver
y = PCL_Part_info_irf ( 0 , PCL_varobs , i_var , M_ , oo_ . dr , options_ . irf , i ) ;
2010-03-23 11:09:59 +01:00
else
2014-09-22 10:29:00 +02:00
if options_ . order > 1 && options_ . relative_irf % normalize shock to 0.01 before IRF generation for GIRFs; multiply with 100 later
y = irf ( oo_ . dr , cs ( M_ . exo_names_orig_ord , i ) ./ cs ( i , i ) / 100 , options_ . irf , options_ . drop , ...
options_ . replic , options_ . order ) ;
else %for linear model, rescaling is done later
y = irf ( oo_ . dr , cs ( M_ . exo_names_orig_ord , i ) , options_ . irf , options_ . drop , ...
options_ . replic , options_ . order ) ;
end
2010-03-23 11:09:59 +01:00
end
2013-10-02 09:48:07 +02:00
if ~ options_ . noprint && any ( any ( isnan ( y ) ) ) && ~ options_ . pruning && ~ ( options_ . order == 1 )
2013-11-28 10:57:54 +01:00
fprintf ( ' \nstoch_simul:: The simulations conducted for generating IRFs to %s were explosive.\n' , M_ . exo_names ( i , : ) )
fprintf ( ' stoch_simul:: No IRFs will be displayed. Either reduce the shock size, \n' )
fprintf ( ' stoch_simul:: use pruning, or set the approximation order to 1.' ) ;
2013-10-02 09:48:07 +02:00
skipline ( 2 ) ;
end
2009-12-16 18:17:34 +01:00
if options_ . relative_irf
2014-09-22 10:29:00 +02:00
if options_ . order == 1 %multiply with 100 for backward compatibility
y = 100 * y / cs ( i , i ) ;
end
2009-12-16 18:17:34 +01:00
end
irfs = [ ] ;
mylist = [ ] ;
if TeX
mylistTeX = [ ] ;
end
2010-03-23 11:09:59 +01:00
for j = 1 : nvar
assignin ( ' base' , [ deblank ( M_ . endo_names ( i_var ( j ) , : ) ) ' _' deblank ( M_ . exo_names ( i , : ) ) ] , ...
y ( i_var ( j ) , : ) ' ) ;
eval ( [ ' oo_.irfs.' deblank ( M_ . endo_names ( i_var ( j ) , : ) ) ' _' ...
2011-09-17 12:33:07 +02:00
deblank ( M_ . exo_names ( i , : ) ) ' = y(i_var(j),:);' ] ) ;
2015-08-14 12:36:08 +02:00
if max ( abs ( y ( i_var ( j ) , : ) ) ) > = options_ . impulse_responses . plot_threshold
2010-03-23 11:09:59 +01:00
irfs = cat ( 1 , irfs , y ( i_var ( j ) , : ) ) ;
2010-09-26 13:42:41 +02:00
if isempty ( mylist )
mylist = deblank ( var_list ( j , : ) ) ;
else
mylist = char ( mylist , deblank ( var_list ( j , : ) ) ) ;
end
2009-12-16 18:17:34 +01:00
if TeX
2010-09-26 13:42:41 +02:00
if isempty ( mylistTeX )
mylistTeX = deblank ( var_listTeX ( j , : ) ) ;
else
mylistTeX = char ( mylistTeX , deblank ( var_listTeX ( j , : ) ) ) ;
end
2009-12-16 18:17:34 +01:00
end
2013-10-12 10:42:16 +02:00
else
if options_ . debug
2013-11-28 10:57:54 +01:00
fprintf ( ' stoch_simul:: The IRF of %s to %s is smaller than the irf_plot_threshold of %4.3f and will not be displayed.\n' , deblank ( M_ . endo_names ( i_var ( j ) , : ) ) , deblank ( M_ . exo_names ( i , : ) ) , options_ . impulse_responses . plot_threshold )
2013-10-12 10:42:16 +02:00
end
2009-12-16 18:17:34 +01:00
end
end
if options_ . nograph == 0
number_of_plots_to_draw = size ( irfs , 1 ) ;
[ nbplt , nr , nc , lr , lc , nstar ] = pltorg ( number_of_plots_to_draw ) ;
if nbplt == 0
elseif nbplt == 1
if options_ . relative_irf
2012-04-20 20:17:20 +02:00
hh = dyn_figure ( options_ , ' Name' , [ ' Relative response to' ...
2009-12-16 18:17:34 +01:00
' orthogonalized shock to ' tit ( i , : ) ] ) ;
else
2012-04-20 20:17:20 +02:00
hh = dyn_figure ( options_ , ' Name' , [ ' Orthogonalized shock to' ...
2009-12-16 18:17:34 +01:00
' ' tit ( i , : ) ] ) ;
end
for j = 1 : number_of_plots_to_draw
subplot ( nr , nc , j ) ;
plot ( 1 : options_ . irf , transpose ( irfs ( j , : ) ) , ' -k' , ' linewidth' , 1 ) ;
hold on
plot ( [ 1 options_ . irf ] , [ 0 0 ] , ' -r' , ' linewidth' , 0.5 ) ;
hold off
xlim ( [ 1 options_ . irf ] ) ;
title ( deblank ( mylist ( j , : ) ) , ' Interpreter' , ' none' ) ;
end
2012-04-20 20:17:20 +02:00
dyn_saveas ( hh , [ M_ . fname ' _IRF_' deblank ( tit ( i , : ) ) ] , options_ ) ;
2015-05-12 08:53:57 +02:00
if TeX && any ( strcmp ( ' eps' , cellstr ( options_ . graph_format ) ) )
2009-12-16 18:17:34 +01:00
fprintf ( fidTeX , ' \\begin{figure}[H]\n' ) ;
for j = 1 : number_of_plots_to_draw
fprintf ( fidTeX , [ ' \\psfrag{%s}[1][][0.5][0]{$%s$}\n' ] , deblank ( mylist ( j , : ) ) , deblank ( mylistTeX ( j , : ) ) ) ;
end
fprintf ( fidTeX , ' \\centering \n' ) ;
fprintf ( fidTeX , ' \\includegraphics[scale=0.5]{%s_IRF_%s}\n' , M_ . fname , deblank ( tit ( i , : ) ) ) ;
fprintf ( fidTeX , ' \\caption{Impulse response functions (orthogonalized shock to $%s$).}' , titTeX ( i , : ) ) ;
fprintf ( fidTeX , ' \\label{Fig:IRF:%s}\n' , deblank ( tit ( i , : ) ) ) ;
fprintf ( fidTeX , ' \\end{figure}\n' ) ;
fprintf ( fidTeX , ' \n' ) ;
end
else
for fig = 1 : nbplt - 1
2012-04-20 20:17:20 +02:00
if options_ . relative_irf
hh = dyn_figure ( options_ , ' Name' , [ ' Relative response to orthogonalized shock' ...
2009-12-16 18:17:34 +01:00
' to ' tit ( i , : ) ' figure ' int2str ( fig ) ] ) ;
else
2012-04-20 20:17:20 +02:00
hh = dyn_figure ( options_ , ' Name' , [ ' Orthogonalized shock to ' tit ( i , : ) ...
2009-12-16 18:17:34 +01:00
' figure ' int2str ( fig ) ] ) ;
end
for plt = 1 : nstar
subplot ( nr , nc , plt ) ;
plot ( 1 : options_ . irf , transpose ( irfs ( ( fig - 1 ) * nstar + plt , : ) ) , ' -k' , ' linewidth' , 1 ) ;
hold on
plot ( [ 1 options_ . irf ] , [ 0 0 ] , ' -r' , ' linewidth' , 0.5 ) ;
hold off
xlim ( [ 1 options_ . irf ] ) ;
title ( deblank ( mylist ( ( fig - 1 ) * nstar + plt , : ) ) , ' Interpreter' , ' none' ) ;
end
2012-04-20 20:17:20 +02:00
dyn_saveas ( hh , [ M_ . fname ' _IRF_' deblank ( tit ( i , : ) ) int2str ( fig ) ] , options_ ) ;
2015-05-12 08:53:57 +02:00
if TeX && any ( strcmp ( ' eps' , cellstr ( options_ . graph_format ) ) )
2009-12-16 18:17:34 +01:00
fprintf ( fidTeX , ' \\begin{figure}[H]\n' ) ;
for j = 1 : nstar
fprintf ( fidTeX , [ ' \\psfrag{%s}[1][][0.5][0]{$%s$}\n' ] , deblank ( mylist ( ( fig - 1 ) * nstar + j , : ) ) , deblank ( mylistTeX ( ( fig - 1 ) * nstar + j , : ) ) ) ;
end
fprintf ( fidTeX , ' \\centering \n' ) ;
fprintf ( fidTeX , ' \\includegraphics[scale=0.5]{%s_IRF_%s%s}\n' , M_ . fname , deblank ( tit ( i , : ) ) , int2str ( fig ) ) ;
if options_ . relative_irf
fprintf ( fidTeX , [ ' \\caption{Relative impulse response' ...
' functions (orthogonalized shock to $%s$).}' ] , deblank ( titTeX ( i , : ) ) ) ;
else
fprintf ( fidTeX , [ ' \\caption{Impulse response functions' ...
' (orthogonalized shock to $%s$).}' ] , deblank ( titTeX ( i , : ) ) ) ;
end
fprintf ( fidTeX , ' \\label{Fig:BayesianIRF:%s:%s}\n' , deblank ( tit ( i , : ) ) , int2str ( fig ) ) ;
fprintf ( fidTeX , ' \\end{figure}\n' ) ;
fprintf ( fidTeX , ' \n' ) ;
end
end
2012-04-20 20:17:20 +02:00
hh = dyn_figure ( options_ , ' Name' , [ ' Orthogonalized shock to ' tit ( i , : ) ' figure ' int2str ( nbplt ) ' .' ] ) ;
2011-09-17 12:33:07 +02:00
m = 0 ;
2009-12-16 18:17:34 +01:00
for plt = 1 : number_of_plots_to_draw - ( nbplt - 1 ) * nstar ;
m = m + 1 ;
subplot ( lr , lc , m ) ;
plot ( 1 : options_ . irf , transpose ( irfs ( ( nbplt - 1 ) * nstar + plt , : ) ) , ' -k' , ' linewidth' , 1 ) ;
hold on
plot ( [ 1 options_ . irf ] , [ 0 0 ] , ' -r' , ' linewidth' , 0.5 ) ;
hold off
xlim ( [ 1 options_ . irf ] ) ;
title ( deblank ( mylist ( ( nbplt - 1 ) * nstar + plt , : ) ) , ' Interpreter' , ' none' ) ;
end
2012-04-20 20:17:20 +02:00
dyn_saveas ( hh , [ M_ . fname ' _IRF_' deblank ( tit ( i , : ) ) int2str ( nbplt ) ] , options_ ) ;
2015-05-12 08:53:57 +02:00
if TeX && any ( strcmp ( ' eps' , cellstr ( options_ . graph_format ) ) )
2009-12-16 18:17:34 +01:00
fprintf ( fidTeX , ' \\begin{figure}[H]\n' ) ;
for j = 1 : m
fprintf ( fidTeX , [ ' \\psfrag{%s}[1][][0.5][0]{$%s$}\n' ] , deblank ( mylist ( ( nbplt - 1 ) * nstar + j , : ) ) , deblank ( mylistTeX ( ( nbplt - 1 ) * nstar + j , : ) ) ) ;
end
fprintf ( fidTeX , ' \\centering \n' ) ;
fprintf ( fidTeX , ' \\includegraphics[scale=0.5]{%s_IRF_%s%s}\n' , M_ . fname , deblank ( tit ( i , : ) ) , int2str ( nbplt ) ) ;
if options_ . relative_irf
fprintf ( fidTeX , [ ' \\caption{Relative impulse response functions' ...
' (orthogonalized shock to $%s$).}' ] , deblank ( titTeX ( i , : ) ) ) ;
else
fprintf ( fidTeX , [ ' \\caption{Impulse response functions' ...
' (orthogonalized shock to $%s$).}' ] , deblank ( titTeX ( i , : ) ) ) ;
end
fprintf ( fidTeX , ' \\label{Fig:IRF:%s:%s}\n' , deblank ( tit ( i , : ) ) , int2str ( nbplt ) ) ;
fprintf ( fidTeX , ' \\end{figure}\n' ) ;
fprintf ( fidTeX , ' \n' ) ;
end
end
end
end
2011-02-09 15:21:03 +01:00
end
2015-05-12 08:53:57 +02:00
if TeX && any ( strcmp ( ' eps' , cellstr ( options_ . graph_format ) ) )
2011-02-09 15:21:03 +01:00
fprintf ( fidTeX , ' \n' ) ;
fprintf ( fidTeX , ' %% End Of TeX file. \n' ) ;
fclose ( fidTeX ) ;
2005-09-11 11:43:58 +02:00
end
2009-12-16 18:17:34 +01:00
end
2006-05-24 18:46:32 +02:00
2012-04-26 08:48:31 +02:00
if options_ . SpectralDensity . trigger == 1
2015-08-04 08:45:55 +02:00
[ oo_ ] = UnivariateSpectralDensity ( M_ , oo_ , options_ , var_list ) ;
2009-12-16 18:17:34 +01:00
end
2007-01-22 17:34:54 +01:00
2006-11-18 08:37:22 +01:00
options_ = options_old ;
2010-03-25 11:20:34 +01:00
% temporary fix waiting for local options
2011-12-10 20:10:31 +01:00
options_ . partial_information = 0 ;