Debian Codegraph @

tests/estimation/system_prior_restriction/Gali_2015_PC_slope.m

raw
1 function output_cell =Gali_2015_PC_slope(xparam1,M_,options_,oo_,estim_params_,bayestopt_,dataset_,dataset_info)
2 % output_cell =PC_slope(xparam1,M_,options_,oo_,estim_params_,bayestopt_,dataset_,dataset_info);
3 % This is an example file computing statistics on the prior/posterior draws. The
4 % function allows read-only access to all Dynare structures. However, those
5 % structures are local to this function. Changing them will not affect
6 % other Dynare functions and you cannot use them to pass results to other
7 % Dynare functions.
8 % The function takes one and only one output argument: an 1 by n cell.
9 % Using functions like cell2mat, the contents of the cell can be easily
10 % transformed back to matrices. See the fs2000_posterior_function.mod for
11 % an example
12
13 % INPUTS
14 % xparam1 Current parameter draw
15 % M_ [structure] Matlab's structure describing the Model (initialized by dynare, see @ref{M_}).
16 % options_ [structure] Matlab's structure describing the options (initialized by dynare, see @ref{options_}).
17 % oo_ [structure] Matlab's structure gathering the results (initialized by dynare, see @ref{oo_}).
18 % estim_params_[structure] Matlab's structure describing the estimated_parameters (initialized by dynare, see @ref{estim_params_}).
19 % bayestopt_ [structure] Matlab's structure describing the parameter options (initialized by dynare, see @ref{bayestopt_}).
20 % dataset_ [structure] Matlab's structure storing the dataset
21 % dataset_info [structure] Matlab's structure storing the information about the dataset
22
23 % Output
24 % output_cell [1 by n cell] 1 by n Matlab cell allowing to store any
25 % desired computation or result (strings, matrices, structures, etc.)
26
27 % Copyright © 2021-2022 Dynare Team
28 %
29 % This file is part of Dynare.
30 %
31 % Dynare is free software: you can redistribute it and/or modify
32 % it under the terms of the GNU General Public License as published by
33 % the Free Software Foundation, either version 3 of the License, or
34 % (at your option) any later version.
35 %
36 % Dynare is distributed in the hope that it will be useful,
37 % but WITHOUT ANY WARRANTY; without even the implied warranty of
38 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 % GNU General Public License for more details.
40 %
41 % You should have received a copy of the GNU General Public License
42 % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
43
44
45 %% store the slope based on the parameter draw
46 NumberOfParameters = M_.param_nbr;
47 for ii = 1:NumberOfParameters
48 paramname = deblank(M_.param_names{ii,:});
49 eval([ paramname ' = M_.params(' int2str(ii) ');']);
50 end
51
52 Omega=(1-alppha)/(1-alppha+alppha*epsilon);
53 lambda=(1-theta)*(1-betta*theta)/theta*Omega; %defined on page 61
54 output_cell{1,1}=lambda*(siggma+(varphi+alppha)/(1-alppha)); %defined on page 63
55
56 end