From e287be53ca80c5e84befa7d25835f9e3af593201 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 20 Feb 2009 16:53:09 +0000 Subject: [PATCH] trunk: changed to GPL headers in Marco Ratto's files git-svn-id: https://www.dynare.org/svn/dynare/trunk@2433 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/dynare_sensitivity.m | 28 +++++++++++++++++----------- matlab/mr_gstep.m | 19 +++++++++++++++++-- matlab/mr_hessian.m | 25 ++++++++++++++++++++----- matlab/newrat.m | 19 ++++++++++++++++--- 4 files changed, 70 insertions(+), 21 deletions(-) diff --git a/matlab/dynare_sensitivity.m b/matlab/dynare_sensitivity.m index d49a39fa3..a8c83a0ac 100644 --- a/matlab/dynare_sensitivity.m +++ b/matlab/dynare_sensitivity.m @@ -1,19 +1,25 @@ function x0=dynare_sensitivity(options_gsa) -% Part of the Sensitivity Analysis Toolbox for DYNARE +% Frontend to the Sensitivity Analysis Toolbox for DYNARE % -% Written by Marco Ratto, 2006 -% Joint Research Centre, The European Commission, -% (http://eemc.jrc.ec.europa.eu/), -% marco.ratto@jrc.it -% -% Disclaimer: This software is not subject to copyright protection and is in the public domain. -% It is an experimental system. The Joint Research Centre of European Commission -% assumes no responsibility whatsoever for its use by other parties -% and makes no guarantees, expressed or implied, about its quality, reliability, or any other -% characteristic. We would appreciate acknowledgement if the software is used. % Reference: % M. Ratto, Global Sensitivity Analysis for Macroeconomic models, MIMEO, 2006. + +% 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 . global M_ options_ oo_ bayestopt_ estim_params_ diff --git a/matlab/mr_gstep.m b/matlab/mr_gstep.m index 75ac04e63..7c36e1017 100644 --- a/matlab/mr_gstep.m +++ b/matlab/mr_gstep.m @@ -1,10 +1,25 @@ function [f0, x, ig] = mr_gstep(func0,x,htol0,varargin) -% Copyright (C) 2005 Marco Ratto -% % function [f0, x] = mr_gstep(func0,x,htol0,varargin) % % Gibbs type step in optimisation +% Copyright (C) 2006 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 . + global bayestopt_ options_ persistent h1 diff --git a/matlab/mr_hessian.m b/matlab/mr_hessian.m index cec3fb1c0..9f56e6d75 100644 --- a/matlab/mr_hessian.m +++ b/matlab/mr_hessian.m @@ -1,11 +1,11 @@ -% Copyright (C) 2004 Marco Ratto -% adapted from Michel Juillard original rutine hessian.m -% +function [hessian_mat, gg, htol1, ihh, hh_mat0] = mr_hessian(func,x,hflag,htol0,varargin) % [hessian_mat, gg, htol1, ihh, hh_mat0] = mr_hessian(func,x,hflag,htol0,varargin) % % numerical gradient and Hessian, with 'automatic' check of numerical % error % +% adapted from Michel Juillard original rutine hessian.m +% % func = name of the function: func must give two outputs: % - the log-likelihood AND the single contributions at times t=1,...,T % of the log-likelihood to compute outer product gradient @@ -23,9 +23,24 @@ % derivatives % % varargin: other parameters of func -% -function [hessian_mat, gg, htol1, ihh, hh_mat0] = mr_hessian(func,x,hflag,htol0,varargin) +% 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 . + global options_ bayestopt_ persistent h1 htol diff --git a/matlab/newrat.m b/matlab/newrat.m index 015586c73..87d353bfb 100644 --- a/matlab/newrat.m +++ b/matlab/newrat.m @@ -1,7 +1,4 @@ function [xparam1, hh, gg, fval, igg] = newrat(func0, x, hh, gg, igg, ftol0, nit, flagg, varargin) -% -% Copyright (C) 2004 Marco Ratto -% % [xparam1, hh, gg, fval, igg] = newrat(func0, x, hh, gg, igg, ftol0, nit, flagg, varargin) % % Optimiser with outer product gradient and with sequences of univariate steps @@ -27,7 +24,23 @@ function [xparam1, hh, gg, fval, igg] = newrat(func0, x, hh, gg, igg, ftol0, nit % flagg = 2, full numerical Hessian % % varargin = list of parameters for func0 + +% 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 . global bayestopt_ icount=0;