diff --git a/matlab/bfgsi.m b/matlab/bfgsi.m index be2ef0e4f6833d2814ba8ef3a657d593e0778e7d..1f6546477d7c8c381a2e1799577dbe750a5bdd1d 100644 --- a/matlab/bfgsi.m +++ b/matlab/bfgsi.m @@ -3,8 +3,24 @@ function H = bfgsi(H0,dg,dx) % dg is previous change in gradient; dx is previous change in x; % 6/8/93 version that updates inverse hessian instead of hessian % itself. -% Copyright by Christopher Sims 1996. This material may be freely -% reproduced and modified. + +% Copyright (C) 1993-2007 Christopher Sims +% +% 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 size(dg,2)>1 dg=dg'; end diff --git a/matlab/bvar_density.m b/matlab/bvar_density.m index 245b72b8f64ca30fd56902c55adbf97272a88a7d..a3699c22515180783a6c7748d8bef6f8a5e9562b 100644 --- a/matlab/bvar_density.m +++ b/matlab/bvar_density.m @@ -11,7 +11,7 @@ function bvar_density(maxnlags) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2007 Chris Sims +% Copyright (C) 2003-2007 Christopher Sims % Copyright (C) 2007 Dynare Team % % This file is part of Dynare. diff --git a/matlab/bvar_toolbox.m b/matlab/bvar_toolbox.m index 17d203ca7526536931be0191c8fb544b629ff84c..cd4c115271043686fd07eb018aa4a401e2b1a593 100644 --- a/matlab/bvar_toolbox.m +++ b/matlab/bvar_toolbox.m @@ -41,7 +41,7 @@ function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags) % - datafile, first_obs, varobs, xls_sheet, xls_range, nobs, presample % - bvar_prior_{tau,decay,lambda,mu,omega,flat,train} -% Copyright (C) 2003-2007 Chris Sims +% Copyright (C) 2003-2007 Christopher Sims % Copyright (C) 2007-2008 Dynare Team % % This file is part of Dynare. diff --git a/matlab/csminit.m b/matlab/csminit.m index 75bf46d6ae4f4fb15663cb8d9618c882f4c326cc..bc02c06204269913b23018d5bac8b30cef1f4035 100644 --- a/matlab/csminit.m +++ b/matlab/csminit.m @@ -15,7 +15,24 @@ function [fhat,xhat,fcount,retcode] = csminit(fcn,x0,f0,g0,badg,H0,varargin) % % Fixed 7/19/93 to flip eigenvalues of H to get better performance when % it's not psd. + +% Copyright (C) 1993-2007 Christopher Sims % +% 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/>. + %tailstr = ')'; %for i=nargin-6:-1:1 % tailstr=[ ',P' num2str(i) tailstr]; diff --git a/matlab/csminwel.m b/matlab/csminwel.m index 2f0cf5348348d0d4891839422dce83f93ac82139..516c5e7dca61bb921c61db29319efacc4d28bbe1 100644 --- a/matlab/csminwel.m +++ b/matlab/csminwel.m @@ -18,6 +18,24 @@ function [fh,xh,gh,H,itct,fcount,retcodeh] = csminwel(fcn,x0,H0,grad,crit,nit,me % hessian update, respectively. (When the routine hits certain kinds of difficulty, it % write g2.mat and g3.mat as well. If all were written at about the same time, any of them % may be a decent starting point. One can also start from the one with best function value.) + +% Copyright (C) 1993-2007 Christopher Sims +% +% 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_ fh = []; xh = []; diff --git a/matlab/csolve.m b/matlab/csolve.m index e6400b830b1352243cf7c426eb6f42ae4e370d7c..6a7dbf334f8a39727ae58b82114c73f637e1cc7d 100644 --- a/matlab/csolve.m +++ b/matlab/csolve.m @@ -17,6 +17,24 @@ function [x,rc] = csolve(FUN,x,gradfun,crit,itmax,varargin) % rc: 0 means normal solution, 1 and 3 mean no solution despite extremely fine adjustments % in step length (very likely a numerical problem, or a discontinuity). 4 means itmax % termination. + +% Copyright (C) 1993-2007 Christopher Sims +% +% 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/>. + %---------- delta -------------------- % differencing interval for numerical gradient delta = 1e-6; diff --git a/matlab/numgrad.m b/matlab/numgrad.m index e6076017bfc9b5aae1955f86a7719ecac2965aac..317577e3d8b7fab03170e90e545ebca1d74f9a32 100644 --- a/matlab/numgrad.m +++ b/matlab/numgrad.m @@ -1,6 +1,23 @@ function [g, badg] = numgrad(fcn,x,varargin) % function [g badg] = numgrad(fcn,xvarargin) + +% Copyright (C) 1993-2007 Christopher Sims % +% 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/>. + delta = 1e-6; %delta=1e-2; n=length(x); diff --git a/matlab/numgrad3.m b/matlab/numgrad3.m index e1203536ea0c0a9e8eced39c1248f5e1ba02cd82..f79ab7f07500dc6646743fe0329c4ed1ac771bd2 100644 --- a/matlab/numgrad3.m +++ b/matlab/numgrad3.m @@ -7,6 +7,7 @@ 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) 1993-2007 Christopher Sims % Copyright (C) 2008 Dynare Team % % This file is part of Dynare. diff --git a/matlab/numgrad5.m b/matlab/numgrad5.m index 8ff0ef3bae32b9fb2b5c899722205249a00ddd3d..c93e0a0fd76f4c54aba1e61103db850bbb63a52b 100644 --- a/matlab/numgrad5.m +++ b/matlab/numgrad5.m @@ -8,8 +8,8 @@ function [g, badg, f0, f1, f2, f3, f4] = numgrad5(fcn,x,varargin) % http://www.math.sfu.ca/~cbm/aands/ % % TODO Try Four points formula when cost_flag3=0 or cost_flag4=0. -% +% Copyright (C) 1993-2007 Christopher Sims % Copyright (C) 2008 Dynare Team % % This file is part of Dynare. diff --git a/matlab/qz/qzdiv.m b/matlab/qz/qzdiv.m index 9ea24723b1d8902c41076f0f62ff1bd2fbb1a710..5f1a0fd95ee7223921ee92d2058b55356b81f575 100644 --- a/matlab/qz/qzdiv.m +++ b/matlab/qz/qzdiv.m @@ -1,7 +1,3 @@ -% from Chris Sims web site -% http://eco-072399b.princeton.edu/yftp/gensys/mfiles/QZDIV.M -% - function [A,B,Q,Z] = qzdiv(stake,A,B,Q,Z) %function [A,B,Q,Z] = qzdiv(stake,A,B,Q,Z) % @@ -9,7 +5,24 @@ function [A,B,Q,Z] = qzdiv(stake,A,B,Q,Z) % so that all cases of abs(B(i,i)/A(i,i))>stake are in lower right % corner, while preserving U.T. and orthonormal properties and Q'AZ' and % Q'BZ'. + +% Copyright (C) 1993-2007 Christopher Sims +% +% 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 jnk] = size(A); root = abs([diag(A) diag(B)]); root(:,1) = root(:,1)-(root(:,1)<1.e-13).*(root(:,1)+root(:,2)); diff --git a/matlab/qz/qzswitch.m b/matlab/qz/qzswitch.m index 350fc9f1609c74226dec6428b2e205ebb8afbecc..72bf41574db91c1cf00d3153ac14f74f2751e243 100644 --- a/matlab/qz/qzswitch.m +++ b/matlab/qz/qzswitch.m @@ -1,7 +1,3 @@ -% from Chris Sims web site -% http://eco-072399b.princeton.edu/yftp/gensys/mfiles/QZSWITCH.M -% - function [A,B,Q,Z] = qzswitch(i,A,B,Q,Z) %function [A,B,Q,Z] = qzswitch(i,A,B,Q,Z) % @@ -13,7 +9,25 @@ function [A,B,Q,Z] = qzswitch(i,A,B,Q,Z) % to drive all zeros on the diagonal of A to the lower right, but in this case % the qz transformation is not unique and it is not possible simply to switch % the positions of the diagonal elements of both A and B. - realsmall=sqrt(eps)*10; + +% Copyright (C) 1993-2007 Christopher Sims +% +% 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/>. + +realsmall=sqrt(eps)*10; %realsmall=1e-3; a = A(i,i); d = B(i,i); b = A(i,i+1); e = B(i,i+1); c = A(i+1,i+1); f = B(i+1,i+1);