


function s=get_moments_size(options)
Computes size of moments for a given model and options
INPUTS
options: structure of Dynare options
OUTPUTS
s: size of moments for a given model and options
SPECIAL REQUIREMENTS
none

0001 function s=get_moments_size(options) 0002 % function s=get_moments_size(options) 0003 % Computes size of moments for a given model and options 0004 % 0005 % INPUTS 0006 % options: structure of Dynare options 0007 % 0008 % OUTPUTS 0009 % s: size of moments for a given model and options 0010 % 0011 % SPECIAL REQUIREMENTS 0012 % none 0013 0014 % Copyright (C) 2008-2009 Dynare Team 0015 % 0016 % This file is part of Dynare. 0017 % 0018 % Dynare is free software: you can redistribute it and/or modify 0019 % it under the terms of the GNU General Public License as published by 0020 % the Free Software Foundation, either version 3 of the License, or 0021 % (at your option) any later version. 0022 % 0023 % Dynare is distributed in the hope that it will be useful, 0024 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0025 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0026 % GNU General Public License for more details. 0027 % 0028 % You should have received a copy of the GNU General Public License 0029 % along with Dynare. If not, see <http://www.gnu.org/licenses/>. 0030 0031 global M_ 0032 0033 n = size(options.varlist,1); 0034 0035 if n == 0 0036 n = M_.endo_nbr; 0037 end 0038 0039 n2 = n*n; 0040 0041 s = n; % mean 0042 s = s + n; % std errors 0043 s = s + n2; % variance 0044 s = s + n2; % correlations 0045 s = s + options.ar*n2; % auto-correlations