v4 matlab: fixed some existing copyright headers (and some other minor header issues)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1974 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
c633f68b12
commit
db50368418
|
@ -43,8 +43,24 @@ function [dr,aimcode,rts]=dynAIMsolver1(jacobia_,M_,dr)
|
|||
% i.e. diff < e-14 for aa and diff < *e-13 for jacobia_ if Q' is used.
|
||||
%
|
||||
% GP July 2008
|
||||
% part of DYNARE, copyright Dynare Team (1996-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
aimcode=-1;
|
||||
neq= size(jacobia_,1); % no of equations
|
||||
lags=M_.maximum_endo_lag; % no of lags and leads
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function [alphahat,etahat,a1, aK] = DiffuseKalmanSmoother3(T,R,Q,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
|
||||
|
||||
% function [alphahat,etahat,a1, aK] = DiffuseKalmanSmoother3(T,R,Q,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
|
||||
% Computes the diffuse kalman smoother without measurement error, in the case of a singular var-cov matrix.
|
||||
% Univariate treatment of multivariate time series.
|
||||
|
@ -22,15 +21,28 @@ function [alphahat,etahat,a1, aK] = DiffuseKalmanSmoother3(T,R,Q,Pinf1,Pstar1,Y,
|
|||
% etahat: smoothed shocks
|
||||
% a1: matrix of one step ahead filtered state variables
|
||||
% aK: 3D array of k step ahead filtered state variables
|
||||
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% See "Filtering and Smoothing of State Vector for Diffuse State Space
|
||||
% Models", S.J. Koopman and J. Durbin (2003, in Journal of Time Series
|
||||
% Analysis, vol. 24(1), pp. 85-98).
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
% Modified by M. Ratto
|
||||
% New output argument aK: 1-step to nk-stpe ahed predictions)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function [alphahat,etahat,a1,P,aK,PK,d,decomp] = DiffuseKalmanSmoother3_Z(T,Z,R,Q,Pinf1,Pstar1,Y,pp,mm,smpl)
|
||||
|
||||
% function [alphahat,etahat,a1,P,aK,PK,d,decomp_filt] = DiffuseKalmanSmoother3(T,Z,R,Q,Pinf1,Pstar1,Y,pp,mm,smpl)
|
||||
% Computes the diffuse kalman smoother without measurement error, in the case of a singular var-cov matrix.
|
||||
% Univariate treatment of multivariate time series.
|
||||
|
@ -34,10 +33,23 @@ function [alphahat,etahat,a1,P,aK,PK,d,decomp] = DiffuseKalmanSmoother3_Z(T,Z,R,
|
|||
% See "Filtering and Smoothing of State Vector for Diffuse State Space
|
||||
% Models", S.J. Koopman and J. Durbin (2003, in Journal of Time Series
|
||||
% Analysis, vol. 24(1), pp. 85-98).
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
% Modified by M. Ratto
|
||||
% New output argument aK: 1-step to nk-stpe ahed predictions)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function [alphahat,epsilonhat,etahat,a, aK] = DiffuseKalmanSmootherH1(T,R,Q,H,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
|
||||
|
||||
% function [alphahat,epsilonhat,etahat,a, aK] = DiffuseKalmanSmootherH1(T,R,Q,H,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
|
||||
% Computes the diffuse kalman smoother with measurement error, in the case of a non-singular var-cov matrix
|
||||
%
|
||||
|
@ -22,15 +21,28 @@ function [alphahat,epsilonhat,etahat,a, aK] = DiffuseKalmanSmootherH1(T,R,Q,H,Pi
|
|||
% etahat: smoothed shocks
|
||||
% a: matrix of one step ahead filtered state variables
|
||||
% aK: 3D array of k step ahead filtered state variables
|
||||
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% See "Filtering and Smoothing of State Vector for Diffuse State Space
|
||||
% Models", S.J. Koopman and J. Durbin (2003, in Journal of Time Series
|
||||
% Analysis, vol. 24(1), pp. 85-98).
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
% modified by M. Ratto:
|
||||
% new output argument aK (1-step to k-step predictions)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function [alphahat,epsilonhat,etahat,a1, aK] = DiffuseKalmanSmootherH3(T,R,Q,H,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
|
||||
|
||||
% function [alphahat,epsilonhat,etahat,a1, aK] = DiffuseKalmanSmootherH3(T,R,Q,H,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
|
||||
% Computes the diffuse kalman smoother with measurement error, in the case of a singular var-cov matrix.
|
||||
% Univariate treatment of multivariate time series.
|
||||
|
@ -23,15 +22,28 @@ function [alphahat,epsilonhat,etahat,a1, aK] = DiffuseKalmanSmootherH3(T,R,Q,H,P
|
|||
% etahat: smoothed shocks
|
||||
% a1: matrix of one step ahead filtered state variables
|
||||
% aK: 3D array of k step ahead filtered state variables
|
||||
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% See "Filtering and Smoothing of State Vector for Diffuse State Space
|
||||
% Models", S.J. Koopman and J. Durbin (2003, in Journal of Time Series
|
||||
% Analysis, vol. 24(1), pp. 85-98).
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
% Modified by M. Ratto
|
||||
% New output argument aK: 1-step to nk-stpe ahed predictions)
|
||||
|
@ -45,7 +57,6 @@ function [alphahat,epsilonhat,etahat,a1, aK] = DiffuseKalmanSmootherH3(T,R,Q,H,P
|
|||
% some bugs corrected in the DKF part of the smoother (Z matrix and
|
||||
% alphahat)
|
||||
|
||||
|
||||
global options_
|
||||
|
||||
nk = options_.nk;
|
||||
|
|
|
@ -27,9 +27,23 @@ function [alphahat,epsilonhat,etahat,a1] = DiffuseKalmanSmootherH3corr(T,R,Q,H,P
|
|||
% See "Fast Filtering and Smoothing for Multivariate State Space
|
||||
% Models", S.J. Koopman and J. Durbin (2000, in Journal of Time Series
|
||||
% Analysis, vol. 21(3), pp. 281-296).
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global options_;
|
||||
|
||||
|
|
|
@ -18,9 +18,24 @@ function [fval,cost_flag,ys,trend_coeff,info] = DsgeLikelihood(xparam1,gend,data
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% Adapted from mj_optmumlik.m
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global bayestopt_ estim_params_ options_ trend_coeff_ M_ oo_ xparam1_test
|
||||
fval = [];
|
||||
ys = [];
|
||||
|
|
|
@ -27,9 +27,23 @@ function [alphahat,etahat,epsilonhat,ahat,SteadyState,trend_coeff,aK,T,R,P,PK,d,
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% None
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2006-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2006-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global bayestopt_ M_ oo_ estim_params_ options_
|
||||
|
||||
|
|
|
@ -10,9 +10,23 @@ function get_posterior_parameters_statistics()
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% None.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2006-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2006-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global estim_params_ M_ options_ bayestopt_ oo_
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function McMCDiagnostics
|
||||
|
||||
% function McMCDiagnostics
|
||||
% Computes convergence tests
|
||||
%
|
||||
|
@ -11,10 +10,23 @@ function McMCDiagnostics
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2005-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2005-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global options_ estim_params_ M_
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function d = bksup1(ny,jcf)
|
||||
|
||||
% function d = bksup1(ny,jcf)
|
||||
% Solves deterministic models recursively by backsubstitution for one lead/lag
|
||||
%
|
||||
|
@ -12,10 +11,23 @@ function d = bksup1(ny,jcf)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global options_ iyf c
|
||||
|
||||
|
|
|
@ -14,9 +14,23 @@ function d1 = bksupk(ny,fid,jcf,icc1)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function bvar_density(maxnlags)
|
||||
|
||||
% function bvar_density(maxnlags)
|
||||
% computes the density of a bayesian var
|
||||
%
|
||||
|
@ -11,9 +10,24 @@ function bvar_density(maxnlags)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2007 Chris Sims
|
||||
% Copyright (C) 2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
for nlags = 1:maxnlags
|
||||
[ny, nx, posterior, prior] = bvar_toolbox(nlags);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function bvar_forecast(nlags)
|
||||
|
||||
% function bvar_forecast(nlags)
|
||||
% builds forecats for a bvar model
|
||||
%
|
||||
|
@ -11,9 +10,23 @@ function bvar_forecast(nlags)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2007-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global options_ oo_ M_
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags)
|
||||
|
||||
%function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags)
|
||||
% bvar_toolbox Routines shared between BVAR methods
|
||||
% Computes several things for the estimations of a BVAR(nlags)
|
||||
|
@ -41,10 +40,25 @@ function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags)
|
|||
% This function uses the following Dynare options:
|
||||
% - datafile, first_obs, varobs, xls_sheet, xls_range, nobs, presample
|
||||
% - bvar_prior_{tau,decay,lambda,mu,omega,flat,train}
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2007 Chris Sims
|
||||
% Copyright (C) 2007-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global options_
|
||||
|
||||
% Load dataset
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
function [info,description] = check_posterior_analysis_data(type,M_)
|
||||
% part of DYNARE, copyright Dynare Team (2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
info = 0;
|
||||
if nargout>1
|
||||
|
|
|
@ -13,9 +13,23 @@ function [m0,s0] = compute_mh_covariance_matrix()
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% None.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2006-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2006-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ estim_params_
|
||||
|
||||
|
|
20
matlab/dr1.m
20
matlab/dr1.m
|
@ -29,9 +29,23 @@ function [dr,info,M_,options_,oo_] = dr1(dr,task,M_,options_,oo_)
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none.
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 1996-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
info = 0;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx);
|
||||
|
||||
% function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx)
|
||||
% plots prior density
|
||||
%
|
||||
|
@ -16,10 +15,23 @@ function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx);
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global bayestopt_
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function dsample(s1,s2)
|
||||
|
||||
% function dsample(s1,s2)
|
||||
% This optional command permits to reduce the number of periods considered in following output commands.
|
||||
% If only one argument is provided, output is from period 1 to the period specified in the DSAMPLE command.
|
||||
|
@ -15,10 +14,23 @@ function dsample(s1,s2)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global options_
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
function [nvar,vartan,CorrFileNumber] = dsge_posterior_theoretical_correlation(SampleSize,nar,M_,options_,oo_)
|
||||
%function [nvar,vartan,CorrFileNumber] = dsge_posterior_theoretical_correlation(SampleSize,nar,M_,options_,oo_)
|
||||
% This function estimates the posterior density of the endogenous
|
||||
% variables second order moments.
|
||||
%
|
||||
|
@ -18,10 +19,23 @@ function [nvar,vartan,CorrFileNumber] = dsge_posterior_theoretical_correlation(S
|
|||
% resol.m
|
||||
% th_autocovariances.m
|
||||
% posterior_moments.m
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2007-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2007-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
type = 'posterior';
|
||||
|
||||
|
|
|
@ -18,10 +18,23 @@ function [nvar,vartan,CovarFileNumber] = dsge_posterior_theoretical_covariance(S
|
|||
% resol.m
|
||||
% th_autocovariances.m
|
||||
% posterior_moments.m
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2007-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2007-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
type = 'posterior';
|
||||
|
||||
|
|
|
@ -15,9 +15,24 @@ function bvar = dsgevar_posterior_density(deep)
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 1996-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global options_ M_
|
||||
|
||||
gend = options_.nobs;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
% function [z,zss]=dyn2vec(s1,s2);
|
||||
function [z,zss]=dyn2vec(s1,s2)
|
||||
% function [z,zss]=dyn2vec(s1,s2)
|
||||
% Takes Dynare variables from oo_.endo_simul and copies them into matlab global vectors
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -12,12 +13,23 @@
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
|
||||
function [z,zss]=dyn2vec(s1,s2);
|
||||
% Copyright (C) 2001-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ oo_ options_
|
||||
|
||||
|
|
|
@ -15,9 +15,23 @@ function dynare(fname, varargin)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
warning_config
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
function dynareroot = dynare_config(path_to_dynare)
|
||||
%function dynareroot = dynare_config(path_to_dynare)
|
||||
% This function tests the existence of valid mex files (for qz
|
||||
% decomposition, solution to sylvester equation and kronecker
|
||||
% products...) and, if needed, add paths to the matlab versions
|
||||
% of these routines.
|
||||
%
|
||||
%
|
||||
% INPUTS
|
||||
% none
|
||||
|
@ -13,9 +13,24 @@ function dynareroot = dynare_config(path_to_dynare)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
if nargin
|
||||
addpath(path_to_dynare);
|
||||
end
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function [x,info] = dynare_solve(func,x,jacobian_flag,varargin)
|
||||
|
||||
% function [x,info] = dynare_solve(func,x,jacobian_flag,varargin)
|
||||
% proposes different solvers
|
||||
%
|
||||
|
@ -16,10 +15,23 @@ function [x,info] = dynare_solve(func,x,jacobian_flag,varargin)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global options_
|
||||
|
||||
|
|
|
@ -14,10 +14,23 @@ function dynasave(s,var_list)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ oo_
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function dynatype (s,var_list)
|
||||
|
||||
% function dynatype (s,var_list)
|
||||
% This optional command saves the simulation results in a text file. The name of each
|
||||
% variable preceeds the corresponding results. This command must follow SIMUL.
|
||||
|
@ -14,10 +13,23 @@ function dynatype (s,var_list)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ oo_
|
||||
|
||||
|
|
|
@ -11,9 +11,23 @@ function y=ff1_(x)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global it_ M_ oo_
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
function [a,b] = ffill(x,ixc,y)
|
||||
|
||||
% function [a,b] = ffill(x,ixc,y)
|
||||
% Makes the horizontale concatenation if x exists
|
||||
% Makes the horizontal concatenation if x exists
|
||||
% and fills the matrix with 0 if x and y are not the same size.
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -15,10 +14,23 @@ function [a,b] = ffill(x,ixc,y)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
xc = size(x,1) ;
|
||||
|
||||
|
|
|
@ -17,9 +17,23 @@ function [yf,int_width]=forcst(dr,y0,horizon,var_list)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ oo_ options_
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
function E = gensylv(fake,A,B,C,D)
|
||||
%function E = gensylv(fake,A,B,C,D)
|
||||
% Solves a Sylvester equation.
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -15,11 +16,25 @@ function E = gensylv(fake,A,B,C,D)
|
|||
% none.
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none.
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2008)
|
||||
% Gnu Public License.
|
||||
% none.
|
||||
|
||||
% Copyright (C) 1996-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
C = kron(C,C);
|
||||
x0 = sylvester3(A,B,C,D);
|
||||
E = sylvester3a(x0,A,B,C,D);
|
||||
E = sylvester3a(x0,A,B,C,D);
|
||||
|
|
|
@ -1,8 +1,25 @@
|
|||
function [d1,d2] = get_date_of_a_file(filename)
|
||||
% part of DYNARE, copyright Dynare Team (2008)
|
||||
% Gnu Public License.
|
||||
%function [d1,d2] = get_date_of_a_file(filename)
|
||||
|
||||
% Copyright (C) 2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
info = dir(filename);
|
||||
d1 = info.datenum;
|
||||
if nargout>1
|
||||
d2 = info.date;
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,9 +23,23 @@ function B = get_innovation_contemporaneous_impact(type,info)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% This function needs to be run after the estimation of a model.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2006-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2006-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global oo_ M_ bayestopt_ options_
|
||||
|
||||
|
|
|
@ -1,6 +1,23 @@
|
|||
function mhname = get_name_of_the_last_mh_file(M_)
|
||||
% part of DYNARE, copyright Dynare Team (2008)
|
||||
% Gnu Public License.
|
||||
%function mhname = get_name_of_the_last_mh_file(M_)
|
||||
|
||||
% Copyright (C) 2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
model_name = M_.fname ;
|
||||
mcmc_directory = M_.dname ;
|
||||
load([ mcmc_directory '/metropolis/' model_name '_mh_history.mat']) ;
|
||||
|
|
|
@ -14,9 +14,23 @@ function [nam,texnam] = get_the_name(k,TeX)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ estim_params_ options_
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
function global_initialization()
|
||||
%function global_initialization()
|
||||
% initializes global variables and options for DYNARE
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -9,9 +10,24 @@ function global_initialization()
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global oo_ M_ options_ ct_ endval_ rplottype_
|
||||
|
||||
ct_=0;
|
||||
|
|
|
@ -24,9 +24,23 @@ function homotopy2(values, step_nbr)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ oo_ options_
|
||||
|
||||
|
|
|
@ -12,9 +12,23 @@ function a=indnv(x,y)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
a = zeros(size(x)) ;
|
||||
|
||||
|
|
|
@ -13,10 +13,23 @@ function initial_estimation_checks(xparam1,gend,data)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global dr1_test bayestopt_ estim_params_ options_ oo_ M_
|
||||
|
||||
|
|
|
@ -13,9 +13,23 @@ function initvalf(fname)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ oo_ options_
|
||||
global y_start_date ex_start_date
|
||||
|
|
|
@ -16,9 +16,23 @@ function [s,nu] = inverse_gamma_specification(mu,sigma,type)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
sigma2 = sigma^2;
|
||||
mu2 = mu^2;
|
||||
|
|
20
matlab/irf.m
20
matlab/irf.m
|
@ -16,9 +16,23 @@ function y = irf(dr, e1, long, drop, replic, iorder)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ oo_ options_
|
||||
|
||||
|
|
|
@ -11,9 +11,23 @@ function test = ispd(A)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% None.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2007-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2007-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
m = length(A);% I do not test for a square matrix...
|
||||
test = 1;
|
||||
|
|
|
@ -14,9 +14,23 @@ function [A,B] = kalman_transition_matrix(dr,iv,ic,aux,exo_nbr)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
n_iv = length(iv);
|
||||
n_ir1 = size(aux,1);
|
||||
|
|
|
@ -23,8 +23,23 @@ function [abscissa,f] = kernel_density_estimate(data,number_of_grid_points,numbe
|
|||
% A kernel density estimator is used (see Silverman [1986], "Density estimation for statistics and data analysis")
|
||||
% The code is adapted from Anders Holtsberg's matlab toolbox (stixbox).
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
if min(size(data))>1
|
||||
error('kernel_density_estimate:: data must be a one dimensional array.');
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
function D = A_times_B_kronecker_C(A,B,C)
|
||||
%function D = A_times_B_kronecker_C(A,B,C)
|
||||
% Computes A * kron(B,C).
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -14,10 +15,23 @@ function D = A_times_B_kronecker_C(A,B,C)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none.
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 1996-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
% Chek number of inputs and outputs.
|
||||
if nargin>3 | nargin<2
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
function D = sparse_hessian_times_B_kronecker_C(A,B,C)
|
||||
%function D = sparse_hessian_times_B_kronecker_C(A,B,C)
|
||||
% Computes A * kron(B,C) where A is a sparse matrix.
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -14,10 +15,24 @@ function D = sparse_hessian_times_B_kronecker_C(A,B,C)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none.
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 1996-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
switch nargin
|
||||
case 3
|
||||
D = A_times_B_kronecker_C(A,B,C);
|
||||
|
@ -25,4 +40,4 @@ switch nargin
|
|||
D = A_times_B_kronecker_C(A,B,B);
|
||||
otherwise
|
||||
error('Two or Three input arguments required!')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
% function [x,f,fvec,check]=lnsrch(xold,fold,g,p,stpmax,func,j1,j2,varargin)
|
||||
function [x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin)
|
||||
% function [x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin)
|
||||
% Computes the optimal step by minimizing the residual sum of squares
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -21,13 +22,24 @@
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
function [x,f,fvec,check]=lnsrch(xold,fold,g,p,stpmax,func,j1,j2,varargin)
|
||||
global options_
|
||||
|
||||
alf = 1e-4 ;
|
||||
|
|
|
@ -13,9 +13,23 @@ function ldens = lpdfgam(x,a,b);
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
ldens = -gammaln(a) -a*log(b)+ (a-1)*log(x) -x/b ;
|
||||
|
||||
|
|
|
@ -15,9 +15,23 @@ function ldens = lpdfgbeta(x,a,b,aa,bb);
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
ldens = -betaln(a,b) + (a-1)*log(x-aa) + (b-1)*log(bb-x) - (a+b-1)*log(bb-aa);
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function ldens = lpdfig1(x,s,nu)
|
||||
|
||||
% function ldens = lpdfig1(x,s,nu)
|
||||
% log INVERSE GAMMA (type 1)
|
||||
% X ~ IG1(s,nu)
|
||||
|
@ -9,16 +8,29 @@ function ldens = lpdfig1(x,s,nu)
|
|||
% x: density evatuated at x
|
||||
% s: shape parameter
|
||||
% nu: scale parameter
|
||||
|
||||
%
|
||||
% OUTPUTS
|
||||
% ldens: the log INVERSE GAMMA density function (type 1)
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% See L. Bauwens, M. Lubrano and J-F. Richard [1999, appendix A] for more
|
||||
% details.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
ldens = log(2) - gammaln(nu/2) - (nu/2).*log(2/s) - (nu+1)*log(x) - .5*s./(x.^2);
|
||||
ldens = log(2) - gammaln(nu/2) - (nu/2).*log(2/s) - (nu+1)*log(x) - .5*s./(x.^2);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function ldens = lpdfig2(x,s,nu)
|
||||
|
||||
% function ldens = lpdfig2(x,s,nu)
|
||||
% log INVERSE GAMMA (type 2)
|
||||
% X ~ IG2(s,nu)
|
||||
|
@ -9,16 +8,29 @@ function ldens = lpdfig2(x,s,nu)
|
|||
% x: density evatuated at x
|
||||
% s: shape parameter
|
||||
% nu: scale parameter
|
||||
|
||||
%
|
||||
% OUTPUTS
|
||||
% ldens: the log INVERSE GAMMA density function (type 2)
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% See L. Bauwens, M. Lubrano and J-F. Richard [1999, appendix A] for more
|
||||
% details.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
ldens = - gammaln(nu/2) - (nu/2)*log(2/s) - .5*(nu+2)*log(x) -.5*s./x;
|
||||
ldens = - gammaln(nu/2) - (nu/2)*log(2/s) - .5*(nu+2)*log(x) -.5*s./x;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function f = lpdfnorm(x,m,s)
|
||||
|
||||
% function f = lpdfnorm(x,m,s)
|
||||
% The log of the normal density function
|
||||
%
|
||||
|
@ -7,16 +6,29 @@ function f = lpdfnorm(x,m,s)
|
|||
% x: density evatuated at x
|
||||
% m: mean
|
||||
% s: standard deviation
|
||||
|
||||
%
|
||||
% OUTPUTS
|
||||
% f: the log of the normal density function
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
if nargin<3, s=1; end
|
||||
if nargin<2, m=0; end
|
||||
|
|
|
@ -11,9 +11,23 @@ function make_ex_
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 1996-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ oo_ ex0_ ex_det0_
|
||||
|
||||
|
|
|
@ -11,9 +11,24 @@ function make_y_
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 1996-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ oo_ ys0_
|
||||
|
||||
options_ = set_default_option(options_,'periods',0);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function marginal = marginal_density()
|
||||
|
||||
% function marginal = marginal_density()
|
||||
% Computes the marginal density
|
||||
%
|
||||
|
@ -11,10 +10,23 @@ function marginal = marginal_density()
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2005-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2005-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ estim_params_ oo_
|
||||
|
||||
|
|
|
@ -17,9 +17,23 @@ function r = matlab_ver_less_than(verstr)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
ver_struct = ver('matlab');
|
||||
cur_verstr = ver_struct.Version;
|
||||
|
|
|
@ -15,9 +15,24 @@ function [ ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck,
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% None.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2006-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2006-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ bayestopt_
|
||||
|
||||
ModelName = M_.fname;
|
||||
|
|
|
@ -23,11 +23,24 @@ function optimal_bandwidth = mh_optimal_bandwidth(data,number_of_draws,bandwidth
|
|||
% REFERENCES:
|
||||
% [1] M. Skold and G.O. Roberts [2003], "Density estimation for the Metropolis-Hastings algorithm".
|
||||
% [2] Silverman [1986], "Density estimation for statistics and data analysis".
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
%% Kernel specifications.
|
||||
if strcmpi(kernel_function,'gaussian')
|
||||
% Kernel definition
|
||||
|
|
|
@ -17,9 +17,23 @@ function mode_check(x,fval,hessian,gend,data,lb,ub)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global bayestopt_ M_ options_
|
||||
|
||||
|
|
|
@ -16,9 +16,23 @@ function my_subplot(i,imax,irow,icol,fig_title)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
nfig_max = irow*icol;
|
||||
if imax < nfig_max
|
||||
|
|
|
@ -6,9 +6,23 @@ function [g, badg, f0, f1, f2] = numgrad3(fcn,x,varargin)
|
|||
%
|
||||
% See section 25.3.4 in Abramovitz and Stegun (1972, Tenth Printing, December) Handbook of Mathematical Functions.
|
||||
% http://www.math.sfu.ca/~cbm/aands/
|
||||
|
||||
% Copyright (C) 2008 Dynare Team
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2008)
|
||||
% Gnu Public License.
|
||||
% 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/>.
|
||||
|
||||
f0 = NaN;
|
||||
f1 = NaN;
|
||||
|
|
|
@ -9,8 +9,23 @@ function [g, badg, f0, f1, f2, f3, f4] = numgrad5(fcn,x,varargin)
|
|||
%
|
||||
% TODO Try Four points formula when cost_flag3=0 or cost_flag4=0.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
f0 = NaN;
|
||||
f1 = NaN;
|
||||
|
|
|
@ -14,9 +14,23 @@ function r = octave_ver_less_than(verstr)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
cur_verstr = version();
|
||||
|
||||
|
|
|
@ -11,9 +11,23 @@ function plot_priors
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2004-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global bayestopt_ M_ options_
|
||||
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
function oo_ = posterior_analysis(type,arg1,arg2,arg3,options_,M_,oo_)
|
||||
% part of DYNARE, copyright Dynare Team (2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
info = check_posterior_analysis_data(type,M_);
|
||||
SampleSize = options_.PosteriorSampleSize;
|
||||
|
|
|
@ -20,8 +20,23 @@ function [post_mean, post_median, post_var, hpd_interval, post_deciles, density]
|
|||
% Other matlab routines distributed with Dynare: mh_optimal_bandwidth.m
|
||||
% kernel_density_estimate.m.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2005-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2005-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
xx = xx(:);
|
||||
xx = sort(xx);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function bounds = prior_bounds(bayestopt)
|
||||
|
||||
% function bounds = prior_bounds(bayestopt)
|
||||
% computes practical bounds for prior density
|
||||
%
|
||||
|
@ -11,10 +10,23 @@ function bounds = prior_bounds(bayestopt)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global options_
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function pdraw = prior_draw(init,cc)
|
||||
|
||||
% function pdraw = prior_draw(init,cc)
|
||||
% Builds one draw from the prior distribution.
|
||||
%
|
||||
|
@ -15,10 +14,23 @@ function pdraw = prior_draw(init,cc)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2006-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2006-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global estim_params_ bayestopt_
|
||||
persistent fname npar bounds pshape pmean pstd a b p1 p2 p3 p4 condition
|
||||
|
|
|
@ -22,9 +22,23 @@ function lnprior = priordens(para, pshape, p1, p2, p3, p4)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
lnprior = 0;
|
||||
nprio = length(pshape);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
function [ss,tt,w,sdim,eigval,info] = mjdgges(e,d,qz_criterium)
|
||||
%function [ss,tt,w,sdim,eigval,info] = mjdgges(e,d,qz_criterium)
|
||||
% QZ decomposition, Sims' codes are used.
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -19,10 +20,23 @@ function [ss,tt,w,sdim,eigval,info] = mjdgges(e,d,qz_criterium)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none.
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 1996-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
% Chek number of inputs and outputs.
|
||||
if nargin>3 | nargin<2
|
||||
|
|
|
@ -23,8 +23,23 @@ function G = rand_inverse_wishart(m, v, H_inv_upper_chol)
|
|||
% SPECIAL REQUIREMENT
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
X = randn(v, m) * H_inv_upper_chol;
|
||||
|
||||
|
|
|
@ -19,9 +19,23 @@ function B = rand_matrix_normal(n, p, M, Omega_lower_chol, Sigma_lower_chol)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% Same notations than: http://en.wikipedia.org/wiki/Matrix_normal_distribution
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
B1 = randn(n * p, 1);
|
||||
B2 = kron(Omega_lower_chol, Sigma_lower_chol) * B1;
|
||||
|
|
|
@ -13,7 +13,22 @@ function draw = rand_multivariate_normal(Mean,Sigma_upper_chol,n)
|
|||
% covariance Sigma
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
draw = Mean + randn(1,n) * Sigma_upper_chol;
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
draw = Mean + randn(1,n) * Sigma_upper_chol;
|
||||
|
|
|
@ -17,7 +17,23 @@ function draw = rand_multivariate_student(Mean,Sigma_upper_chol,df)
|
|||
%
|
||||
% NOTE See Zellner (appendix B.2, 1971) for a definition.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
n = length(Mean);
|
||||
draw = Mean + randn(1,n) * Sigma_upper_chol * sqrt(df/sum(randn(df,1).^2));
|
||||
draw = Mean + randn(1,n) * Sigma_upper_chol * sqrt(df/sum(randn(df,1).^2));
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
function random_walk_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bounds,varargin)
|
||||
%function random_walk_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bounds,varargin)
|
||||
% Random walk Metropolis-Hastings algorithm.
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -17,9 +18,24 @@ function random_walk_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bou
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% None.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2006-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2006-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ bayestopt_
|
||||
%%%%
|
||||
%%%% Initialization of the random walk metropolis-hastings chains.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function resid(period)
|
||||
%
|
||||
% function resid(period)
|
||||
% Computes residuals associated with the guess values
|
||||
%
|
||||
|
@ -11,11 +10,23 @@ function resid(period)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
|
||||
% Copyright (C) 2001-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ oo_ it_ endval_ z
|
||||
|
||||
|
|
|
@ -21,9 +21,23 @@ function [dr,info]=resol(ys,check_flag)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ oo_ bayestopt_
|
||||
global it_
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
function y = rndprior(bayestopt_)
|
||||
|
||||
|
||||
% function y = rndprior(bayestopt_)
|
||||
% Draws random number from the prior density
|
||||
%
|
||||
|
@ -12,10 +10,23 @@ function y = rndprior(bayestopt_)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
pshape=bayestopt_.pshape;
|
||||
pmean=bayestopt_.pmean;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
function rplot(s1)
|
||||
|
||||
% function rplot(s1)
|
||||
% This optionnal command creates the plot of the variable trajectory. By default, the entire simulation period is
|
||||
% ploted. The instruction DSAMPLE permits to reduce the number of periods in the plot.
|
||||
|
@ -14,10 +12,23 @@ function rplot(s1)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ oo_ options_
|
||||
|
||||
|
|
|
@ -19,8 +19,23 @@ function SampleAddress = selec_posterior_draws(SampleSize,drsize)
|
|||
% SPECIAL REQUIREMENTS
|
||||
% None.
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2006-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2006-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ estim_params_ oo_
|
||||
|
||||
|
|
|
@ -13,9 +13,23 @@ function options=set_default_option(options,field,default)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
if ~isfield(options,field)
|
||||
options.(field) = default;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function [xparam1,estim_params_,bayestopt_,lb,ub]=set_prior(estim_params_)
|
||||
|
||||
% function [xparam1,estim_params_,bayestopt_,lb,ub]=set_prior(estim_params_)
|
||||
% sets prior distributions
|
||||
%
|
||||
|
@ -15,10 +14,23 @@ function [xparam1,estim_params_,bayestopt_,lb,ub]=set_prior(estim_params_)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_
|
||||
|
||||
|
|
|
@ -17,9 +17,23 @@ function set_shocks(flag,k,ivar,values)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2003-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2003-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global oo_ M_
|
||||
|
||||
|
|
|
@ -14,9 +14,23 @@ function dr=set_state_space(dr,M_)
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 1996-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
xlen = M_.maximum_endo_lead + M_.maximum_endo_lag + 1;
|
||||
klen = M_.maximum_endo_lag + M_.maximum_endo_lead + 1;
|
||||
|
|
|
@ -16,9 +16,23 @@ function sim1
|
|||
% SPECIAL REQUIREMENTS
|
||||
% None.
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 1996-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ oo_
|
||||
global iyp iyf ct_ M_ it_ c
|
||||
|
|
|
@ -16,9 +16,24 @@ function simk
|
|||
% SPECIAL REQUIREMENTS
|
||||
% None.
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 1996-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ oo_
|
||||
global it_ iyr0 ct_ broyden_
|
||||
|
||||
|
|
|
@ -11,10 +11,23 @@ function simul(dr)
|
|||
% ...
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (1996-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 1996-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ oo_
|
||||
global ys0_ ct_ endval_
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
function y_=simult(ys, dr)
|
||||
% function y_=simult(ys, dr)
|
||||
% Recursive Monte Carlo simulations
|
||||
%
|
||||
|
@ -11,12 +12,24 @@
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
function y_=simult(ys, dr)
|
||||
global M_ options_ oo_
|
||||
global it_ means_
|
||||
|
||||
|
|
|
@ -15,9 +15,23 @@
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
function y_=simult_(y0,dr,ex_,iorder)
|
||||
global M_ options_ it_
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function [x,check] = solve1(func,x,j1,j2,jacobian_flag,varargin)
|
||||
|
||||
% function [x,check] = solve1(func,x,j1,j2,jacobian_flag,varargin)
|
||||
% Solves systems of non linear equations of several variables
|
||||
%
|
||||
|
@ -18,10 +17,23 @@ function [x,check] = solve1(func,x,j1,j2,jacobian_flag,varargin)
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ options_ fjac
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
function steady()
|
||||
|
||||
% function steady()
|
||||
% computes and prints the steady state calculations
|
||||
%
|
||||
|
@ -11,10 +10,23 @@ function steady()
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ oo_ options_ ys0_
|
||||
|
||||
|
|
|
@ -12,9 +12,23 @@ function steady_()
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2001-2007)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2001-2007 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
global M_ oo_ it_ options_
|
||||
|
||||
|
|
|
@ -9,9 +9,23 @@ function warning_config()
|
|||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
%
|
||||
% part of DYNARE, copyright Dynare Team (2008)
|
||||
% Gnu Public License.
|
||||
|
||||
% Copyright (C) 2008 Dynare Team
|
||||
%
|
||||
% 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/>.
|
||||
|
||||
warning on;
|
||||
if exist('OCTAVE_VERSION')
|
||||
|
|
Loading…
Reference in New Issue