1function s=get_moments_size(options)
2% function s=get_moments_size(options)
3% Computes size of moments for a given model and options
4%
5% INPUTS
6%    options: structure of Dynare options
7%
8% OUTPUTS
9%    s: size of moments for a given model and options
10%
11% SPECIAL REQUIREMENTS
12%    none
13
14% Copyright (C) 2008-2017 Dynare Team
15%
16% This file is part of Dynare.
17%
18% Dynare is free software: you can redistribute it and/or modify
19% it under the terms of the GNU General Public License as published by
20% the Free Software Foundation, either version 3 of the License, or
21% (at your option) any later version.
22%
23% Dynare is distributed in the hope that it will be useful,
24% but WITHOUT ANY WARRANTY; without even the implied warranty of
25% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26% GNU General Public License for more details.
27%
28% You should have received a copy of the GNU General Public License
29% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
30
31global M_
32
33n = size(options.varlist,1);
34
35if n == 0
36    n = M_.endo_nbr;
37end
38
39n2 = n*n;
40
41s = n; % mean
42s = s + n;  % std errors
43s = s + n2; % variance
44s = s + n2; % correlations
45s = s + options.ar*n2; % auto-correlations