File: partitions.mod

package info (click to toggle)
dynare 6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 67,796 kB
  • sloc: cpp: 79,110; ansic: 28,917; objc: 12,445; yacc: 4,537; pascal: 1,993; lex: 1,441; sh: 1,132; python: 634; makefile: 628; lisp: 163; xml: 18
file content (49 lines) | stat: -rw-r--r-- 1,741 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
var y (country='US', long_name='United States') z (country='EA', long_name='Euro Area') x (long_name='March');

varexo e (country='US', kind='toto')
       f (country='US', kind='titi')
       g (country='EA', kind='toto')
       h (country='EA', kind='titi') ;

parameters aUS (country='US', colour='red')
           aEA (country='EA', colour='red')
           bUS (country='US', colour='blue')
           bEA (country='EA', colour='blue')
           cUS (country='US', colour='yellow')
           cEA (country='EA', colour='yellow') ;

model;
y = .5*y(-1) + e-f^2 ;
z = .5*z(-1) + g-h^2 ;
x = e-g;
end;

if ~(isfield(M_.exo_partitions, 'country') && isequal(M_.exo_partitions.country, {'US'  'US'  'EA'  'EA'}))
    error('First partition on exogenous variables is wrong!')
end

if ~(isfield(M_.exo_partitions, 'kind') && isequal(M_.exo_partitions.kind, {'toto'  'titi'  'toto'  'titi'}))
    error('Second partition on exogenous variables is wrong!')
end

if ~(isfield(M_.endo_partitions, 'country') && isequal(M_.endo_partitions.country, {'US'  'EA' ''}))
    error('Partition on endogenous variables is wrong!')
end

if ~(isfield(M_.param_partitions, 'colour') && isequal(M_.param_partitions.colour, {'red'  'red' 'blue'  'blue' 'yellow'  'yellow'}))
    error('First partition on parameters is wrong!')
end

if ~(isfield(M_.param_partitions, 'country') && isequal(M_.param_partitions.country, {'US'  'EA' 'US'  'EA' 'US'  'EA'}))
    error('Second partition on parameters is wrong!')
end

if isfield(M_.endo_partitions, 'long_name')
    error('long_name should not be a member of endo_partitions!')
end

tmp = {'United States'; 'Euro Area'; 'March'};

if ~isequal(M_.endo_names_long, tmp)
    error('M_.endo_names_long is wrong!')
end