Compare commits
1410 Commits
remove-sub
...
master
Author | SHA1 | Date |
---|---|---|
Stéphane Adjemian | 4f2b9b3e62 | |
Johannes Pfeifer | 5d47ac2aa9 | |
Sébastien Villemot | 1ce40d4df5 | |
Sébastien Villemot | 6820edd614 | |
Sébastien Villemot | 4a8c78f703 | |
Sébastien Villemot | 3000e6d691 | |
Johannes Pfeifer | 73d54cea04 | |
Willi Mutschler | 1b3c1c33ce | |
Sébastien Villemot | dd03d51112 | |
Johannes Pfeifer | 4a2724959d | |
Stéphane Adjemian (Argos) | 24fbc0d923 | |
Sébastien Villemot | fd76ce53af | |
Johannes Pfeifer | 6975aaef43 | |
Sébastien Villemot | ab7d741bf1 | |
Sébastien Villemot | 6f2af6943f | |
Sébastien Villemot | 0d9857e737 | |
Sébastien Villemot | adc42bb4cb | |
Sébastien Villemot | 641cf6a95c | |
Sébastien Villemot | a623cb1d12 | |
Sébastien Villemot | 28fc9e7c78 | |
Sébastien Villemot | d5cffba8fc | |
Sébastien Villemot | 3ebf824f3f | |
Sébastien Villemot | ec48980e1e | |
Sébastien Villemot | ebfd2aa0a1 | |
Sébastien Villemot | 433f00e224 | |
Sébastien Villemot | d61cb124ba | |
Sébastien Villemot | 05d82796c2 | |
Sébastien Villemot | cfa978b39e | |
Sébastien Villemot | 99883d4ca6 | |
Sébastien Villemot | 3053f9b7df | |
Sébastien Villemot | c125d35347 | |
Johannes Pfeifer | a40b0c146d | |
Johannes Pfeifer | 8e91841a39 | |
Stéphane Adjemian (Argos) | f5a5ebb910 | |
Sébastien Villemot | 6145bf9b31 | |
Stéphane Adjemian (Argos) | 415a86d1d9 | |
Stéphane Adjemian (Argos) | 8eab48aa5e | |
Stéphane Adjemian (Argos) | 9f9f4a99ba | |
Stéphane Adjemian (Argos) | a48a03bc67 | |
Stéphane Adjemian (Argos) | 942d8846e4 | |
Johannes Pfeifer | 2ed416532b | |
Sébastien Villemot | 60e3b6a19f | |
Sébastien Villemot | 505084f20b | |
Sébastien Villemot | b956a2253e | |
Sébastien Villemot | 00bba09986 | |
Sébastien Villemot | 6a0ee900a4 | |
Sébastien Villemot | 8954a682c7 | |
Sébastien Villemot | 13c9acba57 | |
Sébastien Villemot | aee581fd0b | |
Sébastien Villemot | 855e44cb17 | |
Sébastien Villemot | 881f5f2e62 | |
Johannes Pfeifer | b1cb309a73 | |
Sébastien Villemot | 330542a79f | |
Sébastien Villemot | b2f603091a | |
Sébastien Villemot | 88236b1cc0 | |
Sébastien Villemot | c14d410699 | |
Johannes Pfeifer | 619de017d6 | |
Sébastien Villemot | 85c637d3d1 | |
Sébastien Villemot | 6fe43545d8 | |
Sébastien Villemot | 6b6b648255 | |
Sébastien Villemot | aa76e06099 | |
Sébastien Villemot | e68be9ec55 | |
Sébastien Villemot | 2c6df2b668 | |
Sébastien Villemot | c6c179d8dd | |
Sébastien Villemot | aceebe9769 | |
Johannes Pfeifer | 28df34df06 | |
Johannes Pfeifer | d7242c056d | |
Johannes Pfeifer | 6ba9cb06e7 | |
Johannes Pfeifer | bcd57142c6 | |
Sébastien Villemot | 6868e2f27e | |
Johannes Pfeifer | 248d8ae84f | |
Sébastien Villemot | 6780b9a009 | |
Sébastien Villemot | 6235de3a82 | |
Sébastien Villemot | e1833c475d | |
Johannes Pfeifer | e5951650d9 | |
Johannes Pfeifer | 1b181fca57 | |
Johannes Pfeifer | 45e8ab14dc | |
Johannes Pfeifer | 6bb973a0fa | |
Johannes Pfeifer | 23225aca1b | |
Sébastien Villemot | 2d90ef9890 | |
Sébastien Villemot | 5d169d658e | |
Sébastien Villemot | 4683b9aeb6 | |
Sébastien Villemot | cb7bd0778b | |
Sébastien Villemot | 2fd4a6fac4 | |
Sébastien Villemot | 2bfa311636 | |
Sébastien Villemot | 3ab9be71c8 | |
Johannes Pfeifer | 0187ebe0a2 | |
Johannes Pfeifer | 6ff924550c | |
Sébastien Villemot | 346ee01107 | |
Sébastien Villemot | cc02690acf | |
Sébastien Villemot | ffb578276e | |
Johannes Pfeifer | 4a7851b069 | |
Johannes Pfeifer | 46d7e155d9 | |
Sébastien Villemot | f9cd465fea | |
Sébastien Villemot | 53d8278d8a | |
Sébastien Villemot | 049006a1bf | |
Sébastien Villemot | e7cd6eb408 | |
Sébastien Villemot | 0679da4cba | |
Sébastien Villemot | a99beac083 | |
Sébastien Villemot | 44044904c1 | |
Sébastien Villemot | b89e79862a | |
Sébastien Villemot | 3249d74220 | |
Sébastien Villemot | 8a7440c6ac | |
Johannes Pfeifer | 90266c0bfc | |
Johannes Pfeifer | 02d1e8d3ed | |
Johannes Pfeifer | a6ad26788e | |
Johannes Pfeifer | 8f07f37138 | |
Johannes Pfeifer | e9d79796cf | |
Johannes Pfeifer | b7e9d69874 | |
Sébastien Villemot | 7bf0395a27 | |
Willi Mutschler | ee2545f84d | |
Sébastien Villemot | dd1669082e | |
Johannes Pfeifer | 9c28f5feaf | |
Sébastien Villemot | 31ce155852 | |
Sébastien Villemot | c36b695cd9 | |
Sébastien Villemot | 6cad684980 | |
Marco Ratto | a4e6531420 | |
Sébastien Villemot | d09a206c7c | |
Marco Ratto | fbf62255c6 | |
Marco Ratto | e918589e02 | |
Sébastien Villemot | 368c93214e | |
Johannes Pfeifer | 8deeaa7252 | |
Johannes Pfeifer | e3e6f4c9b4 | |
Sébastien Villemot | 5216cec249 | |
Sébastien Villemot | cae5a00e80 | |
Sébastien Villemot | 42e2f77e4a | |
Sébastien Villemot | 7a5684bf4b | |
Willi Mutschler | c4bf6d079f | |
Willi Mutschler | c46eef685d | |
Willi Mutschler | 2f07fa2921 | |
Willi Mutschler | f14bbc73b1 | |
Willi Mutschler | 329f0d2d54 | |
Willi Mutschler | 68b92a1ab9 | |
Willi Mutschler | 8987576ff5 | |
Willi Mutschler | 9148b5b210 | |
Willi Mutschler | 0b839467e6 | |
Willi Mutschler | 547bdcc99b | |
Willi Mutschler | 0787589479 | |
Willi Mutschler | 37efafe475 | |
Willi Mutschler | 7f60674dae | |
Willi Mutschler | bd3ca58727 | |
Willi Mutschler | 65f8b56fb0 | |
Willi Mutschler | 2521314c39 | |
Willi Mutschler | 378e38c8c2 | |
Willi Mutschler | c59daa6139 | |
Willi Mutschler | 937ee0ef77 | |
Willi Mutschler | 8515a195ab | |
Willi Mutschler | 8a29933c6e | |
Willi Mutschler | f210ffa3ae | |
Willi Mutschler | 20ec0a6c97 | |
Willi Mutschler | e9871d7d47 | |
Willi Mutschler | 459842e4f6 | |
Willi Mutschler | 2d8bcd6918 | |
Willi Mutschler | c45c0efeba | |
Willi Mutschler | 613b3869e1 | |
Willi Mutschler | 95bfb84014 | |
Willi Mutschler | 37c7ca2d97 | |
Willi Mutschler | dedbb3be57 | |
Sébastien Villemot | d7850a2bbe | |
Willi Mutschler | b435aa7f27 | |
Willi Mutschler | f8a6020d2b | |
Willi Mutschler | 5f1ae3bb19 | |
Sébastien Villemot | bc69f6a102 | |
Sébastien Villemot | 8b9d1d1346 | |
Sébastien Villemot | 38d1c0538a | |
Johannes Pfeifer | 774cb18aac | |
Johannes Pfeifer | b215eedb4b | |
Sébastien Villemot | fb18777e58 | |
Sébastien Villemot | 311808db0a | |
Sébastien Villemot | 52b92ce64d | |
Johannes Pfeifer | ba52789020 | |
Johannes Pfeifer | c52c21ca24 | |
Sébastien Villemot | e649fa5494 | |
Sébastien Villemot | 346d2acbdf | |
Johannes Pfeifer | 278e767ea1 | |
Johannes Pfeifer | 90ced5ca47 | |
Sébastien Villemot | c9db9809d0 | |
Sébastien Villemot | 70b9d9277a | |
Johannes Pfeifer | 78abd68c9f | |
Johannes Pfeifer | 4512e85cb2 | |
Johannes Pfeifer | d7ae0d0039 | |
Marco Ratto | ac346ef83d | |
Marco Ratto | 9b165d7785 | |
Johannes Pfeifer | 7b94310fd4 | |
Marco Ratto | 8348cf009a | |
Marco Ratto | 75f5a463df | |
Marco Ratto | e8d82ad840 | |
Johannes Pfeifer | ab6ea60967 | |
Marco Ratto | 90fbb9559e | |
Marco Ratto | 3f1a37614f | |
Marco Ratto | ee5faf0783 | |
Marco Ratto | cf7be44257 | |
Sébastien Villemot | c363355dbf | |
Sébastien Villemot | d50330aad3 | |
Sébastien Villemot | 380e78be53 | |
Sébastien Villemot | 84a7b4b2cf | |
Johannes Pfeifer | 48380a1370 | |
Johannes Pfeifer | 3faaffacc6 | |
Sébastien Villemot | e9ffb16ec6 | |
Stéphane Adjemian (Ryûk) | 4982ce06b4 | |
Johannes Pfeifer | 37e4d68264 | |
Johannes Pfeifer | 4d6d4953e7 | |
Stéphane Adjemian (Ryûk) | c399f54581 | |
Stéphane Adjemian (Ryûk) | 735bd66d4d | |
Stéphane Adjemian (Ryûk) | 7468a903b7 | |
Stéphane Adjemian (Ryûk) | c841f1474c | |
Stéphane Adjemian (Ryûk) | b6619b342b | |
Stéphane Adjemian (Ryûk) | fef466ef34 | |
Stéphane Adjemian (Ryûk) | 52be9d08c1 | |
Stéphane Adjemian (Ryûk) | 5d8861ff29 | |
Stéphane Adjemian (Ryûk) | 743de7da5c | |
Stéphane Adjemian (Ryûk) | e962cb4dba | |
Stéphane Adjemian (Ryûk) | cf4c6cdf14 | |
Stéphane Adjemian (Guts) | 7915b91fdb | |
Johannes Pfeifer | 72a8d53df8 | |
Stéphane Adjemian (Guts) | 23af7f64b6 | |
Stéphane Adjemian (Guts) | 0249ea2116 | |
Stéphane Adjemian (Guts) | 44119077db | |
Stéphane Adjemian (Guts) | 47af0cde16 | |
Sébastien Villemot | eb043406e6 | |
Sébastien Villemot | ae082cffbe | |
Sébastien Villemot | febd39713e | |
Sébastien Villemot | 20b2c79ffb | |
Sébastien Villemot | 458926b17b | |
Sébastien Villemot | 162ca815bc | |
Sébastien Villemot | ff7cc9267e | |
Sébastien Villemot | 56e97e29aa | |
Sébastien Villemot | adddcf6197 | |
Sébastien Villemot | 79959aa587 | |
Sébastien Villemot | a0bafbcb95 | |
Sébastien Villemot | 2005f292e5 | |
Stéphane Adjemian (Guts) | 4a6783c690 | |
Johannes Pfeifer | 3e7291b573 | |
Sébastien Villemot | 9225e6b6df | |
Sébastien Villemot | d8f1e49221 | |
Sébastien Villemot | 1239842909 | |
Marco Ratto | 281f01f29e | |
Johannes Pfeifer | 8710ce0898 | |
Johannes Pfeifer | 74ac072549 | |
Marco Ratto | 8ddd35ddd8 | |
Marco Ratto | 3ee963c908 | |
Johannes Pfeifer | d25d95b3b5 | |
Marco Ratto | 2898407764 | |
Marco Ratto | 3931451250 | |
Marco Ratto | e1e79d3177 | |
Sébastien Villemot | d94e5bd7b9 | |
Sébastien Villemot | 66bc9fd9c2 | |
Sébastien Villemot | 19dcd4a0f2 | |
Johannes Pfeifer | f05a2de89e | |
Johannes Pfeifer | c3268c0279 | |
Johannes Pfeifer | 2e73856f5a | |
Sébastien Villemot | 565667c6b7 | |
Johannes Pfeifer | 75cd1042c8 | |
Sébastien Villemot | fd0d93ba13 | |
Sébastien Villemot | 668f6de5df | |
Johannes Pfeifer | 0c07460f3b | |
Johannes Pfeifer | dbcc0aeb9f | |
Stéphane Adjemian (Guts) | 1983dc13a3 | |
Johannes Pfeifer | 162813225d | |
Johannes Pfeifer | 1b2e1d2856 | |
Sébastien Villemot | 81cd0f1cb5 | |
Sébastien Villemot | 441ef7e102 | |
Johannes Pfeifer | 2df08f88c7 | |
Marco Ratto | f102a992aa | |
Marco Ratto | 53b57da8ba | |
Marco Ratto | aad5c36081 | |
Marco Ratto | de152a3de3 | |
Marco Ratto | 8f73564634 | |
Marco Ratto | 0c4b59b19e | |
Marco Ratto | 9b71845b87 | |
Marco Ratto | 91a2cd2496 | |
Sébastien Villemot | 858b534c22 | |
Johannes Pfeifer | e17bf15042 | |
Sébastien Villemot | ea28fcb4b4 | |
Sébastien Villemot | a7f5fd571d | |
Sébastien Villemot | 05cb10f8f7 | |
Sébastien Villemot | 594facdb03 | |
Sébastien Villemot | 7ba1fc1c63 | |
Sébastien Villemot | 63d5569cf4 | |
Sébastien Villemot | 00434c595d | |
Stéphane Adjemian (Ryûk) | 60c0ed0180 | |
Johannes Pfeifer | 42fc1ec40a | |
Johannes Pfeifer | 1b4fb46c75 | |
Stéphane Adjemian (Ryûk) | 2fbbe66c0a | |
Stéphane Adjemian (Ryûk) | 61498e644a | |
Stéphane Adjemian (Ryûk) | 3606b10f05 | |
Stéphane Adjemian (Ryûk) | 5077969aad | |
Stéphane Adjemian (Ryûk) | 3d50844ae4 | |
Stéphane Adjemian (Ryûk) | 3c3353b7ed | |
Stéphane Adjemian (Ryûk) | 03a68ddb89 | |
Sébastien Villemot | b1aa88e8da | |
Sébastien Villemot | d3aac5e2d7 | |
Sébastien Villemot | 62b31aa279 | |
Sébastien Villemot | 9d6a25e368 | |
Sébastien Villemot | 43b24facb9 | |
Sébastien Villemot | cc15281b1f | |
Sébastien Villemot | c99230825f | |
Sébastien Villemot | b7805cc667 | |
Johannes Pfeifer | ec76bda254 | |
Johannes Pfeifer | 021b9dbb25 | |
Johannes Pfeifer | daecd1f720 | |
Johannes Pfeifer | 5a3d545db2 | |
Johannes Pfeifer | ed80c4ff3f | |
Johannes Pfeifer | 678bd7aca9 | |
Johannes Pfeifer | 97f6a4219b | |
Johannes Pfeifer | 31c91080e1 | |
Johannes Pfeifer | 62e8b275a0 | |
Johannes Pfeifer | 435b103cf5 | |
Sébastien Villemot | d844043877 | |
Sébastien Villemot | a31c76403d | |
Sébastien Villemot | 4ef9245a95 | |
Sébastien Villemot | 91c677ca7f | |
Sébastien Villemot | 56289c72d0 | |
Sébastien Villemot | 1f5f668313 | |
Johannes Pfeifer | 54c4e9df09 | |
Stéphane Adjemian (Guts) | 8d8176fc30 | |
Sébastien Villemot | 40ef192e37 | |
Johannes Pfeifer | 1e5a04c2c5 | |
Johannes Pfeifer | f3a1ba56e3 | |
Johannes Pfeifer | af53c65172 | |
Johannes Pfeifer | c3b9c499ba | |
Johannes Pfeifer | 7f027d8f5e | |
Johannes Pfeifer | 9efb784763 | |
Johannes Pfeifer | 19b2619d06 | |
Johannes Pfeifer | 5d07ff9f8b | |
Johannes Pfeifer | fca782f8e4 | |
Johannes Pfeifer | 43fc6263af | |
Johannes Pfeifer | 37ab539a10 | |
Johannes Pfeifer | 6adf1c2639 | |
Johannes Pfeifer | 709ef9230f | |
Johannes Pfeifer | 0ba91259d8 | |
Johannes Pfeifer | dce0967deb | |
Johannes Pfeifer | 392721097c | |
Johannes Pfeifer | e68793030c | |
Johannes Pfeifer | bf6d88a472 | |
Sébastien Villemot | 6a58316a3e | |
Sébastien Villemot | 91f2dcdfe1 | |
Sébastien Villemot | de476ad5ac | |
Sébastien Villemot | 123f909b67 | |
Sébastien Villemot | fd9a89ab38 | |
Sébastien Villemot | 15b6e6e6b3 | |
Sébastien Villemot | 9d98811cfc | |
Sébastien Villemot | 8953007440 | |
Sébastien Villemot | d82eecfd39 | |
Sébastien Villemot | 3df4856259 | |
Sébastien Villemot | 11c1f6175e | |
Sébastien Villemot | 7864370bfb | |
Sébastien Villemot | 911437378c | |
Sébastien Villemot | 6f38dcd1d5 | |
Sébastien Villemot | bc6840ff6f | |
Sébastien Villemot | aeec4494b0 | |
Sébastien Villemot | 857e5b00f5 | |
Sébastien Villemot | bd7703d160 | |
Sébastien Villemot | a5445c52be | |
Sébastien Villemot | 403f20a7f3 | |
Johannes Pfeifer | 53f12e81fa | |
Sébastien Villemot | bea87aafad | |
Johannes Pfeifer | 526e6841b1 | |
Johannes Pfeifer | c21199a3e9 | |
Johannes Pfeifer | 36a4ad0fbc | |
Johannes Pfeifer | f218127220 | |
Stéphane Adjemian (Ryûk) | edaf938582 | |
Stéphane Adjemian (Ryûk) | dadcd9a2bf | |
Sébastien Villemot | c6a7801ba8 | |
Sébastien Villemot | 7edf01a2a9 | |
Sébastien Villemot | cb56dcc569 | |
Sébastien Villemot | f0420fa219 | |
Sébastien Villemot | ed332e3ba1 | |
Sébastien Villemot | ca16f7f848 | |
Sébastien Villemot | 847f940f78 | |
Johannes Pfeifer | d5f7fbe96a | |
Johannes Pfeifer | d29228bb5f | |
Johannes Pfeifer | 152991864d | |
Johannes Pfeifer | f8a0a99683 | |
Johannes Pfeifer | 5060f246ea | |
Johannes Pfeifer | 4199f57788 | |
Johannes Pfeifer | 94c1343671 | |
Johannes Pfeifer | a80ead7d94 | |
Johannes Pfeifer | da438d5099 | |
Johannes Pfeifer | ffaf6c8559 | |
Sébastien Villemot | 54e72a4d35 | |
Sébastien Villemot | c3d91d5ce8 | |
Sébastien Villemot | c6c6f4f549 | |
Sébastien Villemot | b0197da05f | |
Sébastien Villemot | ccff7d3560 | |
Johannes Pfeifer | e718402357 | |
Johannes Pfeifer | 59c9f70a7d | |
Sébastien Villemot | 6ccc7fd69e | |
Sébastien Villemot | b220be6d3e | |
Sébastien Villemot | f21fda7dfa | |
Sébastien Villemot | c0e39d40a7 | |
Johannes Pfeifer | d0e99daf9a | |
Sébastien Villemot | f62d76cbcf | |
Sébastien Villemot | 56410be973 | |
Johannes Pfeifer | 07d859d018 | |
Sébastien Villemot | b513214570 | |
Sébastien Villemot | 9545dcc8d9 | |
Sébastien Villemot | 08c9eca8ee | |
Sébastien Villemot | 701afd2c7c | |
Sébastien Villemot | 1d5a442fe5 | |
Sébastien Villemot | d55b6c68f9 | |
Sébastien Villemot | 72ac69eb97 | |
Sébastien Villemot | ec7a4ba84f | |
Sébastien Villemot | 3bfe2c5500 | |
Sébastien Villemot | 7f58e819c6 | |
Sébastien Villemot | 0efe0c9844 | |
Sébastien Villemot | dd5049cd4c | |
Sébastien Villemot | 627bbb0a91 | |
Johannes Pfeifer | eb8444889a | |
Johannes Pfeifer | 37f747bb3b | |
Sébastien Villemot | e15fba807f | |
Sébastien Villemot | d8ebdf916c | |
Sébastien Villemot | 56ed5bff43 | |
Sébastien Villemot | 742a3101b1 | |
Sébastien Villemot | 50a53a22ee | |
Sébastien Villemot | 8a54d10389 | |
Johannes Pfeifer | b053b96f6a | |
Johannes Pfeifer | 0e08dd287b | |
Sébastien Villemot | 551060ae27 | |
Johannes Pfeifer | e27ab153d7 | |
Sébastien Villemot | 4b4cfba2dc | |
Sébastien Villemot | 0e5f9defbc | |
Sébastien Villemot | b535763e56 | |
Johannes Pfeifer | 50ed6b2387 | |
Sébastien Villemot | e1d4c81531 | |
Johannes Pfeifer | b1519b8c3c | |
Normann Rion | a900f74cf3 | |
Sébastien Villemot | eb591b1299 | |
Sébastien Villemot | 6599800f88 | |
Stéphane Adjemian (Argos) | 666aa46dfb | |
Stéphane Adjemian (Argos) | b863c309bd | |
Stéphane Adjemian (Argos) | 9c61422a75 | |
Normann Rion | 3a461c996c | |
Sébastien Villemot | 0c83453a0c | |
Sébastien Villemot | 0e201b2928 | |
Sébastien Villemot | 77a7d5c3de | |
Sébastien Villemot | be648d350b | |
Sébastien Villemot | 0839ff78ae | |
Sébastien Villemot | 4bee919c31 | |
Sébastien Villemot | 158b7462bf | |
Sébastien Villemot | b36507d005 | |
Sébastien Villemot | 8556043c9a | |
Sébastien Villemot | 7dc90654ab | |
Sébastien Villemot | 93ab67acab | |
Sébastien Villemot | 7e512af074 | |
Stéphane Adjemian (Argos) | 368a7e2478 | |
Sébastien Villemot | 79a655261b | |
Sébastien Villemot | fd0e175fe4 | |
Sébastien Villemot | f6adb1d9ad | |
Sébastien Villemot | 25000ca693 | |
Stéphane Adjemian (Argos) | 33f2456acf | |
Johannes Pfeifer | 5103d55cb4 | |
Stéphane Adjemian (Argos) | 12cca117bc | |
Stéphane Adjemian (Argos) | b0a84bd6f8 | |
Stéphane Adjemian (Argos) | 76a2203b50 | |
Stéphane Adjemian (Argos) | cdd842cc19 | |
Sébastien Villemot | b1b76f7783 | |
Sébastien Villemot | 4701dfd158 | |
Johannes Pfeifer | 0561200f1c | |
Sébastien Villemot | aca148e8ef | |
Sébastien Villemot | ff2b8512b9 | |
Sébastien Villemot | 0295e5ede8 | |
Sébastien Villemot | 218a1f2d58 | |
Johannes Pfeifer | b3ce518433 | |
Johannes Pfeifer | c19469f01a | |
Johannes Pfeifer | 879d92fbf8 | |
Sébastien Villemot | 04ea0d0659 | |
Sébastien Villemot | caaa70ab7e | |
Sébastien Villemot | 17b016d983 | |
Johannes Pfeifer | a5383fdf65 | |
Sébastien Villemot | af20512476 | |
Sébastien Villemot | 88ce107466 | |
Sébastien Villemot | 1334ae045a | |
Sébastien Villemot | f40e7cfc68 | |
Sébastien Villemot | e3b346094b | |
Sébastien Villemot | 896c48eba7 | |
Sébastien Villemot | c475109648 | |
Sébastien Villemot | ff5ca80bbc | |
Stéphane Adjemian (Argos) | d95154ffa9 | |
Sébastien Villemot | 8c3429bb0f | |
Sébastien Villemot | df9c7d85b8 | |
Sébastien Villemot | 7449d26e51 | |
Sébastien Villemot | 6027d31da2 | |
Sébastien Villemot | b17ff164fc | |
Sébastien Villemot | 753848ab4b | |
Sébastien Villemot | 12a0781bc4 | |
Sébastien Villemot | 8573c6d06a | |
Sébastien Villemot | 8305afc6b3 | |
Sébastien Villemot | ed45b2092f | |
Sébastien Villemot | 9964de1c5f | |
Sébastien Villemot | 1492073669 | |
Sébastien Villemot | 9b9c87e09f | |
Sébastien Villemot | 4d13d73c58 | |
Sébastien Villemot | 401fbd25a6 | |
Sébastien Villemot | 853b195432 | |
Sébastien Villemot | 2617f5a4be | |
Sébastien Villemot | c132817780 | |
Sébastien Villemot | 6c3325cc5e | |
Sébastien Villemot | d5618a61d9 | |
Sébastien Villemot | f47507395d | |
Johannes Pfeifer | 643face6ed | |
Johannes Pfeifer | fb8ff758f9 | |
Sébastien Villemot | 9eaf1510f6 | |
Sébastien Villemot | 093a547684 | |
Sébastien Villemot | 0bfcc6d2f5 | |
Sébastien Villemot | 860285b8b8 | |
Sébastien Villemot | 233d0815a6 | |
Sébastien Villemot | dc6a84196a | |
Sébastien Villemot | 88a0f67585 | |
Sébastien Villemot | 24fc3854e2 | |
Sébastien Villemot | 115a0a8e5d | |
Sébastien Villemot | e5bf3f79b3 | |
Sébastien Villemot | 197347c870 | |
Sébastien Villemot | e104318e6b | |
Sébastien Villemot | 68cee02eb5 | |
Sébastien Villemot | fdb3cd0623 | |
Sébastien Villemot | 8e74322325 | |
Sébastien Villemot | af1985d569 | |
Sébastien Villemot | fd16bbe493 | |
Sébastien Villemot | 6809819961 | |
Sébastien Villemot | bbcbcd1eed | |
Sébastien Villemot | b747eff473 | |
Sébastien Villemot | a9c581e2bc | |
Sébastien Villemot | 846ed7e829 | |
Sébastien Villemot | 654b4e57a2 | |
Sébastien Villemot | 06ac452459 | |
Sébastien Villemot | ed4824f956 | |
Sébastien Villemot | 9ef3f7d0ed | |
Willi Mutschler | da4bc40e66 | |
Sébastien Villemot | 5145bd0708 | |
Sébastien Villemot | d78dea3086 | |
Sébastien Villemot | daa6b5569d | |
Sébastien Villemot | 357076feb4 | |
Willi Mutschler | e03d6f3c1f | |
Sébastien Villemot | 39f9d4352a | |
Sébastien Villemot | 66ccb3b3d3 | |
Sébastien Villemot | 113cfb9c47 | |
Sébastien Villemot | 9a0462a8a6 | |
Sébastien Villemot | 06a7acf19b | |
Sébastien Villemot | 651fed87be | |
Sébastien Villemot | b0fa610357 | |
Willi Mutschler | fb63a8eadb | |
Sébastien Villemot | eae9902cb8 | |
Sébastien Villemot | 3e5591d41f | |
Sébastien Villemot | 4875554a39 | |
Sébastien Villemot | 2ae485705e | |
Sébastien Villemot | 4f74ceb937 | |
Sébastien Villemot | cc7c024389 | |
Sébastien Villemot | 9ebd8a8372 | |
Sébastien Villemot | e26f3f5d06 | |
Sébastien Villemot | a6eb943aae | |
Sébastien Villemot | cd17a2dd6d | |
Sébastien Villemot | 20e1540892 | |
Sébastien Villemot | e4a4d2d8e6 | |
Sébastien Villemot | b59dc2cf1a | |
Sébastien Villemot | 88146bcc6f | |
Sébastien Villemot | a241aa2bd7 | |
Sébastien Villemot | f94e7ae9a6 | |
Sébastien Villemot | b4e2a0be48 | |
Stéphane Adjemian (Ryûk) | 2c923c613b | |
Willi Mutschler | 16be379493 | |
Willi Mutschler | 987c6f2e00 | |
Willi Mutschler | a3b05f6d74 | |
Willi Mutschler | 6d2958625d | |
Willi Mutschler | 3d057a6605 | |
Willi Mutschler | 5213adc0ad | |
Willi Mutschler | cb0ece6d82 | |
Willi Mutschler | d5649a53fa | |
Willi Mutschler | bb3aa0a206 | |
Willi Mutschler | cc9102248c | |
Willi Mutschler | 6e98e9849f | |
Willi Mutschler | cdd632ed07 | |
Willi Mutschler | 01c1df6c93 | |
Willi Mutschler | 81b2fe4c88 | |
Willi Mutschler | 158abbd0fd | |
Willi Mutschler | 83910ddae3 | |
Willi Mutschler | d480bbdcac | |
Willi Mutschler | de5b37fca7 | |
Sébastien Villemot | 9d95dadb13 | |
Sébastien Villemot | c1a46fed91 | |
Stéphane Adjemian (Argos) | 06926e0153 | |
Sébastien Villemot | cfb8a1d15a | |
Sébastien Villemot | cf9ea686ef | |
Johannes Pfeifer | a00eb5e1de | |
Johannes Pfeifer | cbf57b1af6 | |
Johannes Pfeifer | 328f6f3229 | |
Johannes Pfeifer | 36a2a41e35 | |
Johannes Pfeifer | 6f8fc22d57 | |
Johannes Pfeifer | 0e468103d9 | |
Johannes Pfeifer | 7f5d8b81c2 | |
Johannes Pfeifer | f0b10ca9df | |
Johannes Pfeifer | d5f8d3fffe | |
Johannes Pfeifer | 94207ab851 | |
Johannes Pfeifer | a67cd58d1f | |
Johannes Pfeifer | 5a3ae27b13 | |
Johannes Pfeifer | 2eb9475e0e | |
Willi Mutschler | 0a3f4220df | |
Sébastien Villemot | 8cc646fbf6 | |
Sébastien Villemot | 03433112a4 | |
Sébastien Villemot | dcdbd85b10 | |
Sébastien Villemot | 9525dbe3a8 | |
Sébastien Villemot | c329b4ff11 | |
Sébastien Villemot | d584317a6a | |
Sébastien Villemot | 5e7b7ec7b0 | |
Sébastien Villemot | e5b7ddbb33 | |
Sébastien Villemot | 2e3fbfc040 | |
Sébastien Villemot | 6b44e08daa | |
Sébastien Villemot | 7f6f66c1c9 | |
Sébastien Villemot | 82ea15e5e7 | |
Sébastien Villemot | 727f925f01 | |
Sébastien Villemot | d4b6e61497 | |
Sébastien Villemot | c3680b9f85 | |
Sébastien Villemot | 4dea001d8d | |
Sébastien Villemot | 068070d336 | |
Sébastien Villemot | 375f65c213 | |
Johannes Pfeifer | 32d5bc05a1 | |
Sébastien Villemot | d77561e241 | |
Sébastien Villemot | e4afa5eee0 | |
Sébastien Villemot | da9789038d | |
Johannes Pfeifer | 7ff7561280 | |
Johannes Pfeifer | 3a115d4fcc | |
Johannes Pfeifer | 268a668f32 | |
Johannes Pfeifer | ab61f79c9e | |
Johannes Pfeifer | f34653b0f7 | |
Johannes Pfeifer | fa29689b13 | |
Johannes Pfeifer | acb9518dec | |
Johannes Pfeifer | 7da5ff4fad | |
Johannes Pfeifer | c5ab1c7f11 | |
Johannes Pfeifer | 776c247b9b | |
Johannes Pfeifer | e65662151f | |
Sébastien Villemot | f2abdb6ec8 | |
Sébastien Villemot | 285c1ef244 | |
Sébastien Villemot | 0e5bba7567 | |
Sébastien Villemot | 2600a878da | |
Stéphane Adjemian (Argos) | 85e9ec7fdc | |
Stéphane Adjemian (Ryûk) | de626fb4e8 | |
Sébastien Villemot | b4a34f8ebc | |
Sébastien Villemot | ceff825ed4 | |
Sébastien Villemot | befe645728 | |
Sébastien Villemot | 432fd2d1b1 | |
Sébastien Villemot | 2993c79a85 | |
Sébastien Villemot | 50319b7620 | |
Willi Mutschler | e6aff20142 | |
Sébastien Villemot | b65f641b72 | |
Willi Mutschler | 2c2d93f36b | |
Sébastien Villemot | 64f47723bf | |
Sébastien Villemot | 01833b8a76 | |
Sébastien Villemot | 82a2aeaae4 | |
Sébastien Villemot | c4a5c36c52 | |
Johannes Pfeifer | 9b86dd4c33 | |
Johannes Pfeifer | 13bf261088 | |
Johannes Pfeifer | 710a5fba52 | |
Johannes Pfeifer | 6d8927775b | |
Johannes Pfeifer | bf7ac27fd7 | |
Johannes Pfeifer | dc9560e610 | |
Johannes Pfeifer | b4104584a2 | |
Johannes Pfeifer | 71b63c6e8e | |
Johannes Pfeifer | 8da98057b9 | |
Sébastien Villemot | 7557dfb70d | |
Johannes Pfeifer | 4fa5df0c24 | |
Johannes Pfeifer | 22c0f2279f | |
Johannes Pfeifer | 01f29784d7 | |
Johannes Pfeifer | b5880e0e56 | |
Johannes Pfeifer | 5231fc04c1 | |
Johannes Pfeifer | 782a2e8d69 | |
Stéphane Adjemian (Ryûk) | 6417520c09 | |
Stéphane Adjemian (Ryûk) | 8d7a5e69d7 | |
Sébastien Villemot | bdb385d17c | |
Sébastien Villemot | 9a1f150e38 | |
Sébastien Villemot | b8412aba10 | |
Sébastien Villemot | b117e2a540 | |
Sébastien Villemot | bf9434f95f | |
Sébastien Villemot | 9f3f1b00c6 | |
Sébastien Villemot | 1e290daa44 | |
Sébastien Villemot | f4bcecc0d2 | |
Sébastien Villemot | 4f1e5e1bc2 | |
Sébastien Villemot | 4a68cfcbd6 | |
Sébastien Villemot | c424366440 | |
Sébastien Villemot | 5ae5102f89 | |
Sébastien Villemot | 7eb1959f66 | |
Sébastien Villemot | 491c8785a9 | |
Sébastien Villemot | d36b82e47c | |
Sébastien Villemot | a54b29a384 | |
Sébastien Villemot | 605ed45811 | |
Sébastien Villemot | 70866c7b70 | |
Sébastien Villemot | f23dd8c981 | |
Sébastien Villemot | e0bc9f29a1 | |
Sébastien Villemot | 6dd55726e6 | |
Sébastien Villemot | 83e1b307d2 | |
Sébastien Villemot | 7984e08f99 | |
Sébastien Villemot | 3845f965ba | |
Sébastien Villemot | 834b04bcb4 | |
Sébastien Villemot | e549bbba7a | |
Johannes Pfeifer | 1f723ebd7e | |
Johannes Pfeifer | 552e6575cc | |
Sébastien Villemot | 01ae836a99 | |
Sébastien Villemot | ba0fef9879 | |
Sébastien Villemot | d731cb18e9 | |
Sébastien Villemot | 6f5e346bf6 | |
Sébastien Villemot | 7f2483ed38 | |
Sébastien Villemot | 14a71a6d98 | |
Sébastien Villemot | 44f307ce45 | |
Johannes Pfeifer | 87ce652088 | |
Johannes Pfeifer | f6a8473144 | |
Sébastien Villemot | c2897c8f14 | |
Sébastien Villemot | a252daee51 | |
Johannes Pfeifer | 8032aa6e7e | |
Sébastien Villemot | bb55e9ec2f | |
Willi Mutschler | 330b10ec85 | |
Willi Mutschler | 649f668dd1 | |
Willi Mutschler | 66e7233018 | |
Willi Mutschler | c8be1a3274 | |
Willi Mutschler | a41fbdefbc | |
Willi Mutschler | 9a4e022eb7 | |
Willi Mutschler | 268d511e29 | |
Willi Mutschler | 80ce86baf8 | |
Willi Mutschler | 8f650a9cca | |
Johannes Pfeifer | 7df3ff5059 | |
Johannes Pfeifer | b0358b9939 | |
Johannes Pfeifer | 62c3a14026 | |
Johannes Pfeifer | dafe3fbdb2 | |
Johannes Pfeifer | 757b6e10ec | |
Johannes Pfeifer | 624eabe2e8 | |
Johannes Pfeifer | 68ff5c4110 | |
Sébastien Villemot | e335fed27b | |
Sébastien Villemot | d573ff1507 | |
Sébastien Villemot | 049609cbbb | |
Sébastien Villemot | db677f1bab | |
Sébastien Villemot | 7072776a60 | |
Sébastien Villemot | 63333fe041 | |
Sébastien Villemot | d57ff73763 | |
Sébastien Villemot | 3e0999a0fb | |
Sébastien Villemot | 8c5d6f5eae | |
Sébastien Villemot | 9e7e069aa8 | |
Sébastien Villemot | 8a79899189 | |
Sébastien Villemot | 755138fb84 | |
Johannes Pfeifer | ff83c4aea7 | |
Sébastien Villemot | db331c53d4 | |
Sébastien Villemot | bea2d7905b | |
Johannes Pfeifer | 14634946dc | |
Johannes Pfeifer | 2b313b0308 | |
Sébastien Villemot | 126a1b74ea | |
Johannes Pfeifer | 838bb2f4b5 | |
Sébastien Villemot | e86b372464 | |
Sébastien Villemot | a375cb5575 | |
Sébastien Villemot | 43af789eda | |
Sébastien Villemot | eb16bb4373 | |
Johannes Pfeifer | 885fda0e20 | |
Sébastien Villemot | 46a34aaa6c | |
Sébastien Villemot | 53089ad6e5 | |
Johannes Pfeifer | 2473b57782 | |
Johannes Pfeifer | ac0ecde1d9 | |
Sébastien Villemot | 6af9b5f268 | |
Sébastien Villemot | e67ca64d4b | |
Johannes Pfeifer | b8a1b63572 | |
Johannes Pfeifer | 3895da48a1 | |
Johannes Pfeifer | 497c6bd1b1 | |
Sébastien Villemot | a57f81b3aa | |
Johannes Pfeifer | 8cc5ecf6ec | |
Sébastien Villemot | 6037b9f096 | |
Johannes Pfeifer | 2b240210d0 | |
Sébastien Villemot | a0ea6005e8 | |
Johannes Pfeifer | 4598dba40c | |
Sébastien Villemot | f26a469208 | |
Sébastien Villemot | 890c6b2e1d | |
Sébastien Villemot | 8d29d7b8d3 | |
Sébastien Villemot | 4a0b87fdaf | |
Sébastien Villemot | dee66e8351 | |
Johannes Pfeifer | 91dd4d9a83 | |
Johannes Pfeifer | 7eaa974484 | |
Johannes Pfeifer | baf8243fac | |
Johannes Pfeifer | 825763b18f | |
Sébastien Villemot | d601ca4a2e | |
Johannes Pfeifer | af274aec3f | |
Johannes Pfeifer | 3a851dd8f3 | |
Johannes Pfeifer | c72763501e | |
Johannes Pfeifer | 290f19c705 | |
Johannes Pfeifer | 74399f0728 | |
Johannes Pfeifer | 5ac11449ce | |
Johannes Pfeifer | bd905360e0 | |
Johannes Pfeifer | 842bf3d687 | |
Sébastien Villemot | cb0f0e6701 | |
Willi Mutschler | 2e742462b3 | |
Johannes Pfeifer | cd05bfb8a2 | |
Johannes Pfeifer | c43308a07b | |
Johannes Pfeifer | 2fa6c437f7 | |
Johannes Pfeifer | 420cbc8202 | |
Johannes Pfeifer | 4e58e22bdd | |
Johannes Pfeifer | c063d53646 | |
Johannes Pfeifer | f2f1c48baf | |
Johannes Pfeifer | 3dd1ffb8fe | |
Johannes Pfeifer | 41ac891f80 | |
Willi Mutschler | a0b443b9f8 | |
Willi Mutschler | 777ec76536 | |
Willi Mutschler | 55dc4a00d5 | |
Willi Mutschler | e025d56a59 | |
Willi Mutschler | 07b62fe554 | |
Willi Mutschler | 9dc4878f9f | |
Willi Mutschler | e52c007d8b | |
Willi Mutschler | fb326638f9 | |
Willi Mutschler | e170b64713 | |
Willi Mutschler | b737d46d61 | |
Willi Mutschler | 9914d764c2 | |
Willi Mutschler | c0cae0ebaa | |
Willi Mutschler | 0cd65df72a | |
Willi Mutschler | 017b4f05f6 | |
Willi Mutschler | 1ef026dc9d | |
Willi Mutschler | 180b92cb1e | |
Willi Mutschler | c3327e000c | |
Willi Mutschler | 0487dd4a77 | |
Willi Mutschler | f25188cf2f | |
Willi Mutschler | 3c0f3c1c24 | |
Willi Mutschler | 23f6019cdf | |
Willi Mutschler | 6941bd5516 | |
Willi Mutschler | c356db4531 | |
Willi Mutschler | aa99eff81d | |
Willi Mutschler | 7f22414843 | |
Willi Mutschler | 688d847489 | |
Willi Mutschler | c21f75887d | |
Willi Mutschler | dd2c816df0 | |
Willi Mutschler | d8105a3237 | |
Willi Mutschler | 960c075420 | |
Sébastien Villemot | 6551b88fc8 | |
Sébastien Villemot | 9e2b387d0a | |
Johannes Pfeifer | 8f79e848f0 | |
Johannes Pfeifer | 9afd75ca9b | |
Johannes Pfeifer | 7283838a0f | |
Johannes Pfeifer | 02b4242c75 | |
Johannes Pfeifer | 5f68504919 | |
Johannes Pfeifer | d60a19ce49 | |
Sébastien Villemot | 16f921ed62 | |
Sébastien Villemot | b0503ce994 | |
Sébastien Villemot | 6747f2130e | |
Sébastien Villemot | bd9943a695 | |
Sébastien Villemot | 9e5bd75611 | |
Sébastien Villemot | 7e92438601 | |
Johannes Pfeifer | c70f2f1e4b | |
Sébastien Villemot | 0d21927381 | |
Sébastien Villemot | 01011cb849 | |
Sébastien Villemot | 38f36258ed | |
Sébastien Villemot | 8888711266 | |
Sébastien Villemot | bda2b1a1e9 | |
Sébastien Villemot | 1bbfcf426e | |
Sébastien Villemot | 14bd989134 | |
Johannes Pfeifer | e70b2fdfcf | |
Johannes Pfeifer | 183e6fbb3b | |
Johannes Pfeifer | 9e53bd9967 | |
Stéphane Adjemian | 4024ad7e99 | |
Johannes Pfeifer | 0729ee72af | |
Johannes Pfeifer | a85a00bfcf | |
Sébastien Villemot | b4f260aa01 | |
Sébastien Villemot | b1db895dee | |
Sébastien Villemot | 0442fe785e | |
Sébastien Villemot | 33719e69f2 | |
Sébastien Villemot | 9ff1d8556c | |
Sébastien Villemot | 801b774bcd | |
Stéphane Adjemian (Argos) | 91825d4b5b | |
Sébastien Villemot | d9ff8dfeee | |
Normann Rion | 710589eb5b | |
Stéphane Adjemian (Ryûk) | c02e550582 | |
Sébastien Villemot | 5b8b63924d | |
Sébastien Villemot | 661e5c7e9f | |
Sébastien Villemot | d52aceeb16 | |
Johannes Pfeifer | d2fecdc5d3 | |
Sébastien Villemot | 4f4dc0e4f4 | |
Sébastien Villemot | 89376b188e | |
Johannes Pfeifer | 8532d6abd7 | |
Johannes Pfeifer | e6c43c2a29 | |
Stéphane Adjemian (Ryûk) | b5a74b96e5 | |
Sébastien Villemot | 7457c6d3db | |
Stéphane Adjemian (Ryûk) | 21dcc911bc | |
Willi Mutschler | b23c394972 | |
Willi Mutschler | d4a8d0fc50 | |
Sébastien Villemot | 3bdbfef301 | |
Normann Rion | d2c324eeee | |
Sébastien Villemot | e14c59384d | |
Stéphane Adjemian (Ryûk) | 084e64cdac | |
Sébastien Villemot | 5642e994fc | |
Sébastien Villemot | 704f3596cb | |
Sébastien Villemot | 3a5e38f49c | |
Sébastien Villemot | 58e98a78c6 | |
Normann Rion | 7721ea041c | |
Normann Rion | 7fac60f5f6 | |
Normann Rion | ea01f8f22a | |
Sébastien Villemot | 9540313b93 | |
Sébastien Villemot | 550e48884a | |
Sébastien Villemot | 542e30d417 | |
Sébastien Villemot | eb6becfa82 | |
Sébastien Villemot | 8a0dba1f88 | |
Sébastien Villemot | 90484edb0e | |
Sébastien Villemot | 62ff3f3194 | |
Frédéric Karamé | 773cbd2f38 | |
Sébastien Villemot | 84562f3568 | |
Sébastien Villemot | 6cf56ec86c | |
Johannes Pfeifer | 43dc073192 | |
Sébastien Villemot | 95ce62b2f7 | |
Sébastien Villemot | 8ee74d84b0 | |
Sébastien Villemot | 13538155cc | |
Sébastien Villemot | ef84d0270d | |
Sébastien Villemot | dc3aff7e1e | |
Sébastien Villemot | acd04951e3 | |
Johannes Pfeifer | c03862e71b | |
Sébastien Villemot | 91736d3d8b | |
Johannes Pfeifer | e544f1d860 | |
Stéphane Adjemian (Ryuk) | 3da7ded1da | |
Stéphane Adjemian (Ryuk) | 35ff1c0261 | |
Stéphane Adjemian (Ryuk) | fb8301d87e | |
Stéphane Adjemian (Ryuk) | a4ef4676d1 | |
Sébastien Villemot | 8a4b75bc5c | |
Sébastien Villemot | e3138abef8 | |
Sébastien Villemot | 19d7e2ce86 | |
Sébastien Villemot | 9b3d061f98 | |
Stéphane Adjemian | 8d0c555627 | |
Johannes Pfeifer | e953ba562c | |
Johannes Pfeifer | e49cdefac3 | |
Johannes Pfeifer | 0c6151df7a | |
Stéphane Adjemian (Charybdis) | d1ff573c67 | |
Sébastien Villemot | d1ea4e75e5 | |
Sébastien Villemot | 173d5d9270 | |
Johannes Pfeifer | 5714ebf298 | |
Sébastien Villemot | 68ae83c25c | |
Sébastien Villemot | b7996a0610 | |
Johannes Pfeifer | 389bdc23f2 | |
Johannes Pfeifer | 6f3a0298e3 | |
Sébastien Villemot | 909025639c | |
Stéphane Adjemian (Charybdis) | 5a9ddc405e | |
Stéphane Adjemian (Charybdis) | e6f75e4b18 | |
Stéphane Adjemian (Charybdis) | 7d8c922b78 | |
Stéphane Adjemian (Charybdis) | ae23c01d1c | |
Stéphane Adjemian (Charybdis) | 8cd20070d2 | |
Stéphane Adjemian (Charybdis) | 6e27946a04 | |
Stéphane Adjemian (Charybdis) | b8180f3328 | |
Houtan Bastani | 9988ba358d | |
Houtan Bastani | 48c58cd6c0 | |
Houtan Bastani | 080f90119c | |
Houtan Bastani | cd483463b5 | |
Houtan Bastani | 0c1569db72 | |
Houtan Bastani | 1c7b3b09f5 | |
Houtan Bastani | 87f815d701 | |
Houtan Bastani | 6fe23556f6 | |
Houtan Bastani | bc55bdb2a6 | |
Houtan Bastani | ce1c8c5bc2 | |
Houtan Bastani | b70a5269ee | |
Houtan Bastani | a717cc2ad4 | |
Houtan Bastani | 7e47f128d9 | |
Houtan Bastani | 933c1eeb72 | |
Houtan Bastani | 388f92b607 | |
Houtan Bastani | 09b59aa321 | |
Sébastien Villemot | 6a2a1c9266 | |
Sébastien Villemot | bbe24ad987 | |
Houtan Bastani | 5d882351d0 | |
Houtan Bastani | edf1472f1b | |
Houtan Bastani | 41a2072862 | |
Houtan Bastani | ccd4a416f7 | |
Houtan Bastani | 87ddce0dc3 | |
Houtan Bastani | 835be14b33 | |
Houtan Bastani | 30689dd1c8 | |
Houtan Bastani | d64ecf22b6 | |
Houtan Bastani | 1b8c2d4c48 | |
Houtan Bastani | 3183d806e3 | |
Houtan Bastani | 35e97799c4 | |
Houtan Bastani | 48d73ecb0c | |
Houtan Bastani | 8909f01b13 | |
Houtan Bastani | 543e973042 | |
Houtan Bastani | b397002973 | |
Houtan Bastani | 245a11d547 | |
Sébastien Villemot | cbed396604 | |
Sébastien Villemot | 6f48a2857a | |
Houtan Bastani | df9d6c35de | |
Houtan Bastani | 04eabc587f | |
Houtan Bastani | a2d9d20a9d | |
Houtan Bastani | 7c68e6709b | |
Houtan Bastani | 0e935918c6 | |
Stéphane Adjemian (Charybdis) | bc1c173988 | |
Frédéric Karamé | 2aed30d686 | |
Houtan Bastani | cac8231f48 | |
Houtan Bastani | 4cea90a156 | |
Sébastien Villemot | fcfde3bc0b | |
Sébastien Villemot | fd977f79f7 | |
Sébastien Villemot | 0ece9d3062 | |
Sébastien Villemot | f9e85d3c80 | |
Frédéric Karamé | 713e3ffcfb | |
Frédéric Karamé | a299c04d7e | |
Frédéric Karamé | 6e89a1ff9e | |
Frédéric Karamé | 4de28e10c0 | |
Frédéric Karamé | 801d175890 | |
Frédéric Karamé | b66d78d434 | |
Frédéric Karamé | cecc11c73f | |
Frédéric Karamé | b7597b5060 | |
Frédéric Karamé | be31310838 | |
Frédéric Karamé | d3d6a037b1 | |
Houtan Bastani | eeccf4021c | |
Houtan Bastani | c094e38927 | |
Houtan Bastani | e5fb0efd7b | |
Houtan Bastani | 2abe25e3aa | |
Stéphane Adjemian (Charybdis) | e71343cb79 | |
Sébastien Villemot | 3178cb0c44 | |
Sébastien Villemot | 3575db6100 | |
Houtan Bastani | c05d3a5cb9 | |
Houtan Bastani | aa3fdcf262 | |
Houtan Bastani | 136588fcef | |
Stéphane Adjemian (Charybdis) | 53d38e7833 | |
Stéphane Adjemian (Charybdis) | 3d0abed99a | |
Stéphane Adjemian (Charybdis) | 1eee8eb3f2 | |
Stéphane Adjemian (Charybdis) | a812a00b17 | |
Houtan Bastani | 046a1b3804 | |
Houtan Bastani | 7ba160e898 | |
Houtan Bastani | 9166579b46 | |
Houtan Bastani | b5802808e3 | |
Houtan Bastani | 3b6540951b | |
Houtan Bastani | e1941ca4a7 | |
Houtan Bastani | 215245758d | |
Stéphane Adjemian (Charybdis) | a4158ad306 | |
Houtan Bastani | ce79dbe420 | |
Stéphane Adjemian | 0c28a29392 | |
Johannes Pfeifer | bd8e804435 | |
Houtan Bastani | 21bbf12999 | |
Houtan Bastani | 60def33fa7 | |
Houtan Bastani | 8118eb0c49 | |
Frédéric Karamé | 814cb693f6 | |
Frédéric Karamé | bdd519a5f5 | |
Houtan Bastani | 4644a31291 | |
Frédéric Karamé | e6d081d58a | |
Frédéric Karamé | 8221d5c780 | |
Frédéric Karamé | 0141b34310 | |
Stéphane Adjemian (Charybdis) | 005b0907c0 | |
Stéphane Adjemian (Charybdis) | 8f4fe9b341 | |
Houtan Bastani | e16102fbf6 | |
Houtan Bastani | 332054cdc1 | |
Houtan Bastani | 33c8426ca3 | |
Frédéric Karamé | 75b17ce780 | |
Frédéric Karamé | 394df6f537 | |
Frédéric Karamé | 9a366d6576 | |
Frédéric Karamé | df842aa542 | |
Frédéric Karamé | 3c18bf1f6b | |
Houtan Bastani | af52282be0 | |
Houtan Bastani | b1e8790ff5 | |
Houtan Bastani | bac8ef8520 | |
ferhat | 3e040087e8 | |
Houtan Bastani | b94839f83b | |
Houtan Bastani | de6e1faae8 | |
Frédéric Karamé | e6d627396a | |
Houtan Bastani | 42797082ec | |
Houtan Bastani | 905c3b9c40 | |
Houtan Bastani | d204b44434 | |
Houtan Bastani | b0fc52dca1 | |
Houtan Bastani | 8050deee0e | |
Houtan Bastani | 6c3719280e | |
Houtan Bastani | 428ead788c | |
Houtan Bastani | 9f8eb4e30d | |
Houtan Bastani | 1aca7bb7e3 | |
ferhat | bae1f89c02 | |
ferhat | 0af48c4ac9 | |
Frédéric Karamé | 7816397856 | |
Frédéric Karamé | 46f367b299 | |
Frédéric Karamé | 8b79fb562b | |
Frédéric Karamé | bf956f9bb0 | |
Frédéric Karamé | ce9dace8ef | |
Frédéric Karamé | 57f4f5b157 | |
Frédéric Karamé | a64073ec3c | |
Stéphane Adjemian | c4b465a2c4 | |
Johannes Pfeifer | d5ef4962bd | |
Houtan Bastani | a037e3177c | |
Houtan Bastani | 2cb0bc27dc | |
Houtan Bastani | cb2571b158 | |
Houtan Bastani | 2464865b88 | |
Houtan Bastani | b4bbd49b7f | |
Houtan Bastani | 3a303fcb6f | |
Houtan Bastani | 9cd10285ec | |
Houtan Bastani | 33aba204d8 | |
Houtan Bastani | ce891a5e3d | |
Houtan Bastani | b15cfd1404 | |
Houtan Bastani | cea37a15e5 | |
Houtan Bastani | ca59274c87 | |
Houtan Bastani | 9e9f746469 | |
Houtan Bastani | 08eeb0fd1e | |
Houtan Bastani | ac811378c7 | |
Houtan Bastani | bf6fa900db | |
Houtan Bastani | 7a8467c13a | |
Houtan Bastani | 5f41bb3264 | |
Houtan Bastani | 17d5b639f1 | |
Stéphane Adjemian (Hermes) | 042303da68 | |
Frédéric Karamé | 47bfcece40 | |
Frédéric Karamé | 6ab142a75b | |
Houtan Bastani | 67f6f59e7f | |
Houtan Bastani | 0f4e3d2888 | |
Houtan Bastani | 84d1933143 | |
Houtan Bastani | f2002669e4 | |
Houtan Bastani | c620943245 | |
Houtan Bastani | 523c0c7864 | |
Houtan Bastani | ec6a4e92b0 | |
Frédéric Karamé | 34cf8ca284 | |
Houtan Bastani | c2a3e40178 | |
Houtan Bastani | 6980669d6e | |
Houtan Bastani | 761c07cdb2 | |
Houtan Bastani | 1c1681ac3c | |
Houtan Bastani | e436add816 | |
Frédéric Karamé | 19858696bf | |
Houtan Bastani | 29587b7f2a | |
Frédéric Karamé | 49d25782bb | |
Frédéric Karamé | 2b0a83ca91 | |
Frédéric Karamé | 3300a448f2 | |
Frédéric Karamé | bcb09ee14d | |
Houtan Bastani | b3a7e49464 | |
Houtan Bastani | eab8089e16 | |
Frédéric Karamé | f3a4bd8a63 | |
Frédéric Karamé | 81c02a58d8 | |
Frédéric Karamé | 29db2fe060 | |
Frédéric Karamé | d5735c9585 | |
Houtan Bastani | 135ae323d5 | |
Houtan Bastani | 224f2ed793 | |
Houtan Bastani | 814ff2a835 | |
Houtan Bastani | 94533d213b | |
Frédéric Karamé | d476a195e0 | |
Stéphane Adjemian | 86ebce712f | |
Stéphane Adjemian (Charybdis) | 3c345e1d45 | |
Stéphane Adjemian (Charybdis) | 5c3a4841b8 | |
Stéphane Adjemian (Charybdis) | cca16be513 | |
Stéphane Adjemian (Charybdis) | bebcba0a7d | |
Stéphane Adjemian (Charybdis) | c0cfc640c4 | |
Stéphane Adjemian (Charybdis) | e803fdbc88 | |
Stéphane Adjemian (Charybdis) | 5610856478 | |
Stéphane Adjemian (Charybdis) | dd0cc89ef3 | |
Frédéric Karamé | d533b826c1 | |
Frédéric Karamé | d4e4ea4ad8 | |
Stéphane Adjemian (Telemachus) | 459d02febf | |
Stéphane Adjemian (Telemachus) | deef89316c | |
Stéphane Adjemian (Telemachus) | 4c71e9b4ab | |
Stéphane Adjemian (Telemachus) | 27f5f298f4 | |
Stéphane Adjemian (Telemachus) | 0514b3949c | |
Stéphane Adjemian (Telemachus) | 9bb61c33bf | |
Houtan Bastani | 387a9b87b1 | |
Houtan Bastani | 2cbe1c34d9 | |
Houtan Bastani | 54adbb1e69 | |
Houtan Bastani | 13dc0e3538 | |
Houtan Bastani | 4fa89e2fc4 | |
Houtan Bastani | 3adc7826db | |
Houtan Bastani | 310b081c41 | |
Houtan Bastani | d6a37e8fcc | |
Houtan Bastani | 7a529bc973 | |
Houtan Bastani | b0bd8d62c0 | |
Houtan Bastani | 4487e41580 | |
Houtan Bastani | 9aef6eede7 | |
Houtan Bastani | 8a89b63cea | |
Houtan Bastani | 2f4540d36c | |
Houtan Bastani | 27764e5c4e | |
Houtan Bastani | ff97205474 | |
Houtan Bastani | 7c7a8a5bb9 | |
Houtan Bastani | a1d4284e7c | |
Houtan Bastani | 52dacc673d | |
Houtan Bastani | 128a6c6d95 | |
Houtan Bastani | 4fd0daee45 | |
Houtan Bastani | 36332da071 | |
Houtan Bastani | a269940940 | |
Houtan Bastani | 544b4c5a57 | |
Houtan Bastani | ee1e47883c | |
Houtan Bastani | dcd151a713 | |
Houtan Bastani | afa2f03db5 | |
Houtan Bastani | d038a6c9f3 | |
Houtan Bastani | f2e0ce6af8 | |
Houtan Bastani | 2a490eaa80 | |
Houtan Bastani | 914b81d830 | |
Houtan Bastani | 656d74436b | |
Houtan Bastani | 0f3c1b1537 | |
Houtan Bastani | cd6074b5d1 | |
Houtan Bastani | 0059a1bd4b | |
Houtan Bastani | bd5ba5e73d | |
Houtan Bastani | fac17ab6e7 | |
Houtan Bastani | 92e8c9340a | |
Houtan Bastani | 5b29f183b3 | |
Houtan Bastani | 120aa7ede7 | |
Houtan Bastani | dc8763a810 | |
Houtan Bastani | 62f8189a25 | |
Houtan Bastani | d40498fea1 | |
Houtan Bastani | f3cdc4ff79 | |
Houtan Bastani | 905bb8a3b6 | |
Houtan Bastani | 927bc3b9c9 | |
Houtan Bastani | cb90f5e72d | |
Houtan Bastani | 7576ba2e03 | |
Houtan Bastani | c0174131f6 | |
Houtan Bastani | 1d4fe68f4d | |
Houtan Bastani | 9829a5e213 | |
Houtan Bastani | 8222d4254d | |
Houtan Bastani | 41d86fca9e | |
Houtan Bastani | 2dd68d4ecd | |
Houtan Bastani | 56d284d30a | |
Houtan Bastani | c783bcfccf | |
Houtan Bastani | 5a35c9d54a | |
Houtan Bastani | 75f4994d04 | |
Houtan Bastani | 01e6c2a971 | |
Houtan Bastani | bb3e2fdff8 | |
Houtan Bastani | f035fabb14 | |
Houtan Bastani | 7dfe38198c | |
Houtan Bastani | eacea6d66d | |
Houtan Bastani | f877285c3b | |
Houtan Bastani | 84faa840c0 | |
Houtan Bastani | c693f745fa | |
Houtan Bastani | 68a8e42933 | |
Houtan Bastani | 2e8ef3ad5f | |
Houtan Bastani | 414ef860ab | |
Houtan Bastani | 96cd971f66 | |
Houtan Bastani | 7cfedcd2f6 | |
Houtan Bastani | a71b8808df | |
Houtan Bastani | a4b45bae37 | |
Houtan Bastani | 5f82248caf | |
Houtan Bastani | 3751fd9f39 | |
Houtan Bastani | d71878e327 | |
Houtan Bastani | 4c0cbaceff | |
Houtan Bastani | f92e714000 | |
Houtan Bastani | ed80ed12fb | |
Houtan Bastani | a940a028c6 | |
Houtan Bastani | 97da5d9ae3 | |
Houtan Bastani | 7f199ee114 | |
Houtan Bastani | 95f9c37726 | |
Houtan Bastani | 7cf2d46463 | |
Houtan Bastani | 67360a1711 | |
Houtan Bastani | fb7def044a | |
Houtan Bastani | 0d364975db | |
Houtan Bastani | 2a38a2615d | |
Houtan Bastani | 27fea2633a | |
Houtan Bastani | 1d76ad5496 | |
Houtan Bastani | 53d249cd88 | |
Houtan Bastani | f90a6836e7 | |
Houtan Bastani | 617db5ba64 | |
Houtan Bastani | adda7d8604 | |
Houtan Bastani | 1cfc233633 | |
Houtan Bastani | 24f550a2e9 | |
Houtan Bastani | 33d22eaf9b | |
Houtan Bastani | c21044ba87 | |
Houtan Bastani | fa020902a0 | |
Houtan Bastani | c862fdfbb7 | |
Houtan Bastani | ef6935fe96 | |
Houtan Bastani | f3be3f811c | |
Houtan Bastani | 21895669db | |
Houtan Bastani | 956a7644b0 | |
Houtan Bastani | b642de2343 | |
Houtan Bastani | 48d077cd4e | |
Houtan Bastani | 2070610fe2 | |
Houtan Bastani | 5e96706727 | |
Houtan Bastani | ae92cca4a2 | |
Houtan Bastani | f776f5c5cd | |
Houtan Bastani | ba6336dddc | |
Houtan Bastani | 60e292b70b | |
Houtan Bastani | c0372ab81f | |
Houtan Bastani | 1581202772 | |
Houtan Bastani | fbcc6830f2 | |
Houtan Bastani | 86bb71888f | |
Houtan Bastani | c8b147c0c0 | |
Houtan Bastani | ce6fa17483 | |
Houtan Bastani | 0678b98eca | |
Houtan Bastani | 764b31de99 | |
Houtan Bastani | f47555a92f | |
Houtan Bastani | 91f408b6b9 | |
Sébastien Villemot | d21738853c | |
Houtan Bastani | 49fc522b27 | |
Houtan Bastani | a3a6e7e7b9 | |
Houtan Bastani | 6a0d9b3d59 | |
Houtan Bastani | 517d242059 | |
Houtan Bastani | 2b23bcac46 | |
Houtan Bastani | 7fa3ab3999 | |
Houtan Bastani | da83298e46 | |
Houtan Bastani | 8315ae52a4 | |
Houtan Bastani | 94fc7382ca | |
Houtan Bastani | 664fa0d5e8 | |
Houtan Bastani | ab2fa28ea6 | |
Houtan Bastani | 913612e604 | |
Stéphane Adjemian (Charybdis) | d4e903e665 | |
Stéphane Adjemian (Charybdis) | 2174190e49 | |
Stéphane Adjemian (Charybdis) | cb9732a609 | |
Houtan Bastani | 64a5ab28a9 | |
Houtan Bastani | 1e62b4e77e | |
Houtan Bastani | 4cef528e56 | |
Stéphane Adjemian (Charybdis) | 2bb645ec70 | |
Houtan Bastani | 3dbb9bd6a2 | |
Houtan Bastani | 151c3c328b | |
Houtan Bastani | 376c605499 | |
Houtan Bastani | f10dbf60c6 | |
Houtan Bastani | 43504f9d64 | |
Houtan Bastani | 07fc0307ab | |
Houtan Bastani | 5fd2a4755c | |
Houtan Bastani | d22ebccf2c | |
Houtan Bastani | 493525e14a | |
Houtan Bastani | c4540358db | |
Houtan Bastani | 56a79d353d | |
Houtan Bastani | 9b2a8d12e0 | |
Houtan Bastani | df05b5204e | |
Houtan Bastani | 704e72a0f2 | |
Houtan Bastani | b8d4650074 | |
Houtan Bastani | f1c8147d91 | |
Houtan Bastani | a96b3d5074 | |
Houtan Bastani | 8ece1f1245 | |
Houtan Bastani | 17081da6e1 | |
Houtan Bastani | 68e4b22348 | |
Houtan Bastani | 48e5541bce | |
Houtan Bastani | 184167b404 | |
Houtan Bastani | 7a56e7ab7a | |
Houtan Bastani | dc3792f8b3 | |
Houtan Bastani | 35f1724f42 | |
Houtan Bastani | 5981d2a9d6 | |
Houtan Bastani | cc5a6f0ff0 | |
Houtan Bastani | f4ae8dbeab | |
Houtan Bastani | 9b67b92ece | |
Houtan Bastani | 3d0b2f49e3 | |
Houtan Bastani | c1f73901b5 | |
Houtan Bastani | 01f1474c56 | |
Houtan Bastani | b0ea699799 | |
Houtan Bastani | 12a5950394 | |
Houtan Bastani | c4b529ce2b | |
Houtan Bastani | 2e3326b3b4 | |
Houtan Bastani | 201178d7e0 | |
Houtan Bastani | f9f9d7de0d | |
Houtan Bastani | 0f48b7dce3 | |
Houtan Bastani | 7b97c358f3 | |
Houtan Bastani | b521b6adee | |
Houtan Bastani | 8e20b98d98 | |
Houtan Bastani | 02ca95e811 | |
Houtan Bastani | ec49704822 | |
Houtan Bastani | d3cf432e30 | |
Houtan Bastani | 95bed0fd57 | |
Houtan Bastani | 8d645b642f | |
Houtan Bastani | e74412249e | |
Houtan Bastani | 8a7c0d5611 | |
Houtan Bastani | 7e0c50421e | |
Houtan Bastani | aad042ec27 | |
Houtan Bastani | af11f6449f | |
Houtan Bastani | bb7d6c750c | |
Houtan Bastani | d98687aacf | |
Houtan Bastani | 3c8164f101 | |
Houtan Bastani | b7df250525 | |
Houtan Bastani | aaf0cc48f7 | |
Houtan Bastani | 145fcfdd19 | |
Houtan Bastani | 515ee0d9af | |
Houtan Bastani | 74a8e9bcc1 | |
Houtan Bastani | a8c9f2afdd | |
Houtan Bastani | 12c94e6881 | |
Houtan Bastani | 17a2c4000d | |
Houtan Bastani | 85ea29e1a8 | |
Houtan Bastani | 91162e9eb0 | |
Houtan Bastani | 9143a805fa | |
Houtan Bastani | 2cb40a658d | |
Houtan Bastani | 8947c52c1f | |
Houtan Bastani | ef7bb4f04f | |
Houtan Bastani | 60ee6c08b3 | |
Houtan Bastani | 90b164d288 | |
Houtan Bastani | 628f1fef43 | |
Houtan Bastani | ad2b5fed3e | |
Houtan Bastani | 4841f700eb | |
Houtan Bastani | 22962be7c1 | |
Houtan Bastani | dd987523c8 | |
Houtan Bastani | ec0dc6148c | |
Houtan Bastani | 540c59ee85 | |
Houtan Bastani | 2921f91ca3 | |
Houtan Bastani | 11e90492df | |
Houtan Bastani | cec93b6b37 | |
Houtan Bastani | d1b4a10ffe | |
Houtan Bastani | c983d99169 | |
Houtan Bastani | 8ac9ac6f68 | |
Houtan Bastani | d78e491278 | |
Houtan Bastani | cc6d29c5fc | |
Houtan Bastani | d0be97c4e4 | |
Houtan Bastani | ee7f2fb7d0 | |
Houtan Bastani | 57c10f5ff8 | |
Houtan Bastani | 7280ec13a7 | |
Houtan Bastani | 7b14bdafe9 | |
Houtan Bastani | 7068bc4f80 | |
Houtan Bastani | 33e80b5816 | |
Houtan Bastani | c94f1b98b1 | |
Houtan Bastani | 1f988bcdf4 | |
Houtan Bastani | 0d33a12d5b | |
Houtan Bastani | 922c0066c7 | |
Houtan Bastani | 03e306785c | |
Houtan Bastani | 6e9be0feb4 | |
Houtan Bastani | 953dab0358 | |
Houtan Bastani | 2529b12660 | |
Houtan Bastani | 258acc58ad | |
Houtan Bastani | 1b25e97051 | |
Houtan Bastani | 7c7ff24ebe | |
Houtan Bastani | 6b3b92d7dd | |
Houtan Bastani | edf643af6b | |
Houtan Bastani | a9ff5c74d3 | |
Houtan Bastani | 85d4bd69a3 | |
Houtan Bastani | 5c82fcc87f | |
Houtan Bastani | 3ba1dcd408 | |
Houtan Bastani | 6d0cd7ba5a | |
Houtan Bastani | 1f73c74211 | |
Houtan Bastani | 59ef4b9e68 | |
Houtan Bastani | ce65626a68 | |
Houtan Bastani | 5d5f394eb1 | |
Houtan Bastani | 94c37bcf96 | |
Houtan Bastani | d905c6ad84 | |
Houtan Bastani | faf2d3be3f | |
Houtan Bastani | c09f1d02d0 | |
Houtan Bastani | 9158ad5b8e | |
Houtan Bastani | 13d82d94ed | |
Houtan Bastani | 7efaaea364 | |
Houtan Bastani | 59a190a282 | |
Houtan Bastani | fb8cf54f08 | |
Houtan Bastani | 33b76367ab | |
Houtan Bastani | 263c84e985 | |
Houtan Bastani | b400fea376 | |
Houtan Bastani | 2230380a35 | |
Houtan Bastani | 1d8fdfd31d | |
Stéphane Adjemian (Ulysses) | 3b8b6f82cf | |
Houtan Bastani | fbf807ad0f | |
Houtan Bastani | 51f83a118d | |
Houtan Bastani | 16aebf892c | |
Houtan Bastani | 1c371389df | |
Houtan Bastani | ff4a155f07 | |
Houtan Bastani | 95e2dd079e | |
Houtan Bastani | 218c1655a1 |
|
@ -0,0 +1,27 @@
|
|||
# NB: whenever the present file is modified, the same modification should be
|
||||
# applied to the copy in preprocessor.git
|
||||
|
||||
# For general information about our coding style, and the specific version
|
||||
# of clang-format used, see:
|
||||
# https://git.dynare.org/Dynare/dynare/-/wikis/CodingGuidelines#c-code
|
||||
# For the list of options of clang-format, see:
|
||||
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||
# Effective configuration can be obtained with:
|
||||
# clang-format --dump-config
|
||||
Language: Cpp
|
||||
Standard: c++20
|
||||
ColumnLimit: 100
|
||||
BasedOnStyle: GNU
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BreakConstructorInitializers: AfterColon
|
||||
BreakInheritanceList: AfterColon
|
||||
Cpp11BracedListStyle: true
|
||||
DeriveLineEnding: false
|
||||
IndentPPDirectives: AfterHash
|
||||
PackConstructorInitializers: NextLine
|
||||
PPIndentWidth: 1
|
||||
PointerAlignment: Left
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeCpp11BracedList: true
|
|
@ -0,0 +1,8 @@
|
|||
# NB: to use clang-tidy on the MEX source code, make sure that you have
|
||||
# libomp-dev installed (the LLVM implementation of OpenMP)
|
||||
|
||||
# TODO: add the following check families:
|
||||
# - bugprone-*
|
||||
# - cppcoreguidelines-
|
||||
|
||||
Checks: 'performance-*,modernize-*,-modernize-use-trailing-return-type,-clang-diagnostic-unqualified-std-cast-call'
|
|
@ -1,6 +1,8 @@
|
|||
((c-mode . ((indent-tabs-mode . nil)
|
||||
(fill-column . 100)
|
||||
(c-file-style . "gnu")))
|
||||
(c++-mode . ((indent-tabs-mode . nil)
|
||||
(fill-column . 100)
|
||||
(c-file-style . "gnu")))
|
||||
(makefile-mode . ((indent-tabs-mode . t)))
|
||||
(octave-mode . ((indent-tabs-mode . nil)
|
||||
|
|
|
@ -3,108 +3,12 @@
|
|||
# Any file that is displayed should be removed from the ignore list
|
||||
# (possibly by an exclusion rule beginning with an exclamation mark)
|
||||
|
||||
# Generic ignore rules
|
||||
*~
|
||||
*.o
|
||||
*.a
|
||||
*.fig
|
||||
\#*\#
|
||||
TAGS
|
||||
*.mat
|
||||
|
||||
# Build system rules
|
||||
.deps
|
||||
Makefile
|
||||
Makefile.in
|
||||
confdefs.h
|
||||
configure
|
||||
config.log
|
||||
config.status
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.guess
|
||||
config.sub
|
||||
depcomp
|
||||
install-sh
|
||||
/missing
|
||||
/mex/build/matlab/missing
|
||||
/mex/build/octave/missing
|
||||
/compile
|
||||
/mex/build/matlab/compile
|
||||
/mex/build/octave/compile
|
||||
ylwrap
|
||||
ar-lib
|
||||
|
||||
# checksum associated with fast option
|
||||
checksum
|
||||
|
||||
# Make Check Rules
|
||||
*.trs
|
||||
*.tls
|
||||
|
||||
# Doc rules
|
||||
*.pdf
|
||||
*.aux
|
||||
*.log
|
||||
*.out
|
||||
*.toc
|
||||
*.idx
|
||||
*.scn
|
||||
*.nav
|
||||
*.snm
|
||||
*.vrb
|
||||
*.bbl
|
||||
*.blg
|
||||
*.lof
|
||||
/doc/manual/build
|
||||
/doc/manual/utils/version.py
|
||||
# Created when building the reference manual
|
||||
/doc/manual/utils/__pycache__/*
|
||||
!/doc/guide.bbl
|
||||
!/doc/parallel/AvenueParadigm.pdf
|
||||
!/doc/parallel/iVaNo_*.pdf
|
||||
!/doc/parallel/netbook_*.pdf
|
||||
!/doc/parallel/quest_*.pdf
|
||||
!/doc/parallel/RWMH_quest1_*.pdf
|
||||
!/doc/parallel/waitbars*.pdf
|
||||
doc/internals/*.html
|
||||
doc/internals/ltxpng
|
||||
|
||||
# MATLAB dir
|
||||
/matlab/preprocessor64/
|
||||
/matlab/dynare_version.m
|
||||
|
||||
# DLL rules
|
||||
*.mex
|
||||
*.mexa64
|
||||
*.mexw64
|
||||
*.mexmaci64
|
||||
*.mexmaca64
|
||||
/mex/matlab/
|
||||
/mex/octave/
|
||||
|
||||
# Symbolic links created for building MEX files
|
||||
/mex/build/matlab/*/*.c
|
||||
/mex/build/matlab/*/*.cc
|
||||
/mex/build/matlab/*/*.f08
|
||||
/mex/build/matlab/*/*.F08
|
||||
/mex/build/octave/*/*.c
|
||||
/mex/build/octave/*/*.cc
|
||||
/mex/build/octave/*/*.f08
|
||||
/mex/build/octave/*/*.F08
|
||||
|
||||
# Fortran modules
|
||||
/mex/build/matlab/*/*.mod
|
||||
/mex/build/octave/*/*.mod
|
||||
|
||||
# Extra rules for trust_region MEX testfiles
|
||||
/mex/sources/block_trust_region/test/*.mod
|
||||
/mex/sources/block_trust_region/test/dulmage_mendelsohn_test
|
||||
/mex/sources/block_trust_region/test/trust_region_test
|
||||
!/mex/sources/block_trust_region/test/Makefile
|
||||
|
||||
# Windows
|
||||
!/windows/Makefile
|
||||
!/windows/deps/Makefile
|
||||
# Created by the Windows package build script
|
||||
/windows/deps/lib64/
|
||||
/windows/deps/lib64-msys2/
|
||||
/windows/deps/matlab64/
|
||||
|
@ -115,35 +19,17 @@ doc/internals/ltxpng
|
|||
/windows/exe/
|
||||
/windows/7z/
|
||||
/windows/zip/
|
||||
/matlab/preprocessor64/
|
||||
/matlab/supported_octave_version.m
|
||||
|
||||
# MacOS stuff
|
||||
.DS_Store
|
||||
/macOS/pkg/
|
||||
/macOS/deps/sources64/
|
||||
# Created by the macOS package build script
|
||||
/macOS/deps/arm64/sources64/
|
||||
/macOS/deps/x86_64/sources64/
|
||||
/macOS/deps/tarballs/
|
||||
/macOS/deps/lib64/
|
||||
!/macOS/Makefile
|
||||
!/macOS/deps/Makefile
|
||||
/macOS/deps/arm64/lib64/
|
||||
/macOS/deps/x86_64/lib64/
|
||||
build-doc
|
||||
|
||||
# Emacs stuff
|
||||
TAGS
|
||||
scripts/dynare.elc
|
||||
|
||||
# MS-Sbvar
|
||||
/contrib/ms-sbvar/*.prn
|
||||
/contrib/ms-sbvar/*.dat
|
||||
/contrib/ms-sbvar/sbvar_commandline
|
||||
/contrib/ms-sbvar/sbvar_init_file
|
||||
!/contrib/ms-sbvar/Makefile
|
||||
/tests/ms-sbvar/*.tmp
|
||||
|
||||
# Reporting
|
||||
*synctex.gz
|
||||
tests/reporting/tmpRepDir
|
||||
|
||||
# Octave variables saved when Octave crashes
|
||||
octave-workspace
|
||||
|
||||
# VERSION generated file
|
||||
VERSION
|
||||
|
||||
matlab/supported_octave_version.m
|
||||
|
|
187
.gitlab-ci.yml
187
.gitlab-ci.yml
|
@ -1,72 +1,84 @@
|
|||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
TERM: linux
|
||||
MATLAB_VERSION: R2023a
|
||||
OLD_MATLAB_VERSION: R2014a
|
||||
MATLAB_VERSION: R2023b
|
||||
OLD_MATLAB_VERSION: R2018b
|
||||
# To ensure that "false && true" fails, see https://gitlab.com/gitlab-org/gitlab-runner/-/issues/25394#note_412609647
|
||||
FF_ENABLE_BASH_EXIT_CODE_CHECK: 'true'
|
||||
|
||||
# The next stanza creates the version number used for the source tarball and the
|
||||
# binary packages. Here are the following possible cases:
|
||||
# - if VERSION was already set (when manually running a pipeline), use it
|
||||
# - if we are in the official Dynare repository:
|
||||
# + if on a tag: use the tag
|
||||
# + if on master: use 6-unstable-$TIMESTAMP-$COMMIT
|
||||
# + if on master: use 7-unstable-$TIMESTAMP-$COMMIT
|
||||
# + on another branch: use $BRANCH-$TIMESTAMP-$COMMIT
|
||||
# - if in a personal repository: use $USER-$TIMESTAMP-$COMMIT
|
||||
before_script:
|
||||
- '[[ -z $VERSION ]] && [[ $CI_PROJECT_NAMESPACE == Dynare ]] && [[ -n $CI_COMMIT_TAG ]] && export VERSION=$CI_COMMIT_TAG'
|
||||
- '[[ -z $VERSION ]] && [[ $CI_PROJECT_NAMESPACE == Dynare ]] && [[ $CI_COMMIT_REF_NAME == master ]] && export VERSION=6-unstable-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA'
|
||||
- '[[ -z $VERSION ]] && [[ $CI_PROJECT_NAMESPACE == Dynare ]] && export VERSION=$CI_COMMIT_REF_NAME-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA'
|
||||
- '[[ -z $VERSION ]] && export VERSION=$CI_PROJECT_NAMESPACE-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA'
|
||||
- 'if [[ -z $VERSION ]] && [[ $CI_PROJECT_NAMESPACE == Dynare ]] && [[ -n $CI_COMMIT_TAG ]]; then export VERSION=$CI_COMMIT_TAG; fi'
|
||||
- 'if [[ -z $VERSION ]] && [[ $CI_PROJECT_NAMESPACE == Dynare ]] && [[ $CI_COMMIT_REF_NAME == master ]]; then export VERSION=7-unstable-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA; fi'
|
||||
- 'if [[ -z $VERSION ]] && [[ $CI_PROJECT_NAMESPACE == Dynare ]]; then export VERSION=$CI_COMMIT_REF_NAME-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA; fi'
|
||||
- 'if [[ -z $VERSION ]]; then export VERSION=$CI_PROJECT_NAMESPACE-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA; fi'
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- pkg
|
||||
- sign
|
||||
- deploy
|
||||
|
||||
build_binaries:
|
||||
build_matlab:
|
||||
stage: build
|
||||
script:
|
||||
- autoreconf -si
|
||||
- ./configure --with-matlab=/opt/MATLAB/$MATLAB_VERSION PACKAGE_VERSION=$VERSION PACKAGE_STRING="dynare $VERSION"
|
||||
- make -j $(nproc) LN_S="cp -p"
|
||||
- meson setup -Dbuild_for=matlab -Dmatlab_path=/opt/MATLAB/$MATLAB_VERSION -Dbuildtype=release build-matlab
|
||||
- meson compile -v -C build-matlab
|
||||
artifacts:
|
||||
paths:
|
||||
- preprocessor/dynare-preprocessor
|
||||
- mex/octave/
|
||||
- mex/matlab/
|
||||
- build-matlab/
|
||||
expire_in: 3 days
|
||||
|
||||
build_octave:
|
||||
stage: build
|
||||
script:
|
||||
- meson setup -Dbuild_for=octave -Dbuildtype=release build-octave
|
||||
- meson compile -v -C build-octave
|
||||
artifacts:
|
||||
paths:
|
||||
- build-octave/
|
||||
expire_in: 3 days
|
||||
|
||||
build_doc:
|
||||
stage: build
|
||||
script:
|
||||
- autoreconf -si
|
||||
- ./configure --disable-matlab --disable-octave PACKAGE_VERSION=$VERSION PACKAGE_STRING="dynare $VERSION"
|
||||
- make -j $(nproc) pdf html
|
||||
- meson rewrite kwargs set project / version "$VERSION"
|
||||
# Use a local copy of MathJax to avoid using CDN (which are a privacy issue)
|
||||
# NB: Debian 12 “Bookworm” has MathJax 2. The following needs to be updated
|
||||
# when Debian moves to MathJax 3.
|
||||
- meson setup -Dbuild_for=octave -Dmathjax_path=mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML build-doc
|
||||
- meson compile -v -C build-doc doc
|
||||
- cp -dR /usr/share/javascript/mathjax build-doc/dynare-manual.html/_static/
|
||||
artifacts:
|
||||
paths:
|
||||
- doc/manual/build/
|
||||
- doc/**/*.pdf
|
||||
- preprocessor/doc/*/*.pdf
|
||||
- build-doc/
|
||||
expire_in: 3 days
|
||||
|
||||
pkg_source:
|
||||
stage: pkg
|
||||
script:
|
||||
- rm doc/manual/source/_static/mathjax && sed -i "/^mathjax_path *=/d" doc/manual/source/conf.py
|
||||
- 'for f in configure.ac preprocessor/configure.ac mex/build/matlab/configure.ac mex/build/octave/configure.ac; do sed -i "s/^AC_INIT(\[\(.*\)\],\s*\[\(.*\)\])/AC_INIT([\1], [$VERSION])/" $f; done'
|
||||
- autoreconf -si
|
||||
- ./configure --with-matlab=/opt/MATLAB/$MATLAB_VERSION
|
||||
- make dist
|
||||
- meson rewrite kwargs set project / version "$VERSION"
|
||||
- git commit -a -m "Source for $VERSION"
|
||||
- meson setup -Dbuild_for=octave build-src
|
||||
- meson dist -C build-src --no-tests
|
||||
artifacts:
|
||||
paths:
|
||||
- dynare-*.tar.xz
|
||||
- build-src/meson-dist/dynare-*.tar.xz
|
||||
expire_in: 3 days
|
||||
needs: []
|
||||
|
||||
pkg_windows:
|
||||
stage: pkg
|
||||
script:
|
||||
- meson rewrite kwargs set project / version "$VERSION"
|
||||
- mkdir -p windows/deps/tarballs && cp /usr/lib/dynare-runner/matlab64-* windows/deps/tarballs/
|
||||
- make -C windows
|
||||
- rm windows/deps/tarballs/matlab64-* # No need to cache these files
|
||||
|
@ -90,16 +102,18 @@ pkg_windows:
|
|||
expire_in: 3 days
|
||||
needs: [ "build_doc" ]
|
||||
|
||||
pkg_macOS:
|
||||
pkg_macOS_x86_64:
|
||||
stage: pkg
|
||||
script:
|
||||
- ln -s ~/tarballs macOS/deps/
|
||||
- arch -x86_64 make -C macOS
|
||||
# Enforce the arm64 meson for rewrite, as a workaround to https://github.com/mesonbuild/meson/issues/12282
|
||||
- env PATH="/opt/homebrew/bin:$PATH" meson rewrite kwargs set project / version "$VERSION"
|
||||
- ln -s ~/tarballs macOS/deps/x86_64
|
||||
- make -C macOS build-x86_64
|
||||
cache:
|
||||
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
||||
paths:
|
||||
- macOS/deps/sources64/
|
||||
- macOS/deps/lib64/
|
||||
- macOS/deps/x86_64/sources64/
|
||||
- macOS/deps/x86_64/lib64/
|
||||
tags:
|
||||
- macOS
|
||||
artifacts:
|
||||
|
@ -108,32 +122,46 @@ pkg_macOS:
|
|||
expire_in: 3 days
|
||||
needs: [ "build_doc" ]
|
||||
|
||||
.test_matlab_template:
|
||||
stage: test
|
||||
pkg_macOS_arm64:
|
||||
stage: pkg
|
||||
script:
|
||||
# Enforce the arm64 meson for rewrite, as a workaround to https://github.com/mesonbuild/meson/issues/12282
|
||||
- env PATH="/opt/homebrew/bin:$PATH" meson rewrite kwargs set project / version "$VERSION"
|
||||
- ln -s ~/tarballs macOS/deps/arm64
|
||||
- make -C macOS build-arm64
|
||||
cache:
|
||||
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
||||
paths:
|
||||
- macOS/deps/arm64/sources64/
|
||||
- macOS/deps/arm64/lib64/
|
||||
tags:
|
||||
- macOS
|
||||
artifacts:
|
||||
paths:
|
||||
- tests/**/*.m.log
|
||||
- tests/**/*.m.trs
|
||||
- tests/**/*.jnl
|
||||
- tests/run_test_matlab_output.txt
|
||||
when: always
|
||||
needs: [ "build_binaries" ]
|
||||
- macOS/pkg/*
|
||||
expire_in: 3 days
|
||||
needs: [ "build_doc" ]
|
||||
|
||||
test_matlab:
|
||||
extends: .test_matlab_template
|
||||
stage: test
|
||||
script:
|
||||
- autoreconf -si
|
||||
- ./configure --disable-octave --with-matlab=/opt/MATLAB/$MATLAB_VERSION
|
||||
- make -j $(($(nproc) * 3 / 4)) -C tests check-matlab
|
||||
- meson test -C build-matlab --no-rebuild --num-processes $(($(nproc) * 3 / 4))
|
||||
artifacts:
|
||||
paths:
|
||||
- build-matlab/meson-logs/testlog.txt
|
||||
when: always
|
||||
needs: [ "build_matlab" ]
|
||||
|
||||
test_old_matlab:
|
||||
extends: .test_matlab_template
|
||||
stage: test
|
||||
script:
|
||||
- autoreconf -si
|
||||
- ./configure --disable-octave --with-matlab=/opt/MATLAB/$OLD_MATLAB_VERSION
|
||||
- make -C mex/build/matlab clean
|
||||
- make -j $(nproc) -C mex/build/matlab
|
||||
- make -j $(($(nproc) * 3 / 4)) -C tests check-matlab
|
||||
- meson setup -Dbuild_for=matlab -Dmatlab_path=/opt/MATLAB/$OLD_MATLAB_VERSION -Dbuildtype=release build-old-matlab
|
||||
- meson compile -v -C build-old-matlab
|
||||
- meson test -C build-old-matlab --num-processes $(($(nproc) * 3 / 4))
|
||||
artifacts:
|
||||
paths:
|
||||
- build-old-matlab/meson-logs/testlog.txt
|
||||
when: always
|
||||
when: manual
|
||||
|
||||
test_octave:
|
||||
|
@ -141,22 +169,41 @@ test_octave:
|
|||
variables:
|
||||
OPENBLAS_NUM_THREADS: 1
|
||||
script:
|
||||
- autoreconf -si
|
||||
- ./configure --disable-matlab
|
||||
- make -j $(nproc) -C tests check-octave
|
||||
- meson test -C build-octave --no-rebuild
|
||||
artifacts:
|
||||
paths:
|
||||
- tests/**/*.o.log
|
||||
- tests/**/*.o.trs
|
||||
- tests/**/*.jnl
|
||||
- tests/run_test_octave_output.txt
|
||||
- build-octave/meson-logs/testlog.txt
|
||||
when: always
|
||||
needs: [ "build_binaries" ]
|
||||
needs: [ "build_octave" ]
|
||||
when: manual
|
||||
|
||||
# For the deploy jobs, we don’t use the “needs” keyword, since we don’t want
|
||||
# those jobs to start before the “test” and “pkg” stages have succeeded. Hence
|
||||
# we stick to the “dependencies” keyword.
|
||||
test_clang_format:
|
||||
stage: test
|
||||
script:
|
||||
- meson setup -Dbuild_for=octave build-clang-format
|
||||
- ninja -C build-clang-format clang-format-check
|
||||
needs: []
|
||||
|
||||
# For the sign and deploy jobs, we don’t use the “needs” keyword, since we
|
||||
# don’t want those jobs to start before the “test” and “pkg” stages have
|
||||
# succeeded. Hence we stick to the “dependencies” keyword.
|
||||
|
||||
sign_windows:
|
||||
stage: sign
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "Dynare" && $CI_COMMIT_REF_NAME == "master"'
|
||||
when: on_success
|
||||
- when: never
|
||||
tags:
|
||||
- sign
|
||||
dependencies:
|
||||
- pkg_windows
|
||||
script:
|
||||
- f=(windows/exe/*) && mkdir -p windows/exe-signed/ && osslsigncode sign -pkcs11module /usr/lib/x86_64-linux-gnu/libykcs11.so.2 -key "pkcs11:id=%01;type=private;pin-value=$YUBIKEY_PIN" -certs ~/cepremap-code-signing-comodo-sectigo.pem -n Dynare -i https://www.dynare.org -t http://timestamp.comodoca.com -in ${f[0]} -out windows/exe-signed/${f[0]##*/}
|
||||
artifacts:
|
||||
paths:
|
||||
- windows/exe-signed/*
|
||||
expire_in: 3 days
|
||||
|
||||
deploy_manual_unstable:
|
||||
stage: deploy
|
||||
|
@ -165,13 +212,11 @@ deploy_manual_unstable:
|
|||
when: on_success
|
||||
- when: never
|
||||
tags:
|
||||
- restricted
|
||||
- deploy
|
||||
dependencies:
|
||||
- build_doc
|
||||
script:
|
||||
- rm -rf doc/manual/build/html/_static/mathjax
|
||||
- ln -s /usr/share/javascript/mathjax doc/manual/build/html/_static/mathjax
|
||||
- rsync --recursive --links --delete doc/manual/build/html/ /srv/www.dynare.org/manual-unstable/
|
||||
- rsync --recursive --links --delete build-doc/dynare-manual.html/ /srv/www.dynare.org/manual-unstable/
|
||||
|
||||
deploy_snapshot_unstable:
|
||||
stage: deploy
|
||||
|
@ -180,17 +225,19 @@ deploy_snapshot_unstable:
|
|||
when: on_success
|
||||
- when: never
|
||||
tags:
|
||||
- restricted
|
||||
- deploy
|
||||
dependencies:
|
||||
- pkg_source
|
||||
- pkg_windows
|
||||
- pkg_macOS
|
||||
- sign_windows
|
||||
- pkg_macOS_arm64
|
||||
- pkg_macOS_x86_64
|
||||
script:
|
||||
- f=(windows/exe/*) && osslsigncode sign -pkcs12 ~/cepremap-comodo-sectigo-code-signing.p12 -n Dynare -i https://www.dynare.org -t http://timestamp.comodoca.com -in ${f[0]} -out ${f[0]}.signed && mv ${f[0]}.signed ${f[0]}
|
||||
- cp *.tar.xz /srv/www.dynare.org/snapshot/source/ && ln -sf *.tar.xz /srv/www.dynare.org/snapshot/source/dynare-latest-src.tar.xz
|
||||
- f=(windows/exe/*) && cp ${f[0]} /srv/www.dynare.org/snapshot/windows/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/windows/dynare-latest-win.exe
|
||||
- cp build-src/meson-dist/*.tar.xz /srv/www.dynare.org/snapshot/source/ && ln -sf *.tar.xz /srv/www.dynare.org/snapshot/source/dynare-latest-src.tar.xz
|
||||
- f=(windows/exe-signed/*) && cp ${f[0]} /srv/www.dynare.org/snapshot/windows/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/windows/dynare-latest-win.exe
|
||||
- f=(windows/7z/*) && cp ${f[0]} /srv/www.dynare.org/snapshot/windows-7z/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/windows-7z/dynare-latest-win.7z
|
||||
- f=(windows/zip/*) && cp ${f[0]} /srv/www.dynare.org/snapshot/windows-zip/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/windows-zip/dynare-latest-win.zip
|
||||
- f=(macOS/pkg/*) && cp ${f[0]} /srv/www.dynare.org/snapshot/macos/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/macos/dynare-latest-macos.pkg
|
||||
- f=(macOS/pkg/*-arm64.pkg) && cp ${f[0]} /srv/www.dynare.org/snapshot/macos-arm64/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/macos-arm64/dynare-latest-macos-arm64.pkg
|
||||
- f=(macOS/pkg/*-x86_64.pkg) && cp ${f[0]} /srv/www.dynare.org/snapshot/macos-x86_64/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/macos-x86_64/dynare-latest-macos-x86_64.pkg
|
||||
- ~/update-snapshot-list.sh
|
||||
- curl -X POST -F token="$WEBSITE_PIPELINE_TRIGGER_TOKEN" -F ref=master https://git.dynare.org/api/v4/projects/40/trigger/pipeline
|
||||
|
|
|
@ -10,19 +10,10 @@
|
|||
[submodule "matlab/utilities/tests"]
|
||||
path = matlab/utilities/tests
|
||||
url = ../../Dynare/m-unit-tests.git
|
||||
[submodule "matlab/particles"]
|
||||
path = matlab/particles
|
||||
url = ../../Dynare/particles.git
|
||||
[submodule "matlab/modules/dseries"]
|
||||
path = matlab/modules/dseries
|
||||
path = matlab/dseries
|
||||
url = ../../Dynare/dseries.git
|
||||
branch = master
|
||||
[submodule "matlab/modules/reporting"]
|
||||
path = matlab/modules/reporting
|
||||
url = ../../Dynare/reporting.git
|
||||
[submodule "contrib/jsonlab"]
|
||||
path = contrib/jsonlab
|
||||
url = https://github.com/fangq/jsonlab.git
|
||||
[submodule "preprocessor"]
|
||||
path = preprocessor
|
||||
url = ../../Dynare/preprocessor.git
|
||||
|
|
|
@ -12,10 +12,8 @@ Please note that the repositories under the purview of this page are:
|
|||
|
||||
* [Dynare](https://git.dynare.org/Dynare/dynare)
|
||||
* [Preprocessor](https://git.dynare.org/Dynare/preprocessor)
|
||||
* [Particles](https://git.dynare.org/Dynare/particles)
|
||||
* [Dseries](https://git.dynare.org/Dynare/dseries)
|
||||
* [Reporting](https://git.dynare.org/Dynare/reporting)
|
||||
* [Testsuite](https://git.dynare.org/Dynare/testsuite)
|
||||
* [M-unit-tests](https://git.dynare.org/Dynare/m-unit-tests)
|
||||
|
||||
## Making your Intentions Known
|
||||
|
@ -94,9 +92,9 @@ The output from the latest run of the test suite can be found in the `test_matla
|
|||
|
||||
It’s useful to contribute `.mod` files that test some aspect of Dynare that is not currently tested. A `.mod` file that runs into a bug is perfect. As the test suite currently takes several hours to run, we prefer you modify a current test to also create the bug you’ve found. If you can’t do that, please add a new test that runs as quickly as possible. It will contain only those commands necessary to create the bug, nothing more. To contribute a test, after having made an issue and cloned and forked the repository as described above, do the following:
|
||||
|
||||
1. Modify the `MODFILES` variable in `tests/Makefile.am` with a line containing your test file name
|
||||
1. If any ancillary files are needed to run your test, please include them in the `EXTRA_DIST` variable in `tests/Makefile.am`
|
||||
1. Add and commit your test file and `tests/Makefile.am` as described above
|
||||
1. Modify the `mod_and_m_tests` variable in `meson.build` with a entry containing your test file name
|
||||
1. If any ancillary files are needed to run your test, please include them in the `'extra'` field
|
||||
1. Add and commit your test file and `meson.build` as described above
|
||||
1. Push and create a pull request as described above
|
||||
|
||||
### Unit tests
|
||||
|
|
67
Makefile.am
67
Makefile.am
|
@ -1,67 +0,0 @@
|
|||
SUBDIRS = preprocessor doc tests mex/sources
|
||||
|
||||
if ENABLE_MATLAB
|
||||
SUBDIRS += mex/build/matlab
|
||||
endif
|
||||
if ENABLE_OCTAVE
|
||||
SUBDIRS += mex/build/octave
|
||||
endif
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = \
|
||||
matlab \
|
||||
contrib \
|
||||
NEWS.md \
|
||||
license.txt \
|
||||
README.md \
|
||||
COPYING \
|
||||
CONTRIBUTING.md \
|
||||
windows \
|
||||
macOS \
|
||||
examples \
|
||||
scripts \
|
||||
.dir-locals.el
|
||||
|
||||
all-local:
|
||||
# Create top-level preprocessor symlink needed by matlab/dynare.m (when Dynare is run
|
||||
# from the locally-built copy)
|
||||
$(LN_S) -f $(abs_builddir)/preprocessor/src/dynare-preprocessor$(EXEEXT) $(abs_builddir)/preprocessor/dynare-preprocessor$(EXEEXT)
|
||||
# Create backward-compatibility symlink for old location of preprocessor
|
||||
$(MKDIR_P) matlab/preprocessor64/
|
||||
$(LN_S) -f $(abs_builddir)/preprocessor/src/dynare-preprocessor$(EXEEXT) $(abs_srcdir)/matlab/preprocessor64/dynare_m$(EXEEXT)
|
||||
|
||||
clean-local:
|
||||
rm -f preprocessor/dynare-preprocessor$(EXEEXT)
|
||||
rm -rf matlab/preprocessor64/
|
||||
|
||||
dist-hook:
|
||||
rm -rf `find $(distdir)/matlab $(distdir)/examples -name *~`
|
||||
rm -f $(distdir)/matlab/dynare_version.m
|
||||
rm -rf $(distdir)/matlab/preprocessor64/
|
||||
$(MKDIR_P) $(distdir)/mex/matlab $(distdir)/mex/octave
|
||||
rm -rf `find $(distdir) -name '.git*'`
|
||||
|
||||
install-exec-local:
|
||||
$(MKDIR_P) $(DESTDIR)$(pkglibdir)/preprocessor
|
||||
# The following will break under Windows, but we don’t use the install rule there
|
||||
$(LN_S) -f $(bindir)/dynare-preprocessor$(EXEEXT) $(DESTDIR)$(pkglibdir)/preprocessor/dynare-preprocessor$(EXEEXT)
|
||||
$(MKDIR_P) $(DESTDIR)$(pkglibdir)/contrib/ms-sbvar/TZcode
|
||||
cp -r contrib/ms-sbvar/TZcode/MatlabFiles $(DESTDIR)$(pkglibdir)/contrib/ms-sbvar/TZcode
|
||||
$(MKDIR_P) $(DESTDIR)$(pkglibdir)/contrib/jsonlab
|
||||
cp -r contrib/jsonlab $(DESTDIR)$(pkglibdir)/contrib/jsonlab
|
||||
cp -r examples $(DESTDIR)$(pkglibdir)
|
||||
cp -r matlab $(DESTDIR)$(pkglibdir)
|
||||
find $(DESTDIR)$(pkglibdir) -name LICENSE.md -delete
|
||||
# Recreate backward-compatibility symlink
|
||||
rm -f $(DESTDIR)$(pkglibdir)/matlab/preprocessor64/dynare_m$(EXEEXT)
|
||||
$(LN_S) -f $(bindir)/dynare-preprocessor$(EXEEXT) $(DESTDIR)$(pkglibdir)/matlab/preprocessor64/dynare_m$(EXEEXT)
|
||||
# We don’t fail over doc install rules, since the user may deliberately not have compiled them
|
||||
# (e.g. with the “nodoc” option under Debian)
|
||||
$(MKDIR_P) $(DESTDIR)$(docdir)
|
||||
-cp doc/*.pdf doc/gsa/gsa.pdf doc/parallel/parallel.pdf doc/dseries-and-reporting/dseriesReporting.pdf preprocessor/doc/preprocessor/preprocessor.pdf preprocessor/doc/macroprocessor/macroprocessor.pdf doc/manual/build/latex/dynare-manual.pdf $(DESTDIR)$(docdir)
|
||||
-cp -r doc/manual/build/html $(DESTDIR)$(docdir)/dynare-manual.html
|
||||
|
||||
uninstall-local:
|
||||
rm -rf $(DESTDIR)$(pkglibdir)
|
||||
rm -rf $(DESTDIR)$(docdir)
|
461
NEWS.md
461
NEWS.md
|
@ -1,3 +1,464 @@
|
|||
Announcement for Dynare 6.0 (on 2024-02-02)
|
||||
===========================================
|
||||
|
||||
We are pleased to announce the release of Dynare 6.0.
|
||||
|
||||
This major release adds new features and fixes various bugs.
|
||||
|
||||
The Windows, macOS, MATLAB Online and source packages are already available for
|
||||
download at [the Dynare website](https://www.dynare.org/download/).
|
||||
|
||||
This release is compatible with MATLAB versions ranging from 9.5 (R2018b) to
|
||||
23.2 (R2023b), and with GNU Octave versions ranging from 7.1.0 to 8.4.0 (NB:
|
||||
the Windows package requires version 8.4.0 specifically).
|
||||
|
||||
Major user-visible changes
|
||||
--------------------------
|
||||
|
||||
- The Sequential Monte Carlo sampler as described by Herbst and Schorfheide
|
||||
(2014) is now available under value `hssmc` for option
|
||||
`posterior_sampling_method`.
|
||||
|
||||
- New routines for perfect foresight simulation with expectation errors. In
|
||||
such a scenario, agents make expectation errors in that the path they had
|
||||
anticipated in period 1 is not realized exactly. More precisely, in some
|
||||
simulation periods, they may receive new information that makes them revise
|
||||
their anticipation for the path of future shocks. Also, under this scenario,
|
||||
it is assumed that agents behave as under perfect foresight, *i.e.* they
|
||||
make their decisions as if there were no uncertainty and they knew exactly
|
||||
the path of future shocks; the new information that they may receive comes
|
||||
as a total surprise to them. Available under new
|
||||
`perfect_foresight_with_expectation_errors_setup` and
|
||||
`perfect_foresight_with_expectation_errors_solver` commands, and
|
||||
`shocks(learnt_in=…)`, `mshocks(learnt_in=…)` and `endval(learnt_in=…)`
|
||||
blocks.
|
||||
|
||||
- New routines for IRF matching with stochastic simulations:
|
||||
|
||||
- Both frequentist (as in Christiano, Eichenbaum, and Evans, 2005) and
|
||||
Bayesian (as in Christiano, Trabandt, and Walentin, 2010) IRF matching
|
||||
approaches are implemented. The core idea of IRF matching is to treat
|
||||
empirical impulse responses (*e.g.* given from an SVAR or local projection
|
||||
estimation) as data and select model parameters that align the model’s
|
||||
IRFs closely with their empirical counterparts.
|
||||
|
||||
- Available under option `mom_method = irf_matching` option to the
|
||||
`method_of_moments` command.
|
||||
|
||||
- New blocks `matched_irfs` and `matched_irfs_weights` for specifying the
|
||||
values and weights of the empirical impulse response functions.
|
||||
|
||||
- Pruning à la Andreasen et al. (2018) is now available at an arbitrary
|
||||
approximation order when performing stochastic simulations with
|
||||
`stoch_simul`, and at 3rd order when performing particle filtering.
|
||||
|
||||
- New `log` option to the `var` statement. In addition to the endogenous
|
||||
variable(s) thus declared, this option also triggers the creation of
|
||||
auxiliary variable(s) equal to the log of the corresponding endogenous
|
||||
variable(s). For example, given a `var(log) y;` statement, two endogenous
|
||||
will be created (`y` and `LOG_y`), and an auxiliary equation linking the two
|
||||
will also be added (equal to `y = exp(LOG_y);`). Moreover, every occurrence
|
||||
of `y` in the model will be replaced by `exp(LOG_y)`. This option is, for
|
||||
example, useful for performing a loglinear approximation of some variable(s)
|
||||
in the context of a first-order stochastic approximation; or for ensuring
|
||||
that the variable(s) stay(s) in the definition domain of the function
|
||||
defining the steady state or the dynamic residuals when the nonlinear solver
|
||||
is used.
|
||||
|
||||
- New model editing features
|
||||
|
||||
- Multiple `model` blocks are now supported (this was already working but
|
||||
not explicitly documented).
|
||||
|
||||
- Multiple `estimated_params` blocks now concatenate their contents (instead
|
||||
of overwriting previous ones, which was the former undocumented behavior);
|
||||
an `overwrite` option has been added to provide the old behavior.
|
||||
|
||||
- New `model_options` statement to set model options in a global fashion.
|
||||
|
||||
- New `model_remove` command to remove equations.
|
||||
|
||||
- New `model_replace` block to replace equations.
|
||||
|
||||
- New `var_remove` command to remove variables (or parameters).
|
||||
|
||||
- New `estimated_params_remove` block to remove estimated parameters.
|
||||
|
||||
- Stochastic simulations
|
||||
|
||||
- Performance improvements for simulation of the solution under perturbation
|
||||
and for particle filtering at higher order (⩾ 3).
|
||||
|
||||
- Performance improvement for the first order perturbation solution using
|
||||
either cycle reduction (`dr=cycle_reduction` option) or logarithmic
|
||||
reduction (`dr=logarithmic_reduction`).
|
||||
|
||||
- New `nomodelsummary` option to the `stoch_simul` command, to suppress the
|
||||
printing of the model summary and the covariance of the exogenous shocks.
|
||||
|
||||
- Estimation
|
||||
|
||||
- A truncated normal distribution can now be specified as a prior, using the
|
||||
3rd and 4th parameters of the `estimated_params` block as the bounds.
|
||||
|
||||
- New `conditional_likelihood` option to the `estimation` command. When the
|
||||
option is set, instead of using the Kalman filter to evaluate the
|
||||
likelihood, Dynare will evaluate the conditional likelihood based on the
|
||||
first-order reduced form of the model by assuming that the initial state
|
||||
vector is at its steady state.
|
||||
|
||||
- New `additional_optimizer_steps` option to the `estimation` command to
|
||||
trigger the sequential execution of several optimizers when looking for
|
||||
the posterior mode.
|
||||
|
||||
- The `generate_trace_plots` command now allows comparing multiple chains.
|
||||
|
||||
- The Geweke and Raftery-Lewis convergence diagnostics will now also be
|
||||
displayed when `mh_nblocks>1`.
|
||||
|
||||
- New `robust`, `TolGstep`, and `TolGstepRel` options to the optimizer
|
||||
available under `mode_compute=5` (“newrat”).
|
||||
|
||||
- New `brooks_gelman_plotrows` option to the `estimation` command for
|
||||
controlling the number of parameters to depict along the rows of the
|
||||
figures depicting the Brooks and Gelman (1998) convergence diagnostics.
|
||||
|
||||
- New `mh_init_scale_factor` option to the `estimation` command tor govern
|
||||
the overdispersion of the starting draws when initializing several Monte
|
||||
Carlo Markov Chains. This option supersedes the `mh_init_scale` option,
|
||||
which is now deprecated.
|
||||
|
||||
- Steady state computation
|
||||
|
||||
- Steady state computation now accounts for occasionally-binding constraints
|
||||
of mixed-complementarity problems (as defined by `mcp` tags).
|
||||
|
||||
- New `tolx` option to the `steady` command for governing the termination
|
||||
based on the step tolerance.
|
||||
|
||||
- New `fsolve_options` option to the `steady` command for passing options to
|
||||
`fsolve` (in conjunction with the `solve_algo=0` option).
|
||||
|
||||
- New option `from_initval_to_endval` option to the `homotopy_setup` block,
|
||||
for easily computing homotopy from initial to terminal steady state (when
|
||||
the former is already computed).
|
||||
|
||||
- New `non_zero` option to `resid` command to restrict display to non-zero
|
||||
residuals.
|
||||
|
||||
- Perfect foresight
|
||||
|
||||
- Significant performance improvement of the `stack_solve_algo=1` option to
|
||||
the `perfect_foresight_solver` command (Laffargue-Boucekkine-Juillard
|
||||
algorithm) when used in conjunction with options `block` and/or `bytecode`
|
||||
of the `model` block.
|
||||
|
||||
- New `relative_to_initval` option to the `mshocks` block, to use the
|
||||
initial steady state as a basis for the multiplication when there is an
|
||||
`endval` block.
|
||||
|
||||
- New `static_mfs` option to the `model` block (and to the `model_options`
|
||||
command), for controlling the minimum feedback set computation for the
|
||||
static model. It defaults to `0` (corresponding to the behavior in Dynare
|
||||
version 5).
|
||||
|
||||
- Various improvements to homotopy
|
||||
|
||||
- New `endval_steady` option to the `perfect_foresight_setup` command for
|
||||
computing the terminal steady state at the same time as the transitory
|
||||
dynamics (and new options `steady_solve_algo`, `steady_tolf`,
|
||||
`steady_tolx`, `steady_maxit` and `steady_markowitz` for controlling the
|
||||
steady state nonlinear solver).
|
||||
|
||||
- New `homotopy_linearization_fallback` and
|
||||
`homotopy_marginal_linearization_fallback` options to the
|
||||
`perfect_foresight_solver` command to get an approximate solution when
|
||||
homotopy fails to go to 100%.
|
||||
|
||||
- New `homotopy_initial_step_size`, `homotopy_min_step_size`,
|
||||
`homotopy_step_size_increase_success_count` and
|
||||
`homotopy_max_completion_share` options to the
|
||||
`perfect_foresight_solver` command to fine tune the homotopy behavior.
|
||||
|
||||
- Purely backward, forward and static models are now supported by the
|
||||
homotopy procedure.
|
||||
|
||||
- The `stack_solve_algo=1` and `stack_solve_algo=6` options of the
|
||||
`perfect_foresight_solver` command were merged and are now synonymous.
|
||||
They both provide the Laffargue-Boucekkine-Juillard algorithm and work
|
||||
with and without the `block` and `bytecode` options of the `model` block.
|
||||
Using `stack_solve_algo=1` is now recommended, but `stack_solve_algo=6` is
|
||||
kept for backward compatibility.
|
||||
|
||||
- OccBin
|
||||
|
||||
- New `simul_reset_check_ahead_periods` option to the `occbin_setup` and
|
||||
`occbin_solver` commands, for resetting `check_ahead_periods` in each
|
||||
simulation period.
|
||||
|
||||
- new `simul_max_check_ahead_periods`, `likelihood_max_check_ahead_periods`,
|
||||
and `smoother_max_check_ahead_periods` options to the `occbin_setup`
|
||||
command, for truncating the number of periods for which agents check ahead
|
||||
which regime is present.
|
||||
|
||||
- Optimal policy
|
||||
|
||||
- The `osr` command now accepts the `analytic_derivation` and
|
||||
`analytic_derivation_mode` options.
|
||||
|
||||
- The `evaluate_planner_objective` command now computes the unconditional
|
||||
welfare for higher-order approximations (⩾ 3).
|
||||
|
||||
- New `periods` and `drop` options to the `evaluate_planner_objective`
|
||||
command.
|
||||
|
||||
- Semi-structural models
|
||||
|
||||
- New `pac_target_info` block for decomposing the PAC target into an
|
||||
arbitrary number of components. Furthermore, in the presence of such a
|
||||
block, the new `pac_target_nonstationary` operator can be used to select
|
||||
the non stationary part of the target (typically useful in the error
|
||||
correction term of the PAC equation).
|
||||
|
||||
- New `kind` option to the `pac_model` command. This option allows the user
|
||||
to select the formula used to compute the weights on the VAR companion
|
||||
matrix variables that are used to form PAC expectations.
|
||||
|
||||
- Performance improvement to `solve_algo=12` and `solve_algo=14`, which
|
||||
significantly accelerates the simulation of purely backward, forward and
|
||||
static models with the `perfect_foresight_solver` command and the routines
|
||||
for semi-structural models.
|
||||
|
||||
- dseries classes
|
||||
|
||||
- The `remove` and `remove_` methods now accept a list of variables (they
|
||||
would previously only accept a single variable).
|
||||
|
||||
- New MATLAB/Octave command `dplot` to plot mathematical expressions
|
||||
generated from variables fetched from (different) dseries objects.
|
||||
|
||||
- Misc
|
||||
|
||||
- New `display_parameter_values` command to print the parameter values in
|
||||
the command window.
|
||||
|
||||
- New `collapse_figures_in_tabgroup` command to dock all figures.
|
||||
|
||||
- Performance improvement for the `use_dll` option of the `model` block. The
|
||||
preprocessor now takes advantage of parallelization when compiling the MEX
|
||||
files.
|
||||
|
||||
- New mathematical primitives available: complementary error function
|
||||
(`erfc`), hyperbolic functions (`cosh`, `sinh`, `tanh`, `acosh`, `asinh`,
|
||||
`atanh`).
|
||||
|
||||
- New `last_simulation_period` option to the `initval_file` command.
|
||||
|
||||
- The `calib_smoother` command now accepts the `nobs` and
|
||||
`heteroskedastic_filter` options.
|
||||
|
||||
- Under the MATLAB Desktop, autocompletion is now available for the `dynare`
|
||||
command and other CLI commands (thanks to Eduard Benet Cerda from
|
||||
MathWorks).
|
||||
|
||||
- Model debugging: The preprocessor now creates files for evaluating the
|
||||
left- and right-hand sides of model equations separately. For a model file
|
||||
called `ramst.mod`, you can call
|
||||
`[lhs,rhs]=ramst.debug.static_resid(y,x,params);` (for the static model)
|
||||
and `[lhs,rhs]=ramst.debug.dynamic_resid(y,x,params,steady_state);` (for
|
||||
the dynamic model), where `y` are the endogenous, `x` the exogenous,
|
||||
`params` the parameters, and `steady_state` is self-explanatory. NB: In
|
||||
the dynamic case, the vector `y` of endogenous must have 3n elements
|
||||
where n is the number of endogenous (including auxiliary ones); the
|
||||
first n elements correspond to the lagged values, the middle n
|
||||
elements to the contemporaneous values, and the last n elements to the
|
||||
lead values.
|
||||
|
||||
- New interactive MATLAB/Octave command `search` for listing the equations
|
||||
in which given variable(s) appear (requires `json` command line option).
|
||||
|
||||
- The `model_info` command allows to print the block decomposition even if
|
||||
the `block` option of the `model` block has not been used, by specifying
|
||||
the new options `block_static` and `block_dynamic`.
|
||||
|
||||
- There is now a default value for the global initialization file
|
||||
(`GlobalInitFile` option of the configuration file): the `global_init.m`
|
||||
in the Dynare configuration directory (typically
|
||||
`$HOME/.config/dynare/global_init.m` under Linux and macOS, and
|
||||
`c:\Users\USERNAME\AppData\Roaming\dynare\global_init.m` under Windows).
|
||||
|
||||
- For those compiling Dynare from source, the build system has been entirely
|
||||
rewritten and now uses Meson; as a consequence, it is now faster and
|
||||
easier to understand.
|
||||
|
||||
- References:
|
||||
|
||||
- Andreasen, Martin M., Jesús Fernández-Villaverde, and Juan Rubio-Ramírez
|
||||
(2018): “The Pruned State-Space System for Non-Linear DSGE Models: Theory
|
||||
and Empirical Applications,” *Review of Economic Studies*, 85(1), 1-49.
|
||||
- Brooks, Stephen P., and Andrew Gelman (1998): “General methods for
|
||||
monitoring convergence of iterative simulations,” *Journal of Computational
|
||||
and Graphical Statistics*, 7, pp. 434–455.
|
||||
- Christiano, Eichenbaum and Charles L. Evans (2005): “Nominal Rigidities and
|
||||
the Dynamic Effects of a Shock to Monetary Policy,” *Journal of Political
|
||||
Economy*, 113(1), 1–45.
|
||||
- Christiano, Lawrence J., Mathias Trabandt, and Karl Walentin (2010): “DSGE
|
||||
Models for Monetary Policy Analysis,” In: *Handbook of Monetary Economics
|
||||
3*, 285–367.
|
||||
- Herbst, Edward and Schorfheide, Frank (2014): "Sequential Monte Carlo
|
||||
Sampling for DSGE Models," *Journal of Applied Econometrics*, 29,
|
||||
1073-1098.
|
||||
|
||||
Incompatible changes
|
||||
--------------------
|
||||
|
||||
- The default value of the `mode_compute` option of the `estimation` command
|
||||
has been changed to `5` (it was previously `4`).
|
||||
|
||||
- When using block decomposition (with the `block` option of the `model`
|
||||
block), the option `mfs` now defaults to `1`. This setting should deliver
|
||||
better performance in perfect foresight simulation on most models.
|
||||
|
||||
- The default location for the configuration file has changed. On Linux and
|
||||
macOS, the configuration file is now searched by default under
|
||||
`dynare/dynare.ini` in the configuration directories defined by the XDG
|
||||
specification (typically `$HOME/.config/dynare/dynare.ini` for the
|
||||
user-specific configuration and `/etc/xdg/dynare/dynare.ini` for the
|
||||
system-wide configuration, the former having precedence over the latter).
|
||||
Under Windows, the configuration file is now searched by default in
|
||||
`%APPDATA%\dynare\dynare.ini` (typically
|
||||
`c:\Users\USERNAME\AppData\Roaming\dynare\dynare.ini`).
|
||||
|
||||
- The information stored in `oo_.endo_simul, oo_.exo_simul`, and `oo_.irfs` is
|
||||
no longer duplicated in the base workspace. New helper functions
|
||||
`send_endogenous_variables_to_workspace`,
|
||||
`send_exogenous_variables_to_workspace`, and `send_irfs_to_workspace` have
|
||||
been introduced to explicitly request these outputs and to mimic the old
|
||||
behavior.
|
||||
|
||||
- The `dynare_sensitivity` command has been renamed `sensitivity`. The old
|
||||
name is still accepted but triggers a warning.
|
||||
|
||||
- The syntax `resid(1)` is no longer supported.
|
||||
|
||||
- The `mode_compute=6` option to the `estimation` command now recursively
|
||||
updates the covariance matrix across the `NumberOfMh` Metropolis-Hastings
|
||||
runs, starting with the `InitialCovarianceMatrix` in the first run, instead
|
||||
of computing it from scratch in every Metropolis-Hastings run.
|
||||
|
||||
- The `periods` command has been removed.
|
||||
|
||||
- The `Sigma_e` command has been removed.
|
||||
|
||||
- The `block` option of the `model` block no longer has an effect when used in
|
||||
conjunction with `stoch_simul` or `estimation` commands.
|
||||
|
||||
- The Dynare++ executable is no longer distributed since almost all of its
|
||||
functionalities have been integrated inside Dynare for MATLAB/Octave.
|
||||
|
||||
- A macro-processor variable defined without a value (such as `@#define var`
|
||||
in the `.mod` file or alternatively `-Dvar` on the `dynare` command line) is
|
||||
now assigned the `true` logical value (it was previously assigned `1`).
|
||||
|
||||
- The `parallel_slave_open_mode` option of the `dynare` command has been
|
||||
renamed `parallel_follower_open_mode`.
|
||||
|
||||
- The `static` option of the `model_info` command is now deprecated and is
|
||||
replaced by the `block_static` option.
|
||||
|
||||
Bugs that were present in 5.5 and that have been fixed in 6.0
|
||||
-------------------------------------------------------------
|
||||
|
||||
* The `mh_initialize_from_previous_mcmc` option of the `estimation` command
|
||||
would not work if estimation was conducted with a different prior and the
|
||||
last draw in the previous MCMC fell outside the new prior bounds
|
||||
* When specifying a generalized inverse Gamma prior, the hyperparameter
|
||||
computation would erroneously ignore the resulting mean shift
|
||||
* When using the `mh_recover` option of the `estimation` command, the status
|
||||
bar always started at zero instead of showing the overall progress of the
|
||||
recovered chain
|
||||
* The `model_diagnostics` command would fail to check the correctness of
|
||||
user-defined steady state files
|
||||
* GSA: LaTeX output was not working as expected
|
||||
* Forecasts and filtered variables could not be retrieved with the
|
||||
`heteroskedastic_shocks` block
|
||||
* The OccBin smoother would potentially not display all smoothed shocks with
|
||||
`heteroskedastic_filter` option
|
||||
* The OccBin smoother would crash if the number of requested periods was
|
||||
smaller than the data length
|
||||
* The multivariate OccBin smoother would return wrong results if the constraint
|
||||
was binding in the first period
|
||||
* The `plot_shock_decomposition` command would fail with the `init2shocks`
|
||||
block if the `initial_condition_decomposition` was not run before
|
||||
* LaTeX output under Windows failed to compile for `plot_priors=1` option of
|
||||
the `estimation` command and Brooks and Gelman (1998) convergence diagnostics
|
||||
* The plot produced by the `shock_decomposition` command was too big, making
|
||||
the close button inaccessible
|
||||
* Monthly dates for October, November and December (*i.e.* with a 2-digit month
|
||||
number) were not properly interpreted by the preprocessor
|
||||
* Theoretical moments computed by `stoch_simul` at `order=2` with `pruning`
|
||||
would not contain unconditional and conditional variance decomposition
|
||||
|
||||
|
||||
Announcement for Dynare 5.5 (on 2023-10-23)
|
||||
===========================================
|
||||
|
||||
We are pleased to announce the release of Dynare 5.5.
|
||||
|
||||
This maintenance release fixes various bugs.
|
||||
|
||||
The Windows, macOS and source packages are already available for download at
|
||||
[the Dynare website](https://www.dynare.org/download/).
|
||||
|
||||
All users are strongly encouraged to upgrade.
|
||||
|
||||
This release is compatible with MATLAB versions ranging from 8.3 (R2014a) to
|
||||
23.2 (R2023b), and with GNU Octave version 8.3.0 (under Windows).
|
||||
|
||||
Note for macOS users with an Apple Silicon processor: this is the first Dynare
|
||||
release that comes with native Apple Silicon (arm64) support under MATLAB.
|
||||
Please download the corresponding package, to be used with MATLAB R2023b for
|
||||
Apple Silicon.
|
||||
|
||||
Here is a list of the problems identified in version 5.4 and that have been
|
||||
fixed in version 5.5:
|
||||
|
||||
* In a stochastic context, results could be incorrect if an endogenous with a
|
||||
lead ⩾ 2 or an exogenous with a lead ⩾ 1 appeared in the argument(s) of a
|
||||
call to a (nonlinear) external function
|
||||
* With the `use_dll` option of the `model` block, the expression `sign(x)`
|
||||
would evaluate to ±1 instead of 0 if `x=0`
|
||||
* If the guess value given to the `steady` command was such that the residuals
|
||||
were all below tolerance, except some that are `NaN`, then this guess value
|
||||
was incorrectly accepted as the solution to the steady state problem
|
||||
* The `method_of_moments` command with GMM was ignoring the
|
||||
`analytic_standard_errors` option when using `mode_compute=4`
|
||||
* Homotopy with the `extended_path` command at `order=0` was broken
|
||||
* The `parallel_use_psexec` command-line option was ignored
|
||||
* With the `bytecode` option of the `model` block, using the operators `abs()`,
|
||||
`cbrt()` and `sign()` would lead to a crash
|
||||
* The `fast` command-line option was broken under MATLAB with Windows
|
||||
* Ramsey steady state computation could fail if an `expectation` or `diff`
|
||||
operator was present in the model
|
||||
* A crash could occur if some external function call was present in an
|
||||
auxiliary variable
|
||||
* The `endogenous_prior` option of the `estimation` command could erroneously
|
||||
display a warning message about missing observations
|
||||
* The `model_comparison` command would crash if the `.mod` file name had less
|
||||
than four characters
|
||||
* The `shock_decomposition` command would overwrite previously stored smoother
|
||||
results
|
||||
* The `x13` interface in dseries did not handle missing values, particularly at
|
||||
the beginning of a series
|
||||
* The `x13` interface in dseries would occasionally crash under Windows with
|
||||
segmentation violations
|
||||
* OccBin: estimation would crash if a previous `shocks(surprise)` simulation
|
||||
was conducted
|
||||
* The `internals` command would not find the location of the `_results.mat`
|
||||
file
|
||||
* The `prior optimize` command would not work with `mode_compute=5`
|
||||
|
||||
|
||||
Announcement for Dynare 5.4 (on 2023-03-22)
|
||||
===========================================
|
||||
|
||||
|
|
284
README.md
284
README.md
|
@ -33,8 +33,6 @@ This source can be retrieved in three forms:
|
|||
- using the stable source archive of the latest Dynare version from <https://www.dynare.org/download/>
|
||||
- using a source snapshot of the unstable version, also from <https://www.dynare.org/download/>
|
||||
|
||||
Note that if you obtain the source code via git, you will need to install more tools (see below).
|
||||
|
||||
The first section of this page gives general instructions, which apply to all platforms. Then some specific platforms are discussed.
|
||||
|
||||
**Note:** Here, when we refer to 32-bit or 64-bit, we refer to the type of
|
||||
|
@ -58,6 +56,7 @@ a 32-bit Octave.
|
|||
1. [**Fedora, CentOS or RHEL**](#fedora-centos-or-rhel)
|
||||
1. [**Windows**](#windows)
|
||||
1. [**macOS**](#macos)
|
||||
1. [**Docker**](#docker)
|
||||
|
||||
## General Instructions
|
||||
|
||||
|
@ -65,28 +64,27 @@ a 32-bit Octave.
|
|||
|
||||
A number of tools and libraries are needed in order to recompile everything. You don't necessarily need to install everything, depending on what you want to compile.
|
||||
|
||||
- A POSIX compliant shell and an implementation of Make (mandatory)
|
||||
- The [GNU Compiler Collection](https://gcc.gnu.org/), version 10 or later, with
|
||||
gcc, g++ and gfortran (mandatory)
|
||||
gcc, g++ and gfortran
|
||||
- [MATLAB](https://mathworks.com) (if you want to compile the MEX for MATLAB)
|
||||
- [GNU Octave](https://www.octave.org) with
|
||||
- the development headers (if you want to compile the MEX for Octave)
|
||||
- the development libraries corresponding to the [UMFPACK](https://people.engr.tamu.edu/davis/suitesparse.html) packaged with Octave
|
||||
- Optionally, the [Control](https://octave.sourceforge.io/control/), [IO](https://octave.sourceforge.io/io/), [Optimization](https://octave.sourceforge.io/optim/) and [Statistics](https://octave.sourceforge.io/statistics/) package either installed via your package manager or through [Octave Forge](https://octave.sourceforge.io/).
|
||||
- the development libraries corresponding to the [UMFPACK](https://people.engr.tamu.edu/davis/suitesparse.html) packaged with Octave (if you want to compile the MEX for Octave)
|
||||
- the [statistics](https://octave.sourceforge.io/statistics/) package and, optionally, the [control](https://octave.sourceforge.io/control/), [io](https://octave.sourceforge.io/io/) and [optimization](https://octave.sourceforge.io/optim/) packages, either installed via your package manager or through [Octave Forge](https://octave.sourceforge.io/)
|
||||
- [Meson](https://mesonbuild.com), version 0.64.0 or later
|
||||
- [Pkgconf](http://pkgconf.org/), or another pkg-config implementation
|
||||
- [Bash](https://www.gnu.org/software/bash/)
|
||||
- [Boost libraries](https://www.boost.org), version 1.36 or later
|
||||
- [Bison](https://www.gnu.org/software/bison/), version 3.2 or later (only if you get the source through Git)
|
||||
- [Flex](https://github.com/westes/flex), version 2.5.4 or later (only if you get the source through Git)
|
||||
- [Autoconf](https://www.gnu.org/software/autoconf/), version 2.62 or later (only if you get the source through Git)
|
||||
- [Automake](https://www.gnu.org/software/automake/), version 1.11.2 or later (only if you get the source through Git)
|
||||
- [MAT File I/O library](https://sourceforge.net/projects/matio/), version 1.5 or later (if you want to compile Markov-Switching SBVAR code)
|
||||
- [SLICOT](http://www.slicot.org) (if you want to compile the Kalman steady state DLL)
|
||||
- [GSL library](https://www.gnu.org/software/gsl/) (if you want to compile Markov-Switching SBVAR code)
|
||||
- [Bison](https://www.gnu.org/software/bison/), version 3.2 or later
|
||||
- [Flex](https://github.com/westes/flex), version 2.5.4 or later
|
||||
- [MAT File I/O library](https://sourceforge.net/projects/matio/), version 1.5 or later (only when compiling for Octave)
|
||||
- [SLICOT](http://www.slicot.org)
|
||||
- [GSL library](https://www.gnu.org/software/gsl/)
|
||||
- A decent LaTeX distribution (if you want to compile PDF documentation),
|
||||
ideally with Beamer
|
||||
- For building the reference manual:
|
||||
- [Sphinx](https://www.sphinx-doc.org/)
|
||||
- [MathJax](https://www.mathjax.org/)
|
||||
- [Doxygen](https://www.doxygen.nl) (if you want to build Dynare preprocessor source documentation)
|
||||
- [X-13ARIMA-SEATS Seasonal Adjustment Program](https://www.census.gov/data/software/x13as.html)
|
||||
|
||||
### Preparing the sources
|
||||
|
@ -98,99 +96,69 @@ have the [Git LFS](https://git-lfs.github.com/) extension installed):
|
|||
```sh
|
||||
git clone --recurse-submodules https://git.dynare.org/Dynare/dynare.git
|
||||
cd dynare
|
||||
autoreconf -si
|
||||
```
|
||||
The last line runs Autoconf and Automake in order to prepare the build environment (this is not necessary if you got the sources from an official source archive or the source snapshot). If you want a certain version (e.g. 5.x) , then add `--single-branch --branch 5.x` to the git clone command.
|
||||
If you want a certain version (e.g. 5.x) , then add `--single-branch --branch 5.x` to the git clone command.
|
||||
|
||||
### Configuring the build tree
|
||||
### Configuring the build directory
|
||||
|
||||
Simply launch the configure script from a terminal:
|
||||
If you want to compile for MATLAB, please run the following (after adapting the path to MATLAB):
|
||||
```sh
|
||||
./configure --with-matlab=<…>
|
||||
meson setup -Dmatlab_path=/usr/local/MATLAB/R2023b -Dbuildtype=debugoptimized build-matlab
|
||||
```
|
||||
where the path to MATLAB is specified.
|
||||
The build directory will thus be `build-matlab`.
|
||||
|
||||
Some important options:
|
||||
|
||||
- `--disable-matlab`: skip the compilation of MEX files for MATLAB
|
||||
- `--disable-octave`: skip the compilation of MEX files for Octave
|
||||
- `--disable-doc`: skip the compilation of the documentation (PDF and HTML)
|
||||
|
||||
You may need to specify additional options to the configure script, see the output of the `--help` option, and also the platform specific instructions below. If the configuration goes well, the script will tell you which components are correctly configured and will be built.
|
||||
|
||||
Note that it is possible that some MEX files cannot be compiled, due to missing
|
||||
build dependencies. If you find no way of installing the missing dependencies,
|
||||
a workaround can be to give up on compiling these MEX files and rather use
|
||||
slower implementations (in the MATLAB/Octave language) that are available under
|
||||
the `matlab/missing/mex/` subdirectories. For example, if you fail to compile
|
||||
the gensylv MEX, you can type the following at the MATLAB/Octave prompt before
|
||||
running Dynare:
|
||||
```matlab
|
||||
addpath <DYNARE_ROOT>/matlab/missing/mex/gensylv
|
||||
Or for Octave:
|
||||
```sh
|
||||
meson setup -Dbuild_for=octave -Dbuildtype=debugoptimized build-octave
|
||||
```
|
||||
(where you need to replace `<DYNARE_ROOT>` with the full path to your Dynare copy).
|
||||
The build directory will thus be `build-octave`.
|
||||
|
||||
Note that if you do not chose `build-matlab` (under MATLAB) or `build-octave`
|
||||
(under Octave) as the build directory, you will need to set the environment
|
||||
variable `DYNARE_BUILD_DIR` to the full path of your build tree, before running
|
||||
MATLAB or Octave, if you want Dynare to be able to find the preprocessor and
|
||||
the MEX files.
|
||||
|
||||
It is possible to specify various Meson options, see the Meson documentation
|
||||
for more details. Modifying options of an existing build directory can be
|
||||
done using the `meson configure` command.
|
||||
|
||||
### Building
|
||||
|
||||
Binaries are built with:
|
||||
For compiling the preprocessor and the MEX files:
|
||||
```sh
|
||||
make
|
||||
meson compile -C <builddir>
|
||||
```
|
||||
PDF and HTML documentation are respectively built with:
|
||||
where `<builddir>` is the build directory, typically either `build-matlab` or `build-octave`.
|
||||
|
||||
PDF and HTML documentation can be built with:
|
||||
```sh
|
||||
make pdf
|
||||
make html
|
||||
meson compile -C <builddir> doc
|
||||
```
|
||||
|
||||
### Check
|
||||
|
||||
The Git source comes with unit tests (in the MATLAB functions) and integration tests (under the `tests` subfolder). All the tests can be run with:
|
||||
Dynare comes with unit tests (in the MATLAB functions) and integration tests (under the `tests` subfolder). All the tests can be run with:
|
||||
```sh
|
||||
make check
|
||||
```
|
||||
in the `tests` subfolder. If Dynare has been compiled against MATLAB and Octave, the tests will be run with both MATLAB and Octave. Depending on the performance of your machine, this can take several hours. It is possible to run the tests only with MATLAB:
|
||||
```sh
|
||||
make check-matlab
|
||||
```
|
||||
or only with Octave:
|
||||
```sh
|
||||
make check-octave
|
||||
meson test -C <builddir>
|
||||
```
|
||||
|
||||
Depending on the performance of your machine, this can take several hours.
|
||||
|
||||
Note that running the testsuite with Octave requires the additional packages `pstoedit`, `epstool`, `xfig`, and `gnuplot`.
|
||||
|
||||
A summary of the results is available in `tests/run_test_matlab_output.txt` or `tests/run_test_octave_output.txt`. Often, it does not make sense to run the complete testsuite. For instance, if you modify codes only related to the perfect foresight model solver, you can decide to run only a subset of the integration tests, with:
|
||||
Often, it does not make sense to run the complete testsuite. For instance, if you modify codes only related to the perfect foresight model solver, you can decide to run only a subset of the integration tests, with:
|
||||
```sh
|
||||
make deterministic_simulations
|
||||
meson test -C <builddir> --suite deterministic_simulations
|
||||
```
|
||||
This will run all the integration tests in `tests/deterministic_simulations` with MATLAB and Octave. Again, it is possible to do this only with MATLAB:
|
||||
This will run all the integration tests in `tests/deterministic_simulations`.
|
||||
This syntax also works with a nested directory (e.g. `--suite deterministic_simulations/purely_forward`).
|
||||
|
||||
Finally if you want to run a single integration test, e.g. `deterministic_simulations/lbj/rbc.mod`:
|
||||
```sh
|
||||
make m/deterministic_simulations
|
||||
meson test -C <builddir> deterministic_simulations/lbj/rbc.mod
|
||||
```
|
||||
or with Octave:
|
||||
```sh
|
||||
make o/deterministic_simulations
|
||||
```
|
||||
Finally if you want to run a single integration test, e.g. `deterministic_simulations/lbj/rbc.mod` with MATLAB:
|
||||
```sh
|
||||
make deterministic_simulations/lbj/rbc.m.trs
|
||||
```
|
||||
or with Octave:
|
||||
```sh
|
||||
make deterministic_simulations/lbj/rbc.o.trs
|
||||
```
|
||||
The result of the test (`PASSED` or `FAILED`) will be printed in the terminal, the produced log can be displayed with:
|
||||
```sh
|
||||
make deterministic_simulations/lbj/rbc.m.drs
|
||||
```
|
||||
or
|
||||
```sh
|
||||
make deterministic_simulations/lbj/rbc.o.drs
|
||||
```
|
||||
Note that only tests will be executed where the `m.trs/o.trs` does not yet exist. You can run
|
||||
```sh
|
||||
make clean
|
||||
```
|
||||
in the `tests` folder to delete files that were created by the run of the testsuite. You can also manually delete the desired `m.trs/o.trs` file(s).
|
||||
NB: Some individual tests cannot be run using that syntax, if they are a dependency in a chain of tests (see the `mod_and_m_tests` variable `meson.build`); in that case, you should use the name of the last `.mod` file in the chain as the test name to be passed to `meson test`.
|
||||
|
||||
## Debian or Ubuntu
|
||||
|
||||
|
@ -199,7 +167,6 @@ All the prerequisites are packaged:
|
|||
- `gcc`
|
||||
- `g++`
|
||||
- `gfortran`
|
||||
- `make`
|
||||
- `octave-dev` (or `liboctave-dev` on older Debian/Ubuntu releases)
|
||||
- `libboost-graph-dev`
|
||||
- `libgsl-dev`
|
||||
|
@ -208,39 +175,31 @@ All the prerequisites are packaged:
|
|||
- `libsuitesparse-dev`
|
||||
- `flex` and `libfl-dev`
|
||||
- `bison`
|
||||
- `autoconf`
|
||||
- `automake`
|
||||
- `meson`
|
||||
- `pkgconf`
|
||||
- `texlive`
|
||||
- `texlive-publishers` (for Econometrica bibliographic style)
|
||||
- `texlive-latex-extra` (for fullpage.sty)
|
||||
- `texlive-fonts-extra` (for ccicons)
|
||||
- `texlive-science` (for amstex)
|
||||
- `texlive-plain-generic`
|
||||
- `lmodern` (for macroprocessor PDF)
|
||||
- `python3-sphinx`
|
||||
- `tex-gyre`
|
||||
- `latexmk`
|
||||
- `libjs-mathjax`
|
||||
- `doxygen`
|
||||
- `x13as`
|
||||
|
||||
You can install them all at once with:
|
||||
```sh
|
||||
apt install gcc g++ gfortran make octave-dev libboost-graph-dev libgsl-dev libmatio-dev libslicot-dev libslicot-pic libsuitesparse-dev flex libfl-dev bison autoconf automake texlive texlive-publishers texlive-latex-extra texlive-fonts-extra texlive-science texlive-plain-generic lmodern python3-sphinx tex-gyre latexmk libjs-mathjax doxygen x13as
|
||||
apt install gcc g++ gfortran octave-dev libboost-graph-dev libgsl-dev libmatio-dev libslicot-dev libslicot-pic libsuitesparse-dev flex libfl-dev bison meson pkgconf texlive texlive-publishers texlive-latex-extra texlive-fonts-extra texlive-science lmodern python3-sphinx make tex-gyre latexmk libjs-mathjax x13as
|
||||
```
|
||||
If you use MATLAB, we strongly advise to also `apt install matlab-support` and confirm to rename the GCC libraries shipped with MATLAB to avoid possible conflicts with GCC libraries shipped by your distribution.
|
||||
|
||||
Tested on
|
||||
- Debian “Buster” 10
|
||||
- Debian “Bullseye” 11
|
||||
- Ubuntu 20.04
|
||||
- Ubuntu 20.10
|
||||
|
||||
## Fedora, CentOS or RHEL
|
||||
|
||||
Almost all prerequisites are packaged:
|
||||
|
||||
- `gcc`, `gcc-c++`, `make`
|
||||
- `gcc`, `gcc-c++`
|
||||
- `gcc-gfortran`
|
||||
- `boost-devel`
|
||||
- `gsl-devel`
|
||||
|
@ -248,24 +207,23 @@ Almost all prerequisites are packaged:
|
|||
- `suitesparse-devel`
|
||||
- `flex`
|
||||
- `bison`
|
||||
- `autoconf`
|
||||
- `automake`
|
||||
- `meson`
|
||||
- `redhat-rpm-config`
|
||||
- `octave`, `octave-devel`, `octave-statistics`, `octave-io`, `octave-optim`, `octave-control`
|
||||
- `texlive-scheme-minimal`, `texlive-collection-publishers`, `texlive-collection-latexextra`, `texlive-collection-fontsextra`, `texlive-collection-latexrecommended`, `texlive-collection-science`, `texlive-collection-plaingeneric`, `texlive-lm`
|
||||
- `python3-sphinx`
|
||||
- `latexmk`
|
||||
- `mathjax`
|
||||
- `doxygen`
|
||||
- `make` (for building Slicot)
|
||||
|
||||
You can install them all at once with:
|
||||
```sh
|
||||
# Minimal packages (use --disable-doc and --disable-octave flags)
|
||||
dnf install -y gcc gcc-c++ make gcc-gfortran boost-devel gsl-devel matio-devel suitesparse-devel flex bison autoconf automake redhat-rpm-config
|
||||
# Octave packages (use --disable-doc flag)
|
||||
# Minimal packages
|
||||
dnf install -y gcc gcc-c++ make gcc-gfortran boost-devel gsl-devel matio-devel suitesparse-devel flex bison meson redhat-rpm-config
|
||||
# Octave packages
|
||||
dnf install octave octave-devel octave-statistics octave-io octave-optim octave-control
|
||||
# Documentation packages
|
||||
dnf install texlive-scheme-minimal texlive-collection-publishers texlive-collection-latexextra texlive-collection-fontsextra texlive-collection-latexrecommended texlive-collection-science texlive-collection-plaingeneric texlive-lm python3-sphinx latexmk mathjax doxygen
|
||||
# Documentation packages (only needed if you build documentation)
|
||||
dnf install texlive-scheme-minimal texlive-collection-publishers texlive-collection-latexextra texlive-collection-fontsextra texlive-collection-latexrecommended texlive-collection-science texlive-collection-plaingeneric texlive-lm python3-sphinx latexmk mathjax
|
||||
```
|
||||
In Fedora these are available from the default repositories; whereas for CentOS and RHEL you need to enable the [Extra Packages for Enterprise Linux (EPEL)](https://fedoraproject.org/wiki/EPEL) repository and either the PowerTools repository for CentOS or the CodeReady Linux Builder repository for RHEL:
|
||||
```sh
|
||||
|
@ -276,7 +234,7 @@ dnf config-manager --set-enabled PowerTools
|
|||
ARCH=$( /bin/arch )
|
||||
subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
|
||||
```
|
||||
The documentation packages have slightly different names in CentOS and RHEL, you can also choose to pass the `--disable-doc` flag to your configure script to skip these dependencies.
|
||||
The documentation packages have slightly different names in CentOS and RHEL, but this should only impact you if you build the documentation.
|
||||
|
||||
`Slicot` and `x13as` need to be compiled from source:
|
||||
|
||||
|
@ -287,16 +245,19 @@ cd /home/$USER/dynare/slicot
|
|||
wget https://deb.debian.org/debian/pool/main/s/slicot/slicot_5.0+20101122.orig.tar.gz
|
||||
tar xf slicot_5.0+20101122.orig.tar.gz
|
||||
cd slicot-5.0+20101122
|
||||
make FORTRAN=gfortran OPTS="-O2 -fPIC -fdefault-integer-8" LOADER=gfortran lib
|
||||
mkdir -p /home/$USER/dynare/slicot/lib
|
||||
cp slicot.a /home/$USER/dynare/slicot/lib/libslicot64_pic.a #for matlab
|
||||
cp slicot.a /home/$USER/dynare/slicot/lib/libslicot_pic.a #for octave
|
||||
# The following two lines are only for MATLAB
|
||||
make FORTRAN=gfortran OPTS="-O2 -fPIC -fdefault-integer-8" LOADER=gfortran lib
|
||||
cp slicot.a /home/$USER/dynare/slicot/lib/libslicot64_pic.a
|
||||
# The following two lines are only for Octave
|
||||
make FORTRAN=gfortran OPTS="-O2 -fPIC" LOADER=gfortran lib
|
||||
cp slicot.a /home/$USER/dynare/slicot/lib/libslicot_pic.a
|
||||
|
||||
# compile x13as from source and put it into /usr/bin/
|
||||
mkdir -p /home/$USER/dynare/x13as
|
||||
cd /home/$USER/dynare/x13as
|
||||
wget https://www2.census.gov/software/x-13arima-seats/x13as/unix-linux/program-archives/x13as_asciisrc-v1-1-b59.tar.gz
|
||||
tar xf x13as_asciisrc-v1-1-b59.tar.gz
|
||||
wget https://www2.census.gov/software/x-13arima-seats/x13as/unix-linux/program-archives/x13as_asciisrc-v1-1-b60.tar.gz
|
||||
tar xf x13as_asciisrc-v1-1-b60.tar.gz
|
||||
sed -i "s|-static| |" makefile.gf # this removes '-static' in the makefile.gf
|
||||
make -f makefile.gf FFLAGS="-O2 -std=legacy" PROGRAM=x13as
|
||||
sudo cp x13as /usr/bin/
|
||||
|
@ -304,17 +265,16 @@ sudo cp x13as /usr/bin/
|
|||
|
||||
If you use MATLAB, we strongly advise to also rename or exclude the GCC libraries shipped with MATLAB to avoid possible conflicts with GCC libraries shipped by Fedora, see e.g. [Matlab on Fedora 33](https://mutschler.eu/linux/install-guides/fedora-post-install/#matlab) or [MATLAB-ArchWiki](https://wiki.archlinux.org/index.php/MATLAB) for instructions.
|
||||
|
||||
Keep in mind to use the `--with-slicot` option to the configure command, e.g.:
|
||||
Now use the following commands if using MATLAB (adapt them for Octave, see above):
|
||||
```sh
|
||||
cd /home/$USER/dynare
|
||||
git clone --recurse-submodules https://git.dynare.org/dynare/dynare.git unstable
|
||||
cd unstable
|
||||
autoreconf -si
|
||||
./configure --with-slicot=/home/$USER/dynare/slicot --with-matlab=/usr/local/MATLAB/R2020b
|
||||
make -j$(($(nproc)+1)) #rule of thumb: one more than CPUs as shown by e.g. lscpu
|
||||
meson setup -Dmatlab_path=/usr/local/MATLAB/R2023b -Dfortran_args="[ '-B', '/home/$USER/dynare/slicot']" -Dbuildtype=debugoptimized build-matlab
|
||||
meson compile -C build-matlab
|
||||
```
|
||||
|
||||
If your distribution ships an older version of `bison`, compile it from source and append it *temporarily* to your path before calling the configure script:
|
||||
If your distribution ships an older version of `bison`, compile it from source and append it *temporarily* to your path before running meson:
|
||||
```sh
|
||||
bison --version # bison (GNU Bison) 3.0.4
|
||||
mkdir -p /home/$USER/dynare/bison
|
||||
|
@ -330,12 +290,6 @@ bison --version # bison (GNU Bison) 3.6.4
|
|||
```
|
||||
Now configure dynare as above.
|
||||
|
||||
Tested on
|
||||
- CentOS 8
|
||||
- Fedora Workstation 32
|
||||
- Fedora Workstation 33
|
||||
- Red Hat Enterprise Linux 8
|
||||
|
||||
## Windows
|
||||
|
||||
- Install [MSYS2](http://www.msys2.org)
|
||||
|
@ -349,9 +303,9 @@ pacman -Syu
|
|||
window to complete the upgrade.
|
||||
- Install all needed dependencies:
|
||||
```sh
|
||||
pacman -S git autoconf automake-wrapper bison flex make tar texinfo mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-boost mingw-w64-x86_64-gsl mingw-w64-x86_64-matio
|
||||
pacman -S git bison flex make tar mingw-w64-x86_64-meson mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-boost mingw-w64-x86_64-gsl mingw-w64-x86_64-matio mingw-w64-x86_64-pkgconf
|
||||
```
|
||||
- Compile and install SLICOT, needed for the `kalman_steady_state` MEX file
|
||||
- Compile and install SLICOT
|
||||
```sh
|
||||
wget https://deb.debian.org/debian/pool/main/s/slicot/slicot_5.0+20101122.orig.tar.gz
|
||||
tar xf slicot_5.0+20101122.orig.tar.gz
|
||||
|
@ -365,11 +319,10 @@ cd ..
|
|||
```sh
|
||||
git clone --recurse-submodules https://git.dynare.org/Dynare/dynare.git
|
||||
cd dynare
|
||||
autoreconf -si
|
||||
```
|
||||
- Configure Dynare from the source directory:
|
||||
```sh
|
||||
./configure --with-slicot=/usr/local --with-matlab=<…> --disable-octave --disable-doc
|
||||
meson setup -Dmatlab_path=<…> -Dbuildtype=debugoptimized -Dprefer_static=true -Dfortran_args="['-B','/usr/local/lib']" build-matlab
|
||||
```
|
||||
where the path of MATLAB is specified. Note that you should use
|
||||
the MSYS2 notation and not put spaces in the MATLAB path, so you probably want
|
||||
|
@ -379,11 +332,11 @@ does not have short filenames (8dot3), then you can run `mkdir -p
|
|||
then pass `/usr/local/MATLAB/…` as MATLAB path to the configure script.
|
||||
- Compile:
|
||||
```sh
|
||||
make
|
||||
meson compile -C build-matlab
|
||||
```
|
||||
- Run the testsuite:
|
||||
```sh
|
||||
make -C tests check-matlab
|
||||
meson test -C build-matlab
|
||||
```
|
||||
|
||||
**Note:** The above assumes that you have a 64-bit version of MATLAB. It can be
|
||||
|
@ -453,29 +406,29 @@ export PATH="$BREWDIR/bin:$PATH"
|
|||
```
|
||||
|
||||
|
||||
- Install required Homebrew packages and link sphinx-doc:
|
||||
- Install required Homebrew packages:
|
||||
```sh
|
||||
arch -$ARCH $BREWDIR/bin/brew install automake bison flex boost gcc gsl libmatio veclibfort octave sphinx-doc docutils wget
|
||||
arch -$ARCH $BREWDIR/bin/brew install meson bison flex boost gcc gsl libmatio veclibfort octave sphinx-doc docutils wget pkg-config git-lfs
|
||||
```
|
||||
If you want to compile the documentation, you need to link sphinx-doc:
|
||||
If you are installing `git-lfs` for the first time, you need to run `git lfs install` once after installing it.
|
||||
|
||||
- Link the sphinx-doc package to be able to compile the documentation:
|
||||
```sh
|
||||
arch -$ARCH $BREWDIR/bin/brew link --force sphinx-doc
|
||||
```
|
||||
Otherwise add `--disable-doc` flag to the `configure` command below, if you want to skip this.
|
||||
|
||||
- Install [MacTeX](http://www.tug.org/mactex/index.html) using the universal installer. MacTeX runs natively on both ARM and Intel machines. On Apple Silicon, it is advised to symlink `pdflatex` and `bibtex` into `/usr/local/bin`:
|
||||
- Install [MacTeX](http://www.tug.org/mactex/index.html) using the universal installer, if you want to build the documentation. MacTeX runs natively on both ARM and Intel machines. On Apple Silicon, it is advised to symlink `pdflatex`, `bibtex` and `latexmk` into `/usr/local/bin`:
|
||||
```sh
|
||||
sudo ln -s /Library/TeX/texbin/pdflatex /usr/local/bin/pdflatex
|
||||
sudo ln -s /Library/TeX/texbin/bibtex /usr/local/bin/bibtex
|
||||
sudo ln -s /Library/TeX/texbin/latexmk /usr/local/bin/latexmk
|
||||
```
|
||||
Alternatively, if you don’t want to install MacTeX, you should pass the `--disable-doc` flag to the `configure` command below.
|
||||
If you don't have admin privileges, then you can also symlink them into `$HOME/.local/bin` and add this folder to your PATH.
|
||||
|
||||
- Install MATLAB and additional toolboxes.
|
||||
We recommend, but don't require, the following: Optimization, Global Optimization, Statistics and Machine Learning, Econometrics, and Control System.
|
||||
For Apple Silicon: MATLAB offers a native Apple silicon version of R2022b as an open beta. You can sign up and install it (including a suitable Java 8 JRE, e.g. Amazon Corretto 8) using
|
||||
[the official instructions](https://de.mathworks.com/support/apple-silicon-r2022b-beta.html).
|
||||
Unfortunately, this version does not support yet the Optimization, Global Optimization and Econometrics toolboxes.
|
||||
If you need these, please run the Intel version (under Rosetta 2) instead.
|
||||
For Apple Silicon: MATLAB offers a native Apple silicon version (arm64) as of version R2023b, see [the official instructions](https://de.mathworks.com/support/requirements/apple-silicon.html) how to install it.
|
||||
You can also run the Intel version (x86_64) under Rosetta 2.
|
||||
Don't forget to run MATLAB at least once to make sure you have a valid license.
|
||||
|
||||
- Create a folder for Dynare and its dependencies
|
||||
|
@ -483,7 +436,7 @@ Don't forget to run MATLAB at least once to make sure you have a valid license.
|
|||
export DYNAREDIR=$HOME/dynare
|
||||
```
|
||||
|
||||
- Compile and install SLICOT, needed for e.g. the `kalman_steady_state` MEX file.
|
||||
- Compile and install SLICOT
|
||||
```sh
|
||||
mkdir -p $DYNAREDIR/slicot/lib
|
||||
cd $DYNAREDIR/slicot
|
||||
|
@ -495,22 +448,21 @@ cp slicot.a $DYNAREDIR/slicot/lib/libslicot_pic.a
|
|||
make clean
|
||||
make -j$(sysctl -n hw.ncpu) FORTRAN=$BREWDIR/bin/gfortran OPTS="-O2 -fdefault-integer-8" LOADER=gfortran lib
|
||||
cp slicot.a $DYNAREDIR/slicot/lib/libslicot64_pic.a
|
||||
cd $HOME/dynare
|
||||
```
|
||||
|
||||
- Compile and install the X-13ARIMA-SEATS Seasonal Adjustment Program
|
||||
```sh
|
||||
mkdir -p $DYNAREDIR/x13as
|
||||
cd $DYNAREDIR/x13as
|
||||
curl -O https://www2.census.gov/software/x-13arima-seats/x13as/unix-linux/program-archives/x13as_asciisrc-v1-1-b59.tar.gz
|
||||
tar xf x13as_asciisrc-v1-1-b59.tar.gz
|
||||
curl -O https://www2.census.gov/software/x-13arima-seats/x13as/unix-linux/program-archives/x13as_asciisrc-v1-1-b60.tar.gz
|
||||
tar xf x13as_asciisrc-v1-1-b60.tar.gz
|
||||
sed -i '' 's/-static//g' makefile.gf
|
||||
make -j$(sysctl -n hw.ncpu) -f makefile.gf FC=$BREWDIR/bin/gfortran LINKER=$BREWDIR/bin/gcc-13 FFLAGS="-O2 -std=legacy" LDFLAGS=-static-libgcc LIBS="$BREWDIR/lib/gcc/current/libgfortran.a /$BREWDIR/lib/gcc/current/libquadmath.a" PROGRAM=x13as
|
||||
mkdir -p $HOME/.local/bin
|
||||
cp x13as $HOME/.local/bin/x13as
|
||||
cd ;
|
||||
sudo cp $DYNAREDIR/x13as/x13as /usr/local/bin/x13as
|
||||
cd $DYNAREDIR
|
||||
x13as
|
||||
```
|
||||
Alternatively, if you don't have admin privileges you can install it into `$HOME/.local/bin` and add this folder to your PATH.
|
||||
|
||||
### Compile Dynare from source
|
||||
The following commands will download the Dynare source code and compile
|
||||
|
@ -519,48 +471,48 @@ folder where you want Dynare installed.
|
|||
|
||||
- Prepare the Dynare sources for the unstable version:
|
||||
```sh
|
||||
mkdir -p $DYNAREDIR/unstable
|
||||
git clone --recurse-submodules https://git.dynare.org/Dynare/dynare.git $DYNAREDIR/unstable
|
||||
cd $DYNAREDIR/unstable
|
||||
arch -$ARCH autoreconf -si
|
||||
```
|
||||
You can also choose a specific version of Dynare by checking out the corresponding branch or a specific tag with git.
|
||||
If you want a certain version (e.g. 5.x) , then add `--single-branch --branch 5.x` to the git clone command.
|
||||
|
||||
- Configure Dynare from the source directory:
|
||||
```sh
|
||||
arch -$ARCH ./configure --prefix=$BREWDIR CC=gcc-13 CXX=g++-13 CPPFLAGS=-I$BREWDIR/include LDFLAGS=-L$BREWDIR/lib LEX=$BREWDIR/opt/flex/bin/flex YACC=$BREWDIR/opt/bison/bin/bison --with-slicot=$DYNAREDIR/slicot --with-matlab=/Applications/MATLAB_R2022b_Beta.app
|
||||
export BUILDDIR=build-matlab
|
||||
export MATLABPATH=/Applications/MATLAB_R2023b.app
|
||||
arch -$ARCH meson setup --native-file macOS/homebrew-native-$ARCH.ini -Dmatlab_path=$MATLABPATH -Dbuildtype=debugoptimized -Dfortran_args="['-B','$DYNAREDIR/slicot/lib']" $BUILDDIR
|
||||
```
|
||||
where you need to adapt the path to MATLAB. If you don’t have MATLAB, simply replace `--with-matlab=<…>` by `--disable-matlab`.
|
||||
Similarly, if you don't want to compile for Octave add a `--disable-octave` flag.
|
||||
Check the output of the command whether Dynare is configured for building everything except the internal docs of Dynare and M2HTML.
|
||||
where you need to adapt the path to MATLAB.
|
||||
Similarly, if you want to compile for Octave, replace the `-Dmatlab_path` option by `-Dbuild_for=octave`, and change the build directory to `build-octave`.
|
||||
|
||||
- Compile:
|
||||
```sh
|
||||
arch -$ARCH make -j$(sysctl -n hw.ncpu)
|
||||
arch -$ARCH meson compile -C $BUILDDIR
|
||||
```
|
||||
If no errors occured, you are done. Dynare is now ready to use.
|
||||
If you additionally want to compile the documentation run:
|
||||
|
||||
- If you additionally want to compile the documentation run:
|
||||
```sh
|
||||
arch -$ARCH make pdf
|
||||
arch -$ARCH make html
|
||||
arch -$ARCH meson compile -C $BUILDDIR doc
|
||||
```
|
||||
|
||||
### Optional: pass the full PATH to MATLAB to run system commands
|
||||
If you start MATLAB from a terminal, you will get the PATH inherited from the shell.
|
||||
However, when you click on the application icon in macOS, you are not running at the terminal level:
|
||||
the program is run by launcher, which does not go through a shell login session.
|
||||
In other words, you get the system default PATH which includes `/usr/bin:/bin:/usr/sbin:/sbin`, but not `/usr/local/bin` or `$HOME/.local/bin`.
|
||||
So if you want to use system commands like `pdflatex` or `x13as` you should either call them by their full path (e.g `/Library/TeX/texbin/pdflatex`)
|
||||
or append the PATH in MATLAB by running `setenv('PATH', [getenv('PATH') ':/usr/local/bin:$HOME/.local/bin:/Library/TeX/texbin']);`.
|
||||
Alternatively, you can create a `startup.m` file or change the system default PATH in the `/etc/paths` file.
|
||||
- Optionally, run the testsuite:
|
||||
```sh
|
||||
arch -$ARCH meson test -C $BUILDDIR --num-processes=$(sysctl -n hw.perflevel0.physicalcpu)
|
||||
```
|
||||
where `--num-processes` specifies the number of parallel processes to use for the testsuite (here set to the number of performance cores on your mac).
|
||||
|
||||
### Optional: pass the full PATH to MATLAB to run system commands
|
||||
If you start MATLAB from a terminal, you will get the PATH inherited from the shell.
|
||||
However, when you click on the application icon in macOS, you are not running at the terminal level:
|
||||
the program is run by launcher, which does not go through a shell login session.
|
||||
In other words, you get the system default PATH which includes `/usr/bin:/bin:/usr/sbin:/sbin`, but not `/usr/local/bin` or `$HOME/.local/bin`.
|
||||
So if you want to use system commands like `pdflatex` or `x13as` you should either call them by their full path (e.g `/Library/TeX/texbin/pdflatex`) or append the PATH in MATLAB by running `setenv('PATH', [getenv('PATH') ':/usr/local/bin:$HOME/.local/bin:/Library/TeX/texbin']);`.
|
||||
Alternatively, you can create a `startup.m` file or change the system default PATH in the `/etc/paths` file.
|
||||
So if you want to use system commands like `pdflatex`, `latexmk` or `x13as` you should either call them by their full path (e.g `/Library/TeX/texbin/pdflatex`)
|
||||
or append the PATH by running `setenv('PATH', [getenv('PATH') ':/usr/local/bin:$HOME/.local/bin:/Library/TeX/texbin']);` in your MATLAB command line once,
|
||||
e.g. by adding this to your mod file. Alternatively, you can create a `startup.m` file or change the system default PATH in the `/etc/paths` file.
|
||||
|
||||
Last tested on:
|
||||
- macOS Ventura 13.3.1 (MacBook Air M1, MacBook Pro M2 MAX, M2 Virtual Machine using Parallels, Intel Virtual Machine using Quickemu)
|
||||
|
||||
## Docker
|
||||
We offer a variety of pre-configured Docker containers for Dynare, pre-configured with Octave and MATLAB including all recommended toolboxes.
|
||||
These are readily available for your convenience on [Docker Hub](https://hub.docker.com/r/dynare/dynare).
|
||||
The `scripts/docker` folder contains [information and instructions](scripts/docker/README.md) to interact, built and customize the containers.
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
@PACKAGE_VERSION@
|
125
configure.ac
125
configure.ac
|
@ -1,125 +0,0 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl Copyright © 2009-2023 Dynare Team
|
||||
dnl
|
||||
dnl This file is part of Dynare.
|
||||
dnl
|
||||
dnl Dynare is free software: you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation, either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl Dynare is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
AC_PREREQ([2.62])
|
||||
AC_INIT([dynare], [6-unstable])
|
||||
AC_CONFIG_SRCDIR([preprocessor/src/DynareMain.cc])
|
||||
AM_INIT_AUTOMAKE([1.11 -Wall -Wno-portability foreign no-dist-gzip dist-xz tar-pax])
|
||||
|
||||
AC_CONFIG_SUBDIRS([preprocessor])
|
||||
|
||||
# For setting EXEEXT, needed by top-level Makefile.am
|
||||
AC_PROG_CC
|
||||
|
||||
AX_PROG_LN_S
|
||||
|
||||
AC_PROG_MKDIR_P
|
||||
|
||||
# Define optional components and their corresponding flags and Automake conditionals
|
||||
AC_ARG_ENABLE([doc], AS_HELP_STRING([--disable-doc], [disable compilation of documentation]), [], [enable_doc=yes])
|
||||
AM_CONDITIONAL([ENABLE_DOC], [test "$enable_doc" = yes])
|
||||
|
||||
AC_ARG_ENABLE([matlab], AS_HELP_STRING([--disable-matlab], [disable compilation of MEX files for MATLAB]), [], [enable_matlab=yes])
|
||||
AM_CONDITIONAL([ENABLE_MATLAB], [test "$enable_matlab" = yes])
|
||||
|
||||
AC_ARG_ENABLE([octave], AS_HELP_STRING([--disable-octave], [disable compilation of MEX files for Octave]), [], [enable_octave=yes])
|
||||
AM_CONDITIONAL([ENABLE_OCTAVE], [test "$enable_octave" = yes])
|
||||
|
||||
AC_ARG_ENABLE([org-export], AS_HELP_STRING([--enable-org-export], [enable exporting of Org files (requires Emacs, org-mode and other external programs)]))
|
||||
AM_CONDITIONAL([ENABLE_ORG_EXPORT], [test -n "$enable_org_export"])
|
||||
|
||||
# Check utilities needed for documentation
|
||||
if test "$enable_doc" = yes; then
|
||||
AC_CHECK_PROG([PDFLATEX], [pdflatex], [pdflatex], [no])
|
||||
test "$PDFLATEX" = no && AC_MSG_ERROR([pdflatex cannot be found. If you want to skip the compilation of the documentation, pass the --disable-doc flag.])
|
||||
AC_CHECK_PROG([BIBTEX], [bibtex], [bibtex], [no])
|
||||
test "$BIBTEX" = no && AC_MSG_ERROR([bibtex cannot be found. If you want to skip the compilation of the documentation, pass the --disable-doc flag.])
|
||||
AC_CHECK_PROG([SPHINXBUILD], [sphinx-build], [sphinx-build], [no])
|
||||
test "$SPHINXBUILD" = no && AC_MSG_ERROR([sphinx-build cannot be found. If you want to skip the compilation of the documentation, pass the --disable-doc flag.])
|
||||
AX_LATEX_CLASS([beamer], [ax_latex_have_beamer], [], [AC_MSG_ERROR([beamer cannot be found. If you want to skip the compilation of the documentation, pass the --disable-doc flag.])])
|
||||
fi
|
||||
|
||||
# Check for MATLAB
|
||||
if test "$enable_matlab" = yes; then
|
||||
AC_CONFIG_SUBDIRS([mex/build/matlab])
|
||||
AX_MATLAB
|
||||
AX_MATLAB_BATCH_OPTIONS
|
||||
test "$ax_enable_matlab" != yes && AC_MSG_ERROR([MATLAB cannot be found. If you want to compile Dynare without MATLAB support, pass the --disable-matlab flag.])
|
||||
fi
|
||||
|
||||
# Check for Octave
|
||||
if test "$enable_octave" = yes; then
|
||||
AC_CONFIG_SUBDIRS([mex/build/octave])
|
||||
AX_OCTAVE
|
||||
test "$ax_enable_octave" != yes && AC_MSG_ERROR([Octave cannot be found. If you want to compile Dynare without Octave support, pass the --disable-octave flag.])
|
||||
fi
|
||||
|
||||
# Construct final output message
|
||||
if test "$enable_doc" = yes; then
|
||||
BUILD_DOC="yes"
|
||||
else
|
||||
BUILD_DOC="no"
|
||||
fi
|
||||
|
||||
if test -n "$enable_org_export"; then
|
||||
BUILD_INTERNAL_DOC="yes"
|
||||
else
|
||||
BUILD_INTERNAL_DOC="no"
|
||||
fi
|
||||
|
||||
if test "$enable_matlab" = yes; then
|
||||
TESTSUITE_MATLAB="yes"
|
||||
else
|
||||
TESTSUITE_MATLAB="no"
|
||||
fi
|
||||
|
||||
if test "$enable_octave" = yes; then
|
||||
TESTSUITE_OCTAVE="yes"
|
||||
else
|
||||
TESTSUITE_OCTAVE="no"
|
||||
fi
|
||||
|
||||
AC_MSG_NOTICE([
|
||||
|
||||
Dynare is now configured for building the following components...
|
||||
|
||||
Documentation (with "make html pdf"):
|
||||
Manual and other documents $BUILD_DOC
|
||||
Dynare internal doc: $BUILD_INTERNAL_DOC
|
||||
|
||||
Testsuites (run with "make check"):
|
||||
Dynare for MATLAB: $TESTSUITE_MATLAB
|
||||
Dynare for Octave: $TESTSUITE_OCTAVE
|
||||
])
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
VERSION
|
||||
doc/Makefile
|
||||
doc/manual/Makefile
|
||||
doc/manual/utils/version.py
|
||||
doc/parallel/Makefile
|
||||
doc/internals/Makefile
|
||||
doc/gsa/Makefile
|
||||
doc/dseries-and-reporting/Makefile
|
||||
tests/Makefile
|
||||
matlab/dynare_version.m
|
||||
mex/sources/Makefile
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 5a58fafdca239e61be4d7b2270307b2445bb571a
|
|
@ -1 +1 @@
|
|||
Subproject commit f1d0fd61ea6d9c4f8694b373780d6c372e344f6e
|
||||
Subproject commit 391689d9f1bea4bd68ef6641dc2dc4a1bd867850
|
|
@ -1 +1 @@
|
|||
Subproject commit 216abedb9ab4df5dd4dca07c721f7c07392801e9
|
||||
Subproject commit ac6d0ae1b69cda26aa9486188d54c8c010f115c4
|
|
@ -1,34 +0,0 @@
|
|||
SUBDIRS = parallel internals gsa dseries-and-reporting
|
||||
|
||||
if ENABLE_DOC
|
||||
SUBDIRS += manual
|
||||
pdf-local: guide.pdf bvar-a-la-sims.pdf dr.pdf sylvester.pdf tl.pdf
|
||||
endif
|
||||
|
||||
EXTRA_DIST = guide.tex guide.bbl bibmad.sty bvar-a-la-sims.tex dr.tex dr.bib dynare.plots
|
||||
|
||||
guide.pdf: guide.tex guide.bbl bibmad.sty
|
||||
$(PDFLATEX) guide
|
||||
$(PDFLATEX) guide
|
||||
|
||||
bvar-a-la-sims.pdf: bvar-a-la-sims.tex
|
||||
$(PDFLATEX) bvar-a-la-sims
|
||||
$(PDFLATEX) bvar-a-la-sims
|
||||
|
||||
dr.pdf: dr.tex
|
||||
$(PDFLATEX) dr
|
||||
$(BIBTEX) dr
|
||||
$(PDFLATEX) dr
|
||||
$(PDFLATEX) dr
|
||||
|
||||
sylvester.pdf: sylvester.tex
|
||||
$(PDFLATEX) sylvester
|
||||
$(PDFLATEX) sylvester
|
||||
|
||||
tl.pdf: tl.tex
|
||||
$(PDFLATEX) tl
|
||||
$(PDFLATEX) tl
|
||||
|
||||
clean-local:
|
||||
# Do not delete guide.bbl which is not autogenerated
|
||||
rm -f *~ *.pdf *.log *.aux *.out *.blg dr.bbl
|
105
doc/bibmad.sty
105
doc/bibmad.sty
|
@ -1,105 +0,0 @@
|
|||
\message{harvard bibliography,}
|
||||
|
||||
\def\@hiteml[#1]#2#3#4{\item[]\if@filesw%
|
||||
{ \def\protect##1{\string ##1\space}\immediate%
|
||||
\write\@auxout{\string\harvardcite{#4}{#2}{#1}{#3}}}\fi%
|
||||
\protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces}
|
||||
|
||||
\def\@hitem#1#2#3{\item[]\if@filesw%
|
||||
{ \def\protect##1{\string ##1\space}\immediate%
|
||||
\write\@auxout{\string\harvardcite{#3}{#1}{#1}{#2}}}\fi%
|
||||
\protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces}
|
||||
|
||||
\def\harvarditem{\@ifnextchar [{\@hiteml}{\@hitem}}
|
||||
|
||||
\def\harvardcite#1#2#3#4{
|
||||
\global\@namedef{bhf@#1}{#2}
|
||||
\global\@namedef{bha@#1}{#3}
|
||||
\global\@namedef{bhy@#1}{#4}\global\@namedef{b@#1}{\csname bhf@#1\endcsname}
|
||||
}
|
||||
|
||||
\def\citeasnoun{\@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
|
||||
\def\cite{\@ifnextchar [{\@tempswatrue\@citexasnoun}
|
||||
{\@tempswafalse\@citexasnoun[]}
|
||||
}
|
||||
\def\citeyear{\@ifnextchar [{\@tempswatrue\@citexyear}
|
||||
{\@tempswafalse\@citexyear[]}
|
||||
}
|
||||
\def\citename{\@ifnextchar [{\@tempswatrue\@citexname}
|
||||
{\@tempswafalse\@citexname[]}
|
||||
}
|
||||
|
||||
% \def\@enamedef#1{\expandafter\edef\csname #1\endcsname}
|
||||
% Previous line should be replaced by the following to prevent
|
||||
% problems with the NFSS. Solution by Bernd Raichle.
|
||||
\def\@enamedef#1{\expandafter\def\csname #1\expandafter\endcsname\expandafter}
|
||||
|
||||
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
|
||||
\def\@citea{}\@cite{\@for\@citeb:=#2\do
|
||||
{\@citea\def\@citea{\@hisep\penalty\@m\ }\@ifundefined
|
||||
{b@\@citeb}{{\bf ?}\@warning
|
||||
{Citation `\@citeb' on page \thepage \space undefined}}%
|
||||
{{\csname b@\@citeb\endcsname\@hysep\csname bhy@\@citeb\endcsname}%
|
||||
\global\@enamedef{b@\@citeb}{\csname bha@\@citeb\endcsname}}%
|
||||
}}{#1}}
|
||||
|
||||
\def\@citexasnoun[#1]#2{%
|
||||
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
|
||||
\@citeasnoun{{\@ifundefined%
|
||||
{b@#2}%
|
||||
{[{\bf ?}\@warning{Citation `#2' on page \thepage \space undefined}}%
|
||||
{{\csname b@#2\endcsname\ [\csname bhy@#2\endcsname}%
|
||||
\global\@namedef{b@#2}{\csname bha@#2\endcsname}}%
|
||||
}}{#1}}
|
||||
|
||||
\def\@citexname[#1]#2{%
|
||||
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
|
||||
\@citename{{\@ifundefined%
|
||||
{b@#2}%
|
||||
{{\bf ?}\@warning{Citation `#2' on page \thepage \space undefined}}%
|
||||
{{\csname bhf@#2\endcsname}}%
|
||||
}}{#1}}
|
||||
|
||||
\def\@citexyear[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
|
||||
\def\@citeayear{}\@cite{\@for\@citebyear:=#2\do
|
||||
{\@citeayear\def\@citeayear{\@hisep\penalty\@m\ }\@ifundefined
|
||||
{b@\@citebyear}{{\bf ?}\@warning
|
||||
{Citation `\@citebyear' on page \thepage \space undefined}}%
|
||||
{{\csname bhy@\@citebyear\endcsname}%
|
||||
}%
|
||||
}}{#1}}
|
||||
|
||||
\gdef\hysep@agsm{\ }\gdef\hisep@agsm{,}%
|
||||
\gdef\hysep@dcu{, }\gdef\hisep@dcu{;}%
|
||||
\let\@hysep\hysep@agsm \let\@hisep\hisep@agsm
|
||||
\def\citationstyle#1{%
|
||||
\global\@namedef{@hysep}{\csname hysep@#1\endcsname}%
|
||||
\global\@namedef{@hisep}{\csname hisep@#1\endcsname}}
|
||||
|
||||
%DEFAULT DEFINITIONS
|
||||
\def\@cite#1#2{({#1\if@tempswa , #2\fi})}
|
||||
\def\@citeasnoun#1#2{{#1\if@tempswa , #2\fi]}}
|
||||
\def\@citename#1#2{{#1\if@tempswa \ (#2)\fi}}
|
||||
|
||||
% CHANGE \end{document} - to handle double definitions
|
||||
\def\enddocument{\@checkend{document}\clearpage\begingroup
|
||||
\if@filesw \immediate\closeout\@mainaux
|
||||
\def\global\@namedef##1##2{}\def\newlabel{\@testdef r}%
|
||||
\def\bibcite{\@testdef b}%
|
||||
\def\harvardcite{\@testbibh}\@tempswafalse \makeatletter\input \jobname.aux
|
||||
\if@tempswa \@warning{Label(s) may have changed. Rerun to get
|
||||
cross-references right}\fi\fi\endgroup\deadcycles\z@\@@end}
|
||||
|
||||
\def\@testbibh #1#2#3{
|
||||
\def\@tempa{#2}\expandafter
|
||||
\ifx \csname bhf@#1\endcsname \@tempa
|
||||
\def\@tempa{#3}\expandafter
|
||||
\ifx \csname bha@#1\endcsname \@tempa
|
||||
\else \@tempswatrue
|
||||
\fi
|
||||
\else
|
||||
\@tempswatrue
|
||||
\fi
|
||||
}
|
||||
|
||||
%
|
|
@ -1,14 +0,0 @@
|
|||
if ENABLE_DOC
|
||||
pdf-local: dseriesReporting.pdf
|
||||
endif
|
||||
|
||||
SRC = dseriesReporting.tex
|
||||
|
||||
EXTRA_DIST = $(SRC)
|
||||
|
||||
dseriesReporting.pdf: $(SRC)
|
||||
$(PDFLATEX) dseriesReporting
|
||||
$(PDFLATEX) dseriesReporting
|
||||
|
||||
clean-local:
|
||||
rm -f dseriesReporting.pdf *.toc *.aux *.log *.nav *.snm *.vrb *.out *~
|
|
@ -1,16 +0,0 @@
|
|||
if ENABLE_DOC
|
||||
pdf-local: gsa.pdf
|
||||
endif
|
||||
|
||||
SRC = gsa.tex marco.bib
|
||||
|
||||
EXTRA_DIST = $(SRC)
|
||||
|
||||
gsa.pdf: $(SRC)
|
||||
$(PDFLATEX) gsa
|
||||
$(BIBTEX) gsa
|
||||
$(PDFLATEX) gsa
|
||||
$(PDFLATEX) gsa
|
||||
|
||||
clean-local:
|
||||
rm -f *.pdf *.log *.aux *.toc *.lof *.blg *.bbl *.out *~
|
139
doc/gsa/gsa.tex
139
doc/gsa/gsa.tex
|
@ -22,7 +22,7 @@
|
|||
\begin{document}
|
||||
|
||||
% ----------------------------------------------------------------
|
||||
\title{Sensitivity Analysis Toolbox for DYNARE\thanks{Copyright \copyright~2012 Dynare
|
||||
\title{Sensitivity Analysis Toolbox for Dynare\thanks{Copyright \copyright~2012-2024 Dynare
|
||||
Team. Permission is granted to copy, distribute and/or modify
|
||||
this document under the terms of the GNU Free Documentation
|
||||
License, Version 1.3 or any later version published by the Free
|
||||
|
@ -32,9 +32,9 @@
|
|||
|
||||
\author{Marco Ratto\\
|
||||
European Commission, Joint Research Centre \\
|
||||
TP361, IPSC, \\21027 Ispra
|
||||
TP581\\21027 Ispra
|
||||
(VA) Italy\\
|
||||
\texttt{marco.ratto@jrc.ec.europa.eu}
|
||||
\texttt{Marco.Ratto@ec.europa.eu}
|
||||
\thanks{The author gratefully thanks Christophe Planas, Kenneth Judd, Michel Juillard,
|
||||
Alessandro Rossi, Frank Schorfheide and the participants to the
|
||||
Courses on Global Sensitivity Analysis for Macroeconomic
|
||||
|
@ -52,21 +52,21 @@ helpful suggestions.}}
|
|||
|
||||
%-----------------------------------------------------------------------
|
||||
\begin{abstract}
|
||||
\noindent The Sensitivity Analysis Toolbox for DYNARE is a set of
|
||||
\noindent The Sensitivity Analysis Toolbox for Dynare is a set of
|
||||
MATLAB routines for the analysis of DSGE models with global
|
||||
sensitivity analysis. The routines are thought to be used within
|
||||
the DYNARE v4 environment.
|
||||
the Dynare 6 environment.
|
||||
|
||||
|
||||
\begin{description}
|
||||
\item \textbf{Keywords}: Stability Mapping , Reduced form solution, DSGE models,
|
||||
Monte Carlo filtering, Global Sensitivity Analysis.
|
||||
Monte Carlo filtering, Global Sensitivity Analysis.
|
||||
\end{description}
|
||||
\end{abstract}
|
||||
\newpage
|
||||
% ----------------------------------------------------------------
|
||||
\section{Introduction} \label{s:intro}
|
||||
The Sensitivity Analysis Toolbox for DYNARE is a collection of
|
||||
The Sensitivity Analysis Toolbox for Dynare is a collection of
|
||||
MATLAB routines implemented to answer the following questions: (i)
|
||||
Which is the domain of structural coefficients assuring the
|
||||
stability and determinacy of a DSGE model? (ii) Which parameters
|
||||
|
@ -81,20 +81,18 @@ described in \cite{Ratto_CompEcon_2008}.
|
|||
|
||||
|
||||
\section{Use of the Toolbox}
|
||||
The DYNARE parser now recognizes sensitivity analysis commands.
|
||||
The Dynare parser now recognizes sensitivity analysis commands.
|
||||
The syntax is based on a single command:
|
||||
\vspace{0.5cm}
|
||||
|
||||
\verb"dynare_sensitivity(option1=<opt1_val>,option2=<opt2_val>,...)"
|
||||
\verb"sensitivity(option1=<opt1_val>,option2=<opt2_val>,...)"
|
||||
|
||||
\vspace{0.5cm} \noindent with a list of options described in the
|
||||
next section.
|
||||
|
||||
With respect to the previous version of the toolbox, in order to
|
||||
work properly, the sensitivity analysis Toolbox \emph{no longer}
|
||||
needs that the DYNARE estimation environment is set-up.
|
||||
|
||||
Therefore, \verb"dynare_sensitivity" is the only command to run to
|
||||
In order to work properly, the sensitivity analysis Toolbox does not need
|
||||
a Dynare estimation environment to be set up. Rather, \verb"sensitivity"
|
||||
is the only command to run to
|
||||
make a sensitivity analysis on a DSGE model\footnote{Of course,
|
||||
when the user needs to perform the mapping of the fit with a
|
||||
posterior sample, a Bayesian estimation has to be performed
|
||||
|
@ -208,16 +206,17 @@ a multivariate normal MC sample, with covariance matrix based on
|
|||
the inverse Hessian at the optimum: this analysis is useful when
|
||||
ML estimation is done (i.e. no Bayesian estimation);
|
||||
\item when \verb"ppost=1" the Toolbox analyses
|
||||
the RMSE's for the posterior sample obtained by DYNARE's
|
||||
the RMSE's for the posterior sample obtained by Dynare's
|
||||
Metropolis procedure.
|
||||
\end{enumerate}
|
||||
|
||||
The use of cases 2. and 3. requires an estimation step beforehand!
|
||||
The use of cases 2. and 3. require an estimation step beforehand!
|
||||
To facilitate the sensitivity analysis after estimation, the
|
||||
\verb"dynare_sensitivity" command also allows to indicate some
|
||||
options of \verb"dynare_estimation". These are:
|
||||
\verb"sensitivity" command also allows to indicate some
|
||||
options of \verb"estimation". These are:
|
||||
\begin{itemize}
|
||||
\item \verb"datafile"
|
||||
\item \verb"diffuse_filter"
|
||||
\item \verb"mode_file"
|
||||
\item \verb"first_obs"
|
||||
\item \verb"lik_init"
|
||||
|
@ -278,10 +277,10 @@ identifiable.
|
|||
\end{tabular}
|
||||
|
||||
\vspace{1cm}
|
||||
\noindent For example, the following commands in the DYNARE model file
|
||||
\noindent For example, the following commands in the Dynare model file
|
||||
|
||||
\vspace{1cm}
|
||||
\noindent\verb"dynare_sensitivity(identification=1, morris=2);"
|
||||
\noindent\verb"sensitivity(identification=1, morris=2);"
|
||||
|
||||
\vspace{1cm}
|
||||
\noindent trigger the identification analysis using \cite{Iskrev2010,Iskrev2011}, jointly with the mapping of the acceptable region.
|
||||
|
@ -293,75 +292,75 @@ Sensitivity analysis results are saved on the hard-disk of the
|
|||
computer. The Toolbox uses a dedicated folder called \verb"GSA",
|
||||
located in \\
|
||||
\\
|
||||
\verb"<DYNARE_file>\GSA", \\
|
||||
\verb"<Dynare_file>\GSA", \\
|
||||
\\
|
||||
where \verb"<DYNARE_file>.mod" is the name of the DYNARE model
|
||||
where \verb"<Dynare_file>.mod" is the name of the Dynare model
|
||||
file.
|
||||
|
||||
\subsection{Binary data files}
|
||||
A set of binary data files is saved in the \verb"GSA" folder:
|
||||
\begin{description}
|
||||
\item[]\verb"<DYNARE_file>_prior.mat": this file stores
|
||||
\item[]\verb"<Dynare_file>_prior.mat": this file stores
|
||||
information about the analyses performed sampling from the prior
|
||||
ranges, i.e. \verb"pprior=1" and \verb"ppost=0";
|
||||
\item[]\verb"<DYNARE_file>_mc.mat": this file stores
|
||||
\item[]\verb"<Dynare_file>_mc.mat": this file stores
|
||||
information about the analyses performed sampling from
|
||||
multivariate normal, i.e. \verb"pprior=0" and \verb"ppost=0";
|
||||
\item[]\verb"<DYNARE_file>_post.mat": this file stores information
|
||||
\item[]\verb"<Dynare_file>_post.mat": this file stores information
|
||||
about analyses performed using the Metropolis posterior sample,
|
||||
i.e. \verb"ppost=1".
|
||||
\end{description}
|
||||
|
||||
\begin{description}
|
||||
\item[]\verb"<DYNARE_file>_prior_*.mat": these files store
|
||||
\item[]\verb"<Dynare_file>_prior_*.mat": these files store
|
||||
the filtered and smoothed variables for the prior MC sample,
|
||||
generated when doing RMSE analysis (\verb"pprior=1" and
|
||||
\verb"ppost=0");
|
||||
\item[]\verb"<DYNARE_file>_mc_*.mat": these files store
|
||||
\item[]\verb"<Dynare_file>_mc_*.mat": these files store
|
||||
the filtered and smoothed variables for the multivariate normal MC
|
||||
sample, generated when doing RMSE analysis (\verb"pprior=0" and
|
||||
\verb"ppost=0").
|
||||
\end{description}
|
||||
|
||||
\subsection{Stability analysis}
|
||||
Figure files \verb"<DYNARE_file>_prior_*.fig" store results for
|
||||
Figure files \verb"<Dynare_file>_prior_*.fig" store results for
|
||||
the stability mapping from prior MC samples:
|
||||
\begin{description}
|
||||
\item[]\verb"<DYNARE_file>_prior_stab_SA_*.fig": plots of the Smirnov
|
||||
test analyses confronting the cdf of the sample fulfilling
|
||||
Blanchard-Kahn conditions with the cdf of the rest of the sample;
|
||||
\item[]\verb"<DYNARE_file>_prior_stab_indet_SA_*.fig": plots of the Smirnov
|
||||
test analyses confronting the cdf of the sample producing
|
||||
indeterminacy with the cdf of the original prior sample;
|
||||
\item[]\verb"<DYNARE_file>_prior_stab_unst_SA_*.fig": plots of the Smirnov
|
||||
test analyses confronting the cdf of the sample producing unstable
|
||||
(explosive roots) behaviour with the cdf of the original prior
|
||||
\item[]\verb"<Dynare_file>_prior_stab_SA_*.fig": plots of the Smirnov
|
||||
test analyses confronting the CDF of the sample fulfilling
|
||||
Blanchard-Kahn conditions with the CDF of the rest of the sample;
|
||||
\item[]\verb"<Dynare_file>_prior_stab_indet_SA_*.fig": plots of the Smirnov
|
||||
test analyses confronting the CDF of the sample producing
|
||||
indeterminacy with the CDF of the original prior sample;
|
||||
\item[]\verb"<Dynare_file>_prior_stab_unst_SA_*.fig": plots of the Smirnov
|
||||
test analyses confronting the CDF of the sample producing unstable
|
||||
(explosive roots) behaviour with the CDF of the original prior
|
||||
sample;
|
||||
\item[]\verb"<DYNARE_file>_prior_stable_corr_*.fig": plots of
|
||||
\item[]\verb"<Dynare_file>_prior_stable_corr_*.fig": plots of
|
||||
bivariate projections of the sample fulfilling Blanchard-Kahn
|
||||
conditions;
|
||||
\item[]\verb"<DYNARE_file>_prior_indeterm_corr_*.fig": plots of
|
||||
\item[]\verb"<Dynare_file>_prior_indeterm_corr_*.fig": plots of
|
||||
bivariate projections of the sample producing indeterminacy;
|
||||
\item[]\verb"<DYNARE_file>_prior_unstable_corr_*.fig": plots of
|
||||
\item[]\verb"<Dynare_file>_prior_unstable_corr_*.fig": plots of
|
||||
bivariate projections of the sample producing instability;
|
||||
\item[]\verb"<DYNARE_file>_prior_unacceptable_corr_*.fig": plots of
|
||||
\item[]\verb"<Dynare_file>_prior_unacceptable_corr_*.fig": plots of
|
||||
bivariate projections of the sample producing unacceptable
|
||||
solutions, i.e. either instability or indeterminacy or the
|
||||
solution could not be found (e.g. the steady state solution could
|
||||
not be found by the solver).
|
||||
\end{description}
|
||||
Similar conventions apply for \verb"<DYNARE_file>_mc_*.fig" files,
|
||||
Similar conventions apply for \verb"<Dynare_file>_mc_*.fig" files,
|
||||
obtained when samples from multivariate normal are used.
|
||||
|
||||
\subsection{RMSE analysis}
|
||||
Figure files \verb"<DYNARE_file>_rmse_*.fig" store results for the
|
||||
Figure files \verb"<Dynare_file>_rmse_*.fig" store results for the
|
||||
RMSE analysis.
|
||||
\begin{description}
|
||||
\item[]\verb"<DYNARE_file>_rmse_prior*.fig": save results for
|
||||
\item[]\verb"<Dynare_file>_rmse_prior*.fig": save results for
|
||||
the analysis using prior MC samples;
|
||||
\item[]\verb"<DYNARE_file>_rmse_mc*.fig": save results for
|
||||
\item[]\verb"<Dynare_file>_rmse_mc*.fig": save results for
|
||||
the analysis using multivariate normal MC samples;
|
||||
\item[]\verb"<DYNARE_file>_rmse_post*.fig": save results for
|
||||
\item[]\verb"<Dynare_file>_rmse_post*.fig": save results for
|
||||
the analysis using Metropolis posterior samples.
|
||||
\end{description}
|
||||
|
||||
|
@ -369,33 +368,33 @@ The following types of figures are saved (we show prior sample to
|
|||
fix ideas, but the same conventions are used for multivariate
|
||||
normal and posterior):
|
||||
\begin{description}
|
||||
\item[]\verb"<DYNARE_file>_rmse_prior_*.fig": for each parameter, plots the cdf's
|
||||
\item[]\verb"<Dynare_file>_rmse_prior_*.fig": for each parameter, plots the CDF's
|
||||
corresponding to the best 10\% RMES's of each observed series;
|
||||
\item[]\verb"<DYNARE_file>_rmse_prior_dens_*.fig": for each parameter, plots the pdf's
|
||||
\item[]\verb"<Dynare_file>_rmse_prior_dens_*.fig": for each parameter, plots the pdf's
|
||||
corresponding to the best 10\% RMES's of each observed series;
|
||||
\item[]\verb"<DYNARE_file>_rmse_prior_<name of observedseries>_corr_*.fig": for each observed series plots the
|
||||
\item[]\verb"<Dynare_file>_rmse_prior_<name of observedseries>_corr_*.fig": for each observed series plots the
|
||||
bi-dimensional projections of samples with the best 10\% RMSE's,
|
||||
when the correlation is significant;
|
||||
\item[]\verb"<DYNARE_file>_rmse_prior_lnlik*.fig": for each observed
|
||||
series, plots \emph{in red} the cdf of the log-likelihood
|
||||
corresponding to the best 10\% RMSE's, \emph{in green} the cdf of
|
||||
the rest of the sample and \emph{in blue }the cdf of the full
|
||||
\item[]\verb"<Dynare_file>_rmse_prior_lnlik*.fig": for each observed
|
||||
series, plots \emph{in red} the CDF of the log-likelihood
|
||||
corresponding to the best 10\% RMSE's, \emph{in green} the CDF of
|
||||
the rest of the sample and \emph{in blue }the CDF of the full
|
||||
sample; this allows to see the presence of some idiosyncratic
|
||||
behaviour;
|
||||
\item[]\verb"<DYNARE_file>_rmse_prior_lnpost*.fig": for each observed
|
||||
series, plots \emph{in red} the cdf of the log-posterior
|
||||
corresponding to the best 10\% RMSE's, \emph{in green} the cdf of
|
||||
the rest of the sample and \emph{in blue }the cdf of the full
|
||||
\item[]\verb"<Dynare_file>_rmse_prior_lnpost*.fig": for each observed
|
||||
series, plots \emph{in red} the CDF of the log-posterior
|
||||
corresponding to the best 10\% RMSE's, \emph{in green} the CDF of
|
||||
the rest of the sample and \emph{in blue }the CDF of the full
|
||||
sample; this allows to see idiosyncratic behaviour;
|
||||
\item[]\verb"<DYNARE_file>_rmse_prior_lnprior*.fig": for each observed
|
||||
series, plots \emph{in red} the cdf of the log-prior corresponding
|
||||
to the best 10\% RMSE's, \emph{in green} the cdf of the rest of
|
||||
the sample and \emph{in blue }the cdf of the full sample; this
|
||||
\item[]\verb"<Dynare_file>_rmse_prior_lnprior*.fig": for each observed
|
||||
series, plots \emph{in red} the CDF of the log-prior corresponding
|
||||
to the best 10\% RMSE's, \emph{in green} the CDF of the rest of
|
||||
the sample and \emph{in blue }the CDF of the full sample; this
|
||||
allows to see idiosyncratic behaviour;
|
||||
\item[]\verb"<DYNARE_file>_rmse_prior_lik_SA_*.fig": when
|
||||
\item[]\verb"<Dynare_file>_rmse_prior_lik_SA_*.fig": when
|
||||
\verb"lik_only=1", this shows the Smirnov tests for the filtering
|
||||
of the best 10\% log-likelihood values;
|
||||
\item[]\verb"<DYNARE_file>_rmse_prior_post_SA_*.fig": when
|
||||
\item[]\verb"<Dynare_file>_rmse_prior_post_SA_*.fig": when
|
||||
\verb"lik_only=1", this shows the Smirnov test for the filtering
|
||||
of the best 10\% log-posterior values.
|
||||
\end{description}
|
||||
|
@ -405,19 +404,19 @@ In the case of the mapping of the reduced form solution, synthetic
|
|||
figures are saved in the \verb"\GSA" folder:
|
||||
|
||||
\begin{description}
|
||||
\item[]\verb"<DYNARE_file>_redform_<endo name>_vs_lags_*.fig":
|
||||
\item[]\verb"<Dynare_file>_redform_<endo name>_vs_lags_*.fig":
|
||||
shows bar charts of the sensitivity indices for the \emph{ten most
|
||||
important} parameters driving the reduced form coefficients of the
|
||||
selected endogenous variables (\verb"namendo") versus lagged
|
||||
endogenous variables (\verb"namlagendo"); suffix \verb"log"
|
||||
indicates the results for log-transformed entries;
|
||||
\item[]\verb"<DYNARE_file>_redform_<endo name>_vs_shocks_*.fig":
|
||||
\item[]\verb"<Dynare_file>_redform_<endo name>_vs_shocks_*.fig":
|
||||
shows bar charts of the sensitivity indices for the \emph{ten most
|
||||
important} parameters driving the reduced form coefficients of the
|
||||
selected endogenous variables (\verb"namendo") versus exogenous
|
||||
variables (\verb"namexo"); suffix \verb"log" indicates the results
|
||||
for log-transformed entries;
|
||||
\item[]\verb"<DYNARE_file>_redform_GSA(_log).fig": shows bar chart of
|
||||
\item[]\verb"<Dynare_file>_redform_GSA(_log).fig": shows bar chart of
|
||||
all sensitivity indices for each parameter: this allows to notice
|
||||
parameters that have a minor effect for \emph{any} of the reduced
|
||||
form coefficients,
|
||||
|
@ -449,24 +448,24 @@ without the need of any user's intervention.
|
|||
\subsection{Screening analysis}
|
||||
The results of the screening analysis with Morris sampling design
|
||||
are stored in the subfolder \verb"\GSA\SCREEN". The data file
|
||||
\verb"<DYNARE_file>_prior" stores all the information of the
|
||||
\verb"<Dynare_file>_prior" stores all the information of the
|
||||
analysis (Morris sample, reduced form coefficients, etc.).
|
||||
|
||||
Screening analysis merely concerns reduced form coefficients.
|
||||
Similar synthetic bar charts as for the reduced form analysis with
|
||||
MC samples are saved:
|
||||
\begin{description}
|
||||
\item[]\verb"<DYNARE_file>_redform_<endo name>_vs_lags_*.fig":
|
||||
\item[]\verb"<Dynare_file>_redform_<endo name>_vs_lags_*.fig":
|
||||
shows bar charts of the elementary effect tests for the \emph{ten
|
||||
most important} parameters driving the reduced form coefficients
|
||||
of the selected endogenous variables (\verb"namendo") versus
|
||||
lagged endogenous variables (\verb"namlagendo");
|
||||
\item[]\verb"<DYNARE_file>_redform_<endo name>_vs_shocks_*.fig":
|
||||
\item[]\verb"<Dynare_file>_redform_<endo name>_vs_shocks_*.fig":
|
||||
shows bar charts of the elementary effect tests for the \emph{ten
|
||||
most important} parameters driving the reduced form coefficients
|
||||
of the selected endogenous variables (\verb"namendo") versus
|
||||
exogenous variables (\verb"namexo");
|
||||
\item[]\verb"<DYNARE_file>_redform_screen.fig": shows bar chart of
|
||||
\item[]\verb"<Dynare_file>_redform_screen.fig": shows bar chart of
|
||||
all elementary effect tests for each parameter: this allows to
|
||||
identify parameters that have a minor effect for \emph{any} of the
|
||||
reduced form coefficients.
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
\ifx\undefined\bysame
|
||||
\newcommand{\bysame}{\leavevmode\hbox to\leftmargin{\hrulefill\,\,}}
|
||||
\fi
|
||||
\begin{thebibliography}{xx}
|
||||
|
||||
\harvarditem[Collard and Juillard]{Collard and Juillard}{2001}{COLL/JUIL/01a}
|
||||
{ Collard, F. and M.~Juillard}, Accuracy of stochastic perturbation methods:
|
||||
The case of asset pricing models, {\it Journal of Economic Dynamics and
|
||||
Control}, 2001, {\it 25}, 979--999.
|
||||
|
||||
\harvarditem[Schmitt-Grohe and Uribe]{Schmitt-Grohe and Uribe}{2002}{SGU/02}
|
||||
{ Schmitt-Grohe, S. and M.~Uribe}, {\it Solving Dynamic General Equilibrium
|
||||
Models Using a Second-Order Approximation to the Policy Function}, technical
|
||||
working paper, Rutgers Univsersity 2002.
|
||||
|
||||
\end{thebibliography}
|
|
@ -1,9 +0,0 @@
|
|||
EXTRA_DIST = dynare-internals.org
|
||||
|
||||
if ENABLE_ORG_EXPORT
|
||||
html-local:
|
||||
emacs --batch --visit=dynare-internals.org --funcall org-html-export-to-html
|
||||
endif
|
||||
|
||||
clean-local:
|
||||
rm -rf *.html ltxpng
|
|
@ -2,7 +2,6 @@ function build_internal_documentation()
|
|||
% The name of the function should be explicit...
|
||||
|
||||
datafiles = [];
|
||||
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'initialize_dataset'}];
|
||||
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'descriptive_statistics'}];
|
||||
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'compute_stdv'}];
|
||||
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'compute_cova'}];
|
||||
|
@ -81,4 +80,4 @@ if rows(miscfiles)
|
|||
fprintf(fid,'\n\n\n');
|
||||
end
|
||||
end
|
||||
fclose(fid);
|
||||
fclose(fid);
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
EXTRA_DIST = source \
|
||||
utils/dynare_dom.py \
|
||||
utils/dynare_lex.py
|
||||
|
||||
SRC = $(wildcard source/*.rst)
|
||||
|
||||
html-local: build/html/index.html
|
||||
|
||||
build/html/index.html: $(SRC) source/conf.py
|
||||
$(SPHINXBUILD) -M html source build
|
||||
|
||||
pdf-local: build/latex/dynare-manual.pdf
|
||||
|
||||
build/latex/dynare-manual.pdf: $(SRC) source/conf.py
|
||||
$(SPHINXBUILD) -M latexpdf source build
|
||||
|
||||
clean-local:
|
||||
rm -rf build
|
||||
rm -rf utils/__pycache__
|
|
@ -1 +0,0 @@
|
|||
/usr/share/javascript/mathjax/
|
|
@ -13,20 +13,23 @@ Bibliography
|
|||
* Andrews, Donald W.K (1991): “Heteroskedasticity and autocorrelation consistent covariance matrix estimation”, *Econometrica*, 59(3), 817–858.
|
||||
* Backus, David K., Patrick J. Kehoe, and Finn E. Kydland (1992): “International Real Business Cycles,” *Journal of Political Economy*, 100(4), 745–775.
|
||||
* Baxter, Marianne and Robert G. King (1999): “Measuring Business Cycles: Approximate Band-pass Filters for Economic Time Series,” *Review of Economics and Statistics*, 81(4), 575–593.
|
||||
* Bini, Dario A., Guy Latouche, and Beatrice Meini (2002): “Solving matrix polynomial equations arising in queueing problems,” *Linear Algebra and its Applications*, 340, 225–244.
|
||||
* Born, Benjamin and Johannes Pfeifer (2014): “Policy risk and the business cycle”, *Journal of Monetary Economics*, 68, 68-85.
|
||||
* Boucekkine, Raouf (1995): “An alternative methodology for solving nonlinear forward-looking models,” *Journal of Economic Dynamics and Control*, 19, 711–734.
|
||||
* Brayton, Flint and Peter Tinsley (1996): "A Guide to FRB/US: A Macroeconomic Model of the United States", *Finance and Economics Discussion Series*, 1996-42.
|
||||
* Brayton, Flint, Morris Davis and Peter Tulip (2000): "Polynomial Adjustment Costs in FRB/US", *Unpublished manuscript*.
|
||||
* Brayton, Flint and Peter Tinsley (1996): “A Guide to FRB/US: A Macroeconomic Model of the United States,” *Finance and Economics Discussion Series*, 1996-42.
|
||||
* Brayton, Flint, Morris Davis and Peter Tulip (2000): “Polynomial Adjustment Costs in FRB/US,” *Unpublished manuscript*.
|
||||
* Brooks, Stephen P., and Andrew Gelman (1998): “General methods for monitoring convergence of iterative simulations,” *Journal of Computational and Graphical Statistics*, 7, pp. 434–455.
|
||||
* Cardoso, Margarida F., R. L. Salcedo and S. Feyo de Azevedo (1996): “The simplex simulated annealing approach to continuous non-linear optimization,” *Computers & Chemical Engineering*, 20(9), 1065-1080.
|
||||
* Chib, Siddhartha and Srikanth Ramamurthy (2010): “Tailored randomized block MCMC methods with application to DSGE models,” *Journal of Econometrics*, 155, 19–38.
|
||||
* Christiano, Lawrence J., Martin Eichenbaum and Charles L. Evans (2005): “Nominal Rigidities and the Dynamic Effects of a Shock to Monetary Policy,” *Journal of Political Economy*, 113(1), 1–45.
|
||||
* Christiano, Lawrence J., Mathias Trabandt, and Karl Walentin (2010): “DSGE Models for Monetary Policy Analysis,” In: *Handbook of Monetary Economics 3*, 285–367.
|
||||
* Christiano, Lawrence J., Mathias Trabandt and Karl Walentin (2011): “Introducing financial frictions and unemployment into a small open economy model,” *Journal of Economic Dynamics and Control*, 35(12), 1999–2041.
|
||||
* Christoffel, Kai, Günter Coenen and Anders Warne (2010): “Forecasting with DSGE models,” *ECB Working Paper Series*, 1185.
|
||||
* Collard, Fabrice (2001): “Stochastic simulations with Dynare: A practical guide”.
|
||||
* Collard, Fabrice and Michel Juillard (2001a): “Accuracy of stochastic perturbation methods: The case of asset pricing models,” *Journal of Economic Dynamics and Control*, 25, 979–999.
|
||||
* Collard, Fabrice and Michel Juillard (2001b): “A Higher-Order Taylor Expansion Approach to Simulation of Stochastic Forward-Looking Models with an Application to a Non-Linear Phillips Curve,” *Computational Economics*, 17, 125–139.
|
||||
* Corana, Angelo, M. Marchesi, Claudio Martini, and Sandro Ridella (1987): “Minimizing multimodal functions of continuous variables with the “simulated annealing” algorithm”, *ACM Transactions on Mathematical Software*, 13(3), 262–280.
|
||||
* Cuba-Borda, Pablo, Luca Guerrieri, Matteo Iacoviello, and Molin Zhong (2019): "Likelihood evaluation of models with occasionally binding constraints", Journal of Applied Econometrics, 34(7), 1073-1085
|
||||
* Cuba-Borda, Pablo, Luca Guerrieri, Matteo Iacoviello, and Molin Zhong (2019): “Likelihood evaluation of models with occasionally binding constraints,” Journal of Applied Econometrics, 34(7), 1073-1085
|
||||
* Del Negro, Marco and Frank Schorfheide (2004): “Priors from General Equilibrium Models for VARs”, *International Economic Review*, 45(2), 643–673.
|
||||
* Dennis, Richard (2007): “Optimal Policy In Rational Expectations Models: New Solution Algorithms”, *Macroeconomic Dynamics*, 11(1), 31–55.
|
||||
* Duffie, Darrel and Kenneth J. Singleton (1993): “Simulated Moments Estimation of Markov Models of Asset Prices”, *Econometrica*, 61(4), 929-952.
|
||||
|
@ -46,6 +49,7 @@ Bibliography
|
|||
* Hansen, Lars P. (1982): “Large sample properties of generalized method of moments estimators,” Econometrica, 50(4), 1029–1054.
|
||||
* Hansen, Nikolaus and Stefan Kern (2004): “Evaluating the CMA Evolution Strategy on Multimodal Test Functions”. In: *Eighth International Conference on Parallel Problem Solving from Nature PPSN VIII*, Proceedings, Berlin: Springer, 282–291.
|
||||
* Harvey, Andrew C. and Garry D.A. Phillips (1979): “Maximum likelihood estimation of regression models with autoregressive-moving average disturbances,” *Biometrika*, 66(1), 49–58.
|
||||
* Herbst, Edward and Schorfheide, Frank (2014): “Sequential Monte Carlo Sampling for DSGE Models,” *Journal of Applied Econometrics*, 29, 1073-1098.
|
||||
* Herbst, Edward (2015): “Using the “Chandrasekhar Recursions” for Likelihood Evaluation of DSGE Models,” *Computational Economics*, 45(4), 693–705.
|
||||
* Ireland, Peter (2004): “A Method for Taking Models to the Data,” *Journal of Economic Dynamics and Control*, 28, 1205–26.
|
||||
* Iskrev, Nikolay (2010): “Local identification in DSGE models,” *Journal of Monetary Economics*, 57(2), 189–202.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2018-2022 Dynare Team
|
||||
# Copyright © 2018-2024 Dynare Team
|
||||
#
|
||||
# This file is part of Dynare.
|
||||
#
|
||||
|
@ -31,20 +31,14 @@ templates_path = ['_templates']
|
|||
|
||||
html_static_path = ['_static']
|
||||
|
||||
mathjax_path = 'mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
|
||||
|
||||
master_doc = 'index'
|
||||
|
||||
project = u'Dynare'
|
||||
copyright = u'1996–2022 Dynare Team'
|
||||
copyright = u'1996–2024 Dynare Team'
|
||||
author = u'Dynare Team'
|
||||
|
||||
add_function_parentheses = False
|
||||
|
||||
# See ../utils/version.py, which is generated by autoconf
|
||||
from version import version
|
||||
from version import release
|
||||
|
||||
language = 'en'
|
||||
|
||||
exclude_patterns = []
|
||||
|
@ -77,12 +71,11 @@ latex_elements = {
|
|||
warningBorderColor={RGB}{255,50,50},OuterLinkColor={RGB}{34,139,34}, \
|
||||
InnerLinkColor={RGB}{51,51,255},TitleColor={RGB}{51,51,255}',
|
||||
'papersize': 'a4paper',
|
||||
'preamble': r'\DeclareUnicodeCharacter{200B}{}', # Part of the workaround for #1707
|
||||
}
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'dynare-manual.tex', u'Dynare Reference Manual',
|
||||
u'Dynare team', 'manual'),
|
||||
u'Dynare Team', 'manual'),
|
||||
]
|
||||
|
||||
man_pages = [
|
||||
|
|
|
@ -8,6 +8,20 @@
|
|||
Dynare misc commands
|
||||
####################
|
||||
|
||||
.. matcomm:: send_endogenous_variables_to_workspace ;
|
||||
|
||||
Puts the simulation results for the endogenous variables stored in ``oo_.endo_simul``
|
||||
into vectors with the same name as the respective variables into the base workspace.
|
||||
|
||||
.. matcomm:: send_exogenous_variables_to_workspace ;
|
||||
|
||||
Puts the simulation results for the exogenous variables stored in ``oo_.exo_simul``
|
||||
into vectors with the same name as the respective variables into the base workspace.
|
||||
|
||||
.. matcomm:: send_irfs_to_workspace ;
|
||||
|
||||
Puts the IRFs stored in ``oo_.irfs`` into vectors with the same name into the base workspace.
|
||||
|
||||
.. command:: prior_function(OPTIONS);
|
||||
|
||||
Executes a user-defined function on parameter draws from the prior
|
||||
|
@ -53,8 +67,9 @@ Dynare misc commands
|
|||
.. command:: generate_trace_plots(CHAIN_NUMBER);
|
||||
|
||||
Generates trace plots of the MCMC draws for all estimated
|
||||
parameters and the posterior density in the specified Markov Chain
|
||||
``CHAIN_NUMBER``.
|
||||
parameters and the posterior density for the specified Markov Chain(s)
|
||||
``CHAIN_NUMBER``. If ``CHAIN_NUMBER`` is a vector of integers, the trace plots
|
||||
will plot contains separate lines for each chain.
|
||||
|
||||
|br|
|
||||
|
||||
|
@ -154,7 +169,7 @@ Dynare misc commands
|
|||
|
||||
|br|
|
||||
|
||||
.. matcomm:: prior [OPTIONS[, ...]];
|
||||
.. matcomm:: prior [OPTIONS[ ...]];
|
||||
|
||||
Prints information about the prior distribution given the provided
|
||||
options. If no options are provided, the command returns the list of
|
||||
|
@ -215,27 +230,97 @@ Dynare misc commands
|
|||
Searches all occurrences of a variable in a model, and prints the
|
||||
equations where the variable appear in the command line window. If OPTION is
|
||||
set to `withparamvalues`, the values of the parameters (if available) are
|
||||
displayed instead of the name of the parameters.
|
||||
displayed instead of the name of the parameters. Requires the `json` command
|
||||
line option to be set.
|
||||
|
||||
*Example*
|
||||
|
||||
Assuming that we already ran a `.mod` file and that the workspace has not
|
||||
been cleaned after, we can search for all the equations containing variable `X`
|
||||
Assuming that we already ran a `.mod` file and that the workspace has not
|
||||
been cleaned after, we can search for all the equations containing variable `X`
|
||||
|
||||
::
|
||||
::
|
||||
|
||||
>> search X
|
||||
>> search X
|
||||
|
||||
Y = alpha*X/(1-X)+e;
|
||||
Y = alpha*X/(1-X)+e;
|
||||
|
||||
diff(X) = beta*(X(-1)-mX) + gamma1*Z + gamma2*R + u;
|
||||
diff(X) = beta*(X(-1)-mX) + gamma1*Z + gamma2*R + u;
|
||||
|
||||
To replace the parameters with estimated or calibrated parameters:
|
||||
To replace the parameters with estimated or calibrated parameters:
|
||||
|
||||
::
|
||||
::
|
||||
|
||||
>> search X withparamvalues
|
||||
>> search X withparamvalues
|
||||
|
||||
Y = 1.254634*X/(1-X)+e;
|
||||
Y = 1.254634*X/(1-X)+e;
|
||||
|
||||
diff(X) = -0.031459*(X(-1)-mX) + 0.1*Z - 0.2*R + u;
|
||||
diff(X) = -0.031459*(X(-1)-mX) + 0.1*Z - 0.2*R + u;
|
||||
|
||||
|br|
|
||||
|
||||
|
||||
.. matcomm:: dplot [OPTION VALUE[ ...]]
|
||||
|
||||
Plot expressions extracting data from different dseries objects.
|
||||
|
||||
*Options*
|
||||
|
||||
.. option:: --expression EXPRESSION
|
||||
|
||||
``EXPRESSION`` is a mathematical expression involving variables
|
||||
available in the dseries objects, dseries methods, numbers or
|
||||
parameters. All the referenced objects are supposed to be
|
||||
available in the calling workspace.
|
||||
|
||||
.. option:: --dseries NAME
|
||||
|
||||
``NAME`` is the name of a dseries object from which the
|
||||
variables involved in ``EXPRESSION`` will be extracted.
|
||||
|
||||
.. option:: --range DATE1:DATE2
|
||||
|
||||
This option is not mandatory and allows to plot the expressions
|
||||
only over a sub-range. ``DATE1`` and ``DATE2`` must be dates as
|
||||
defined in :ref:`dates in a mod file`.
|
||||
|
||||
.. option:: --style MATLAB_SCRIPT_NAME
|
||||
|
||||
Name of a Matlab script (without extension) containing Matlab
|
||||
commands to customize the produced figure.
|
||||
|
||||
.. option:: --title MATLAB_STRING
|
||||
|
||||
Adds a title to the figure.
|
||||
|
||||
.. option:: --with-legend
|
||||
|
||||
Prints a legend below the produced plot.
|
||||
|
||||
*Remarks*
|
||||
|
||||
- More than one --expression argument is allowed, and they must come first.
|
||||
|
||||
- For each dseries object we plot all the expressions. We use two
|
||||
nested loops, the outer loop is over the dseries objects and the
|
||||
inner loop over the expressions. This determines the ordering of
|
||||
the plotted lines.
|
||||
|
||||
- All dseries objects must be defined in the calling workspace, if a
|
||||
dseries object is missing the routine throws a warning (we only
|
||||
build the plots for the available dseries objects), if all dseries
|
||||
objects are missing the routine throws an error.
|
||||
|
||||
- If the range is not provided, the expressions cannot involve leads or lags.
|
||||
|
||||
*Example*
|
||||
|
||||
::
|
||||
|
||||
>> toto = dseries(randn(100,3), dates('2000Q1'), {'x','y','z'});
|
||||
>> noddy = dseries(randn(100,3), dates('2000Q1'), {'x','y','z'});
|
||||
>> b = 3;
|
||||
>> dplot --expression 2/b*cumsum(x/y(-1)-1) --dseries toto --dseries noddy --range 2001Q1:2024Q1 --title 'This is my plot'
|
||||
|
||||
will produce plots for ``2/b*cumsum(x/y(-1)-1)``, where ``x`` and
|
||||
``y`` are variables in dseries objects ``toto`` and ``noddy``, in
|
||||
the same figure.
|
||||
|
|
|
@ -5,13 +5,13 @@ Currently the development team of Dynare is composed of:
|
|||
|
||||
* Stéphane Adjemian (Le Mans Université, Gains)
|
||||
* Michel Juillard (Banque de France)
|
||||
* Sumudu Kankanamge (Toulouse School of Economics and CEPREMAP)
|
||||
* Sumudu Kankanamge (Le Mans Université and CEPREMAP)
|
||||
* Frédéric Karamé (Le Mans Université, Gains and CEPREMAP)
|
||||
* Junior Maih (Norges Bank)
|
||||
* Willi Mutschler (University of Tübingen)
|
||||
* Johannes Pfeifer (University of the Bundeswehr Munich)
|
||||
* Marco Ratto (European Commission, Joint Research Centre - JRC)
|
||||
* Normann Rion (CY Cergy Paris Université and CEPREMAP)
|
||||
* Normann Rion (CEPREMAP)
|
||||
* Sébastien Villemot (CEPREMAP)
|
||||
|
||||
The following people used to be members of the team:
|
||||
|
@ -26,7 +26,7 @@ The following people used to be members of the team:
|
|||
* Ferhat Mihoubi
|
||||
* George Perendia
|
||||
|
||||
Copyright © 1996-2023, Dynare Team.
|
||||
Copyright © 1996-2024, Dynare Team.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
|
||||
|
|
|
@ -8,14 +8,14 @@ Software requirements
|
|||
=====================
|
||||
|
||||
Packaged versions of Dynare are available for Windows (10 and 11), several
|
||||
GNU/Linux distributions (Debian, Ubuntu, Linux Mint, Arch Linux), macOS (12
|
||||
“Monterey”), and FreeBSD. Dynare should work on other systems, but some
|
||||
GNU/Linux distributions (Debian, Ubuntu, Linux Mint, Arch Linux), macOS (13
|
||||
Ventura), and FreeBSD. Dynare should work on other systems, but some
|
||||
compilation steps are necessary in that case.
|
||||
|
||||
In order to run Dynare, you need one of the following:
|
||||
|
||||
* MATLAB, any version ranging from 8.3 (R2014a) to 9.14 (R2023a);
|
||||
* GNU Octave, any version ranging from 6.2.0 to 8.2.0, with the statistics package
|
||||
* MATLAB, any version ranging from 9.5 (R2018b) to 23.2 (R2023b);
|
||||
* GNU Octave, any version ranging from 7.1.0 to 8.4.0, with the ``statistics`` package
|
||||
from `Octave-Forge`_. Note however that the Dynare installer for Windows
|
||||
requires a more specific version of Octave, as indicated on the download
|
||||
page.
|
||||
|
@ -26,8 +26,8 @@ extra features, but are in no way required:
|
|||
* If under MATLAB: the Optimization Toolbox, the Statistics Toolbox,
|
||||
the Control System Toolbox;
|
||||
|
||||
* If under Octave, the following `Octave-Forge`_ packages: ``optim, io,
|
||||
control``.
|
||||
* If under Octave, the following `Octave-Forge`_ packages: ``optim``, ``io``,
|
||||
``control``.
|
||||
|
||||
|
||||
Installation of Dynare
|
||||
|
@ -95,29 +95,23 @@ With MATLAB
|
|||
^^^^^^^^^^^
|
||||
|
||||
To install Dynare for use with MATLAB, execute the automated installer called
|
||||
``dynare-x.y.pkg`` (where *x.y* is the version number), and follow the
|
||||
instructions. The default installation directory is
|
||||
``/Applications/Dynare/x.y``. After installation, this directory will contain
|
||||
several sub-directories, among which are ``matlab``, ``mex``, and ``doc``.
|
||||
``dynare-x.y-arch.pkg`` (where *x.y* is the version number and *arch* is either arm64 for Apple Silicon or x86_64 for Intel architectures),
|
||||
and follow the instructions.
|
||||
This installation does not require administrative privileges.
|
||||
If for some reason admin rights are requested, use *Change Install Location* and select *Install for me only*.
|
||||
The default installation directory is ``/Applications/Dynare/x.y-arch``.
|
||||
Installing into ``/Applications/dynare`` might fail if you have older versions of Dynare already installed in ``/Applications/Dynare``.
|
||||
To fix this, modify the ownership by executing the following command in Terminal.app::
|
||||
|
||||
Note that several versions of Dynare can coexist (by default in
|
||||
``/Applications/Dynare``), as long as you correctly adjust your path
|
||||
settings (see :ref:`words-warning`).
|
||||
sudo chown -R "$USER":staff /Applications/Dynare
|
||||
|
||||
By default, the installer installs a version of GCC (for use with :opt:`use_dll`)
|
||||
in the installation directory, under the ``.brew`` folder. To do so, it also
|
||||
installs a version of Homebrew_ in the same folder and
|
||||
Xcode Command Line Tools (this is an Apple product) in a system folder.
|
||||
Alternatively, you can modify the installation path in the automated installed using *Customize* and *Location*.
|
||||
After installation, the folder will contain several sub-directories, among which are ``matlab``, ``mex``, and ``doc``.
|
||||
Several versions of Dynare can coexist (by default in ``/Applications/Dynare``),
|
||||
as long as you correctly adjust your path settings (see :ref:`words-warning`).
|
||||
|
||||
All of this requires a bit of time and hard disk space. The amount of time it
|
||||
takes will depend on your computing power and internet connection. To reduce
|
||||
the time the Dynare installer takes, you can install Xcode Command Line Tools
|
||||
yourself (see :ref:`prerequisites-macos`). Dynare, Homebrew, and GCC use
|
||||
about 600 MB of disk space while the Xcode Command Line Tools require about 400
|
||||
MB.
|
||||
|
||||
If you do not use the :opt:`use_dll` option, you have the choice to forgo the
|
||||
installation of GCC and hence Dynare will only take about 50 MB of disk space.
|
||||
It is recommended to install the Xcode Command Line Tools (this is an Apple product)
|
||||
and GCC via Homebrew_ (see :ref:`prerequisites-macos`).
|
||||
|
||||
With Octave
|
||||
^^^^^^^^^^^
|
||||
|
@ -192,8 +186,26 @@ Dynare now ships a compilation environment that can be used with the
|
|||
:opt:`use_dll` option. To install this environment correctly, the Dynare
|
||||
installer ensures that the Xcode Command Line Tools (an Apple product) have
|
||||
been installed on a system folder. To install the Xcode Command Line Tools
|
||||
yourself, simply type ``xcode-select --install`` into the Terminal
|
||||
yourself, simply type ``xcode-select --install`` into the terminal
|
||||
(``/Applications/Utilities/Terminal.app``) prompt.
|
||||
Additionally, to make MATLAB aware that you agree to the terms of Xcode, run the following two commands in the Terminal prompt::
|
||||
|
||||
CLT_VERSION=$(pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version | awk '{print $2}' | cut -d'.' -f1-2)
|
||||
defaults write com.apple.dt.Xcode IDEXcodeVersionForAgreedToGMLicense "${CLT_VERSION}"
|
||||
defaults read com.apple.dt.Xcode IDEXcodeVersionForAgreedToGMLicense
|
||||
|
||||
Otherwise you will see a warning that Xcode is installed, but its license has not been accepted.
|
||||
You can check this e.g. by running the following command in the MATLAB command window::
|
||||
|
||||
mex -setup
|
||||
|
||||
Moreover, we recommend making use of optimized compilation flags when using :opt:`use_dll` and for this you need to install GCC via Homebrew_::
|
||||
|
||||
brew install gcc
|
||||
|
||||
If you already have installed GCC, Dynare will automatically prefer it for :opt:`use_dll`
|
||||
if the binaries are either in ``/opt/homebrew/bin`` on Apple Silicon (arm64) or in ``/usr/local/bin`` on Intel (x86_64) systems.
|
||||
Otherwise, it will fall back to Clang in ``/usr/bin/clang``, which works both on arm64 and x86_64 systems.
|
||||
|
||||
With Octave
|
||||
^^^^^^^^^^^
|
||||
|
|
|
@ -94,26 +94,24 @@ Citing Dynare in your research
|
|||
You should cite Dynare if you use it in your research. The
|
||||
recommended way todo this is to cite the present manual, as:
|
||||
|
||||
Stéphane Adjemian, Houtan Bastani, Michel Juillard, Frédéric Karamé,
|
||||
Ferhat Mihoubi, Willi Mutschler, Johannes Pfeifer, Marco Ratto,
|
||||
Normann Rion and Sébastien Villemot (2022), “Dynare: Reference Manual,
|
||||
Version 5,” *Dynare Working Papers*, 72, CEPREMAP
|
||||
Stéphane Adjemian, Michel Juillard, Frédéric Karamé, Willi Mutschler,
|
||||
Johannes Pfeifer, Marco Ratto, Normann Rion and Sébastien Villemot (2024),
|
||||
“Dynare: Reference Manual, Version 6,” *Dynare Working Papers*, 80, CEPREMAP
|
||||
|
||||
For convenience, you can copy and paste the following into your BibTeX file:
|
||||
|
||||
.. code-block:: bibtex
|
||||
|
||||
@TechReport{Adjemianetal2022,
|
||||
author = {Adjemian, St\'ephane and Bastani, Houtan and
|
||||
Juillard, Michel and Karam\'e, Fr\'ederic and
|
||||
Mihoubi, Ferhat and Mutschler, Willi
|
||||
and Pfeifer, Johannes and Ratto, Marco and
|
||||
@TechReport{Adjemianetal2024,
|
||||
author = {Adjemian, St\'ephane and Juillard, Michel and
|
||||
Karam\'e, Fr\'ederic and Mutschler, Willi and
|
||||
Pfeifer, Johannes and Ratto, Marco and
|
||||
Rion, Normann and Villemot, S\'ebastien},
|
||||
title = {Dynare: Reference Manual Version 5},
|
||||
year = {2022},
|
||||
title = {Dynare: Reference Manual, Version 6},
|
||||
year = {2024},
|
||||
institution = {CEPREMAP},
|
||||
type = {Dynare Working Papers},
|
||||
number = {72},
|
||||
number = {80},
|
||||
}
|
||||
|
||||
If you want to give a URL, use the address of the Dynare website:
|
||||
|
|
|
@ -204,7 +204,7 @@ by the ``dynare`` command.
|
|||
.. option:: params_derivs_order=0|1|2
|
||||
|
||||
When :comm:`identification`, :comm:`dynare_sensitivity` (with
|
||||
identification), or :ref:`estimation_cmd <estim-comm>` are
|
||||
identification), or :ref:`estimation <estim-comm>` are
|
||||
present, this option is used to limit the order of the
|
||||
derivatives with respect to the parameters that are calculated
|
||||
by the preprocessor. 0 means no derivatives, 1 means first
|
||||
|
@ -409,9 +409,11 @@ by the ``dynare`` command.
|
|||
|
||||
.. option:: fast
|
||||
|
||||
Only useful with model option :opt:`use_dll`. Don’t recompile the
|
||||
MEX files when running again the same model file and the lists
|
||||
of variables and the equations haven’t changed. We use a 32
|
||||
Don’t rewrite the output files otherwise written to the disk by the preprocessor
|
||||
when re-running the same model file while the lists of variables and the equations
|
||||
haven’t changed. Note that the whole model still needs to be preprocessed. This option
|
||||
is most useful with model option :opt:`use_dll`, because
|
||||
the time-consuming compilation of the MEX files will be skipped. We use a 32
|
||||
bit checksum, stored in ``<model filename>/checksum``. There
|
||||
is a very small probability that the preprocessor misses a
|
||||
change in the model. In case of doubt, re-run without the fast
|
||||
|
@ -552,7 +554,7 @@ by the ``dynare`` command.
|
|||
executing the ``dynare`` command will leave variables containing
|
||||
results in the workspace available for further processing. More
|
||||
details are given under the relevant computing tasks. The
|
||||
``M_``,``oo_``, and ``options_`` structures are saved in a file
|
||||
``M_``, ``oo_``, and ``options_`` structures are saved in a file
|
||||
called ``FILENAME_results.mat`` located in the ``MODFILENAME/Output`` folder.
|
||||
If they exist, ``estim_params_``,
|
||||
``bayestopt_``, ``dataset_``, ``oo_recursive_`` and
|
||||
|
|
|
@ -15,11 +15,16 @@ related to the model (and hence not placed in the model file). At the
|
|||
moment, it is only used when using Dynare to run parallel
|
||||
computations.
|
||||
|
||||
On Linux and macOS, the default location of the configuration file is
|
||||
``$HOME/.dynare``, while on Windows it is ``%APPDATA%\dynare.ini``
|
||||
(typically ``c:\Users\USERNAME\AppData\dynare.ini``). You
|
||||
can specify a non standard location using the ``conffile`` option of
|
||||
the ``dynare`` command (see :ref:`dyn-invoc`).
|
||||
On Linux and macOS, the configuration file is searched by default under
|
||||
``dynare/dynare.ini`` in the configuration directories defined by the XDG
|
||||
specification (typically ``$HOME/.config/dynare/dynare.ini`` for the
|
||||
user-specific configuration and ``/etc/xdg/dynare/dynare.ini`` for the
|
||||
system-wide configuration, the former having precedence over the latter). Under
|
||||
Windows, the configuration file is searched by default in
|
||||
``%APPDATA%\dynare\dynare.ini`` (typically
|
||||
``c:\Users\USERNAME\AppData\Roaming\dynare\dynare.ini``). You can specify a non
|
||||
standard location using the ``conffile`` option of the ``dynare`` command (see
|
||||
:ref:`dyn-invoc`).
|
||||
|
||||
The parsing of the configuration file is case-sensitive and it should
|
||||
take the following form, with each option/choice pair placed on a
|
||||
|
@ -54,7 +59,7 @@ conventions such as ``USER_NAME`` have been excluded for concision):
|
|||
``PATH_AND_FILE``
|
||||
|
||||
Indicates a valid path to a file in the underlying operating
|
||||
system (e.g. ``/usr/local/MATLAB/R2010b/bin/matlab``).
|
||||
system (e.g. ``/usr/local/MATLAB/R2023b/bin/matlab``).
|
||||
|
||||
``BOOLEAN``
|
||||
|
||||
|
@ -76,8 +81,15 @@ processing. Currently, there is only one option available.
|
|||
|
||||
.. option:: GlobalInitFile = PATH_AND_FILE
|
||||
|
||||
The location of the global initialization file to be run at
|
||||
the end of ``global_initialization.m``.
|
||||
The location of a global initialization file that can be used to
|
||||
customize some Dynare internals (typically default option values). This
|
||||
is a MATLAB/Octave script.
|
||||
|
||||
If this option is not specified, Dynare will look for a
|
||||
``global_init.m`` file in its configuration directory (typically
|
||||
``$HOME/.config/dynare/global_init.m`` under Linux and macOS, and
|
||||
``c:\Users\USERNAME\AppData\Roaming\dynare\global_init.m`` under
|
||||
Windows).
|
||||
|
||||
*Example*
|
||||
|
||||
|
@ -270,20 +282,42 @@ lines starting with a hashtag (#).
|
|||
.. option:: MatlabOctavePath = PATH_AND_FILE
|
||||
|
||||
The path to the MATLAB or Octave executable. The default value
|
||||
is ``matlab`` as MATLAB's executable is typically in the %PATH% environment
|
||||
is ``matlab`` as MATLAB’s executable is typically in the %PATH% environment
|
||||
variable. When using full paths on Windows, you may need to enclose the path
|
||||
in quoted strings, e.g. ``MatlabOctavePath="C:\Program Files\MATLAB\R2023a\bin\matlab.exe"``
|
||||
in quoted strings, e.g. ``MatlabOctavePath="C:\Program Files\MATLAB\R2023b\bin\matlab.exe"``
|
||||
|
||||
.. option:: NumberOfThreadsPerJob = INTEGER
|
||||
|
||||
For Windows nodes, sets the number of threads assigned to each
|
||||
remote MATLAB/Octave run. The default value is 1.
|
||||
This option controls the distribution of jobs (e.g. MCMC chains) across additional MATLAB instances that are run in parallel.
|
||||
Needs to be an exact divisor of the number of cores.
|
||||
The formula :opt:`CPUnbr <CPUnbr = INTEGER | [INTEGER:INTEGER]>` divided by :opt:`NumberOfThreadsPerJob <NumberOfThreadsPerJob = INTEGER>`
|
||||
calculates the number of MATLAB/Octave instances that will be launched in parallel,
|
||||
where each instance will then execute a certain number of jobs sequentially.
|
||||
For example, if you run a MCMC estimation with 24 chains on a 12 core machine, setting ``CPUnbr = 12`` and ``NumberOfThreadsPerJob = 4``
|
||||
will launch 3 MATLAB instances in parallel, each of which will compute 8 chains sequentially.
|
||||
Note that this option does not dictate the number of maximum threads utilized by each MATLAB/Octave instance,
|
||||
see related option :opt:`SingleCompThread <SingleCompThread = BOOLEAN>` for this.
|
||||
Particularly for very large models, setting this option to 2 might distribute the workload in a
|
||||
more efficient manner, depending on your hardware and task specifics.
|
||||
It’s advisable to experiment with different values to achieve optimal performance.
|
||||
The default value is ``1``.
|
||||
|
||||
|
||||
.. option:: SingleCompThread = BOOLEAN
|
||||
|
||||
Whether or not to disable MATLAB’s native multithreading. The
|
||||
default value is ``false``. Option meaningless under Octave.
|
||||
This option allows you to enable or disable MATLAB’s native multithreading capability. When set to ``true``,
|
||||
the additional MATLAB instances are initiated in single thread mode utilizing the ``-singleCompThread`` startup option,
|
||||
thereby disabling MATLAB’s native multithreading. When set to ``false``, MATLAB’s native multithreading
|
||||
is enabled, e.g. the actual number of threads utilized by each MATLAB instance is usually determined by the number of CPU cores
|
||||
(you can check this by running ``maxNumCompThreads`` in MATLAB’s command window).
|
||||
Note: While MATLAB aims to accelerate calculations by distributing them across your computer’s threads,
|
||||
certain tasks, like MCMC estimations, may exhibit slowdowns with MATLAB’s multitasking especially when Dynare’s parallel computing is turned on
|
||||
as we do not use MATLAB’s parallel toolbox.
|
||||
So in many cases it is advisable to set this setting to ``true``.
|
||||
If you want to have more control, you can manually add the MATLAB command `maxNumCompThreads(N)` at the beginning of `fParallel.m`.
|
||||
The default value is ``false``. This option is ineffective under Octave.
|
||||
|
||||
|
||||
.. option:: OperatingSystem = OPERATING_SYSTEM
|
||||
|
||||
The operating system associated with a node. Only necessary
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -22,6 +22,8 @@ Dates
|
|||
=====
|
||||
.. highlight:: matlab
|
||||
|
||||
.. _dates in a mod file:
|
||||
|
||||
Dates in a mod file
|
||||
-------------------
|
||||
|
||||
|
@ -2598,8 +2600,10 @@ The dseries class
|
|||
.. dseriesmethod:: C = remove (A, B)
|
||||
remove_ (A, B)
|
||||
|
||||
|br| Alias for the ``pop`` method with two arguments. Removes
|
||||
variable ``B`` from ``dseries`` object ``A``.
|
||||
|br| If ``B`` is a row char array, the name of a variable, these methods
|
||||
are aliases for ``pop`` and ``pop_`` methods with two arguments. They
|
||||
remove variable ``B`` from ``dseries`` object ``A``. To remove more than
|
||||
one variable, one can pass a cell of row char arrays for ``B``.
|
||||
|
||||
*Example*
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2018-2019 Dynare Team
|
||||
# Copyright © 2018-2024 Dynare Team
|
||||
#
|
||||
# This file is part of Dynare.
|
||||
#
|
||||
|
@ -80,9 +80,7 @@ class DynObject(ObjectDescription):
|
|||
signode += addnodes.desc_name(name, name)
|
||||
|
||||
if self.has_arguments:
|
||||
if not arglist:
|
||||
signode += addnodes.desc_parameterlist()
|
||||
else:
|
||||
if arglist:
|
||||
signode += addnodes.desc_addname(arglist,arglist)
|
||||
return fullname, prefix
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ class DynareLexer(RegexLexer):
|
|||
"addSeries","addParagraph","addVspace","write","compile")
|
||||
|
||||
operators = (
|
||||
"STEADY_STATE","EXPECTATION","var_expectation","pac_expectation")
|
||||
"STEADY_STATE","EXPECTATION","var_expectation","pac_expectation","pac_target_nonstationary")
|
||||
|
||||
macro_dirs = (
|
||||
"@#includepath", "@#include", "@#define", "@#if",
|
||||
|
@ -83,7 +83,8 @@ class DynareLexer(RegexLexer):
|
|||
'osr_params_bounds','ramsey_constraints','irf_calibration',
|
||||
'moment_calibration','identification','svar_identification',
|
||||
'matched_moments','occbin_constraints','surprise','overwrite','bind','relax',
|
||||
'verbatim','end','node','cluster','paths','hooks'), prefix=r'\b', suffix=r'\s*\b'),Keyword.Reserved),
|
||||
'verbatim','end','node','cluster','paths','hooks','target','pac_target_info','auxname_target_nonstationary',
|
||||
'component', 'growth', 'auxname', 'kind'), prefix=r'\b', suffix=r'\s*\b'),Keyword.Reserved),
|
||||
|
||||
# FIXME: Commands following multiline comments are not highlighted properly.
|
||||
(words(commands + report_commands,
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
version = u'@PACKAGE_VERSION@'
|
||||
release = u'@PACKAGE_VERSION@'
|
|
@ -1,29 +0,0 @@
|
|||
if ENABLE_DOC
|
||||
pdf-local: parallel.pdf
|
||||
endif
|
||||
|
||||
SRC = AvenueParadigm.pdf iVaNo_gain.pdf iVaNo_time_comp.pdf marco.bib \
|
||||
netbook_complete_comp.pdf netbook_complete_openclose.pdf \
|
||||
netbook_partial_comp.pdf netbook_partial_openclose.pdf parallel.tex \
|
||||
quest_complete_comp.pdf quest_complete_openclose.pdf quest_partial_comp.pdf \
|
||||
quest_partial_openclose.pdf RWMH_quest1_PriorsAndPosteriors1Comp.pdf \
|
||||
RWMH_quest1_PriorsAndPosteriors2Comp.pdf \
|
||||
RWMH_quest1_PriorsAndPosteriors3Comp.pdf \
|
||||
RWMH_quest1_PriorsAndPosteriors4Comp.pdf \
|
||||
RWMH_quest1_PriorsAndPosteriors5Comp.pdf \
|
||||
RWMH_quest1_PriorsAndPosteriors6Comp.pdf \
|
||||
RWMH_quest1_PriorsAndPosteriors7Comp.pdf waitbars1.pdf waitbars2.pdf \
|
||||
waitbarsP.pdf
|
||||
|
||||
EXTRA_DIST = $(SRC)
|
||||
|
||||
parallel.pdf: $(SRC)
|
||||
$(PDFLATEX) parallel
|
||||
$(BIBTEX) parallel
|
||||
$(PDFLATEX) parallel
|
||||
$(PDFLATEX) parallel
|
||||
$(PDFLATEX) parallel
|
||||
|
||||
clean-local:
|
||||
rm -f *.log *.aux *.toc *.blg *.bbl *.out
|
||||
rm -f parallel.pdf
|
File diff suppressed because it is too large
Load Diff
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Copyright © 2021 Dynare Team
|
||||
* Copyright © 2021-2023 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -147,13 +147,13 @@ end;
|
|||
varobs yhat;
|
||||
|
||||
% Run prior function to get prior slope of the PC based on independent priors
|
||||
hh=figure('Name','Slope of the Phillips Curve');
|
||||
hh_fig=figure('Name','Slope of the Phillips Curve');
|
||||
prior_function(function='Gali_2015_PC_slope');
|
||||
PC_slope_vec=cell2mat(oo_.prior_function_results(:,1));
|
||||
|
||||
optimal_bandwidth = mh_optimal_bandwidth(PC_slope_vec,length(PC_slope_vec),0,'gaussian');
|
||||
[density(:,1),density(:,2)] = kernel_density_estimate(PC_slope_vec,512,length(PC_slope_vec),optimal_bandwidth,'gaussian');
|
||||
figure(hh)
|
||||
figure(hh_fig)
|
||||
subplot(3,1,1)
|
||||
plot(density(:,1),density(:,2));
|
||||
title('Prior')
|
||||
|
@ -165,7 +165,7 @@ posterior_function(function='Gali_2015_PC_slope');
|
|||
PC_slope_vec=cell2mat(oo_.posterior_function_results(:,1));
|
||||
optimal_bandwidth = mh_optimal_bandwidth(PC_slope_vec,length(PC_slope_vec),0,'gaussian');
|
||||
[density(:,1),density(:,2)] = kernel_density_estimate(PC_slope_vec,512,length(PC_slope_vec),optimal_bandwidth,'gaussian');
|
||||
figure(hh)
|
||||
figure(hh_fig)
|
||||
subplot(3,1,2)
|
||||
plot(density(:,1),density(:,2));
|
||||
title('Updated Prior')
|
||||
|
@ -178,7 +178,7 @@ posterior_function(function='Gali_2015_PC_slope');
|
|||
PC_slope_vec=cell2mat(oo_.posterior_function_results(:,1));
|
||||
optimal_bandwidth = mh_optimal_bandwidth(PC_slope_vec,length(PC_slope_vec),0,'gaussian');
|
||||
[density(:,1),density(:,2)] = kernel_density_estimate(PC_slope_vec,512,length(PC_slope_vec),optimal_bandwidth,'gaussian');
|
||||
figure(hh)
|
||||
figure(hh_fig)
|
||||
subplot(3,1,3)
|
||||
plot(density(:,1),density(:,2));
|
||||
title('Posterior')
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
function log_prior_val=Gali_2015_prior_restrictions(M_, oo_, options_, dataset_, dataset_info);
|
||||
% function prior_val=Gali_2015_prior_restrictions(M_, oo_, options_, dataset_, dataset_info);
|
||||
function log_prior_val=Gali_2015_prior_restrictions(M_, dr, endo_steady_state, exo_steady_state, exo_det_steady_state, options_, dataset_, dataset_info);
|
||||
% function prior_val=Gali_2015_prior_restrictions(M_, dr, endo_steady_state, exo_steady_state, exo_det_steady_state, options_, dataset_, dataset_info);
|
||||
% Example of a _prior_restrictions-file automatically called during
|
||||
% estimation
|
||||
% It imposes a prior of the slope of the New Keynesian Phillips Curve of
|
||||
% 0.03. As the slope is a composite of other parameters with independent
|
||||
% priors, a separate function is required to do this.
|
||||
|
||||
% Copyright © 2021 Dynare Team
|
||||
% Copyright © 2021-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
|
|
@ -26,13 +26,17 @@
|
|||
* The model is written in the beginning of period stock notation. To make the model
|
||||
* conform with Dynare’s end of period stock notation, we use the
|
||||
* predetermined_variables-command.
|
||||
*
|
||||
*
|
||||
* The model has been implemented in detrended form, i.e. the \mu_{i,t} are actually
|
||||
* the the growth rates of the original \mu_{i,t}^{orig} in the paper, i.e.
|
||||
* log(\mu_{i,t})=log(\mu_{i,t}^{orig}/\mu_{i,t-1}^{orig})
|
||||
*
|
||||
* Please note that the following copyright notice only applies to this Dynare
|
||||
* implementation of the model.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright © 2013-2020 Dynare Team
|
||||
* Copyright © 2013-2023 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -151,12 +155,12 @@ gammmaPI =1.29;
|
|||
PIbar = 1.01;
|
||||
rhod = 0.12;
|
||||
rhophi = 0.93;
|
||||
sigma_A = -3.97;
|
||||
sigma_d = -1.51;
|
||||
sigma_A = exp(-3.97);
|
||||
sigma_d = exp(-1.51);
|
||||
|
||||
sigma_phi =-2.36;
|
||||
sigma_mu =-5.43;
|
||||
sigma_m =-5.85;
|
||||
sigma_phi =exp(-2.36);
|
||||
sigma_mu =exp(-5.43);
|
||||
sigma_m =exp(-5.85);
|
||||
Lambdamu=3.4e-3;
|
||||
LambdaA = 2.8e-3;
|
||||
|
||||
|
@ -214,7 +218,7 @@ mc=(1/(1-alppha))^(1-alppha)*(1/alppha)^alppha*w^(1-alppha)*r^alppha;
|
|||
1=thetap*(PI(-1)^chi/PI)^(1-epsilon)+(1-thetap)*PIstar^(1-epsilon);
|
||||
|
||||
[name='Taylor Rule']
|
||||
R/Rbar=(R(-1)/Rbar)^gammmaR*((PI/PIbar)^gammmaPI*((yd/yd(-1)*mu_z)/exp(LambdaYd))^gammmay)^(1-gammmaR)*exp(epsm);
|
||||
R/Rbar=(R(-1)/Rbar)^gammmaR*((PI/PIbar)^gammmaPI*((yd/yd(-1)*mu_z)/exp(LambdaYd))^gammmay)^(1-gammmaR)*exp(sigma_m*epsm);
|
||||
|
||||
[name='Resource constraint']
|
||||
yd=c+x+mu_z^(-1)*mu_I^(-1)*(gammma1*(u-1)+gammma2/2*(u-1)^2)*k;
|
||||
|
@ -235,24 +239,24 @@ PIstarw=wstar/w;
|
|||
|
||||
//exogenous processes
|
||||
[name='Preference Shock']
|
||||
log(d)=rhod*log(d(-1))+epsd;
|
||||
log(d)=rhod*log(d(-1))+sigma_d*epsd;
|
||||
[name='Labor disutility Shock']
|
||||
log(phi)=rhophi*log(phi(-1))+epsphi;
|
||||
log(phi)=rhophi*log(phi(-1))+sigma_phi*epsphi;
|
||||
[name='Investment specific technology']
|
||||
log(mu_I)=Lambdamu+epsmu_I;
|
||||
log(mu_I)=Lambdamu+sigma_mu*epsmu_I;
|
||||
[name='Neutral technology']
|
||||
log(mu_A)=LambdaA+epsA;
|
||||
log(mu_A)=LambdaA+sigma_A*epsA;
|
||||
[name='Defininition composite technology']
|
||||
mu_z=mu_A^(1/(1-alppha))*mu_I^(alppha/(1-alppha));
|
||||
|
||||
end;
|
||||
|
||||
shocks;
|
||||
var epsd; stderr exp(sigma_d);
|
||||
var epsphi; stderr exp(sigma_phi);
|
||||
var epsmu_I; stderr exp(sigma_mu);
|
||||
var epsA; stderr exp(sigma_A);
|
||||
var epsm; stderr exp(sigma_m);
|
||||
var epsd; stderr 1;
|
||||
var epsphi; stderr 1;
|
||||
var epsmu_I; stderr 1;
|
||||
var epsA; stderr 1;
|
||||
var epsm; stderr 1;
|
||||
end;
|
||||
|
||||
steady;
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
Assuming that the dynare++ binary is in your PATH, you can run the example by using the following command
|
||||
in a Command Prompt Window:
|
||||
|
||||
... > dynare++ example1.mod
|
||||
|
||||
Please, read the manual (doc\dynare++\dynare++-tutorial.pdf) for a description of the generated output.
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* This Dynare++ mod-file implements the RBC model with time-to-build
|
||||
* described in Kamenik (2011): "DSGE Models with Dynare++. A Tutorial."
|
||||
* Note that Dynare++ uses the same stock-at-the-end-of-period timing convention
|
||||
* as the regular Dynare
|
||||
*/
|
||||
|
||||
var Y, C, K, A, H, B;
|
||||
|
||||
varexo EPS, NU;
|
||||
|
||||
parameters beta, rho, alpha, delta, theta, psi, tau;
|
||||
|
||||
alpha = 0.36;
|
||||
rho = 0.95;
|
||||
tau = 0.025;
|
||||
beta = 1/(1.03^0.25);
|
||||
delta = 0.025;
|
||||
psi = 0;
|
||||
theta = 2.95;
|
||||
|
||||
model;
|
||||
C*theta*H^(1+psi) = (1-alpha)*Y;
|
||||
beta*exp(B)*C/exp(B(1))/C(1)*
|
||||
(exp(B(1))*alpha*Y(1)/K(1)+1-delta) = 1;
|
||||
Y = exp(A)*K^alpha*H^(1-alpha);
|
||||
K = exp(B(-1))*(Y(-1)-C(-1)) + (1-delta)*K(-1);
|
||||
A = rho*A(-1) + tau*B(-1) + EPS;
|
||||
B = tau*A(-1) + rho*B(-1) + NU;
|
||||
end;
|
||||
|
||||
initval;
|
||||
A = 0;
|
||||
B = 0;
|
||||
H = ((1-alpha)/(theta*(1-(delta*alpha)/(1/beta-1+delta))))^(1/(1+psi));
|
||||
Y = (alpha/(1/beta-1+delta))^(alpha/(1-alpha))*H;
|
||||
K = alpha/(1/beta-1+delta)*Y;
|
||||
C = Y - delta*K;
|
||||
end;
|
||||
|
||||
vcov = [0.0002 0.00005;
|
||||
0.00005 0.0001
|
||||
];
|
||||
|
||||
order = 7;
|
|
@ -1,22 +1,22 @@
|
|||
/*
|
||||
* This file replicates the estimation of the cash in advance model (termed M1
|
||||
* in the paper) described in Frank Schorfheide (2000): "Loss function-based
|
||||
* This file replicates the estimation of the cash in advance model (termed M1
|
||||
* in the paper) described in Frank Schorfheide (2000): "Loss function-based
|
||||
* evaluation of DSGE models", Journal of Applied Econometrics, 15(6), 645-670.
|
||||
*
|
||||
* The data are in file "fsdat_simul.m", and have been artificially generated.
|
||||
* They are therefore different from the original dataset used by Schorfheide.
|
||||
* The data are taken from the replication package at
|
||||
* http://dx.doi.org/10.15456/jae.2022314.0708799949
|
||||
*
|
||||
* The prior distribution follows the one originally specified in Schorfheide's
|
||||
* paper, except for parameter rho. In the paper, the elicited beta prior for rho
|
||||
* paper. Note that the elicited beta prior for rho in the paper
|
||||
* implies an asymptote and corresponding prior mode at 0. It is generally
|
||||
* recommended to avoid this extreme type of prior. Some optimizers, for instance
|
||||
* mode_compute=12 (Mathworks' particleswarm algorithm) may find a posterior mode
|
||||
* with rho equal to zero. We lowered the value of the prior standard deviation
|
||||
* (changing .223 to .100) to remove the asymptote.
|
||||
* recommended to avoid this extreme type of prior.
|
||||
*
|
||||
* Because the data are already logged and we use the loglinear option to conduct
|
||||
* a full log-linearization, we need to use the logdata option.
|
||||
*
|
||||
* The equations are taken from J. Nason and T. Cogley (1994): "Testing the
|
||||
* implications of long-run neutrality for monetary business cycle models",
|
||||
* Journal of Applied Econometrics, 9, S37-S70.
|
||||
* Journal of Applied Econometrics, 9, S37-S70, NC in the following.
|
||||
* Note that there is an initial minus sign missing in equation (A1), p. S63.
|
||||
*
|
||||
* This implementation was originally written by Michel Juillard. Please note that the
|
||||
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Copyright © 2004-2017 Dynare Team
|
||||
* Copyright © 2004-2023 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -43,33 +43,71 @@
|
|||
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var m P c e W R k d n l gy_obs gp_obs y dA;
|
||||
varexo e_a e_m;
|
||||
var m ${m}$ (long_name='money growth')
|
||||
P ${P}$ (long_name='Price level')
|
||||
c ${c}$ (long_name='consumption')
|
||||
e ${e}$ (long_name='capital stock')
|
||||
W ${W}$ (long_name='Wage rate')
|
||||
R ${R}$ (long_name='interest rate')
|
||||
k ${k}$ (long_name='capital stock')
|
||||
d ${d}$ (long_name='dividends')
|
||||
n ${n}$ (long_name='labor')
|
||||
l ${l}$ (long_name='loans')
|
||||
gy_obs ${\Delta \ln GDP}$ (long_name='detrended capital stock')
|
||||
gp_obs ${\Delta \ln P}$ (long_name='detrended capital stock')
|
||||
y ${y}$ (long_name='detrended output')
|
||||
dA ${\Delta A}$ (long_name='TFP growth')
|
||||
;
|
||||
varexo e_a ${\epsilon_A}$ (long_name='TFP shock')
|
||||
e_m ${\epsilon_M}$ (long_name='Money growth shock')
|
||||
;
|
||||
|
||||
parameters alp bet gam mst rho psi del;
|
||||
parameters alp ${\alpha}$ (long_name='capital share')
|
||||
bet ${\beta}$ (long_name='discount factor')
|
||||
gam ${\gamma}$ (long_name='long-run TFP growth')
|
||||
logmst ${\log(m^*)}$ (long_name='long-run money growth')
|
||||
rho ${\rho}$ (long_name='autocorrelation money growth')
|
||||
phi ${\phi}$ (long_name='labor weight in consumption')
|
||||
del ${\delta}$ (long_name='depreciation rate')
|
||||
;
|
||||
|
||||
% roughly picked values to allow simulating the model before estimation
|
||||
alp = 0.33;
|
||||
bet = 0.99;
|
||||
gam = 0.003;
|
||||
mst = 1.011;
|
||||
logmst = log(1.011);
|
||||
rho = 0.7;
|
||||
psi = 0.787;
|
||||
phi = 0.787;
|
||||
del = 0.02;
|
||||
|
||||
model;
|
||||
[name='NC before eq. (1), TFP growth equation']
|
||||
dA = exp(gam+e_a);
|
||||
log(m) = (1-rho)*log(mst) + rho*log(m(-1))+e_m;
|
||||
[name='NC eq. (2), money growth rate']
|
||||
log(m) = (1-rho)*logmst + rho*log(m(-1))+e_m;
|
||||
[name='NC eq. (A1), Euler equation']
|
||||
-P/(c(+1)*P(+1)*m)+bet*P(+1)*(alp*exp(-alp*(gam+log(e(+1))))*k^(alp-1)*n(+1)^(1-alp)+(1-del)*exp(-(gam+log(e(+1)))))/(c(+2)*P(+2)*m(+1))=0;
|
||||
[name='NC below eq. (A1), firm borrowing constraint']
|
||||
W = l/n;
|
||||
-(psi/(1-psi))*(c*P/(1-n))+l/n = 0;
|
||||
[name='NC eq. (A2), intratemporal labour market condition']
|
||||
-(phi/(1-phi))*(c*P/(1-n))+l/n = 0;
|
||||
[name='NC below eq. (A2), credit market clearing']
|
||||
R = P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(-alp)/W;
|
||||
[name='NC eq. (A3), credit market optimality']
|
||||
1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)/(m*l*c(+1)*P(+1)) = 0;
|
||||
[name='NC eq. (18), aggregate resource constraint']
|
||||
c+k = exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)+(1-del)*exp(-(gam+e_a))*k(-1);
|
||||
[name='NC eq. (19), money market condition']
|
||||
P*c = m;
|
||||
[name='NC eq. (20), credit market equilibrium condition']
|
||||
m-1+d = l;
|
||||
[name='Definition TFP shock']
|
||||
e = exp(e_a);
|
||||
[name='Implied by NC eq. (18), production function']
|
||||
y = k(-1)^alp*n^(1-alp)*exp(-alp*(gam+e_a));
|
||||
[name='Observation equation GDP growth']
|
||||
gy_obs = dA*y/y(-1);
|
||||
[name='Observation equation price level']
|
||||
gp_obs = (P/P(-1))*m(-1)/dA;
|
||||
end;
|
||||
|
||||
|
@ -81,40 +119,41 @@ end;
|
|||
steady_state_model;
|
||||
dA = exp(gam);
|
||||
gst = 1/dA;
|
||||
m = mst;
|
||||
m = exp(logmst);
|
||||
khst = ( (1-gst*bet*(1-del)) / (alp*gst^alp*bet) )^(1/(alp-1));
|
||||
xist = ( ((khst*gst)^alp - (1-gst*(1-del))*khst)/mst )^(-1);
|
||||
nust = psi*mst^2/( (1-alp)*(1-psi)*bet*gst^alp*khst^alp );
|
||||
xist = ( ((khst*gst)^alp - (1-gst*(1-del))*khst)/m )^(-1);
|
||||
nust = phi*m^2/( (1-alp)*(1-phi)*bet*gst^alp*khst^alp );
|
||||
n = xist/(nust+xist);
|
||||
P = xist + nust;
|
||||
k = khst*n;
|
||||
|
||||
l = psi*mst*n/( (1-psi)*(1-n) );
|
||||
c = mst/P;
|
||||
d = l - mst + 1;
|
||||
l = phi*m*n/( (1-phi)*(1-n) );
|
||||
c = m/P;
|
||||
d = l - m + 1;
|
||||
y = k^alp*n^(1-alp)*gst^alp;
|
||||
R = mst/bet;
|
||||
R = m/bet;
|
||||
W = l/n;
|
||||
ist = y-c;
|
||||
q = 1 - d;
|
||||
|
||||
e = 1;
|
||||
|
||||
|
||||
gp_obs = m/dA;
|
||||
gy_obs = dA;
|
||||
end;
|
||||
|
||||
steady;
|
||||
|
||||
steady;
|
||||
check;
|
||||
|
||||
% Table 1 of Schorfheide (2000)
|
||||
estimated_params;
|
||||
alp, beta_pdf, 0.356, 0.02;
|
||||
bet, beta_pdf, 0.993, 0.002;
|
||||
gam, normal_pdf, 0.0085, 0.003;
|
||||
mst, normal_pdf, 1.0002, 0.007;
|
||||
rho, beta_pdf, 0.129, 0.100;
|
||||
psi, beta_pdf, 0.65, 0.05;
|
||||
logmst, normal_pdf, 0.0002, 0.007;
|
||||
rho, beta_pdf, 0.129, 0.223;
|
||||
phi, beta_pdf, 0.65, 0.05;
|
||||
del, beta_pdf, 0.01, 0.005;
|
||||
stderr e_a, inv_gamma_pdf, 0.035449, inf;
|
||||
stderr e_m, inv_gamma_pdf, 0.008862, inf;
|
||||
|
@ -122,14 +161,8 @@ end;
|
|||
|
||||
varobs gp_obs gy_obs;
|
||||
|
||||
estimation(order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8, mode_check);
|
||||
estimation(order=1, datafile=fs2000_data, loglinear,logdata, mode_compute=4, mh_replic=20000, nodiagnostic, mh_nblocks=2, mh_jscale=0.8, mode_check);
|
||||
|
||||
|
||||
/*
|
||||
* The following lines were used to generate the data file. If you want to
|
||||
* generate another random data file, comment the "estimation" line and uncomment
|
||||
* the following lines.
|
||||
*/
|
||||
|
||||
//stoch_simul(periods=200, order=1);
|
||||
//datatomfile('fsdat_simul', {'gy_obs', 'gp_obs'});
|
||||
%uncomment the following lines to generate LaTeX-code of the model equations
|
||||
%write_latex_original_model(write_equation_tags);
|
||||
%collect_latex_files;
|
||||
|
|
|
@ -0,0 +1,215 @@
|
|||
%This file is a direct Matlab implementation of the loaddata.g and data.prn files
|
||||
%of Schorfheide, Frank (2000): Loss function-based evaluation of DSGE models
|
||||
%(replication data). Version: 1. Journal of Applied Econometrics. Dataset.
|
||||
%http://dx.doi.org/10.15456/jae.2022314.0708799949
|
||||
% Copyright: 2000-2022 Frank Schorfheide
|
||||
% Copyright: 2023 Dynare Team
|
||||
|
||||
% License: CC BY 4.0
|
||||
% (https://creativecommons.org/licenses/by/4.0/legalcode)
|
||||
|
||||
% Time series, extracted 05/04/00
|
||||
% columms are quarterly data from 1949:IV to 1997:IV
|
||||
% 1: GDPD = GROSS DOMESTIC PRODUCT:IMPLICIT PRICE DEFLATOR (INDEX,92=100)(T7.1)
|
||||
% 2: GDPQ = GROSS DOMESTIC PRODUCT
|
||||
% 3: GPOP = POPULATION, NIPA basis (THOUS.,NSA)
|
||||
|
||||
data_q=[18.02 1474.5 150.2
|
||||
17.94 1538.2 150.9
|
||||
18.01 1584.5 151.4
|
||||
18.42 1644.1 152
|
||||
18.73 1678.6 152.7
|
||||
19.46 1693.1 153.3
|
||||
19.55 1724 153.9
|
||||
19.56 1758.2 154.7
|
||||
19.79 1760.6 155.4
|
||||
19.77 1779.2 156
|
||||
19.82 1778.8 156.6
|
||||
20.03 1790.9 157.3
|
||||
20.12 1846 158
|
||||
20.1 1882.6 158.6
|
||||
20.14 1897.3 159.2
|
||||
20.22 1887.4 160
|
||||
20.27 1858.2 160.7
|
||||
20.34 1849.9 161.4
|
||||
20.39 1848.5 162
|
||||
20.42 1868.9 162.8
|
||||
20.47 1905.6 163.6
|
||||
20.56 1959.6 164.3
|
||||
20.62 1994.4 164.9
|
||||
20.78 2020.1 165.7
|
||||
21 2030.5 166.5
|
||||
21.2 2023.6 167.2
|
||||
21.33 2037.7 167.9
|
||||
21.62 2033.4 168.7
|
||||
21.71 2066.2 169.5
|
||||
22.01 2077.5 170.2
|
||||
22.15 2071.9 170.9
|
||||
22.27 2094 171.7
|
||||
22.29 2070.8 172.5
|
||||
22.56 2012.6 173.1
|
||||
22.64 2024.7 173.8
|
||||
22.77 2072.3 174.5
|
||||
22.88 2120.6 175.3
|
||||
22.92 2165 176.045
|
||||
22.91 2223.3 176.727
|
||||
22.94 2221.4 177.481
|
||||
23.03 2230.95 178.268
|
||||
23.13 2279.22 179.694
|
||||
23.22 2265.48 180.335
|
||||
23.32 2268.29 181.094
|
||||
23.4 2238.57 181.915
|
||||
23.45 2251.68 182.634
|
||||
23.51 2292.02 183.337
|
||||
23.56 2332.61 184.103
|
||||
23.63 2381.01 184.894
|
||||
23.75 2422.59 185.553
|
||||
23.81 2448.01 186.203
|
||||
23.87 2471.86 186.926
|
||||
23.94 2476.67 187.68
|
||||
24 2508.7 188.299
|
||||
24.07 2538.05 188.906
|
||||
24.12 2586.26 189.631
|
||||
24.29 2604.62 190.362
|
||||
24.35 2666.69 190.954
|
||||
24.41 2697.54 191.56
|
||||
24.52 2729.63 192.256
|
||||
24.64 2739.75 192.938
|
||||
24.77 2808.88 193.467
|
||||
24.88 2846.34 193.994
|
||||
25.01 2898.79 194.647
|
||||
25.17 2970.48 195.279
|
||||
25.32 3042.35 195.763
|
||||
25.53 3055.53 196.277
|
||||
25.79 3076.51 196.877
|
||||
26.02 3102.36 197.481
|
||||
26.14 3127.15 197.967
|
||||
26.31 3129.53 198.455
|
||||
26.6 3154.19 199.012
|
||||
26.9 3177.98 199.572
|
||||
27.21 3236.18 199.995
|
||||
27.49 3292.07 200.452
|
||||
27.75 3316.11 200.997
|
||||
28.12 3331.22 201.538
|
||||
28.39 3381.86 201.955
|
||||
28.73 3390.23 202.419
|
||||
29.14 3409.65 202.986
|
||||
29.51 3392.6 203.584
|
||||
29.94 3386.49 204.086
|
||||
30.36 3391.61 204.721
|
||||
30.61 3422.95 205.419
|
||||
31.02 3389.36 206.13
|
||||
31.5 3481.4 206.763
|
||||
31.93 3500.95 207.362
|
||||
32.27 3523.8 208
|
||||
32.54 3533.79 208.642
|
||||
33.02 3604.73 209.142
|
||||
33.2 3687.9 209.637
|
||||
33.49 3726.18 210.181
|
||||
33.95 3790.44 210.737
|
||||
34.36 3892.22 211.192
|
||||
34.94 3919.01 211.663
|
||||
35.61 3907.08 212.191
|
||||
36.29 3947.11 212.708
|
||||
37.01 3908.15 213.144
|
||||
37.79 3922.57 213.602
|
||||
38.96 3879.98 214.147
|
||||
40.13 3854.13 214.7
|
||||
41.05 3800.93 215.135
|
||||
41.66 3835.21 215.652
|
||||
42.41 3907.02 216.289
|
||||
43.19 3952.48 216.848
|
||||
43.69 4044.59 217.314
|
||||
44.15 4072.19 217.776
|
||||
44.77 4088.49 218.338
|
||||
45.57 4126.39 218.917
|
||||
46.32 4176.28 219.427
|
||||
47.07 4260.08 219.956
|
||||
47.66 4329.46 220.573
|
||||
48.63 4328.33 221.201
|
||||
49.42 4345.51 221.719
|
||||
50.41 4510.73 222.281
|
||||
51.27 4552.14 222.933
|
||||
52.35 4603.65 223.583
|
||||
53.51 4605.65 224.152
|
||||
54.65 4615.64 224.737
|
||||
55.82 4644.93 225.418
|
||||
56.92 4656.23 226.117
|
||||
58.18 4678.96 226.754
|
||||
59.55 4566.62 227.389
|
||||
61.01 4562.25 228.07
|
||||
62.59 4651.86 228.689
|
||||
64.15 4739.16 229.155
|
||||
65.37 4696.82 229.674
|
||||
66.65 4753.02 230.301
|
||||
67.87 4693.76 230.903
|
||||
68.86 4615.89 231.395
|
||||
69.72 4634.88 231.906
|
||||
70.66 4612.08 232.498
|
||||
71.44 4618.26 233.074
|
||||
72.08 4662.97 233.546
|
||||
72.83 4763.57 234.028
|
||||
73.48 4849 234.603
|
||||
74.19 4939.23 235.153
|
||||
75.02 5053.56 235.605
|
||||
75.58 5132.87 236.082
|
||||
76.25 5170.34 236.657
|
||||
76.81 5203.68 237.232
|
||||
77.63 5257.26 237.673
|
||||
78.25 5283.73 238.176
|
||||
78.76 5359.6 238.789
|
||||
79.45 5393.57 239.387
|
||||
79.81 5460.83 239.861
|
||||
80.22 5466.95 240.368
|
||||
80.84 5496.29 240.962
|
||||
81.45 5526.77 241.539
|
||||
82.09 5561.8 242.009
|
||||
82.68 5618 242.52
|
||||
83.33 5667.39 243.12
|
||||
84.09 5750.57 243.721
|
||||
84.67 5785.29 244.208
|
||||
85.56 5844.05 244.716
|
||||
86.66 5878.7 245.354
|
||||
87.44 5952.83 245.966
|
||||
88.45 6010.96 246.46
|
||||
89.39 6055.61 247.017
|
||||
90.13 6087.96 247.698
|
||||
90.88 6093.51 248.374
|
||||
92 6152.59 248.928
|
||||
93.18 6171.57 249.564
|
||||
94.14 6142.1 250.299
|
||||
95.11 6078.96 251.031
|
||||
96.27 6047.49 251.65
|
||||
97 6074.66 252.295
|
||||
97.7 6090.14 253.033
|
||||
98.31 6105.25 253.743
|
||||
99.13 6175.69 254.338
|
||||
99.79 6214.22 255.032
|
||||
100.17 6260.74 255.815
|
||||
100.88 6327.12 256.543
|
||||
101.84 6327.93 257.151
|
||||
102.35 6359.9 257.785
|
||||
102.83 6393.5 258.516
|
||||
103.51 6476.86 259.191
|
||||
104.13 6524.5 259.738
|
||||
104.71 6600.31 260.351
|
||||
105.39 6629.47 261.04
|
||||
106.09 6688.61 261.692
|
||||
106.75 6717.46 262.236
|
||||
107.24 6724.2 262.847
|
||||
107.75 6779.53 263.527
|
||||
108.29 6825.8 264.169
|
||||
108.91 6882 264.681
|
||||
109.24 6983.91 265.258
|
||||
109.74 7020 265.887
|
||||
110.23 7093.12 266.491
|
||||
111 7166.68 266.987
|
||||
111.43 7236.5 267.545
|
||||
111.76 7311.24 268.171
|
||||
112.08 7364.63 268.815];
|
||||
|
||||
%Compute growth rates: from 1950:I to 1997:IV
|
||||
gy_obs=1000*data_q(:,2)./data_q(:,3); %real GDP per capita
|
||||
gy_obs=diff(log(gy_obs));
|
||||
|
||||
gp_obs = diff(log(data_q(:,1))); %GDP deflator inflation
|
|
@ -0,0 +1,101 @@
|
|||
// --+ options: json=compute, stochastic +--
|
||||
|
||||
var y x z v;
|
||||
|
||||
varexo ex ey ez ;
|
||||
|
||||
parameters a_y_1 a_y_2 b_y_1 b_y_2 b_x_1 b_x_2 d_y; // VAR parameters
|
||||
|
||||
parameters beta e_c_m c_z_1 c_z_2; // PAC equation parameters
|
||||
|
||||
a_y_1 = .2;
|
||||
a_y_2 = .3;
|
||||
b_y_1 = .1;
|
||||
b_y_2 = .4;
|
||||
b_x_1 = -.1;
|
||||
b_x_2 = -.2;
|
||||
d_y = .5;
|
||||
|
||||
|
||||
beta = .9;
|
||||
e_c_m = .1;
|
||||
c_z_1 = .7;
|
||||
c_z_2 = -.3;
|
||||
|
||||
var_model(model_name=toto, eqtags=['eq:x', 'eq:y']);
|
||||
|
||||
pac_model(auxiliary_model_name=toto, discount=beta, model_name=pacman);
|
||||
|
||||
pac_target_info(pacman);
|
||||
target v;
|
||||
auxname_target_nonstationary vns;
|
||||
|
||||
component y;
|
||||
auxname pv_y_;
|
||||
kind ll;
|
||||
|
||||
component x;
|
||||
growth diff(x(-1));
|
||||
auxname pv_dx_;
|
||||
kind dd;
|
||||
|
||||
end;
|
||||
|
||||
model;
|
||||
|
||||
[name='eq:y']
|
||||
y = a_y_1*y(-1) + a_y_2*diff(x(-1)) + b_y_1*y(-2) + b_y_2*diff(x(-2)) + ey ;
|
||||
|
||||
|
||||
[name='eq:x']
|
||||
diff(x) = b_x_1*y(-2) + b_x_2*diff(x(-1)) + ex ;
|
||||
|
||||
[name='eq:v']
|
||||
v = x + d_y*y ; // Composite target, no residuals here only variables defined in the auxiliary VAR model.
|
||||
|
||||
[name='zpac']
|
||||
diff(z) = e_c_m*(pac_target_nonstationary(pacman)-z(-1)) + c_z_1*diff(z(-1)) + c_z_2*diff(z(-2)) + pac_expectation(pacman) + ez;
|
||||
|
||||
end;
|
||||
|
||||
shocks;
|
||||
var ex = .10;
|
||||
var ey = .15;
|
||||
var ez = .05;
|
||||
end;
|
||||
|
||||
// Initialize the PAC model (build the Companion VAR representation for the auxiliary model).
|
||||
pac.initialize('pacman');
|
||||
|
||||
// Update the parameters of the PAC expectation model (h0 and h1 vectors).
|
||||
pac.update.expectation('pacman');
|
||||
|
||||
/*
|
||||
**
|
||||
** Simulate artificial dataset
|
||||
**
|
||||
*/
|
||||
|
||||
// Set initial conditions to zero.
|
||||
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
|
||||
|
||||
// Simulate the model for 5000 periods
|
||||
TrueData = simul_backward_model(initialconditions, 5000);
|
||||
|
||||
/*
|
||||
**
|
||||
** Estimate PAC equation (using the artificial data)
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
// Provide initial conditions for the estimated parameters
|
||||
clear eparams
|
||||
eparams.e_c_m = .9;
|
||||
eparams.c_z_1 = .5;
|
||||
eparams.c_z_2 = .2;
|
||||
|
||||
edata = TrueData; // Set the dataset used for estimation
|
||||
edata.ez = dseries(NaN, 2000Q1); // Remove residuals for the PAC equation from the database.
|
||||
|
||||
pac.estimate.nls('zpac', eparams, edata, 2005Q1:2005Q1+4000, 'fmincon'); // Should produce a table with the estimates (close to the calibration given in lines 21-23)
|
247
license.txt
247
license.txt
|
@ -1,6 +1,6 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Dynare
|
||||
Upstream-Contact: Dynare Team, whose members in 2023 are:
|
||||
Upstream-Contact: Dynare Team, whose members in 2024 are:
|
||||
- Stéphane Adjemian <stephane.adjemian@univ-lemans.fr>
|
||||
- Michel Juillard <michel.juillard@mjui.fr>
|
||||
- Frédéric Karamé <frederic.karame@univ-lemans.fr>
|
||||
|
@ -23,7 +23,7 @@ Upstream-Contact: Dynare Team, whose members in 2023 are:
|
|||
Source: https://www.dynare.org
|
||||
|
||||
Files: *
|
||||
Copyright: 1996-2023 Dynare Team
|
||||
Copyright: 1996-2024 Dynare Team
|
||||
License: GPL-3+
|
||||
|
||||
Files: matlab/+occbin/IVF_core.m
|
||||
|
@ -86,13 +86,13 @@ License: public-domain-aim
|
|||
Journal of Economic Dynamics and Control, 2010, vol. 34, issue 3,
|
||||
pages 472-489
|
||||
|
||||
Files: matlab/optimization/bfgsi1.m matlab/csolve.m matlab/optimization/csminit1.m matlab/optimization/numgrad2.m
|
||||
Files: matlab/optimization/bfgsi1.m matlab/optimization/csolve.m matlab/optimization/csminit1.m matlab/optimization/numgrad2.m
|
||||
matlab/optimization/numgrad3.m matlab/optimization/numgrad3_.m matlab/optimization/numgrad5.m
|
||||
matlab/optimization/numgrad5_.m matlab/optimization/csminwel1.m matlab/bvar_density.m
|
||||
matlab/bvar_toolbox.m matlab/partial_information/PI_gensys.m matlab/partial_information/qzswitch.m
|
||||
matlab/optimization/numgrad5_.m matlab/optimization/csminwel1.m matlab/+bvar/density.m
|
||||
matlab/+bvar/toolbox.m matlab/partial_information/PI_gensys.m matlab/partial_information/qzswitch.m
|
||||
matlab/partial_information/qzdiv.m
|
||||
Copyright: 1993-2009 Christopher Sims
|
||||
2006-2017 Dynare Team
|
||||
2006-2023 Dynare Team
|
||||
License: GPL-3+
|
||||
|
||||
Files: matlab/optimization/cmaes.m
|
||||
|
@ -113,7 +113,7 @@ Copyright: 1995 E.G.Tsionas
|
|||
2015-2017 Dynare Team
|
||||
License: GPL-3+
|
||||
|
||||
Files: matlab/endogenous_prior.m
|
||||
Files: matlab/estimation/endogenous_prior.m
|
||||
Copyright: 2011 Lawrence J. Christiano, Mathias Trabandt and Karl Walentin
|
||||
2013-2017 Dynare Team
|
||||
License: GPL-3+
|
||||
|
@ -123,17 +123,22 @@ Copyright: 2010-2015 Alexander Meyer-Gohde
|
|||
2015-2017 Dynare Team
|
||||
License: GPL-3+
|
||||
|
||||
Files: matlab/collapse_figures_in_tabgroup.m
|
||||
Copyright: 2023 Eduard Benet Cerda
|
||||
2024 Dynare Team
|
||||
License: GPL-3+
|
||||
|
||||
Files: matlab/convergence_diagnostics/raftery_lewis.m
|
||||
Copyright: 2016 Benjamin Born and Johannes Pfeifer
|
||||
2016-2017 Dynare Team
|
||||
License: GPL-3+
|
||||
|
||||
Files: matlab/commutation.m matlab/duplication.m
|
||||
Files: matlab/+pruned_SS/commutation.m matlab/+pruned_SS/duplication.m
|
||||
Copyright: 1997 Tom Minka <minka@microsoft.com>
|
||||
2019-2020 Dynare Team
|
||||
License: GPL-3+
|
||||
|
||||
Files: matlab/allVL1.m
|
||||
Files: matlab/+pruned_SS/allVL1.m
|
||||
Copyright: 2007-2010 Bruno Luong <brunoluong@yahoo.com>
|
||||
2020 Dynare Team
|
||||
License: GPL-3+
|
||||
|
@ -141,7 +146,7 @@ Comment: The original author gave authorization to change
|
|||
the license from BSD-2-clause to GPL-3+ and redistribute
|
||||
it under GPL-3+ with Dynare.
|
||||
|
||||
Files: matlab/uperm.m
|
||||
Files: matlab/+pruned_SS/uperm.m
|
||||
Copyright: 2014 Bruno Luong <brunoluong@yahoo.com>
|
||||
2020 Dynare Team
|
||||
License: GPL-3+
|
||||
|
@ -149,9 +154,9 @@ Comment: The original author gave authorization to change
|
|||
the license from BSD-2-clause to GPL-3+ and redistribute
|
||||
it under GPL-3+ with Dynare.
|
||||
|
||||
Files: matlab/prodmom.m matlab/bivmom.m
|
||||
Files: matlab/+pruned_SS/prodmom.m matlab/+pruned_SS/bivmom.m
|
||||
Copyright: 2008-2015 Raymond Kan <kan@chass.utoronto.ca>
|
||||
2019-2020 Dynare Team
|
||||
2019-2023 Dynare Team
|
||||
License: GPL-3+
|
||||
Comment: The author gave authorization to redistribute
|
||||
these functions under GPL-3+ with Dynare and would
|
||||
|
@ -161,57 +166,37 @@ Comment: The author gave authorization to redistribute
|
|||
Journal of Multivariate Analysis, 2008, vol. 99, issue 3,
|
||||
pages 542-554.
|
||||
|
||||
Files: matlab/gsa/Morris_Measure_Groups.m
|
||||
matlab/gsa/Sampling_Function_2.m
|
||||
Files: matlab/+gsa/Morris_Measure_Groups.m
|
||||
matlab/+gsa/Sampling_Function_2.m
|
||||
Copyright: 2005 European Commission
|
||||
2012-2017 Dynare Team
|
||||
2012-2013 Dynare Team
|
||||
License: GPL-3+
|
||||
Comment: Written by Jessica Cariboni and Francesca Campolongo
|
||||
Joint Research Centre, The European Commission,
|
||||
|
||||
Files: matlab/gsa/cumplot.m
|
||||
matlab/gsa/filt_mc_.m
|
||||
matlab/gsa/gsa_plotmatrix.m
|
||||
matlab/gsa/gsa_skewness.m
|
||||
matlab/gsa/gsa_speed.m
|
||||
matlab/gsa/log_trans_.m
|
||||
matlab/gsa/map_calibration.m
|
||||
matlab/gsa/map_ident_.m
|
||||
matlab/gsa/mcf_analysis.m
|
||||
matlab/gsa/myboxplot.m
|
||||
matlab/gsa/myprctilecol.m
|
||||
matlab/gsa/prior_draw_gsa.m
|
||||
matlab/gsa/read_data.m
|
||||
matlab/gsa/redform_map.m
|
||||
matlab/gsa/redform_screen.m
|
||||
matlab/gsa/scatter_mcf.m
|
||||
matlab/gsa/smirnov.m
|
||||
matlab/gsa/stab_map_.m
|
||||
matlab/gsa/stab_map_1.m
|
||||
matlab/gsa/stab_map_2.m
|
||||
matlab/gsa/stand_.m
|
||||
matlab/gsa/tcrit.m
|
||||
matlab/gsa/teff.m
|
||||
matlab/gsa/trank.m
|
||||
Files: matlab/+gsa/cumplot.m
|
||||
matlab/+gsa/monte_carlo_filtering.m
|
||||
matlab/+gsa/skewness.m
|
||||
matlab/+gsa/log_transform.m
|
||||
matlab/+gsa/map_calibration.m
|
||||
matlab/+gsa/map_identification.m
|
||||
matlab/+gsa/monte_carlo_filtering_analysis.m
|
||||
matlab/+gsa/boxplot.m
|
||||
matlab/+gsa/prior_draw.m
|
||||
matlab/+gsa/reduced_form_mapping.m
|
||||
matlab/+gsa/reduced_form_screening.m
|
||||
matlab/+gsa/scatter_mcf.m
|
||||
matlab/+gsa/smirnov_test.m
|
||||
matlab/+gsa/stability_mapping.m
|
||||
matlab/+gsa/stability_mapping_univariate.m
|
||||
matlab/+gsa/stability_mapping_bivariate.m
|
||||
matlab/+gsa/standardize_columns.m
|
||||
matlab/+gsa/tcrit.m
|
||||
matlab/+gsa/teff.m
|
||||
Copyright: 2011-2018 European Commission
|
||||
2011-2018 Dynare Team
|
||||
2011-2023 Dynare Team
|
||||
License: GPL-3+
|
||||
|
||||
Files: matlab/gsa/pick.m
|
||||
Copyright: none
|
||||
License: public-domain-jrc
|
||||
This software has been developed at the Joint Research Centre of European Commission
|
||||
by officers in the course of their official duties. 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.
|
||||
Comment: This file is part of GLUEWIN.
|
||||
The program has been developed by M. Ratto, European Commission, Joint Research Centre,
|
||||
Institute for the Protection and Security of The Citizen, Technological and Economic Risk Management,
|
||||
Applied Statistics, as a deliverable of the IMPACT project
|
||||
(EC Fifth Framework Programme, SCA Project, IST-1999-11313, DG-INFSO).
|
||||
|
||||
Files: matlab/optimization/simpsa.m matlab/optimization/simpsaget.m matlab/optimization/simpsaset.m
|
||||
Copyright: 2005 Henning Schmidt, FCC, henning@fcc.chalmers.se
|
||||
2006 Brecht Donckels, BIOMATH, brecht.donckels@ugent.be
|
||||
|
@ -262,9 +247,14 @@ License: BSD-2-clause
|
|||
|
||||
Files: matlab/utilities/graphics/colorspace.m
|
||||
Copyright: 2005-2010 Pascal Getreuer
|
||||
2017 Dynare Team
|
||||
2017-2023 Dynare Team
|
||||
License: BSD-2-clause
|
||||
|
||||
Files: examples/fs2000_data.m
|
||||
Copyright: 2000-2022 Frank Schorfheide
|
||||
2023 Dynare Team
|
||||
License: CC-BY-SA-4.0
|
||||
|
||||
Files: doc/*.rst doc/*.tex doc/*.svg doc/*.pdf doc/*.bib
|
||||
Copyright: 1996-2022 Dynare Team
|
||||
License: GFDL-NIV-1.3+
|
||||
|
@ -282,20 +272,6 @@ Files: doc/sylvester.tex doc/tl.tex
|
|||
Copyright: 2004-2011 Ondra Kamenik
|
||||
License: GPL-3+
|
||||
|
||||
Files: m4/ax_compare_version.m4
|
||||
Copyright: 2008 Tim Toolan <toolan@ele.uri.edu>
|
||||
License: FSFAP
|
||||
|
||||
Files: m4/ax_latex_class.m4 m4/ax_latex_test.m4
|
||||
Copyright: 2008 Boretti Mathieu <boretti@eig.unige.ch>
|
||||
2009 Dynare Team
|
||||
License: LGPL-2.1+
|
||||
|
||||
Files: m4/ax_matlab_arch.m4 m4/ax_matlab.m4 m4/ax_mexext.m4
|
||||
Copyright: 2002-2003 Ralph Schleicher
|
||||
2009-2021 Dynare Team
|
||||
License: GPL-2+ with Autoconf exception
|
||||
|
||||
Files: scripts/dynare.el
|
||||
Copyright: 2010 Yannick Kalantzis
|
||||
2019-2023 Dynare Team
|
||||
|
@ -313,22 +289,6 @@ Copyright: 2004-2009 John Burkardt
|
|||
2023 Dynare Team
|
||||
License: LGPL-3+
|
||||
|
||||
Files: macOS/brewfiles/*
|
||||
Copyright: 2009-2019 Homebrew contributors
|
||||
2019-2021 Dynare Team
|
||||
License: BSD-2-clause
|
||||
|
||||
Files: preprocessor/m4/ax_boost_base.m4
|
||||
Copyright: 2008-2009 Thomas Porschberg <thomas@randspringer.de>
|
||||
2009 Peter Adolphs
|
||||
License: FSFAP
|
||||
|
||||
Files: preprocessor/m4/ax_latex_class.m4
|
||||
preprocessor/m4/ax_latex_test.m4
|
||||
Copyright: 2008 Boretti Mathieu <boretti@eig.unige.ch>
|
||||
2009 Dynare Team
|
||||
License: LGPL-2.1+
|
||||
|
||||
Files: preprocessor/doc/macroprocessor/*
|
||||
Copyright: 2008-2021 Dynare Team
|
||||
License: CC-BY-SA-4.0
|
||||
|
@ -337,28 +297,6 @@ Files: preprocessor/doc/preprocessor/*
|
|||
Copyright: 2007-2019 Dynare Team
|
||||
License: CC-BY-SA-4.0
|
||||
|
||||
Files: contrib/jsonlab/*
|
||||
Copyright: 2011-2020 Qianqian Fang <q.fang at neu.edu>
|
||||
2016 Bastian Bechtold
|
||||
License: GPL-3+ or BSD-3-clause
|
||||
|
||||
Files: contrib/jsonlab/base64decode.m
|
||||
contrib/jsonlab/base64encode.m
|
||||
contrib/jsonlab/gzipdecode.m
|
||||
contrib/jsonlab/gzipencode.m
|
||||
contrib/jsonlab/zlibdecode.m
|
||||
contrib/jsonlab/zlibencode.m
|
||||
Copyright: 2012 Kota Yamaguchi
|
||||
2011-2020 Qianqian Fang <q.fang at neu.edu>
|
||||
License: GPL-3+ or BSD-2-clause
|
||||
|
||||
Files: contrib/jsonlab/loadjson.m
|
||||
Copyright: 2011-2020 Qianqian Fang
|
||||
2009 Nedialko Krouchev
|
||||
2009 François Glineur
|
||||
2008 Joel Feenstra
|
||||
License: GPL-3+ or BSD-2-clause or BSD-3-clause
|
||||
|
||||
Files: contrib/ms-sbvar/utilities_dw/*
|
||||
Copyright: 1996-2011 Daniel Waggoner
|
||||
License: GPL-3+
|
||||
|
@ -465,32 +403,6 @@ License: BSD-2-clause
|
|||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License: BSD-3-clause
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
.
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
.
|
||||
* Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License: GFDL-NIV-1.3+
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
|
@ -499,26 +411,6 @@ License: GFDL-NIV-1.3+
|
|||
.
|
||||
A copy of the license can be found at <https://www.gnu.org/licenses/fdl.txt>
|
||||
|
||||
License: GPL-2+ with Autoconf exception
|
||||
This program 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 2,
|
||||
or (at your option) any later version.
|
||||
.
|
||||
This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
.
|
||||
As a special exception to the GNU General Public License, if
|
||||
you distribute this file as part of a program that contains a
|
||||
configuration script generated by GNU Autoconf, you may include
|
||||
it under the same distribution terms that you use for the rest
|
||||
of that program.
|
||||
|
||||
License: GPL-3+
|
||||
Dynare is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -533,47 +425,6 @@ License: GPL-3+
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
License: GPL-3+ with Autoconf exception
|
||||
This program 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.
|
||||
.
|
||||
This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
.
|
||||
As a special exception, the respective Autoconf Macro's copyright owner
|
||||
gives unlimited permission to copy, distribute and modify the configure
|
||||
scripts that are the output of Autoconf when processing the Macro. You
|
||||
need not follow the terms of the GNU General Public License when using
|
||||
or distributing such scripts, even though portions of the text of the
|
||||
Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
all other use of the material that constitutes the Autoconf Macro.
|
||||
.
|
||||
This special exception to the GPL applies to versions of the Autoconf
|
||||
Macro released by the Autoconf Archive. When you make and distribute a
|
||||
modified version of the Autoconf Macro, you may extend this special
|
||||
exception to the GPL to apply to your modified version as well.
|
||||
|
||||
License: LGPL-2.1+
|
||||
This library is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
your option) any later version.
|
||||
.
|
||||
This library 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 Lesser
|
||||
General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
License: LGPL-3+
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
|
@ -1014,9 +865,3 @@ License: CC-BY-SA-4.0
|
|||
licenses.
|
||||
.
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
||||
License: FSFAP
|
||||
Copying and distribution of this file, with or without modification, are
|
||||
permitted in any medium without royalty provided the copyright notice
|
||||
and this notice are preserved. This file is offered as-is, without any
|
||||
warranty.
|
||||
|
|
|
@ -1,177 +0,0 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_compare_version.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro compares two version strings. Due to the various number of
|
||||
# minor-version numbers that can exist, and the fact that string
|
||||
# comparisons are not compatible with numeric comparisons, this is not
|
||||
# necessarily trivial to do in a autoconf script. This macro makes doing
|
||||
# these comparisons easy.
|
||||
#
|
||||
# The six basic comparisons are available, as well as checking equality
|
||||
# limited to a certain number of minor-version levels.
|
||||
#
|
||||
# The operator OP determines what type of comparison to do, and can be one
|
||||
# of:
|
||||
#
|
||||
# eq - equal (test A == B)
|
||||
# ne - not equal (test A != B)
|
||||
# le - less than or equal (test A <= B)
|
||||
# ge - greater than or equal (test A >= B)
|
||||
# lt - less than (test A < B)
|
||||
# gt - greater than (test A > B)
|
||||
#
|
||||
# Additionally, the eq and ne operator can have a number after it to limit
|
||||
# the test to that number of minor versions.
|
||||
#
|
||||
# eq0 - equal up to the length of the shorter version
|
||||
# ne0 - not equal up to the length of the shorter version
|
||||
# eqN - equal up to N sub-version levels
|
||||
# neN - not equal up to N sub-version levels
|
||||
#
|
||||
# When the condition is true, shell commands ACTION-IF-TRUE are run,
|
||||
# otherwise shell commands ACTION-IF-FALSE are run. The environment
|
||||
# variable 'ax_compare_version' is always set to either 'true' or 'false'
|
||||
# as well.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
|
||||
# AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
|
||||
#
|
||||
# would both be true.
|
||||
#
|
||||
# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
|
||||
# AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
|
||||
#
|
||||
# would both be false.
|
||||
#
|
||||
# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
|
||||
#
|
||||
# would be true because it is only comparing two minor versions.
|
||||
#
|
||||
# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
|
||||
#
|
||||
# would be true because it is only comparing the lesser number of minor
|
||||
# versions of the two values.
|
||||
#
|
||||
# Note: The characters that separate the version numbers do not matter. An
|
||||
# empty string is the same as version 0. OP is evaluated by autoconf, not
|
||||
# configure, so must be a string, not a variable.
|
||||
#
|
||||
# The author would like to acknowledge Guido Draheim whose advice about
|
||||
# the m4_case and m4_ifvaln functions make this macro only include the
|
||||
# portions necessary to perform the specific comparison specified by the
|
||||
# OP argument in the final configure script.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Tim Toolan <toolan@ele.uri.edu>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 13
|
||||
|
||||
dnl #########################################################################
|
||||
AC_DEFUN([AX_COMPARE_VERSION], [
|
||||
AC_REQUIRE([AC_PROG_AWK])
|
||||
|
||||
# Used to indicate true or false condition
|
||||
ax_compare_version=false
|
||||
|
||||
# Convert the two version strings to be compared into a format that
|
||||
# allows a simple string comparison. The end result is that a version
|
||||
# string of the form 1.12.5-r617 will be converted to the form
|
||||
# 0001001200050617. In other words, each number is zero padded to four
|
||||
# digits, and non digits are removed.
|
||||
AS_VAR_PUSHDEF([A],[ax_compare_version_A])
|
||||
A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
|
||||
-e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/[[^0-9]]//g'`
|
||||
|
||||
AS_VAR_PUSHDEF([B],[ax_compare_version_B])
|
||||
B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
|
||||
-e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/[[^0-9]]//g'`
|
||||
|
||||
dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
|
||||
dnl # then the first line is used to determine if the condition is true.
|
||||
dnl # The sed right after the echo is to remove any indented white space.
|
||||
m4_case(m4_tolower($2),
|
||||
[lt],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
|
||||
],
|
||||
[gt],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
|
||||
],
|
||||
[le],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
|
||||
],
|
||||
[ge],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
|
||||
],[
|
||||
dnl Split the operator from the subversion count if present.
|
||||
m4_bmatch(m4_substr($2,2),
|
||||
[0],[
|
||||
# A count of zero means use the length of the shorter version.
|
||||
# Determine the number of characters in A and B.
|
||||
ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'`
|
||||
ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'`
|
||||
|
||||
# Set A to no more than B's length and B to no more than A's length.
|
||||
A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
|
||||
B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
|
||||
],
|
||||
[[0-9]+],[
|
||||
# A count greater than zero means use only that many subversions
|
||||
A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
|
||||
B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
|
||||
],
|
||||
[.+],[
|
||||
AC_WARNING(
|
||||
[invalid OP numeric parameter: $2])
|
||||
],[])
|
||||
|
||||
# Pad zeros at end of numbers to make same length.
|
||||
ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
|
||||
B="$B`echo $A | sed 's/./0/g'`"
|
||||
A="$ax_compare_version_tmp_A"
|
||||
|
||||
# Check for equality or inequality as necessary.
|
||||
m4_case(m4_tolower(m4_substr($2,0,2)),
|
||||
[eq],[
|
||||
test "x$A" = "x$B" && ax_compare_version=true
|
||||
],
|
||||
[ne],[
|
||||
test "x$A" != "x$B" && ax_compare_version=true
|
||||
],[
|
||||
AC_WARNING([invalid OP parameter: $2])
|
||||
])
|
||||
])
|
||||
|
||||
AS_VAR_POPDEF([A])dnl
|
||||
AS_VAR_POPDEF([B])dnl
|
||||
|
||||
dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
|
||||
if test "$ax_compare_version" = "true" ; then
|
||||
m4_ifvaln([$4],[$4],[:])dnl
|
||||
m4_ifvaln([$5],[else $5])dnl
|
||||
fi
|
||||
]) dnl AX_COMPARE_VERSION
|
66
m4/ax_gsl.m4
66
m4/ax_gsl.m4
|
@ -1,66 +0,0 @@
|
|||
dnl Detect GSL.
|
||||
dnl We don't use the official M4 macro since it relies on the script gsl-config,
|
||||
dnl which does not work when cross-compiling.
|
||||
dnl
|
||||
dnl Copyright © 2010-2021 Dynare Team
|
||||
dnl
|
||||
dnl This file is part of Dynare.
|
||||
dnl
|
||||
dnl Dynare is free software: you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation, either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl Dynare is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_GSL],
|
||||
[
|
||||
AC_ARG_WITH(gsl, AS_HELP_STRING([--with-gsl=DIR], [prefix to GSL installation]),
|
||||
gsl_prefix="$withval", gsl_prefix="")
|
||||
|
||||
has_gsl=yes
|
||||
|
||||
if test -n "$gsl_prefix"; then
|
||||
GSL_CPPFLAGS="-I$withval/include"
|
||||
GSL_LDFLAGS="-L$withval/lib"
|
||||
else
|
||||
GSL_CPPFLAGS=""
|
||||
GSL_LDFLAGS=""
|
||||
fi
|
||||
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
ac_save_LDFLAGS="$LDFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
|
||||
LIBS=""
|
||||
CPPFLAGS="$CPPFLAGS $GSL_CPPFLAGS"
|
||||
LDFLAGS="$LDFLAGS $GSL_LDFLAGS"
|
||||
|
||||
AC_LANG_PUSH(C)
|
||||
AC_CHECK_HEADER([gsl/gsl_cdf.h], [], [has_gsl=no])
|
||||
AC_LANG_POP(C)
|
||||
|
||||
AC_CHECK_LIB([m], [cos])
|
||||
AC_CHECK_LIB([gslcblas], [cblas_dgemm], [LIBS="-lgslcblas $LIBS"], [has_gsl=no])
|
||||
AC_CHECK_LIB([gsl], [gsl_cdf_ugaussian_P], [LIBS="-lgsl $LIBS"], [has_gsl=no])
|
||||
|
||||
if test "$has_gsl" = yes; then
|
||||
GSL_LIBS="$LIBS"
|
||||
else
|
||||
GSL_LIBS=""
|
||||
fi
|
||||
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LDFLAGS="$ac_save_LDFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
AC_SUBST(GSL_CPPFLAGS)
|
||||
AC_SUBST(GSL_LDFLAGS)
|
||||
AC_SUBST(GSL_LIBS)
|
||||
])
|
|
@ -1,68 +0,0 @@
|
|||
# ===========================================================================
|
||||
# http://www.nongnu.org/autoconf-archive/ax_latex_class.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# OBSOLETE MACRO
|
||||
#
|
||||
# Deprecated because of licensing issues. The Lesser GPL imposes licensing
|
||||
# restrictions on the generated configure script unless it is augmented
|
||||
# with an Autoconf Exception clause.
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_LATEX_CLASS(CLASSNAME,VARIABLETOSET[,ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macros test is class CLASSNAME exists and work and set
|
||||
# VARIABLETOSET to yes or no If ACTION-IF-FOUND (and ACTION-IF-NOT-FOUND)
|
||||
# are set, do the correct action
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright © 2008 Boretti Mathieu <boretti@eig.unige.ch>
|
||||
# Copyright © 2009 Dynare Team
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This library 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 Lesser
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_LATEX_CLASS],[
|
||||
AC_CACHE_CHECK([for usability of class $1],[ac_cv_latex_class_]translit($1,[-],[_]),[
|
||||
AX_LATEX_TEST([\documentclass{$1}
|
||||
\begin{document}
|
||||
\end{document}],[ac_cv_latex_class_]translit($1,[-],[_]))
|
||||
])
|
||||
$2=$[ac_cv_latex_class_]translit($1,[-],[_]) ; export $2;
|
||||
AC_SUBST($2)
|
||||
ifelse($#,2,[],$#,3,[
|
||||
if test "[$]$2" = "yes" ;
|
||||
then
|
||||
$3
|
||||
fi
|
||||
],$#,4,[
|
||||
ifelse($3,[],[
|
||||
if test "[$]$2" = "no" ;
|
||||
then
|
||||
$4
|
||||
fi
|
||||
],[
|
||||
if test "[$]$2" = "yes" ;
|
||||
then
|
||||
$3
|
||||
else
|
||||
$4
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
])
|
|
@ -1,56 +0,0 @@
|
|||
# ===========================================================================
|
||||
# http://www.nongnu.org/autoconf-archive/ax_latex_test.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# OBSOLETE MACRO
|
||||
#
|
||||
# Deprecated because of licensing issues. The Lesser GPL imposes licensing
|
||||
# restrictions on the generated configure script unless it is augmented
|
||||
# with an Autoconf Exception clause.
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_LATEX_TEST(FILEDATA,VARIABLETOSET,[NOCLEAN])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macros execute the latex application with FILEDATA as input and set
|
||||
# VARIABLETOSET the yes or no depending of the result if NOCLEAN is set,
|
||||
# the folder used for the test is not delete after testing.
|
||||
#
|
||||
# The macro assumes that the variable PDFLATEX is set.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright © 2008 Boretti Mathieu <boretti@eig.unige.ch>
|
||||
# Copyright © 2009 Dynare Team
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This library 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 Lesser
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_LATEX_TEST],[
|
||||
rm -rf conftest.dir/.acltx
|
||||
AS_MKDIR_P([conftest.dir/.acltx])
|
||||
cd conftest.dir/.acltx
|
||||
m4_ifval([$2],[$2="no"; export $2;])
|
||||
cat > conftest.tex << ACLEOF
|
||||
$1
|
||||
ACLEOF
|
||||
cat conftest.tex | $PDFLATEX 2>&1 1>output m4_ifval([$2],[&& $2=yes])
|
||||
cd ..
|
||||
cd ..
|
||||
sed 's/^/| /' conftest.dir/.acltx/conftest.tex >&5
|
||||
echo "$as_me:$LINENO: executing cat conftest.tex | $PDFLATEX" >&5
|
||||
sed 's/^/| /' conftest.dir/.acltx/output >&5
|
||||
m4_ifval([$3],,[rm -rf conftest.dir/.acltx])
|
||||
])
|
|
@ -1,69 +0,0 @@
|
|||
dnl Detect the MATIO Library.
|
||||
dnl
|
||||
dnl Copyright © 2012-2023 Dynare Team
|
||||
dnl
|
||||
dnl This file is part of Dynare.
|
||||
dnl
|
||||
dnl Dynare is free software: you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation, either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl Dynare is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_MATIO],
|
||||
[
|
||||
AC_ARG_WITH(matio, AS_HELP_STRING([--with-matio=DIR], [prefix to MATIO installation]),
|
||||
matio_prefix="$withval", matio_prefix="")
|
||||
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
|
||||
has_matio=yes
|
||||
|
||||
if test -n "$matio_prefix"; then
|
||||
CPPFLAGS_MATIO="-I$withval/include"
|
||||
LDFLAGS_MATIO="-L$withval/lib"
|
||||
else
|
||||
CPPFLAGS_MATIO=""
|
||||
LDFLAGS_MATIO=""
|
||||
fi
|
||||
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
ac_save_LDFLAGS="$LDFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
|
||||
LIBADD_MATIO=""
|
||||
CPPFLAGS="$CPPFLAGS_MATIO $CPPFLAGS"
|
||||
LDFLAGS="$LDFLAGS_MATIO $LDFLAGS"
|
||||
|
||||
dnl Under Windows and macOS, add hdf5 and its dependencies since we are linking statically
|
||||
case ${host_os} in
|
||||
*mingw32*)
|
||||
dnl Partly inspired by /mingw64/lib/pkgconfig/{hdf5,libcurl}.pc (in particular for the system libraries)
|
||||
LIBS="-lhdf5 -lcurl -lnghttp2 -lidn2 -lssh2 -lpsl -lunistring -liconv -lbcrypt -ladvapi32 -lcrypt32 -lbcrypt -lgdi32 -lwldap32 -lzstd -lbrotlidec -lbrotlicommon -lssl -lcrypto -lws2_32 -lz -lsz"
|
||||
;;
|
||||
*darwin*)
|
||||
LIBS="-lhdf5 -lz -lsz"
|
||||
;;
|
||||
*)
|
||||
LIBS=""
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CHECK_HEADER([matio.h], [], [has_matio=no])
|
||||
AC_CHECK_LIB([matio], [Mat_Open], [LIBADD_MATIO="-lmatio $LIBS"], [has_matio=no])
|
||||
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LDFLAGS="$ac_save_LDFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
AC_SUBST(CPPFLAGS_MATIO)
|
||||
AC_SUBST(LIBADD_MATIO)
|
||||
AC_SUBST(LDFLAGS_MATIO)
|
||||
])
|
126
m4/ax_matlab.m4
126
m4/ax_matlab.m4
|
@ -1,126 +0,0 @@
|
|||
dnl ax_matlab.m4 --- check for MATLAB.
|
||||
dnl
|
||||
dnl Copyright © 2000-2003 Ralph Schleicher
|
||||
dnl Copyright © 2009-2021 Dynare Team
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU General Public License as
|
||||
dnl published by the Free Software Foundation; either version 2,
|
||||
dnl or (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License along
|
||||
dnl with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
dnl As a special exception to the GNU General Public License, if
|
||||
dnl you distribute this file as part of a program that contains a
|
||||
dnl configuration script generated by GNU Autoconf, you may include
|
||||
dnl it under the same distribution terms that you use for the rest
|
||||
dnl of that program.
|
||||
dnl
|
||||
dnl Code:
|
||||
|
||||
# AX_MATLAB
|
||||
# ---------
|
||||
# Check for MATLAB.
|
||||
AC_DEFUN([AX_MATLAB],
|
||||
[dnl
|
||||
AC_PREREQ([2.50])
|
||||
ax_enable_matlab=
|
||||
AC_ARG_WITH([matlab], AS_HELP_STRING([--with-matlab=ARG], [check for MATLAB [[yes]]]),
|
||||
[case $withval in
|
||||
yes | no)
|
||||
# Explicitly enable or disable MATLAB but determine
|
||||
# MATLAB prefix automatically.
|
||||
ax_enable_matlab=$withval
|
||||
;;
|
||||
*)
|
||||
# Enable MATLAB and use ARG as the MATLAB prefix.
|
||||
# ARG must be an existing directory.
|
||||
ax_enable_matlab=yes
|
||||
MATLAB=$(cd "${withval-/}" > /dev/null 2>&1 && pwd)
|
||||
if test -z "$MATLAB" ; then
|
||||
AC_MSG_ERROR([invalid value '$withval' for --with-matlab])
|
||||
fi
|
||||
;;
|
||||
esac])
|
||||
AC_CACHE_CHECK([for MATLAB prefix], [ax_cv_matlab],
|
||||
[if test "${MATLAB+set}" = set ; then
|
||||
ax_cv_matlab=$(cd "${MATLAB-/}" > /dev/null 2>&1 && pwd)
|
||||
else
|
||||
ax_cv_matlab=
|
||||
IFS=${IFS= } ; ax_ifs=$IFS ; IFS=:
|
||||
for ax_dir in ${PATH-/opt/bin:/usr/local/bin:/usr/bin:/bin} ; do
|
||||
if test -z "$ax_dir" ; then
|
||||
ax_dir=.
|
||||
fi
|
||||
if test -x "$ax_dir/matlab" ; then
|
||||
ax_dir=$(echo "$ax_dir" | sed 's,/bin$,,')
|
||||
# Directory sanity check.
|
||||
ax_cv_matlab=$(cd "${ax_dir-/}" > /dev/null 2>&1 && pwd)
|
||||
if test -n "$ax_cv_matlab" ; then
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS=$ax_ifs
|
||||
fi
|
||||
if test -z "$ax_cv_matlab" ; then
|
||||
ax_cv_matlab="not found"
|
||||
fi])
|
||||
if test "$ax_cv_matlab" = "not found" ; then
|
||||
unset MATLAB
|
||||
else
|
||||
# Strip trailing dashes.
|
||||
MATLAB=$(echo "$ax_cv_matlab" | sed 's,/*$,,')
|
||||
fi
|
||||
AC_MSG_CHECKING([whether to enable MATLAB support])
|
||||
if test "$ax_enable_matlab" != no; then
|
||||
if test "${MATLAB+set}" = set && test -d "$MATLAB/extern/include" ; then
|
||||
ax_enable_matlab=yes
|
||||
elif test -z "$ax_enable_matlab"; then
|
||||
ax_enable_matlab=no
|
||||
else
|
||||
# Fail if MATLAB was explicitly enabled.
|
||||
AC_MSG_RESULT([failure])
|
||||
AC_MSG_ERROR([check your MATLAB setup])
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT([$ax_enable_matlab])
|
||||
if test "$ax_enable_matlab" = yes; then
|
||||
AC_DEFINE([HAVE_MATLAB], [1], [Define if you have MATLAB.])
|
||||
fi
|
||||
AC_SUBST([MATLAB])
|
||||
])
|
||||
|
||||
# AX_REQUIRE_MATLAB
|
||||
# -----------------
|
||||
# Like AX_MATLAB but fail if MATLAB support is disabled.
|
||||
AC_DEFUN([AX_REQUIRE_MATLAB],
|
||||
[dnl
|
||||
AC_PREREQ([2.50])
|
||||
AC_REQUIRE([AX_MATLAB])
|
||||
if test "$ax_enable_matlab" = no; then
|
||||
AC_MSG_ERROR([can not enable MATLAB support])
|
||||
fi
|
||||
])
|
||||
|
||||
# AX_MATLAB_CONDITIONAL
|
||||
# ---------------------
|
||||
# Define MATLAB conditional for GNU Automake.
|
||||
AC_DEFUN([AX_MATLAB_CONDITIONAL],
|
||||
[dnl
|
||||
AC_PREREQ([2.50])
|
||||
AC_REQUIRE([AX_MATLAB])
|
||||
AM_CONDITIONAL([MATLAB], [test "$ax_enable_matlab" = yes])
|
||||
])
|
||||
|
||||
dnl ax_matlab.m4 ends here
|
||||
|
||||
dnl Local variables:
|
||||
dnl tab-width: 8
|
||||
dnl End:
|
|
@ -1,76 +0,0 @@
|
|||
dnl matlabarch.m4 --- check for MATLAB machine architecture.
|
||||
dnl
|
||||
dnl Copyright © 2002, 2003 Ralph Schleicher
|
||||
dnl Copyright © 2009-2023 Dynare Team
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU General Public License as
|
||||
dnl published by the Free Software Foundation; either version 2,
|
||||
dnl or (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License along
|
||||
dnl with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
dnl As a special exception to the GNU General Public License, if
|
||||
dnl you distribute this file as part of a program that contains a
|
||||
dnl configuration script generated by GNU Autoconf, you may include
|
||||
dnl it under the same distribution terms that you use for the rest
|
||||
dnl of that program.
|
||||
dnl
|
||||
dnl Code:
|
||||
|
||||
# AX_MATLAB_ARCH
|
||||
# --------------
|
||||
# Check for MATLAB machine architecture.
|
||||
AC_DEFUN([AX_MATLAB_ARCH],
|
||||
[dnl
|
||||
AC_PREREQ([2.50])
|
||||
AC_REQUIRE([AX_MEXEXT])
|
||||
AC_CACHE_CHECK([for MATLAB machine architecture], [ax_cv_matlab_arch],
|
||||
[if test "${MATLAB_ARCH+set}" = set ; then
|
||||
ax_cv_matlab_arch="$MATLAB_ARCH"
|
||||
else
|
||||
case $MEXEXT in
|
||||
*dll | *mexw32)
|
||||
ax_cv_matlab_arch=win32
|
||||
;;
|
||||
*mexw64)
|
||||
ax_cv_matlab_arch=win64
|
||||
;;
|
||||
*mexglx)
|
||||
ax_cv_matlab_arch=glnx86
|
||||
;;
|
||||
*mexa64)
|
||||
ax_cv_matlab_arch=glnxa64
|
||||
;;
|
||||
*mexs64)
|
||||
ax_cv_matlab_arch=sol64
|
||||
;;
|
||||
*mexmaci)
|
||||
ax_cv_matlab_arch=maci
|
||||
;;
|
||||
*mexmaci64)
|
||||
ax_cv_matlab_arch=maci64
|
||||
;;
|
||||
*mexmaca64)
|
||||
ax_cv_matlab_arch=maca64
|
||||
;;
|
||||
*)
|
||||
ax_cv_matlab_arch=unknown
|
||||
;;
|
||||
esac
|
||||
fi])
|
||||
MATLAB_ARCH="$ax_cv_matlab_arch"
|
||||
AC_SUBST([MATLAB_ARCH])
|
||||
])
|
||||
|
||||
dnl matlabarch.m4 ends here
|
||||
|
||||
dnl Local variables:
|
||||
dnl tab-width: 8
|
||||
dnl End:
|
|
@ -1,41 +0,0 @@
|
|||
dnl Copyright © 2019 Dynare Team
|
||||
dnl
|
||||
dnl This file is part of Dynare.
|
||||
dnl
|
||||
dnl Dynare is free software: you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation, either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl Dynare is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_MATLAB_BATCH_OPTIONS],
|
||||
[dnl
|
||||
AC_REQUIRE([AX_MATLAB])
|
||||
AC_REQUIRE([AX_MATLAB_ARCH])
|
||||
AC_REQUIRE([AX_MATLAB_VERSION])
|
||||
|
||||
AX_COMPARE_VERSION([$MATLAB_VERSION], [ge], [9.6],
|
||||
[
|
||||
if test "${MATLAB_ARCH}" = win32 -o "${MATLAB_ARCH}" = win64; then
|
||||
MATLAB_BATCH_OPTIONS='-noFigureWindows -batch'
|
||||
else
|
||||
MATLAB_BATCH_OPTIONS='-nodisplay -batch'
|
||||
fi
|
||||
],
|
||||
[
|
||||
if test "${MATLAB_ARCH}" = win32 -o "${MATLAB_ARCH}" = win64; then
|
||||
MATLAB_BATCH_OPTIONS='-nosplash -automation -wait -sd "$(CURDIR)" -r'
|
||||
else
|
||||
MATLAB_BATCH_OPTIONS='-nosplash -nodisplay -r'
|
||||
fi
|
||||
])
|
||||
|
||||
AC_SUBST([MATLAB_BATCH_OPTIONS])
|
||||
])
|
|
@ -1,176 +0,0 @@
|
|||
dnl Copyright © 2009-2023 Dynare Team
|
||||
dnl
|
||||
dnl This file is part of Dynare.
|
||||
dnl
|
||||
dnl Dynare is free software: you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation, either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl Dynare is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_MATLAB_VERSION],
|
||||
[dnl
|
||||
AC_REQUIRE([AX_MATLAB])
|
||||
|
||||
AC_MSG_CHECKING([for MATLAB version])
|
||||
|
||||
if test -n "$MATLAB"; then
|
||||
dnl Try to autodetect MATLAB version
|
||||
if test -f "${MATLAB}/VersionInfo.xml"; then
|
||||
dnl The VersionInfo.xml file is present on all versions since R2017a, on all platforms.
|
||||
dnl Extract the version number as x.y, since it is our preferred form, and is
|
||||
dnl more robust to future versions.
|
||||
dnl NB: brackets in regular expressions are enclosed in other brackets, because this is m4
|
||||
MATLAB_VERSION=$(sed -En '/<version>/s/.*>([[0-9]]+\.[[0-9]]+).*/\1/p' "${MATLAB}/VersionInfo.xml")
|
||||
elif test -f "${MATLAB}/bin/util/mex/version.txt"; then
|
||||
dnl The bin/util/mex/version.txt file is present on Windows and macOS, at least
|
||||
dnl since R2009b. It contains the release number (Rnnnnx).
|
||||
MATLAB_VERSION=$(cat "${MATLAB}/bin/util/mex/version.txt")
|
||||
elif test -f "${MATLAB}/bin/mex" || test -f "${MATLAB}/bin/mexsh"; then
|
||||
dnl Works on Linux and macOS until R2018a included. Returns the release number (Rnnnnx).
|
||||
dnl Older MATLABs have the version in bin/mex, more recent in bin/mexsh
|
||||
dnl NB: brackets in regular expressions are enclosed in other brackets, because this is m4
|
||||
MATLAB_VERSION=$(sed -En "/^.*full_ver=/s/^.*full_ver='(R[[^']]+)'.*/\1/p" "${MATLAB}"/bin/mex*)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$MATLAB_VERSION"; then
|
||||
dnl Convert a release number (Rnnnnx) into a version number (x.y)
|
||||
case $MATLAB_VERSION in
|
||||
*2023a | *2023A)
|
||||
MATLAB_VERSION="9.14"
|
||||
;;
|
||||
*2022b | *2022B)
|
||||
MATLAB_VERSION="9.13"
|
||||
;;
|
||||
*2022a | *2022A)
|
||||
MATLAB_VERSION="9.12"
|
||||
;;
|
||||
*2021b | *2021B)
|
||||
MATLAB_VERSION="9.11"
|
||||
;;
|
||||
*2021a | *2021A)
|
||||
MATLAB_VERSION="9.10"
|
||||
;;
|
||||
*2020b | *2020B)
|
||||
MATLAB_VERSION="9.9"
|
||||
;;
|
||||
*2020a | *2020A)
|
||||
MATLAB_VERSION="9.8"
|
||||
;;
|
||||
*2019b | *2019B)
|
||||
MATLAB_VERSION="9.7"
|
||||
;;
|
||||
*2019a | *2019A)
|
||||
MATLAB_VERSION="9.6"
|
||||
;;
|
||||
*2018b | *2018B)
|
||||
MATLAB_VERSION="9.5"
|
||||
;;
|
||||
*2018a | *2018A)
|
||||
MATLAB_VERSION="9.4"
|
||||
;;
|
||||
*2017b | *2017B)
|
||||
MATLAB_VERSION="9.3"
|
||||
;;
|
||||
*2017a | *2017A)
|
||||
MATLAB_VERSION="9.2"
|
||||
;;
|
||||
*2016b | *2016B)
|
||||
MATLAB_VERSION="9.1"
|
||||
;;
|
||||
*2016a | *2016A)
|
||||
MATLAB_VERSION="9.0"
|
||||
;;
|
||||
*2015b | *2015B)
|
||||
MATLAB_VERSION="8.6"
|
||||
;;
|
||||
*2015a | *2015A)
|
||||
MATLAB_VERSION="8.5"
|
||||
;;
|
||||
*2014b | *2014B)
|
||||
MATLAB_VERSION="8.4"
|
||||
;;
|
||||
*2014a | *2014A)
|
||||
MATLAB_VERSION="8.3"
|
||||
;;
|
||||
*2013b | *2013B)
|
||||
MATLAB_VERSION="8.2"
|
||||
;;
|
||||
*2013a | *2013A)
|
||||
MATLAB_VERSION="8.1"
|
||||
;;
|
||||
*2012b | *2012B)
|
||||
MATLAB_VERSION="8.0"
|
||||
;;
|
||||
*2012a | *2012A)
|
||||
MATLAB_VERSION="7.14"
|
||||
;;
|
||||
*2011b | *2011B)
|
||||
MATLAB_VERSION="7.13"
|
||||
;;
|
||||
*2011a | *2011A)
|
||||
MATLAB_VERSION="7.12"
|
||||
;;
|
||||
*2010b | *2010B)
|
||||
MATLAB_VERSION="7.11"
|
||||
;;
|
||||
*2010a | *2010A)
|
||||
MATLAB_VERSION="7.10"
|
||||
;;
|
||||
*2009b | *2009B)
|
||||
MATLAB_VERSION="7.9"
|
||||
;;
|
||||
*2009a | *2009A)
|
||||
MATLAB_VERSION="7.8"
|
||||
;;
|
||||
*2008b | *2008B)
|
||||
MATLAB_VERSION="7.7"
|
||||
;;
|
||||
*2008a | *2008A)
|
||||
MATLAB_VERSION="7.6"
|
||||
;;
|
||||
*2007b | *2007B)
|
||||
MATLAB_VERSION="7.5"
|
||||
;;
|
||||
*2007a | *2007A)
|
||||
MATLAB_VERSION="7.4"
|
||||
;;
|
||||
*2006b | *2006B)
|
||||
MATLAB_VERSION="7.3"
|
||||
;;
|
||||
*2006a | *2006A)
|
||||
MATLAB_VERSION="7.2"
|
||||
;;
|
||||
*14SP3 | *14sp3)
|
||||
MATLAB_VERSION="7.1"
|
||||
;;
|
||||
*14SP2 | *14sp2)
|
||||
MATLAB_VERSION="7.0.4"
|
||||
;;
|
||||
*14SP1 | *14sp1)
|
||||
MATLAB_VERSION="7.0.1"
|
||||
;;
|
||||
R14 | r14)
|
||||
MATLAB_VERSION="7.0.0"
|
||||
;;
|
||||
esac
|
||||
dnl Check that we have an x.y version number
|
||||
if ! echo "${MATLAB_VERSION}" | grep -qE '^[[0-9.]]+$'; then
|
||||
AC_MSG_ERROR([unknown MATLAB version ${MATLAB_VERSION}])
|
||||
fi
|
||||
AC_MSG_RESULT([${MATLAB_VERSION}])
|
||||
ax_matlab_version_ok="yes"
|
||||
else
|
||||
AC_MSG_RESULT([unknown])
|
||||
ax_matlab_version_ok="no"
|
||||
fi
|
||||
AC_SUBST([MATLAB_VERSION])
|
||||
])
|
|
@ -1,75 +0,0 @@
|
|||
dnl ax_mexext.m4 --- check for MEX-file suffix.
|
||||
dnl
|
||||
dnl Copyright © 2000-2003 Ralph Schleicher
|
||||
dnl Copyright © 2009-2019 Dynare Team
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU General Public License as
|
||||
dnl published by the Free Software Foundation; either version 2,
|
||||
dnl or (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License along
|
||||
dnl with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
dnl As a special exception to the GNU General Public License, if
|
||||
dnl you distribute this file as part of a program that contains a
|
||||
dnl configuration script generated by GNU Autoconf, you may include
|
||||
dnl it under the same distribution terms that you use for the rest
|
||||
dnl of that program.
|
||||
dnl
|
||||
dnl Code:
|
||||
|
||||
# AX_MEXEXT
|
||||
# ---------
|
||||
# Check for MEX-file suffix.
|
||||
AC_DEFUN([AX_MEXEXT],
|
||||
[dnl
|
||||
AC_PREREQ([2.50])
|
||||
AC_REQUIRE([AX_MATLAB])
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])
|
||||
AC_CACHE_CHECK([for MEX-file suffix], [ax_cv_mexext],
|
||||
[if test "${MEXEXT+set}" = set ; then
|
||||
ax_cv_mexext="$MEXEXT"
|
||||
else
|
||||
case $build_os in
|
||||
*cygwin*|*mingw*)
|
||||
ax_cv_mexext=$("$MATLAB"/bin/mexext.bat | sed 's/\r//')
|
||||
;;
|
||||
*)
|
||||
ax_cv_mexext=$("$MATLAB"/bin/mexext)
|
||||
;;
|
||||
esac
|
||||
fi])
|
||||
MEXEXT="$ax_cv_mexext"
|
||||
AC_SUBST([MEXEXT])
|
||||
])
|
||||
|
||||
# AX_DOT_MEXEXT
|
||||
# -------------
|
||||
# Check for MEX-file suffix with leading dot.
|
||||
AC_DEFUN([AX_DOT_MEXEXT],
|
||||
[dnl
|
||||
AC_REQUIRE([AX_MEXEXT])
|
||||
case $MEXEXT in
|
||||
.*)
|
||||
;;
|
||||
*)
|
||||
if test -n "$MEXEXT" ; then
|
||||
MEXEXT=.$MEXEXT
|
||||
AC_MSG_RESULT([setting MEX-file suffix to $MEXEXT])
|
||||
AC_SUBST([MEXEXT])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
dnl ax_mexext.m4 ends here
|
||||
|
||||
dnl Local variables:
|
||||
dnl tab-width: 8
|
||||
dnl End:
|
139
m4/ax_mexopts.m4
139
m4/ax_mexopts.m4
|
@ -1,139 +0,0 @@
|
|||
dnl Copyright © 2009-2023 Dynare Team
|
||||
dnl
|
||||
dnl This file is part of Dynare.
|
||||
dnl
|
||||
dnl Dynare is free software: you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation, either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl Dynare is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_MEXOPTS],
|
||||
[dnl
|
||||
AC_REQUIRE([AX_MEXEXT])
|
||||
AC_REQUIRE([AX_MATLAB_ARCH])
|
||||
AC_REQUIRE([AX_MATLAB_VERSION])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
|
||||
AX_COMPARE_VERSION([$MATLAB_VERSION], [lt], [8.3], [AC_MSG_ERROR([Your MATLAB is too old, please upgrade to 8.3 (R2014a) at least.])])
|
||||
|
||||
AC_MSG_CHECKING([for options to compile MEX for MATLAB])
|
||||
|
||||
MATLAB_CPPFLAGS="-I$MATLAB/extern/include"
|
||||
|
||||
case ${MATLAB_ARCH} in
|
||||
glnxa64)
|
||||
MATLAB_DEFS="-D_GNU_SOURCE -DNDEBUG"
|
||||
MATLAB_CFLAGS="-fexceptions -fPIC -pthread"
|
||||
MATLAB_CXXFLAGS="-fPIC -pthread"
|
||||
MATLAB_FCFLAGS="-fPIC -fexceptions"
|
||||
MATLAB_LDFLAGS_NOMAP="-shared -Wl,--no-undefined -Wl,-rpath-link,$MATLAB/bin/glnxa64 -L$MATLAB/bin/glnxa64"
|
||||
MATLAB_LDFLAGS="$MATLAB_LDFLAGS_NOMAP -Wl,--version-script,$MATLAB/extern/lib/glnxa64/mexFunction.map"
|
||||
MATLAB_LIBS="-lmx -lmex -lmat -lm -lmwlapack -lmwblas"
|
||||
FORTRAN_LIBS_FOR_CXXLINK="-lgfortran -lquadmath"
|
||||
ax_mexopts_ok="yes"
|
||||
;;
|
||||
win64)
|
||||
MATLAB_CFLAGS="-fexceptions"
|
||||
MATLAB_CXXFLAGS=""
|
||||
MATLAB_FCFLAGS="-fexceptions -fno-underscoring"
|
||||
MATLAB_DEFS="-DNDEBUG"
|
||||
# The hack for libquadmath is needed because -static-libgfortran
|
||||
# unfortunately does not imply the static linking of the former.
|
||||
# The last part about winpthread is a hack to avoid dynamically linking
|
||||
# against libwinpthread DLL (which is pulled in by libstdc++, even without
|
||||
# using threads, since we are using the POSIX threads version of MinGW)
|
||||
MATLAB_LDFLAGS_NOMAP="-static-libgcc -static-libstdc++ -static-libgfortran -Wl,-Bstatic,--whole-archive -lquadmath -Wl,-Bdynamic,--no-whole-archive -shared -L$MATLAB/bin/win64 -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,-Bdynamic,--no-whole-archive"
|
||||
MATLAB_LDFLAGS="$MATLAB_LDFLAGS_NOMAP \$(abs_top_srcdir)/mex.def"
|
||||
# Hack for libssp, which is pulled in by -fstack-protector
|
||||
# (curiously only on some MEX files), see windows/build.sh.
|
||||
# Note that the link against libssp should not happen with compilers
|
||||
# from MSYS2, see:
|
||||
# https://www.msys2.org/news/#2022-10-10-libssp-is-no-longer-required
|
||||
# But it happens with Debian’s cross compilers (as of Debian “bookworm” 12).
|
||||
# Also note that the -lssp must come by the end of the link command
|
||||
# (otherwise it will have to be enclosed within --whole-archive).
|
||||
MATLAB_LIBS="-lmex -lmx -lmat -lmwlapack -lmwblas -Wl,-Bstatic -lssp -Wl,-Bdynamic"
|
||||
# Hack for static linking of libgomp, needed for OpenMP.
|
||||
# Should come by the end of the link command
|
||||
# (otherwise it will have to be enclosed within --whole-archive).
|
||||
OPENMP_LIBS="-Wl,-Bstatic -lgomp -Wl,-Bdynamic"
|
||||
FORTRAN_LIBS_FOR_CXXLINK="-Wl,-Bstatic -lgfortran -Wl,-Bdynamic" # libquadmath is already in MATLAB_LDFLAGS_NOMAP
|
||||
ax_mexopts_ok="yes"
|
||||
;;
|
||||
mac[[ai]]64)
|
||||
MATLAB_DEFS="-DNDEBUG"
|
||||
MATLAB_CFLAGS="-fno-common -fexceptions"
|
||||
MATLAB_CXXFLAGS="-fno-common -fexceptions"
|
||||
MATLAB_FCFLAGS="-fexceptions -fbackslash"
|
||||
MATLAB_LDFLAGS_NOMAP="-Wl,-twolevel_namespace -undefined error -bundle"
|
||||
MATLAB_LDFLAGS="$MATLAB_LDFLAGS_NOMAP -Wl,-exported_symbols_list,\$(abs_top_srcdir)/mexFunction-MacOSX.map"
|
||||
# This -L flag is put here, hence later on the linker command line, so as
|
||||
# to avoid linking against the HDF5 shipped by MATLAB (which would
|
||||
# otherwise override the HDF5 from Homebrew)
|
||||
MATLAB_LIBS="-L$MATLAB/bin/${MATLAB_ARCH} -lmx -lmex -lmat -lmwlapack -lmwblas"
|
||||
FORTRAN_LIBS_FOR_CXXLINK="-lgfortran -lquadmath"
|
||||
ax_mexopts_ok="yes"
|
||||
;;
|
||||
*)
|
||||
ax_mexopts_ok="no"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Converts the MATLAB version number into comparable integers with only major and minor version numbers
|
||||
# For example, 7.4.2 will become 0704
|
||||
ax_matlab_ver=$(echo "$MATLAB_VERSION" | $SED -e 's/\([[0-9]]*\)\.\([[0-9]]*\).*/Z\1ZZ\2Z/' \
|
||||
-e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/[[^0-9]]//g')
|
||||
|
||||
MATLAB_DEFS="$MATLAB_DEFS -DMATLAB_VERSION=0x${ax_matlab_ver}"
|
||||
|
||||
if test "$ax_mexopts_ok" = "yes"; then
|
||||
AC_MSG_RESULT([ok])
|
||||
else
|
||||
AC_MSG_RESULT([unknown])
|
||||
fi
|
||||
|
||||
# Allow user to override default Matlab compilation flags
|
||||
# Github ticket #1121
|
||||
if test -n "$MATLAB_MEX_CPPFLAGS"; then
|
||||
MATLAB_CPPFLAGS="$MATLAB_CPPFLAGS $MATLAB_MEX_CPPFLAGS"
|
||||
fi
|
||||
|
||||
if test -n "$MATLAB_MEX_DEFS"; then
|
||||
MATLAB_DEFS="$MATLAB_DEFS $MATLAB_MEX_DEFS"
|
||||
fi
|
||||
|
||||
if test -n "$MATLAB_MEX_CFLAGS"; then
|
||||
MATLAB_CFLAGS="$MATLAB_CFLAGS $MATLAB_MEX_CFLAGS"
|
||||
fi
|
||||
|
||||
if test -n "$MATLAB_MEX_CXXFLAGS"; then
|
||||
MATLAB_CXXFLAGS="$MATLAB_CXXFLAGS $MATLAB_MEX_CXXFLAGS"
|
||||
fi
|
||||
|
||||
if test -n "$MATLAB_MEX_LDFLAGS"; then
|
||||
MATLAB_LDFLAGS="$MATLAB_LDFLAGS $MATLAB_MEX_LDFLAGS"
|
||||
fi
|
||||
|
||||
if test -n "$MATLAB_MEX_LIBS"; then
|
||||
MATLAB_LIBS="$MATLAB_LIBS $MATLAB_MEX_LIBS"
|
||||
fi
|
||||
|
||||
AC_SUBST([MATLAB_CPPFLAGS])
|
||||
AC_SUBST([MATLAB_DEFS])
|
||||
AC_SUBST([MATLAB_CFLAGS])
|
||||
AC_SUBST([MATLAB_CXXFLAGS])
|
||||
AC_SUBST([MATLAB_FCFLAGS])
|
||||
AC_SUBST([MATLAB_LDFLAGS])
|
||||
AC_SUBST([MATLAB_LIBS])
|
||||
AC_SUBST([OPENMP_LIBS])
|
||||
AC_SUBST([FORTRAN_LIBS_FOR_CXXLINK])
|
||||
])
|
|
@ -1,56 +0,0 @@
|
|||
dnl ax_octave.m4 --- check for Octave
|
||||
dnl
|
||||
dnl Copyright © 2020-2021 Dynare Team
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU General Public License as
|
||||
dnl published by the Free Software Foundation; either version 2,
|
||||
dnl or (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License along
|
||||
dnl with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
dnl As a special exception to the GNU General Public License, if
|
||||
dnl you distribute this file as part of a program that contains a
|
||||
dnl configuration script generated by GNU Autoconf, you may include
|
||||
dnl it under the same distribution terms that you use for the rest
|
||||
dnl of that program.
|
||||
|
||||
# AX_OCTAVE
|
||||
# ---------
|
||||
# Checks for Octave.
|
||||
# Search in the argument given to --with-octave if any.
|
||||
# Otherwise, search in PATH.
|
||||
# Sets OCTAVE and MKOCTFILE variables and calls AC_SUBST on them.
|
||||
# Sets ax_enable_octave=yes if successful, ax_enable_octave=no otherwise
|
||||
AC_DEFUN([AX_OCTAVE],
|
||||
[dnl
|
||||
AC_ARG_WITH([octave], AS_HELP_STRING([--with-octave=PATH], [Path to search for Octave installation]),
|
||||
[
|
||||
if test -n "$withval"; then
|
||||
if test -x "$withval/bin/octave" && test -x "$withval/bin/mkoctfile"; then
|
||||
OCTAVE="$withval/bin/octave"
|
||||
MKOCTFILE="$withval/bin/mkoctfile"
|
||||
else
|
||||
AC_MSG_ERROR([invalid value '$withval' for --with-octave])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_CHECK_PROG([OCTAVE], [octave], [octave])
|
||||
AC_CHECK_PROG([MKOCTFILE], [mkoctfile], [mkoctfile])
|
||||
|
||||
if test -n "$OCTAVE" && test -n "$MKOCTFILE"; then
|
||||
ax_enable_octave=yes
|
||||
else
|
||||
ax_enable_octave=no
|
||||
fi
|
||||
|
||||
AC_SUBST([OCTAVE])
|
||||
AC_SUBST([MKOCTFILE])
|
||||
])
|
|
@ -1,27 +0,0 @@
|
|||
dnl Copyright © 2009-2010 Dynare Team
|
||||
dnl
|
||||
dnl This file is part of Dynare.
|
||||
dnl
|
||||
dnl Dynare is free software: you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation, either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl Dynare is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_PROG_LN_S],
|
||||
[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_PROG_LN_S])
|
||||
case ${host_os} in
|
||||
*cygwin*|*mingw32*)
|
||||
LN_S="cp -p" # Symbolic links are not understood by MATLAB under Windows
|
||||
;;
|
||||
esac
|
||||
])
|
|
@ -1,68 +0,0 @@
|
|||
dnl Detect the SLICOT Library.
|
||||
dnl Called with an argument of either 'matlab' or 'octave', depending
|
||||
dnl on the configure script from which we're calling it
|
||||
dnl
|
||||
dnl AX_SLICOT([matlab])
|
||||
dnl AX_SLICOT([octave])
|
||||
dnl
|
||||
dnl Copyright © 2012-2021 Dynare Team
|
||||
dnl
|
||||
dnl This file is part of Dynare.
|
||||
dnl
|
||||
dnl Dynare is free software: you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation, either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl Dynare is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_SLICOT],
|
||||
[
|
||||
if test "$1" != matlab && test "$1" != octave; then
|
||||
AC_MSG_ERROR([Argument to autoconf slicot macro must be either 'matlab' or 'octave'])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(slicot, AS_HELP_STRING([--with-slicot=DIR], [prefix to SLICOT installation]),
|
||||
slicot_prefix="$withval", slicot_prefix="")
|
||||
has_slicot=yes
|
||||
|
||||
if test -n "$slicot_prefix"; then
|
||||
LDFLAGS_SLICOT="-L$withval/lib"
|
||||
else
|
||||
LDFLAGS_SLICOT=""
|
||||
fi
|
||||
my_save_LDFLAGS=$LDFLAGS
|
||||
|
||||
# At this point we should add MATLAB_FCFLAGS to FCFLAGS for Windows (which has -fno-underscoring),
|
||||
# but that does not work. The actual underscore test seems to happen at the very beginning of the
|
||||
# macro. Hence the modification of FCFLAGS was moved higher (in mex/build/matlab/configure.ac).
|
||||
AC_FC_FUNC(sb02od)
|
||||
|
||||
if test "$1" = matlab; then
|
||||
LDFLAGS="$LDFLAGS $MATLAB_LDFLAGS_NOMAP $LDFLAGS_SLICOT"
|
||||
|
||||
# Add MATLAB_CFLAGS to get the -fPIC on Linux/x86_64 (otherwise linking fails)
|
||||
my_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $MATLAB_CFLAGS"
|
||||
AC_CHECK_LIB([slicot64_pic], [$sb02od], [LIBADD_SLICOT="-lslicot64_pic"], [has_slicot=no], [$MATLAB_LIBS])
|
||||
CFLAGS=$my_save_CFLAGS
|
||||
else
|
||||
LDFLAGS="$LDFLAGS $LDFLAGS_SLICOT"
|
||||
# Fallback on libslicot_pic if dynamic libslicot not found
|
||||
AC_CHECK_LIB([slicot], [$sb02od], [LIBADD_SLICOT="-lslicot"],
|
||||
[
|
||||
AC_CHECK_LIB([slicot_pic], [$sb02od], [LIBADD_SLICOT="-lslicot_pic"], [has_slicot=no], [$($MKOCTFILE -p BLAS_LIBS) $($MKOCTFILE -p LAPACK_LIBS)])
|
||||
],
|
||||
[$($MKOCTFILE -p BLAS_LIBS) $($MKOCTFILE -p LAPACK_LIBS)])
|
||||
fi
|
||||
|
||||
LDFLAGS=$my_save_LDFLAGS
|
||||
AC_SUBST(LDFLAGS_SLICOT)
|
||||
AC_SUBST(LIBADD_SLICOT)
|
||||
])
|
|
@ -15,22 +15,28 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
.PHONY: all deps clean-deps clean clean-all build
|
||||
ARCHS = arm64 x86_64
|
||||
BUILDS = $(addprefix build-, $(ARCHS))
|
||||
DEPS = $(addprefix deps-, $(ARCHS))
|
||||
CLEAN_DEPS = $(addprefix clean-deps-, $(ARCHS))
|
||||
CLEAN_ALL = $(addprefix clean-all-, $(ARCHS))
|
||||
|
||||
NTHREADS=$(shell sysctl -n hw.ncpu)
|
||||
.PHONY: all $(BUILDS) $(DEPS) clean-pkg $(CLEAN_DEPS) $(CLEAN_ALL) clean-all
|
||||
|
||||
all: build
|
||||
all: $(BUILDS)
|
||||
|
||||
deps:
|
||||
make -C deps -j$(NTHREADS)
|
||||
$(BUILDS): build-%: deps-%
|
||||
./build.sh $*
|
||||
|
||||
clean-deps:
|
||||
make -C deps clean-all
|
||||
$(DEPS): deps-%:
|
||||
make -C deps DEPS_ARCH=$*
|
||||
|
||||
clean:
|
||||
$(CLEAN_DEPS): clean-deps-%:
|
||||
make -C deps clean-all DEPS_ARCH=$*
|
||||
|
||||
clean-pkg:
|
||||
rm -rf pkg
|
||||
|
||||
clean-all: clean-deps clean
|
||||
$(CLEAN_ALL): clean-all-%: clean-deps-% clean-pkg
|
||||
|
||||
build: deps
|
||||
./build.sh
|
||||
clean-all: $(CLEAN_ALL)
|
||||
|
|
|
@ -1,279 +0,0 @@
|
|||
class Gcc < Formula
|
||||
desc "GNU compiler collection"
|
||||
homepage "https://gcc.gnu.org/"
|
||||
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
|
||||
head "https://gcc.gnu.org/git/gcc.git", branch: "master"
|
||||
|
||||
stable do
|
||||
url "https://ftp.gnu.org/gnu/gcc/gcc-13.1.0/gcc-13.1.0.tar.xz"
|
||||
mirror "https://ftpmirror.gnu.org/gcc/gcc-13.1.0/gcc-13.1.0.tar.xz"
|
||||
sha256 "61d684f0aa5e76ac6585ad8898a2427aade8979ed5e7f85492286c4dfc13ee86"
|
||||
|
||||
# Branch from the Darwin maintainer of GCC, with a few generic fixes and
|
||||
# Apple Silicon support, located at https://github.com/iains/gcc-13-branch
|
||||
patch do
|
||||
url "https://raw.githubusercontent.com/Homebrew/formula-patches/5c206c47/gcc/gcc-13.1.0.diff"
|
||||
sha256 "cb4e8a89387f748a744da0273025d0dc2e3c76780cc390b18ada704676afea11"
|
||||
end
|
||||
end
|
||||
|
||||
livecheck do
|
||||
url :stable
|
||||
regex(%r{href=["']?gcc[._-]v?(\d+(?:\.\d+)+)(?:/?["' >]|\.t)}i)
|
||||
end
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_ventura: "d2b21a257c73e9b8f9c6bc03e6330ea8ba9fb3e7cdb9eb945d7ff7d96ba9708c"
|
||||
sha256 cellar: :any, arm64_monterey: "5405f3b1ecdabb68e161308f35d72af907af21694a0e2b67f10edb25b2dd8f90"
|
||||
sha256 cellar: :any, arm64_big_sur: "cc92fced3516bc72b69e31b0495fe416f206b540be02f1c817db96afbcc38f28"
|
||||
sha256 cellar: :any, ventura: "3abd8c2c88a8e74b5df5c44f9c151ff7e760cf705307ecf3c95762492e777f1e"
|
||||
sha256 cellar: :any, monterey: "f9cbc7eb14781df9228518a2d02590941206947e7dc419c0b232d523f39b1475"
|
||||
sha256 cellar: :any, big_sur: "2eb458ed309ea4fa9451ab547fa3d797bd523ba4f50f01d5c997212109b74e5e"
|
||||
sha256 cellar: :any_skip_relocation, x86_64_linux: "cca77a5d6625d3bb711ce40551751974d4cb5c74306329fc2fc8cdcade2ef564"
|
||||
end
|
||||
|
||||
# The bottles are built on systems with the CLT installed, and do not work
|
||||
# out of the box on Xcode-only systems due to an incorrect sysroot.
|
||||
pour_bottle? only_if: :clt_installed
|
||||
|
||||
depends_on "gmp"
|
||||
depends_on "isl"
|
||||
depends_on "libmpc"
|
||||
depends_on "mpfr"
|
||||
depends_on "zstd"
|
||||
|
||||
uses_from_macos "zlib"
|
||||
|
||||
on_linux do
|
||||
depends_on "binutils"
|
||||
end
|
||||
|
||||
# GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib
|
||||
cxxstdlib_check :skip
|
||||
|
||||
def version_suffix
|
||||
if build.head?
|
||||
"HEAD"
|
||||
else
|
||||
version.major.to_s
|
||||
end
|
||||
end
|
||||
|
||||
def install
|
||||
# GCC will suffer build errors if forced to use a particular linker.
|
||||
ENV.delete "LD"
|
||||
|
||||
# We avoiding building:
|
||||
# - Ada and D, which require a pre-existing GCC to bootstrap
|
||||
# - Go, currently not supported on macOS
|
||||
# - BRIG
|
||||
languages = %w[c c++ objc obj-c++ fortran]
|
||||
|
||||
pkgversion = "Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip
|
||||
|
||||
# Use `lib/gcc/current` to provide a path that doesn't change with GCC's version.
|
||||
args = %W[
|
||||
--prefix=#{opt_prefix}
|
||||
--libdir=#{opt_lib}/gcc/current
|
||||
--disable-nls
|
||||
--enable-checking=release
|
||||
--with-gcc-major-version-only
|
||||
--enable-languages=#{languages.join(",")}
|
||||
--program-suffix=-#{version_suffix}
|
||||
--with-gmp=#{Formula["gmp"].opt_prefix}
|
||||
--with-mpfr=#{Formula["mpfr"].opt_prefix}
|
||||
--with-mpc=#{Formula["libmpc"].opt_prefix}
|
||||
--with-isl=#{Formula["isl"].opt_prefix}
|
||||
--with-zstd=#{Formula["zstd"].opt_prefix}
|
||||
--with-pkgversion=#{pkgversion}
|
||||
--with-bugurl=#{tap.issues_url}
|
||||
--with-system-zlib
|
||||
]
|
||||
|
||||
if OS.mac?
|
||||
cpu = Hardware::CPU.arm? ? "aarch64" : "x86_64"
|
||||
args << "--build=#{cpu}-apple-darwin#{OS.kernel_version.major}"
|
||||
|
||||
# System headers may not be in /usr/include
|
||||
sdk = MacOS.sdk_path_if_needed
|
||||
args << "--with-sysroot=#{sdk}" if sdk
|
||||
else
|
||||
# Fix cc1: error while loading shared libraries: libisl.so.15
|
||||
args << "--with-boot-ldflags=-static-libstdc++ -static-libgcc #{ENV.ldflags}"
|
||||
|
||||
# Fix Linux error: gnu/stubs-32.h: No such file or directory.
|
||||
args << "--disable-multilib"
|
||||
|
||||
# Enable to PIE by default to match what the host GCC uses
|
||||
args << "--enable-default-pie"
|
||||
|
||||
# Change the default directory name for 64-bit libraries to `lib`
|
||||
# https://stackoverflow.com/a/54038769
|
||||
inreplace "gcc/config/i386/t-linux64", "m64=../lib64", "m64="
|
||||
end
|
||||
|
||||
mkdir "build" do
|
||||
system "../configure", *args
|
||||
system "make"
|
||||
|
||||
# Do not strip the binaries on macOS, it makes them unsuitable
|
||||
# for loading plugins
|
||||
install_target = OS.mac? ? "install" : "install-strip"
|
||||
|
||||
# To make sure GCC does not record cellar paths, we configure it with
|
||||
# opt_prefix as the prefix. Then we use DESTDIR to install into a
|
||||
# temporary location, then move into the cellar path.
|
||||
system "make", install_target, "DESTDIR=#{Pathname.pwd}/../instdir"
|
||||
mv Dir[Pathname.pwd/"../instdir/#{opt_prefix}/*"], prefix
|
||||
end
|
||||
|
||||
bin.install_symlink bin/"gfortran-#{version_suffix}" => "gfortran"
|
||||
|
||||
# Provide a `lib/gcc/xy` directory to align with the versioned GCC formulae.
|
||||
# We need to create `lib/gcc/xy` as a directory and not a symlink to avoid `brew link` conflicts.
|
||||
(lib/"gcc"/version_suffix).install_symlink (lib/"gcc/current").children
|
||||
|
||||
# Only the newest brewed gcc should install gfortan libs as we can only have one.
|
||||
lib.install_symlink lib.glob("gcc/current/libgfortran.*") if OS.linux?
|
||||
|
||||
# Handle conflicts between GCC formulae and avoid interfering
|
||||
# with system compilers.
|
||||
# Rename man7.
|
||||
man7.glob("*.7") { |file| add_suffix file, version_suffix }
|
||||
# Even when we disable building info pages some are still installed.
|
||||
info.rmtree
|
||||
|
||||
# Work around GCC install bug
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105664
|
||||
rm_rf bin.glob("*-gcc-tmp")
|
||||
end
|
||||
|
||||
def add_suffix(file, suffix)
|
||||
dir = File.dirname(file)
|
||||
ext = File.extname(file)
|
||||
base = File.basename(file, ext)
|
||||
File.rename file, "#{dir}/#{base}-#{suffix}#{ext}"
|
||||
end
|
||||
|
||||
def post_install
|
||||
if OS.linux?
|
||||
gcc = bin/"gcc-#{version_suffix}"
|
||||
libgcc = Pathname.new(Utils.safe_popen_read(gcc, "-print-libgcc-file-name")).parent
|
||||
raise "command failed: #{gcc} -print-libgcc-file-name" if $CHILD_STATUS.exitstatus.nonzero?
|
||||
|
||||
glibc = Formula["glibc"]
|
||||
glibc_installed = glibc.any_version_installed?
|
||||
|
||||
# Symlink system crt1.o and friends where gcc can find it.
|
||||
crtdir = if glibc_installed
|
||||
glibc.opt_lib
|
||||
else
|
||||
Pathname.new(Utils.safe_popen_read("/usr/bin/cc", "-print-file-name=crti.o")).parent
|
||||
end
|
||||
ln_sf Dir[crtdir/"*crt?.o"], libgcc
|
||||
|
||||
# Create the GCC specs file
|
||||
# See https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html
|
||||
|
||||
# Locate the specs file
|
||||
specs = libgcc/"specs"
|
||||
ohai "Creating the GCC specs file: #{specs}"
|
||||
specs_orig = Pathname.new("#{specs}.orig")
|
||||
rm_f [specs_orig, specs]
|
||||
|
||||
system_header_dirs = ["#{HOMEBREW_PREFIX}/include"]
|
||||
|
||||
if glibc_installed
|
||||
# https://github.com/Linuxbrew/brew/issues/724
|
||||
system_header_dirs << glibc.opt_include
|
||||
else
|
||||
# Locate the native system header dirs if user uses system glibc
|
||||
target = Utils.safe_popen_read(gcc, "-print-multiarch").chomp
|
||||
raise "command failed: #{gcc} -print-multiarch" if $CHILD_STATUS.exitstatus.nonzero?
|
||||
|
||||
system_header_dirs += ["/usr/include/#{target}", "/usr/include"]
|
||||
end
|
||||
|
||||
# Save a backup of the default specs file
|
||||
specs_string = Utils.safe_popen_read(gcc, "-dumpspecs")
|
||||
raise "command failed: #{gcc} -dumpspecs" if $CHILD_STATUS.exitstatus.nonzero?
|
||||
|
||||
specs_orig.write specs_string
|
||||
|
||||
# Set the library search path
|
||||
# For include path:
|
||||
# * `-isysroot #{HOMEBREW_PREFIX}/nonexistent` prevents gcc searching built-in
|
||||
# system header files.
|
||||
# * `-idirafter <dir>` instructs gcc to search system header
|
||||
# files after gcc internal header files.
|
||||
# For libraries:
|
||||
# * `-nostdlib -L#{libgcc} -L#{glibc.opt_lib}` instructs gcc to use
|
||||
# brewed glibc if applied.
|
||||
# * `-L#{libdir}` instructs gcc to find the corresponding gcc
|
||||
# libraries. It is essential if there are multiple brewed gcc
|
||||
# with different versions installed.
|
||||
# Noted that it should only be passed for the `gcc@*` formulae.
|
||||
# * `-L#{HOMEBREW_PREFIX}/lib` instructs gcc to find the rest
|
||||
# brew libraries.
|
||||
# Note: *link will silently add #{libdir} first to the RPATH
|
||||
libdir = HOMEBREW_PREFIX/"lib/gcc/current"
|
||||
specs.write specs_string + <<~EOS
|
||||
*cpp_unique_options:
|
||||
+ -isysroot #{HOMEBREW_PREFIX}/nonexistent #{system_header_dirs.map { |p| "-idirafter #{p}" }.join(" ")}
|
||||
|
||||
*link_libgcc:
|
||||
#{glibc_installed ? "-nostdlib -L#{libgcc} -L#{glibc.opt_lib}" : "+"} -L#{libdir} -L#{HOMEBREW_PREFIX}/lib
|
||||
|
||||
*link:
|
||||
+ --dynamic-linker #{HOMEBREW_PREFIX}/lib/ld.so -rpath #{libdir}
|
||||
|
||||
*homebrew_rpath:
|
||||
-rpath #{HOMEBREW_PREFIX}/lib
|
||||
|
||||
EOS
|
||||
inreplace(specs, " %o ", "\\0%(homebrew_rpath) ")
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"hello-c.c").write <<~EOS
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
puts("Hello, world!");
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
system "#{bin}/gcc-#{version_suffix}", "-o", "hello-c", "hello-c.c"
|
||||
assert_equal "Hello, world!\n", shell_output("./hello-c")
|
||||
|
||||
(testpath/"hello-cc.cc").write <<~EOS
|
||||
#include <iostream>
|
||||
struct exception { };
|
||||
int main()
|
||||
{
|
||||
std::cout << "Hello, world!" << std::endl;
|
||||
try { throw exception{}; }
|
||||
catch (exception) { }
|
||||
catch (...) { }
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
system "#{bin}/g++-#{version_suffix}", "-o", "hello-cc", "hello-cc.cc"
|
||||
assert_equal "Hello, world!\n", shell_output("./hello-cc")
|
||||
|
||||
(testpath/"test.f90").write <<~EOS
|
||||
integer,parameter::m=10000
|
||||
real::a(m), b(m)
|
||||
real::fact=0.5
|
||||
|
||||
do concurrent (i=1:m)
|
||||
a(i) = a(i) + fact*b(i)
|
||||
end do
|
||||
write(*,"(A)") "Done"
|
||||
end
|
||||
EOS
|
||||
system "#{bin}/gfortran", "-o", "test", "test.f90"
|
||||
assert_equal "Done\n", shell_output("./test")
|
||||
end
|
||||
end
|
|
@ -1,102 +0,0 @@
|
|||
class Gmp < Formula
|
||||
desc "GNU multiple precision arithmetic library"
|
||||
homepage "https://gmplib.org/"
|
||||
license any_of: ["LGPL-3.0-or-later", "GPL-2.0-or-later"]
|
||||
revision 1
|
||||
|
||||
stable do
|
||||
url "https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz"
|
||||
mirror "https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz"
|
||||
sha256 "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2"
|
||||
|
||||
# Fix -flat_namespace being used on Big Sur and later.
|
||||
patch do
|
||||
url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff"
|
||||
sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c"
|
||||
end
|
||||
end
|
||||
|
||||
livecheck do
|
||||
url "https://gmplib.org/download/gmp/"
|
||||
regex(/href=.*?gmp[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
||||
end
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_ventura: "2436cd120e5678d67c24020a50cbbf7c0220e7ecaac63981335872b9d666bcad"
|
||||
sha256 cellar: :any, arm64_monterey: "a43a2ae4c44d90626b835a968a32327c8b8bbf754ec1d2590f8ac656c71dace9"
|
||||
sha256 cellar: :any, arm64_big_sur: "491220f1ff2c662b96295d931a80702523eeaee681d7305fb02b561e527dcbb8"
|
||||
sha256 cellar: :any, ventura: "4c6488dfd53b8287702827a4e6d50569926417f2cd08613d37720de54b6afe0c"
|
||||
sha256 cellar: :any, monterey: "dddc6d8c871c92f6e5fb1249c28768aa2b4b47c38836a69cf787a639cf5eee73"
|
||||
sha256 cellar: :any, big_sur: "e566452815d2ff5dc66da160bd1cd3d9cf02a17a07284cf0bac46496133383ae"
|
||||
sha256 cellar: :any, catalina: "5ee7a460668864c28e541db15420e1480c3d31c5f216797a453a5310106fbc97"
|
||||
sha256 cellar: :any, mojave: "b9d7d36c8d263be0e02e17d435350546f9f7008eb21b6e86bf42f719efcba85e"
|
||||
sha256 cellar: :any_skip_relocation, x86_64_linux: "786ae29f0c0b06ea86e42bd9c6ac2c49bd5757da037dead7053e8bd612c4cf8c"
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://gmplib.org/repo/gmp/", using: :hg
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "libtool" => :build
|
||||
end
|
||||
|
||||
uses_from_macos "m4" => :build
|
||||
|
||||
# Prevent crash on macOS 12 betas with release gmp 6.2.1, can be removed after the next gmp release.
|
||||
patch do
|
||||
url "https://gmplib.org/repo/gmp/raw-rev/5f32dbc41afc"
|
||||
sha256 "a44ef57903b240df6fde6c9d2fe40063f785995c43b6bfc7a237c571f53613e0"
|
||||
end
|
||||
|
||||
def install
|
||||
system "./.bootstrap" if build.head?
|
||||
|
||||
args = std_configure_args
|
||||
args << "--enable-cxx"
|
||||
|
||||
# Enable --with-pic to avoid linking issues with the static library
|
||||
args << "--with-pic"
|
||||
|
||||
cpu = Hardware::CPU.arm? ? "aarch64" : Hardware.oldest_cpu
|
||||
|
||||
if OS.mac?
|
||||
args << "--build=#{cpu}-apple-darwin#{OS.kernel_version.major}"
|
||||
else
|
||||
args << "--build=#{cpu}-linux-gnu"
|
||||
args << "ABI=32" if Hardware::CPU.is_32_bit?
|
||||
end
|
||||
|
||||
system "./configure", *args
|
||||
system "make"
|
||||
system "make", "check"
|
||||
system "make", "install"
|
||||
|
||||
# Prevent brew from trying to install metafiles that
|
||||
# are actually symlinks to files in autotools kegs
|
||||
buildpath.children.select(&:symlink?).map(&:unlink) if build.head?
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<~EOS
|
||||
#include <gmp.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
mpz_t i, j, k;
|
||||
mpz_init_set_str (i, "1a", 16);
|
||||
mpz_init (j);
|
||||
mpz_init (k);
|
||||
mpz_sqrtrem (j, k, i);
|
||||
if (mpz_get_si (j) != 5 || mpz_get_si (k) != 1) abort();
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
|
||||
system ENV.cc, "test.c", "-L#{lib}", "-lgmp", "-o", "test"
|
||||
system "./test"
|
||||
|
||||
# Test the static library to catch potential linking issues
|
||||
system ENV.cc, "test.c", "#{lib}/libgmp.a", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
|
@ -1,65 +0,0 @@
|
|||
class Isl < Formula
|
||||
# NOTE: Always use tarball instead of git tag for stable version.
|
||||
#
|
||||
# Currently isl detects its version using source code directory name
|
||||
# and update isl_version() function accordingly. All other names will
|
||||
# result in isl_version() function returning "UNKNOWN" and hence break
|
||||
# package detection.
|
||||
desc "Integer Set Library for the polyhedral model"
|
||||
homepage "https://libisl.sourceforge.io/"
|
||||
url "https://libisl.sourceforge.io/isl-0.26.tar.xz"
|
||||
sha256 "a0b5cb06d24f9fa9e77b55fabbe9a3c94a336190345c2555f9915bb38e976504"
|
||||
license "MIT"
|
||||
|
||||
livecheck do
|
||||
url :homepage
|
||||
regex(/href=.*?isl[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
||||
end
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_ventura: "1814fe867c61b34cd5c763cf2ebda99d7883db78348c8b663f98cc95a1348d16"
|
||||
sha256 cellar: :any, arm64_monterey: "0a3e83c458420e4b469ad7464d16d6c9cd26a888059358eb5f1f9d3cff54bbd7"
|
||||
sha256 cellar: :any, arm64_big_sur: "a68a647249ad644cd8d1e1057bac65e5b4e1e08f9adaf15a07121853b0ed40cc"
|
||||
sha256 cellar: :any, ventura: "0301489db7b26967657be0f6c89f11ea7e1e5fb50631686f86c597b01c00dc85"
|
||||
sha256 cellar: :any, monterey: "0dcc555fd2517c6c93bca8999c741029bbdd821bfeb397505ec1f98deb79c551"
|
||||
sha256 cellar: :any, big_sur: "91965ce2f54c7d1b16747ed05de989a3a122f5dbee67546bbf9bf065873b13c5"
|
||||
sha256 cellar: :any_skip_relocation, x86_64_linux: "db14ba1e4ea23ab41e06930dcf25ae9023c5e395c88602da2a9b6a98d54c92d3"
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://repo.or.cz/isl.git"
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "libtool" => :build
|
||||
end
|
||||
|
||||
depends_on "gmp"
|
||||
|
||||
def install
|
||||
system "./autogen.sh" if build.head?
|
||||
system "./configure", "--disable-dependency-tracking",
|
||||
"--disable-silent-rules",
|
||||
"--prefix=#{prefix}",
|
||||
"--with-gmp=system",
|
||||
"--with-gmp-prefix=#{Formula["gmp"].opt_prefix}"
|
||||
system "make"
|
||||
system "make", "install"
|
||||
(share/"gdb/auto-load").install Dir["#{lib}/*-gdb.py"]
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<~EOS
|
||||
#include <isl/ctx.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
isl_ctx* ctx = isl_ctx_alloc();
|
||||
isl_ctx_free(ctx);
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
system ENV.cc, "test.c", "-L#{lib}", "-lisl", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
|
@ -1,60 +0,0 @@
|
|||
class Libmpc < Formula
|
||||
desc "C library for the arithmetic of high precision complex numbers"
|
||||
homepage "http://www.multiprecision.org/mpc/"
|
||||
url "https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz"
|
||||
mirror "https://ftpmirror.gnu.org/mpc/mpc-1.3.1.tar.gz"
|
||||
sha256 "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8"
|
||||
license "LGPL-3.0-or-later"
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_ventura: "da4ff781bc469c82af17f98f0bdbf20932e222d0520ab784cd1b322b789ad7a5"
|
||||
sha256 cellar: :any, arm64_monterey: "dd3994160b3625b1f14e34abf632b90bf49e71db1cc85c12e9ab529d4cae2a87"
|
||||
sha256 cellar: :any, arm64_big_sur: "43bbe994c7bbb40f7172ef7a750bc6d2687275a76a25f67fc2d53ef00728d912"
|
||||
sha256 cellar: :any, ventura: "aa4ddb0e50ace93746e6af2e6185493698b501e9359cf73ce41cfbb70369db09"
|
||||
sha256 cellar: :any, monterey: "c32f2c3fe7ab06e308e6fa74874e1d4d92ff6eb3598da6e0f8e6fa7a333350f5"
|
||||
sha256 cellar: :any, big_sur: "47b50c3df6a35ea3c876397eac4a7dc157b5f4109247671a16599a9a41b9c035"
|
||||
sha256 cellar: :any_skip_relocation, x86_64_linux: "f6542ae5bcf643ca0c980c7000cde1585922e76be080b3cc3422dac0d4a50904"
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://gitlab.inria.fr/mpc/mpc.git", branch: "master"
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "libtool" => :build
|
||||
end
|
||||
|
||||
depends_on "gmp"
|
||||
depends_on "mpfr"
|
||||
|
||||
def install
|
||||
system "autoreconf", "--force", "--install", "--verbose" if build.head?
|
||||
system "./configure", *std_configure_args,
|
||||
"--with-gmp=#{Formula["gmp"].opt_prefix}",
|
||||
"--with-mpfr=#{Formula["mpfr"].opt_prefix}"
|
||||
system "make"
|
||||
system "make", "check"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<~EOS
|
||||
#include <mpc.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
int main() {
|
||||
mpc_t x;
|
||||
mpc_init2 (x, 256);
|
||||
mpc_set_d_d (x, 1., INFINITY, MPC_RNDNN);
|
||||
mpc_tanh (x, x, MPC_RNDNN);
|
||||
assert (mpfr_nan_p (mpc_realref (x)) && mpfr_nan_p (mpc_imagref (x)));
|
||||
mpc_clear (x);
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
system ENV.cc, "test.c", "-L#{lib}", "-L#{Formula["mpfr"].opt_lib}",
|
||||
"-L#{Formula["gmp"].opt_lib}", "-lmpc", "-lmpfr",
|
||||
"-lgmp", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
|
@ -1,101 +0,0 @@
|
|||
class Mpfr < Formula
|
||||
desc "C library for multiple-precision floating-point computations"
|
||||
homepage "https://www.mpfr.org/"
|
||||
license "LGPL-3.0-or-later"
|
||||
|
||||
stable do
|
||||
url "https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.0.tar.xz"
|
||||
mirror "https://ftpmirror.gnu.org/mpfr/mpfr-4.2.0.tar.xz"
|
||||
sha256 "06a378df13501248c1b2db5aa977a2c8126ae849a9d9b7be2546fb4a9c26d993"
|
||||
version "4.2.0-p9"
|
||||
|
||||
# Upstream patches, list at https://www.mpfr.org/mpfr-current/#fixed
|
||||
%w[
|
||||
01 2e465c31689e780a93b24bf2959917443fb882da85b7f1ef23ae53d3de614aa4
|
||||
02 e1ef3d4dab999f4e0ad5ee046c3a2823d3a9395fb8092c3dcb85d3fe29994b52
|
||||
03 a906f9ed8e4a7230980322a0154702664164690614e5ff55ae7049c3fae55584
|
||||
04 ece14ee57596dc2e4f67d2e857c5c6b23d76b20183a50a8b6759b640df001b78
|
||||
05 c4144564097a1be89c9cc2e7ee255c9fe59eb1b94a17c9d4a08169223e705ac1
|
||||
06 70456748a8072265ba103d93ba94e9f93ae64565e6a5742194c56030086540fa
|
||||
07 472386aa5f8c51fbdf60154c19268ce2212be03e1c2f9004c1673b6c270508f6
|
||||
08 6ecd3bd2edf178f4ede4be612964d1b2d0a0bb10ad6f8c51d1a8011fff87d5ea
|
||||
09 3e9aed5bcea95d34d0bd179a61cd7acb712c89c9a745535f18f0ef619833ba3b
|
||||
].each_slice(2) do |p, checksum|
|
||||
patch do
|
||||
url "https://www.mpfr.org/mpfr-4.2.0/patch#{p}"
|
||||
sha256 checksum
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
livecheck do
|
||||
url "https://www.mpfr.org/mpfr-current/"
|
||||
regex(/href=.*?mpfr[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
||||
strategy :page_match do |page, regex|
|
||||
version = page.scan(regex).map { |match| Version.new(match[0]) }.max&.to_s
|
||||
next if version.blank?
|
||||
|
||||
patch = page.scan(%r{href=["']?/?patch(\d+)["' >]}i)
|
||||
.map { |match| Version.new(match[0]) }
|
||||
.max
|
||||
&.to_s
|
||||
next version if patch.blank?
|
||||
|
||||
"#{version}-p#{patch.to_i}"
|
||||
end
|
||||
end
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_ventura: "176114984411aeb1187a50fd9ffc39d7dfe0bf5dc29ab13b0ecc95307d619ff9"
|
||||
sha256 cellar: :any, arm64_monterey: "77a979ab547618549fc85a12212abd57b085b1712c53299847966d76a4e261f9"
|
||||
sha256 cellar: :any, arm64_big_sur: "f5776604dbb68288c8dfe371e46398a671b6c34329ad473ada5d4e1fa7562086"
|
||||
sha256 cellar: :any, ventura: "781d9c4887b8b18ccb96653ce59bb9aa5ee49dd1fb6c7d804750f58ce8726a2f"
|
||||
sha256 cellar: :any, monterey: "a8eb9e75c01527d80843daba945a7581942362e689e3f3b7c6c891daa2655e9e"
|
||||
sha256 cellar: :any, big_sur: "22360e6d89681f3d3d326a5654ab0cfb22d5ac42241c40e9f8f91eb06bb1b77c"
|
||||
sha256 cellar: :any_skip_relocation, x86_64_linux: "d0cafd93a5957220615ae6478033031b750ba5eb6a830cf86d4cbde5bffec8d5"
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://gitlab.inria.fr/mpfr/mpfr.git", branch: "master"
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "libtool" => :build
|
||||
end
|
||||
|
||||
depends_on "gmp"
|
||||
|
||||
def install
|
||||
system "./autogen.sh" if build.head?
|
||||
|
||||
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}",
|
||||
"--disable-silent-rules"
|
||||
system "make"
|
||||
system "make", "check"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<~EOS
|
||||
#include <mpfr.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int main() {
|
||||
mpfr_t x, y;
|
||||
mpfr_inits2 (256, x, y, NULL);
|
||||
mpfr_set_ui (x, 2, MPFR_RNDN);
|
||||
mpfr_rootn_ui (y, x, 2, MPFR_RNDN);
|
||||
mpfr_pow_si (x, y, 4, MPFR_RNDN);
|
||||
mpfr_add_si (y, x, -4, MPFR_RNDN);
|
||||
mpfr_abs (y, y, MPFR_RNDN);
|
||||
if (fabs(mpfr_get_d (y, MPFR_RNDN)) > 1.e-30) abort();
|
||||
if (strcmp("#{version}", mpfr_get_version())) abort();
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
system ENV.cc, "test.c", "-L#{lib}", "-L#{Formula["gmp"].opt_lib}",
|
||||
"-lgmp", "-lmpfr", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
|
@ -1,61 +0,0 @@
|
|||
class Zstd < Formula
|
||||
desc "Zstandard is a real-time compression algorithm"
|
||||
homepage "https://facebook.github.io/zstd/"
|
||||
url "https://github.com/facebook/zstd/archive/v1.5.5.tar.gz"
|
||||
mirror "http://fresh-center.net/linux/misc/zstd-1.5.5.tar.gz"
|
||||
mirror "http://fresh-center.net/linux/misc/legacy/zstd-1.5.5.tar.gz"
|
||||
sha256 "98e9c3d949d1b924e28e01eccb7deed865eefebf25c2f21c702e5cd5b63b85e1"
|
||||
license "BSD-3-Clause"
|
||||
head "https://github.com/facebook/zstd.git", branch: "dev"
|
||||
|
||||
livecheck do
|
||||
url :stable
|
||||
regex(/^v?(\d+(?:\.\d+)+)$/i)
|
||||
end
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_ventura: "b709835f4cd5d339b97103f0dfa343489a02d2073f8e80ba7b04d682f1d29bd4"
|
||||
sha256 cellar: :any, arm64_monterey: "e3cb579108afe4794143b33f24b6020648ca166f0104eb3d13cee56da62c949f"
|
||||
sha256 cellar: :any, arm64_big_sur: "faf929cf92dad72eca2b16fb5aedb695f5d291aac18b496061b8b14003b2e224"
|
||||
sha256 cellar: :any, ventura: "e4eb8cc0473c699ec424bfecc67fcfd30631f7fe5eacf26c727bfed73dcf7c12"
|
||||
sha256 cellar: :any, monterey: "9c1cfe9158a48f6bd3eeb92608ed2799a048d1d27e70e7acef82d5eb4a7a1cea"
|
||||
sha256 cellar: :any, big_sur: "73d78b5fef5ba31d3c37b8201310fe042f30c6000a97b8ba0d91208e1e1de231"
|
||||
sha256 cellar: :any_skip_relocation, x86_64_linux: "68c8655224f058316c16462507b6cdd061bd546e161bf8419c68ca526d3a9a48"
|
||||
end
|
||||
|
||||
depends_on "cmake" => :build
|
||||
depends_on "lz4"
|
||||
depends_on "xz"
|
||||
uses_from_macos "zlib"
|
||||
|
||||
def install
|
||||
# Legacy support is the default after
|
||||
# https://github.com/facebook/zstd/commit/db104f6e839cbef94df4df8268b5fecb58471274
|
||||
# Set it to `ON` to be explicit about the configuration.
|
||||
system "cmake", "-S", "build/cmake", "-B", "builddir",
|
||||
"-DZSTD_PROGRAMS_LINK_SHARED=ON", # link `zstd` to `libzstd`
|
||||
"-DZSTD_BUILD_CONTRIB=ON",
|
||||
"-DCMAKE_INSTALL_RPATH=#{rpath}",
|
||||
"-DZSTD_LEGACY_SUPPORT=ON",
|
||||
"-DZSTD_ZLIB_SUPPORT=ON",
|
||||
"-DZSTD_LZMA_SUPPORT=ON",
|
||||
"-DZSTD_LZ4_SUPPORT=ON",
|
||||
"-DCMAKE_CXX_STANDARD=11",
|
||||
*std_cmake_args
|
||||
system "cmake", "--build", "builddir"
|
||||
system "cmake", "--install", "builddir"
|
||||
end
|
||||
|
||||
test do
|
||||
[bin/"zstd", bin/"pzstd", "xz", "lz4", "gzip"].each do |prog|
|
||||
data = "Hello, #{prog}"
|
||||
assert_equal data, pipe_output("#{bin}/zstd -d", pipe_output(prog, data))
|
||||
if prog.to_s.end_with?("zstd")
|
||||
# `pzstd` can only decompress zstd-compressed data.
|
||||
assert_equal data, pipe_output("#{bin}/pzstd -d", pipe_output(prog, data))
|
||||
else
|
||||
assert_equal data, pipe_output("#{prog} -d", pipe_output("#{bin}/zstd --format=#{prog}", data))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
234
macOS/build.sh
234
macOS/build.sh
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright © 2019-2023 Dynare Team
|
||||
# Copyright © 2019-2024 Dynare Team
|
||||
#
|
||||
# This file is part of Dynare.
|
||||
#
|
||||
|
@ -18,39 +18,81 @@
|
|||
# along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
set -ex
|
||||
#exec > >(tee build-logfile.log) 2>&1 # uncomment for debugging
|
||||
|
||||
ROOTDIR=$(pwd)/..
|
||||
##
|
||||
## Set settings based on architecture
|
||||
##
|
||||
path_remove () { export "$1"="$(echo -n "${!1}" | awk -v RS=: -v ORS=: '$1 != "'"$2"'"' | sed 's/:$//')"; }
|
||||
path_prepend () { path_remove "$1" "$2"; export "$1"="$2:${!1}"; }
|
||||
PKG_ARCH=${1:-x86_64} # default to x86_64
|
||||
if [[ "$PKG_ARCH" == arm64 ]]; then
|
||||
BREWDIR=/opt/homebrew
|
||||
# Make sure /opt/homebrew/bin is set first in PATH (as it might come last)
|
||||
path_prepend PATH /opt/homebrew/bin
|
||||
MATLAB_ARCH=maca64
|
||||
else
|
||||
BREWDIR=/usr/local
|
||||
# Remove /opt/homebrew/bin from PATH, so it does not intervene with the x86_64 compilations
|
||||
path_remove PATH /opt/homebrew/bin
|
||||
MATLAB_ARCH=maci64
|
||||
fi
|
||||
MATLAB_PATH=/Applications/"$PKG_ARCH"/MATLAB_R2023b.app
|
||||
|
||||
# Set the GCC version
|
||||
GCC_VERSION=13
|
||||
|
||||
# Set the compilers
|
||||
CC=gcc-$GCC_VERSION
|
||||
CXX=g++-$GCC_VERSION
|
||||
|
||||
# Set the number of threads
|
||||
NTHREADS=$(sysctl -n hw.ncpu)
|
||||
# Append texbin to PATH to access latexmk and friends
|
||||
path_prepend PATH /Library/TeX/texbin
|
||||
|
||||
# Set dependency directory
|
||||
LIB64="$ROOTDIR"/macOS/deps/lib64
|
||||
LIB64="$ROOTDIR"/macOS/deps/"$PKG_ARCH"/lib64
|
||||
|
||||
## Hack for statically linking libquadmath, similar to the one used in
|
||||
## deps/Makefile for several libraries (there is no -static-libquadmath flag,
|
||||
## see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46539).
|
||||
##
|
||||
## NB: The hack done for Windows does not work for two reasons:
|
||||
## - the macOS linker is different from GNU ld and does not have the equivalent of -Bstatic/-Bdynamic
|
||||
## - libgfortran.spec does not include --as-needed on macOS, hence it will link the library anyways
|
||||
## Also, it does not seem possible to override libgfortran.spec with the --specs option.
|
||||
GCC_VERSION=$(sed -En "/^c[[:space:]]*=/s/c[[:space:]]*=[[:space:]]*'.*gcc-([0-9]+)'/\1/p" "$ROOTDIR"/macOS/homebrew-native-"$PKG_ARCH".ini)
|
||||
|
||||
QUADMATH_DIR=$(mktemp -d)
|
||||
ln -s "$BREWDIR"/opt/gcc/lib/gcc/"$GCC_VERSION"/libquadmath.a "$QUADMATH_DIR"
|
||||
|
||||
##
|
||||
## Find Dynare Version
|
||||
## Compile Dynare
|
||||
##
|
||||
cd "$ROOTDIR"
|
||||
|
||||
# NB: the addition of -Wl,-ld_classic is a workaround for https://github.com/mesonbuild/meson/issues/12282 (see also the native file)
|
||||
common_meson_opts=(-Dbuild_for=matlab -Dbuildtype=release -Dprefer_static=true -Dfortran_args="[ '-B', '$LIB64/Slicot/' ]" \
|
||||
-Dc_link_args="[ '-Wl,-ld_classic', '-L$QUADMATH_DIR' ]" -Dcpp_link_args="[ '-Wl,-ld_classic', '-L$QUADMATH_DIR' ]" -Dfortran_link_args="[ '-Wl,-ld_classic', '-L$QUADMATH_DIR' ]" \
|
||||
--native-file macOS/homebrew-native-$PKG_ARCH.ini)
|
||||
|
||||
# Build for MATLAB ⩾ R2018b (x86_64) and MATLAB ⩾ R2023b (arm64)
|
||||
arch -"$PKG_ARCH" meson setup "${common_meson_opts[@]}" -Dmatlab_path="$MATLAB_PATH" build-matlab --wipe
|
||||
arch -"$PKG_ARCH" meson compile -v -C build-matlab
|
||||
|
||||
# If not in CI, build the docs
|
||||
if [[ -z $CI ]]; then
|
||||
arch -"$PKG_ARCH" meson compile -v -C build-matlab doc
|
||||
ln -s build-matlab build-doc
|
||||
fi
|
||||
|
||||
##
|
||||
## Create package
|
||||
##
|
||||
|
||||
# Determine Dynare version if not passed by an environment variable as in the CI
|
||||
if [[ -z $VERSION ]]; then
|
||||
cd build-matlab
|
||||
VERSION=$(meson introspect --projectinfo | sed -En 's/^.*"version": "([^"]*)".*$/\1/p')
|
||||
cd ..
|
||||
fi
|
||||
|
||||
# Other useful variables
|
||||
DATE=$(date +%Y-%m-%d-%H%M)
|
||||
DATELONG=$(date '+%d %B %Y')
|
||||
if [[ -d ../.git/ ]]; then
|
||||
SHA=$(git rev-parse HEAD)
|
||||
SHASHORT=$(git rev-parse --short HEAD)
|
||||
fi
|
||||
|
||||
if [[ -z $VERSION ]]; then
|
||||
VERSION=$(grep '^AC_INIT(' ../configure.ac | sed 's/AC_INIT(\[dynare\], \[\(.*\)\])/\1/')
|
||||
if [[ -d ../.git/ ]]; then
|
||||
VERSION="$VERSION"-"$SHASHORT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install location must not be too long for gcc.
|
||||
# Otherwise, the headers of the compiled libraries cannot be modified
|
||||
|
@ -63,146 +105,82 @@ else
|
|||
# Get the first component, truncate it to 5 characters, and add the date
|
||||
LOCATION=$(echo "$VERSION" | cut -f1 -d"-" | cut -c 1-5)-"$DATE"
|
||||
fi
|
||||
# Add architecture to LOCATION and VERSION
|
||||
VERSION="$VERSION"-"$PKG_ARCH"
|
||||
LOCATION="$LOCATION"-"$PKG_ARCH"
|
||||
|
||||
## Hack for statically linking libquadmath, similar to the one used in
|
||||
## deps/Makefile for several libraries (there is no -static-libquadmath flag,
|
||||
## see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46539).
|
||||
##
|
||||
## NB: The hack done for Windows (see m4/ax_mexopts.m4) does not work for two reasons:
|
||||
## - the macOS linker is different from GNU ld and does not have the equivalent of -Bstatic/-Bdynamic
|
||||
## - libgfortran.spec does not include --as-needed on macOS, hence it will link the library anyways
|
||||
## Also, it does not seem possible to override libgfortran.spec with the --specs option.
|
||||
QUADMATH_DIR=$(mktemp -d)
|
||||
ln -s /usr/local/opt/gcc/lib/gcc/$GCC_VERSION/libquadmath.a $QUADMATH_DIR
|
||||
|
||||
##
|
||||
## Compile Dynare doc, preprocessor, mex for MATLAB < 2018a
|
||||
##
|
||||
## NB: In Homebrew, -static-libgfortran is implied by -static-libgcc (see “gfortran -dumpspecs”)
|
||||
## NB2: We use the hack for libquadmath in LDFLAGS
|
||||
cd "$ROOTDIR"
|
||||
[[ -f configure ]] || autoreconf -si
|
||||
./configure \
|
||||
PACKAGE_VERSION="$VERSION" \
|
||||
PACKAGE_STRING="dynare $VERSION" \
|
||||
CC=$CC \
|
||||
CXX=$CXX \
|
||||
CPPFLAGS=-I/usr/local/include \
|
||||
LDFLAGS="-static-libgcc -L$QUADMATH_DIR" \
|
||||
LEX=/usr/local/opt/flex/bin/flex \
|
||||
YACC=/usr/local/opt/bison/bin/bison \
|
||||
--with-gsl="$LIB64"/gsl \
|
||||
--with-matio="$LIB64"/matio \
|
||||
--with-slicot="$LIB64"/Slicot/with-underscore \
|
||||
--disable-octave \
|
||||
--with-matlab=/Applications/MATLAB_R2016b.app
|
||||
if [[ -z $CI ]]; then
|
||||
# If not in Gitlab CI, clean the source and build the doc
|
||||
make clean
|
||||
make -j"$NTHREADS" pdf html
|
||||
fi
|
||||
make -j"$NTHREADS"
|
||||
|
||||
|
||||
##
|
||||
## Create package
|
||||
##
|
||||
NAME=dynare-"$VERSION"
|
||||
PKGFILES="$ROOTDIR"/macOS/pkg/"$NAME"
|
||||
mkdir -p \
|
||||
"$PKGFILES"/preprocessor \
|
||||
"$PKGFILES"/mex/matlab/maci64-8.3-9.3 \
|
||||
"$PKGFILES"/mex/matlab/maci64-9.4-9.14 \
|
||||
"$PKGFILES"/doc \
|
||||
"$PKGFILES"/scripts \
|
||||
"$PKGFILES"/contrib/ms-sbvar/TZcode
|
||||
if [[ "$PKG_ARCH" == x86_64 ]]; then
|
||||
mkdir -p "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-9.5-23.2
|
||||
else
|
||||
mkdir -p "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-23.2
|
||||
fi
|
||||
|
||||
if [[ $VERSION == *-unstable* ]]; then
|
||||
echo "$SHA" > "$PKGFILES"/sha.txt
|
||||
fi
|
||||
cp -p "$ROOTDIR"/NEWS.md "$PKGFILES"
|
||||
cp -p "$ROOTDIR"/COPYING "$PKGFILES"
|
||||
cp -p "$ROOTDIR"/VERSION "$PKGFILES"
|
||||
cp -p "$ROOTDIR"/license.txt "$PKGFILES"
|
||||
|
||||
cp -pr "$ROOTDIR"/matlab "$PKGFILES"
|
||||
cp -p "$ROOTDIR"/build-matlab/dynare_version.m "$PKGFILES"/matlab
|
||||
|
||||
cp -pr "$ROOTDIR"/examples "$PKGFILES"
|
||||
|
||||
cp -p "$ROOTDIR"/preprocessor/src/dynare-preprocessor "$PKGFILES"/preprocessor
|
||||
cp -p "$ROOTDIR"/build-matlab/preprocessor/src/dynare-preprocessor "$PKGFILES"/preprocessor
|
||||
|
||||
# Recreate backward-compatibility symlink
|
||||
rm -f "$ROOTDIR"/matlab/preprocessor64/dynare_m
|
||||
# Create backward-compatibility symlink
|
||||
mkdir -p "$PKGFILES"/matlab/preprocessor64
|
||||
ln -sf ../../preprocessor/dynare-preprocessor "$PKGFILES"/matlab/preprocessor64/dynare_m
|
||||
|
||||
cp -L "$ROOTDIR"/mex/matlab/* "$PKGFILES"/mex/matlab/maci64-8.3-9.3
|
||||
if [[ "$PKG_ARCH" == x86_64 ]]; then
|
||||
cp -L "$ROOTDIR"/build-matlab/*.mex"$MATLAB_ARCH" "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-9.5-23.2
|
||||
else
|
||||
cp -L "$ROOTDIR"/build-matlab/*.mex"$MATLAB_ARCH" "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-23.2
|
||||
fi
|
||||
|
||||
cp -p "$ROOTDIR"/scripts/dynare.el "$PKGFILES"/scripts
|
||||
cp -pr "$ROOTDIR"/contrib/ms-sbvar/TZcode/MatlabFiles "$PKGFILES"/contrib/ms-sbvar/TZcode
|
||||
cp -pr "$ROOTDIR"/contrib/jsonlab "$PKGFILES"/contrib
|
||||
|
||||
cp "$ROOTDIR"/doc/*.pdf "$PKGFILES"/doc
|
||||
cp "$ROOTDIR"/doc/gsa/gsa.pdf "$PKGFILES"/doc
|
||||
cp "$ROOTDIR"/doc/parallel/parallel.pdf "$PKGFILES"/doc
|
||||
cp "$ROOTDIR"/doc/dseries-and-reporting/dseriesReporting.pdf "$PKGFILES"/doc
|
||||
cp "$ROOTDIR"/preprocessor/doc/preprocessor/preprocessor.pdf "$PKGFILES"/doc
|
||||
cp "$ROOTDIR"/preprocessor/doc/macroprocessor/macroprocessor.pdf "$PKGFILES"/doc
|
||||
cp "$ROOTDIR"/doc/manual/build/latex/dynare-manual.pdf "$PKGFILES"/doc
|
||||
cp -r "$ROOTDIR"/doc/manual/build/html "$PKGFILES"/doc/dynare-manual.html
|
||||
cp "$ROOTDIR"/build-doc/*.pdf "$PKGFILES"/doc
|
||||
cp "$ROOTDIR"/build-doc/preprocessor/doc/*.pdf "$PKGFILES"/doc
|
||||
cp -r "$ROOTDIR"/build-doc/dynare-manual.html "$PKGFILES"/doc
|
||||
|
||||
mkdir -p "$PKGFILES"/matlab/modules/dseries/externals/x13/macOS/64
|
||||
cp -p "$ROOTDIR"/macOS/deps/lib64/x13as/x13as "$PKGFILES"/matlab/modules/dseries/externals/x13/macOS/64
|
||||
mkdir -p "$PKGFILES"/matlab/dseries/externals/x13/macOS/64
|
||||
cp -p "$ROOTDIR"/macOS/deps/"$PKG_ARCH"/lib64/x13as/x13as "$PKGFILES"/matlab/dseries/externals/x13/macOS/64
|
||||
|
||||
|
||||
##
|
||||
## Create mex for MATLAB ≥ 2018a
|
||||
##
|
||||
cd "$ROOTDIR"/mex/build/matlab
|
||||
make clean
|
||||
./configure \
|
||||
PACKAGE_VERSION="$VERSION" \
|
||||
PACKAGE_STRING="dynare $VERSION" \
|
||||
CC=$CC \
|
||||
CXX=$CXX \
|
||||
CPPFLAGS=-I/usr/local/include \
|
||||
LDFLAGS="-static-libgcc -L$QUADMATH_DIR" \
|
||||
--with-gsl="$LIB64"/gsl \
|
||||
--with-matio="$LIB64"/matio \
|
||||
--with-slicot="$LIB64"/Slicot/with-underscore \
|
||||
--with-matlab=/Applications/MATLAB_R2022b.app
|
||||
make -j"$NTHREADS"
|
||||
cp -L "$ROOTDIR"/mex/matlab/* "$PKGFILES"/mex/matlab/maci64-9.4-9.14
|
||||
|
||||
|
||||
##
|
||||
## Make package
|
||||
##
|
||||
cd "$ROOTDIR"/macOS/pkg
|
||||
|
||||
# Dynare option
|
||||
pkgbuild --root "$PKGFILES" --identifier org.dynare --version "$VERSION" --install-location /Applications/Dynare/"$LOCATION" "$NAME".pkg
|
||||
arch -"$PKG_ARCH" pkgbuild --root "$PKGFILES" --identifier org.dynare."$VERSION" --version "$VERSION" --install-location /Applications/Dynare/"$LOCATION" "$NAME".pkg
|
||||
|
||||
# GCC option
|
||||
# Create dummy payload for GCC package; otherwise the size is displayed as 0 bytes in the installer
|
||||
dd if=/dev/zero of="$ROOTDIR"/macOS/brewfiles/dummy bs=1m count=800
|
||||
pkgbuild --root "$ROOTDIR"/macOS/brewfiles --identifier org.dynare.gcc --version "$VERSION" --scripts "$ROOTDIR"/macOS/scripts --install-location /Applications/Dynare/"$LOCATION" "$NAME"-gcc.pkg
|
||||
# Create distribution.xml by replacing variables in distribution_template.xml
|
||||
sed -e "s/VERSION_NO_SPACE/$VERSION/g" \
|
||||
-e "s/LOCATION/$LOCATION/g" \
|
||||
"$ROOTDIR"/macOS/distribution_template.xml > distribution.xml
|
||||
|
||||
# Replace variables in displayed files
|
||||
sed "s/VERSION_READ/$VERSION/g" "$ROOTDIR"/macOS/distribution_template.xml > distribution_tmp.xml
|
||||
sed "s/VERSION_NO_SPACE/$VERSION/g" distribution_tmp.xml > distribution.xml
|
||||
sed "s/GCC_BINARY/$CC/g" "$ROOTDIR"/macOS/welcome_template.html > "$ROOTDIR"/macOS/welcome.html
|
||||
sed "s/VERSION_NO_SPACE/$VERSION/g" "$ROOTDIR"/macOS/welcome.html > "$ROOTDIR"/macOS/welcome_tmp.html
|
||||
sed "s/DATE/$DATELONG/g" "$ROOTDIR"/macOS/welcome_tmp.html > "$ROOTDIR"/macOS/welcome.html
|
||||
# Create welcome.html by replacing variables in welcome_template.html
|
||||
sed -e "s/VERSION_NO_SPACE/$VERSION/g" \
|
||||
-e "s/DATE/$DATELONG/g" \
|
||||
"$ROOTDIR"/macOS/welcome_template.html > "$ROOTDIR"/macOS/welcome.html
|
||||
|
||||
# Create conclusion.html by replacing variables in conclusion_template.html
|
||||
sed -e "s/GCC_VERSION/$GCC_VERSION/g" \
|
||||
"$ROOTDIR"/macOS/conclusion_template.html > "$ROOTDIR"/macOS/conclusion.html
|
||||
|
||||
# Create installer
|
||||
productbuild --distribution distribution.xml --resources "$ROOTDIR"/macOS --package-path ./"$NAME".pkg "$NAME"-new.pkg
|
||||
arch -"$PKG_ARCH" productbuild --distribution distribution.xml --resources "$ROOTDIR"/macOS --package-path ./"$NAME".pkg "$NAME"-productbuild.pkg
|
||||
|
||||
# cleanup
|
||||
rm -f ./*.xml
|
||||
# Cleanup
|
||||
rm -f ./distribution.xml
|
||||
rm -rf "$PKGFILES"
|
||||
rm -f "$NAME"-gcc.pkg
|
||||
rm -f "$ROOTDIR"/macOS/brewfiles/dummy
|
||||
rm -f "$ROOTDIR"/macOS/welcome.html
|
||||
rm -f "$ROOTDIR"/macOS/welcome_tmp.html
|
||||
rm -f "$ROOTDIR"/macOS/conclusion.html
|
||||
|
||||
# Final pkg
|
||||
mv "$NAME"-new.pkg "$NAME".pkg
|
||||
mv "$NAME"-productbuild.pkg "$NAME".pkg
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Recommendations</title>
|
||||
<style>
|
||||
.center-text {
|
||||
text-align: center;
|
||||
}
|
||||
.bold-text {
|
||||
font-weight: bold;
|
||||
}
|
||||
code {
|
||||
font-family: "Courier New", Courier, monospace;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="center-text">
|
||||
<h1>Recommendations</h1>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<p class="bold-text">Xcode Command Line Tools</p>
|
||||
<p>Dynare highly benefits from installing Xcode Command Line Tools (an Apple product). To install the Xcode Command Line Tools type the following into Terminal.app:</p>
|
||||
<code>
|
||||
xcode-select --install
|
||||
</code>
|
||||
|
||||
<p class="bold-text">Compilation Environment for use_dll option</p>
|
||||
<p>Dynare ships a compilation environment that can be used with the use_dll option. To install this environment correctly, the Xcode Command Line Tools are sufficient. Check this by running the following command in the MATLAB command window:</p>
|
||||
<code>
|
||||
mex -setup
|
||||
</code>
|
||||
<p>If you get a warning in MATLAB, that Xcode is installed, but its license has not been accepted, please refer to the <a href="https://www.dynare.org/manual/installation-and-configuration.html#prerequisites-on-macos" target="_blank" rel="noopener noreferrer">manual</a> for a workaround.</p>
|
||||
<p>Moreover, we recommend making use of optimized compilation flags and for this you need to install GCC via Homebrew.
|
||||
Follow <a href="https://brew.sh" target="_blank" rel="noopener noreferrer">https://brew.sh</a> to install Homebrew and then type the following into Terminal.app:</p>
|
||||
<code>
|
||||
brew install gcc@GCC_VERSION
|
||||
</code>
|
||||
<p>If you already have installed GCC, Dynare will automatically prefer it for use_dll if the binaries are either in /opt/homebrew/bin/gcc-GCC_VERSION (arm64) or in /usr/local/bin/gcc-GCC_VERSION (x86_64). Otherwise, it will fall back to Clang in /usr/bin/clang (for both arm64 and x86_64).</p>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright © 2019-2023 Dynare Team
|
||||
# Copyright © 2019-2024 Dynare Team
|
||||
#
|
||||
# This file is part of Dynare.
|
||||
#
|
||||
|
@ -17,11 +17,19 @@
|
|||
|
||||
include versions.mk
|
||||
|
||||
GCC_VERSION = 13
|
||||
# settings for different architectures
|
||||
DEPS_ARCH ?= x86_64 # use x86_64 by default
|
||||
|
||||
BREWDIR := $(if $(filter arm64,$(DEPS_ARCH)),/opt/homebrew,/usr/local)
|
||||
|
||||
GCC_VERSION = $(shell sed -En "/^c[[:space:]]*=/s/c[[:space:]]*=[[:space:]]*'.*gcc-([0-9]+)'/\1/p" ../homebrew-native-$(DEPS_ARCH).ini)
|
||||
|
||||
ROOT_PATH = $(realpath .)
|
||||
|
||||
WGET_OPTIONS := --no-verbose --no-use-server-timestamps --retry-connrefused --retry-on-host-error
|
||||
|
||||
NTHREADS=$(shell sysctl -n hw.perflevel0.physicalcpu)
|
||||
|
||||
.PHONY: all build build-slicot build-x13as \
|
||||
clean-lib clean-libslicot clean-x13as-bin \
|
||||
clean-src clean-slicot-src clean-x13as-src \
|
||||
|
@ -30,7 +38,7 @@ WGET_OPTIONS := --no-verbose --no-use-server-timestamps --retry-connrefused --re
|
|||
|
||||
all: build
|
||||
|
||||
build: build-slicot build-x13as ln-matio ln-gsl
|
||||
build: build-slicot build-x13as
|
||||
|
||||
clean-lib: clean-libslicot clean-x13as-bin
|
||||
|
||||
|
@ -40,91 +48,35 @@ clean-tar: clean-slicot-tar clean-x13as-tar
|
|||
|
||||
clean-all: clean-lib clean-src clean-tar
|
||||
|
||||
|
||||
#
|
||||
# Matio & GSL
|
||||
# (done to link only to static Matio and GSL libraries)
|
||||
|
||||
# Matio
|
||||
lib64/matio/lib/libmatio.a: /usr/local/lib/libmatio.a
|
||||
mkdir -p $(dir $@) && ln -sf $< $@
|
||||
|
||||
lib64/matio/lib/libhdf5.a: /usr/local/lib/libhdf5.a
|
||||
mkdir -p $(dir $@) && ln -sf $< $@
|
||||
|
||||
lib64/matio/lib/libsz.a: /usr/local/lib/libsz.a
|
||||
mkdir -p $(dir $@) && ln -sf $< $@
|
||||
|
||||
lib64/matio/include/matio.h: /usr/local/include/matio.h
|
||||
mkdir -p $(dir $@) && cd $(dir $@).. && rm -rf include && ln -sf $(dir $<) .
|
||||
|
||||
ln-matio: lib64/matio/lib/libmatio.a \
|
||||
lib64/matio/lib/libhdf5.a \
|
||||
lib64/matio/lib/libsz.a \
|
||||
lib64/matio/include/matio.h
|
||||
|
||||
clean-matio:
|
||||
rm -rf lib64/matio
|
||||
|
||||
# GSL
|
||||
lib64/gsl/lib/libgsl.a: /usr/local/lib/libgsl.a
|
||||
mkdir -p $(dir $@) && ln -sf $< $@
|
||||
|
||||
lib64/gsl/lib/libgslcblas.a: /usr/local/lib/libgslcblas.a
|
||||
mkdir -p $(dir $@) && ln -sf $< $@
|
||||
|
||||
lib64/gsl/include/gsl/gsl_blas.h: /usr/local/include/gsl/gsl_blas.h
|
||||
mkdir -p $(dir $@) && cd $(dir $@).. && rm -rf gsl && ln -sf $(dir $<) .
|
||||
|
||||
ln-gsl: lib64/gsl/lib/libgsl.a \
|
||||
lib64/gsl/lib/libgslcblas.a \
|
||||
lib64/gsl/include/gsl/gsl_blas.h
|
||||
|
||||
clean-gsl:
|
||||
rm -rf lib64/gsl
|
||||
|
||||
#
|
||||
# Slicot
|
||||
# slicot
|
||||
#
|
||||
tarballs/slicot-$(SLICOT_VERSION).tar.gz:
|
||||
mkdir -p tarballs
|
||||
wget $(WGET_OPTIONS) -O $@ https://deb.debian.org/debian/pool/main/s/slicot/slicot_$(SLICOT_VERSION).orig.tar.gz
|
||||
wget $(WGET_OPTIONS) -O $@ https://deb.debian.org/debian/pool/main/s/slicot/slicot_$(SLICOT_VERSION).orig.tar.xz
|
||||
|
||||
sources64/slicot-$(SLICOT_VERSION)-with-32bit-integer-and-underscore: tarballs/slicot-$(SLICOT_VERSION).tar.gz
|
||||
rm -rf sources64/slicot-*-with-32bit-integer-and-underscore
|
||||
$(DEPS_ARCH)/sources64/slicot-$(SLICOT_VERSION): tarballs/slicot-$(SLICOT_VERSION).tar.gz
|
||||
rm -rf $(DEPS_ARCH)/sources64/slicot-*
|
||||
mkdir -p $@
|
||||
tar xf $< --directory $@ --strip-components=1
|
||||
touch $@
|
||||
|
||||
sources64/slicot-$(SLICOT_VERSION)-with-64bit-integer-and-underscore: tarballs/slicot-$(SLICOT_VERSION).tar.gz
|
||||
rm -rf sources64/slicot-*-with-64bit-integer-and-underscore
|
||||
mkdir -p $@
|
||||
tar xf $< --directory $@ --strip-components=1
|
||||
touch $@
|
||||
|
||||
lib64/Slicot/with-underscore/lib/libslicot_pic.a: sources64/slicot-$(SLICOT_VERSION)-with-32bit-integer-and-underscore
|
||||
make -C $< FORTRAN=gfortran LOADER=gfortran SLICOTLIB=../libslicot_pic.a OPTS="-O2 -g" lib
|
||||
strip -S $</libslicot_pic.a
|
||||
mkdir -p $(dir $@)
|
||||
cp $</libslicot_pic.a $@
|
||||
|
||||
lib64/Slicot/with-underscore/lib/libslicot64_pic.a: sources64/slicot-$(SLICOT_VERSION)-with-64bit-integer-and-underscore
|
||||
make -C $< FORTRAN=gfortran LOADER=gfortran SLICOTLIB=../libslicot64_pic.a OPTS="-O2 -g -fdefault-integer-8" lib
|
||||
$(DEPS_ARCH)/lib64/slicot/libslicot64_pic.a: $(DEPS_ARCH)/sources64/slicot-$(SLICOT_VERSION)
|
||||
make -C $< -f makefile_Unix FORTRAN=$(BREWDIR)/bin/gfortran LOADER=$(BREWDIR)/bin/gfortran SLICOTLIB=../libslicot64_pic.a OPTS="-O3 -fdefault-integer-8" lib -j$(NTHREADS)
|
||||
strip -S $</libslicot64_pic.a
|
||||
mkdir -p $(dir $@)
|
||||
cp $</libslicot64_pic.a $@
|
||||
|
||||
build-slicot: lib64/Slicot/with-underscore/lib/libslicot_pic.a \
|
||||
lib64/Slicot/with-underscore/lib/libslicot64_pic.a
|
||||
build-slicot: $(DEPS_ARCH)/lib64/slicot/libslicot64_pic.a
|
||||
|
||||
clean-slicot-tar:
|
||||
rm -f tarballs/slicot-$(SLICOT_VERSION).tar.gz
|
||||
|
||||
clean-slicot-src:
|
||||
rm -rf sources64/slicot-$(SLICOT_VERSION)-with-64bit-integer-and-underscore
|
||||
rm -rf $(DEPS_ARCH)/sources64/slicot-$(SLICOT_VERSION)
|
||||
|
||||
clean-libslicot:
|
||||
rm -rf lib64/Slicot
|
||||
rm -rf $(DEPS_ARCH)/lib64/slicot
|
||||
|
||||
clean-slicot-all: clean-slicot-src clean-slicot-tar clean-libslicot
|
||||
|
||||
|
@ -137,12 +89,12 @@ tarballs/x13as_asciisrc-v$(X13AS_VERSION).tar.gz:
|
|||
mkdir -p tarballs
|
||||
wget $(WGET_OPTIONS) -O $@ https://www2.census.gov/software/x-13arima-seats/x13as/unix-linux/program-archives/x13as_asciisrc-v$(X13AS_VERSION).tar.gz
|
||||
|
||||
sources64/x13as-$(X13AS_VERSION): tarballs/x13as_asciisrc-v$(X13AS_VERSION).tar.gz
|
||||
rm -rf sources64/x13as-*
|
||||
$(DEPS_ARCH)/sources64/x13as-$(X13AS_VERSION): tarballs/x13as_asciisrc-v$(X13AS_VERSION).tar.gz
|
||||
rm -rf $(DEPS_ARCH)/sources64/x13as-*
|
||||
mkdir -p $@
|
||||
tar xf $< --directory $@
|
||||
|
||||
lib64/x13as/x13as: sources64/x13as-$(X13AS_VERSION)
|
||||
$(DEPS_ARCH)/lib64/x13as/x13as: $(DEPS_ARCH)/sources64/x13as-$(X13AS_VERSION)
|
||||
# Statically link x13as (see #1865).
|
||||
# Using -static is not possible, it does not work under Darwin.
|
||||
# Implement an ugly workaround in the absence of -static-libquadmath flag.
|
||||
|
@ -153,20 +105,21 @@ lib64/x13as/x13as: sources64/x13as-$(X13AS_VERSION)
|
|||
# gfortran as the linker with -static-libgfortran and
|
||||
# -static-libquadmath flags, and drop the GCC_VERSION variable.
|
||||
cd $< && sed -i '' 's/-static//g' makefile.gf
|
||||
make -C $< -f makefile.gf FC=gfortran LINKER=gcc-$(GCC_VERSION) FFLAGS="-O2 -std=legacy" LDFLAGS=-static-libgcc LIBS="/usr/local/lib/gcc/current/libgfortran.a /usr/local/lib/gcc/current/libquadmath.a" PROGRAM=x13as
|
||||
make -C $< -f makefile.gf FC=$(BREWDIR)/bin/gfortran LINKER=$(BREWDIR)/bin/gcc-$(GCC_VERSION) FFLAGS="-O3 -std=legacy" LDFLAGS=-static-libgcc LIBS="$(BREWDIR)/lib/gcc/$(GCC_VERSION)/libgfortran.a $(BREWDIR)/lib/gcc/$(GCC_VERSION)/libquadmath.a" PROGRAM=x13as -j$(NTHREADS)
|
||||
|
||||
strip $</x13as
|
||||
mkdir -p $(dir $@)
|
||||
cp $</x13as $@
|
||||
|
||||
build-x13as: lib64/x13as/x13as
|
||||
build-x13as: $(DEPS_ARCH)/lib64/x13as/x13as
|
||||
|
||||
clean-x13as-tar:
|
||||
rm -f tarballs/x13assrc_V$(X13AS_VERSION).tar.gz
|
||||
rm -f tarballs/x13as_asciisrc-v$(X13AS_VERSION).tar.gz
|
||||
|
||||
clean-x13as-src:
|
||||
rm -rf sources64/x13as-$(X13AS_VERSION)
|
||||
rm -rf $(DEPS_ARCH)/sources64/x13as-$(X13AS_VERSION)
|
||||
|
||||
clean-x13as-bin:
|
||||
rm -rf lib64/x13as
|
||||
rm -rf $(DEPS_ARCH)/lib64/x13as
|
||||
|
||||
clean-x13as-all: clean-x13as-tar clean-x13as-src clean-x13as-bin
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
SLICOT_VERSION = 5.0+20101122
|
||||
X13AS_VERSION = 1-1-b59
|
||||
SLICOT_VERSION = 5.9~20240205.gita037f7e
|
||||
X13AS_VERSION = 1-1-b60
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<installer-gui-script minSpecVersion="1">
|
||||
<title>Dynare VERSION_READ</title>
|
||||
<title>Dynare VERSION_NO_SPACE</title>
|
||||
<background file="background.png" scaling="tofit" mime-type="image/png" alignment="topleft" />
|
||||
<background-darkAqua file="background.png" scaling="tofit" mime-type="image/png" alignment="topleft" />
|
||||
<welcome file="welcome.html" mime-type="text/html" />
|
||||
<conclusion file="conclusion.html" mime-type="text/html" />
|
||||
<license file="gpl-3.0-standalone.html" mime-type="text/html" />
|
||||
<pkg-ref id="org.dynare" />
|
||||
<options customize="allow" require-scripts="false" hostArchitectures="x86_64" />
|
||||
<domains enable_anywhere="false" enable_currentUserHome="true" enable_localSystem="false"/> <!-- on enable_currentUserHome="true" does not require admin rights! enable_localSystem="true" or enable_anywhere="true" requires admin rights by default, even though this can be changed in the installer though under Change Installation. -->
|
||||
<pkg-ref id="default" />
|
||||
<options customize="allow" require-scripts="false" hostArchitectures="x86_64,arm64" />
|
||||
<choices-outline>
|
||||
<line choice="org.dynare" />
|
||||
<line choice="org.dynare.gcc" />
|
||||
<line choice="default" />
|
||||
</choices-outline>
|
||||
<choice id="org.dynare" title="Dynare" description="Dynare Required Files" start_enabled="false" enabled="false">
|
||||
<pkg-ref id="org.dynare" />
|
||||
</choice>
|
||||
<choice id="org.dynare.gcc" title="GCC for `use_dll`" description="This is necessary for the use of Dynare with the `use_dll` option. NB: This takes a few minutes and requires an active internet connection.">
|
||||
<pkg-ref id="org.dynare.gcc" />
|
||||
</choice>
|
||||
<pkg-ref id="org.dynare" version="VERSION_NO_SPACE">dynare-VERSION_NO_SPACE.pkg</pkg-ref>
|
||||
<pkg-ref id="org.dynare.gcc" version="VERSION_NO_SPACE">dynare-VERSION_NO_SPACE-gcc.pkg</pkg-ref>
|
||||
</installer-gui-script>
|
||||
<choice id="default" title="Dynare" description="Dynare Required Files" start_enabled="false" enabled="false" customLocation="/Applications/Dynare/LOCATION">
|
||||
<pkg-ref id="org.dynare.VERSION_NO_SPACE" />
|
||||
</choice>
|
||||
<pkg-ref id="org.dynare.VERSION_NO_SPACE" version="VERSION_NO_SPACE">dynare-VERSION_NO_SPACE.pkg</pkg-ref>
|
||||
</installer-gui-script>
|
|
@ -0,0 +1,15 @@
|
|||
# Meson native file for compiling under Homebrew for arm64 architecture
|
||||
|
||||
[binaries]
|
||||
cpp = '/opt/homebrew/bin/g++-13'
|
||||
c = '/opt/homebrew/bin/gcc-13'
|
||||
flex = '/opt/homebrew/opt/flex/bin/flex'
|
||||
bison = '/opt/homebrew/opt/bison/bin/bison'
|
||||
|
||||
[built-in options]
|
||||
cpp_args = [ '-I/opt/homebrew/include', '-B', '/opt/homebrew/lib' ]
|
||||
# XCode 15 (on Ventura and Sonoma) has a linker issue, see https://github.com/mesonbuild/meson/issues/12282, workaround is to use ld_classic
|
||||
cpp_link_args = [ '-Wl,-ld_classic' ]
|
||||
c_link_args = [ '-Wl,-ld_classic' ]
|
||||
fortran_link_args = [ '-Wl,-ld_classic' ]
|
||||
#fortran_args = [ '-B', '/Users/sebastien/slicot' ]
|
|
@ -0,0 +1,15 @@
|
|||
# Meson native file for compiling under Homebrew for x86_64 architecture
|
||||
|
||||
[binaries]
|
||||
cpp = '/usr/local/bin/g++-13'
|
||||
c = '/usr/local/bin/gcc-13'
|
||||
flex = '/usr/local/opt/flex/bin/flex'
|
||||
bison = '/usr/local/opt/bison/bin/bison'
|
||||
|
||||
[built-in options]
|
||||
cpp_args = [ '-I/usr/local/include', '-B', '/usr/local/lib' ]
|
||||
# XCode 15 (on Ventura and Sonoma) has a linker issue, see https://github.com/mesonbuild/meson/issues/12282, workaround is to use ld_classic
|
||||
cpp_link_args = [ '-Wl,-ld_classic' ]
|
||||
c_link_args = [ '-Wl,-ld_classic' ]
|
||||
fortran_link_args = [ '-Wl,-ld_classic' ]
|
||||
#fortran_args = [ '-B', '/Users/sebastien/slicot' ]
|
|
@ -1,96 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright © 2019-2021 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
set -ex
|
||||
|
||||
set -o errexit
|
||||
readonly LOG_FILE="$2"/install.log
|
||||
sudo touch "$LOG_FILE"
|
||||
exec 1>"$LOG_FILE"
|
||||
exec 2>&1
|
||||
|
||||
# Remove dummy payload
|
||||
rm -f "$2"/dummy
|
||||
|
||||
# Test for Internet connection
|
||||
if ! curl -s -m 4 https://github.com >/dev/null; then
|
||||
osascript -e 'display alert "Dynare Installation Error" message "Not able to connect to github.com. Either you are not connected to the internet or github.com is blocked where you are.\n\nAccess to GitHub is necessary to make Dynare work with the `use_dll` option on macOS.\n\nIf you cannot establish this connection or do not want to use the `use_dll` option of Dynare, please run the installer again and choose \"Customize\" from the \"Installation Type\" screen and uncheck the `GCC` option." as critical'
|
||||
echo "No internet connection to github.com"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install Command Line Tools
|
||||
# Checking that “xcode-select -print-path” returns a valid path is not enough, because
|
||||
# the contents of that directory might have been removed (this is the official way of
|
||||
# uninstalling CLT, see https://developer.apple.com/library/archive/technotes/tn2339/_index.html#//apple_ref/doc/uid/DTS40014588-CH1-HOW_CAN_I_UNINSTALL_THE_COMMAND_LINE_TOOLS_)
|
||||
# Hence we also check that the directory contains the git binary.
|
||||
if ! xcpath=$(/usr/bin/xcode-select -print-path) || [[ ! -x "$xcpath"/usr/bin/git ]]; then
|
||||
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
|
||||
SUC=$(softwareupdate -l |
|
||||
grep "\*.*Command Line" |
|
||||
grep -m1 "" |
|
||||
awk -F"*" '{print $2}' |
|
||||
sed -e 's/^ *//' |
|
||||
tr -d '\n')
|
||||
# On macOS 10.15 softwareupdate output is preceded by "Label: "
|
||||
[[ $SUC == Label:* ]] && SUC=${SUC#"Label: "}
|
||||
softwareupdate -i "$SUC" --verbose
|
||||
rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
|
||||
softwareupdate -l
|
||||
fi
|
||||
|
||||
# If CLT installation didn't work, exit
|
||||
if ! xcpath=$(/usr/bin/xcode-select -print-path) || [[ ! -x "$xcpath"/usr/bin/git ]]; then
|
||||
osascript -e 'display alert "Dynare Installation Error" message "Not able to find Command Line Tools.\n\nCommand Line Tools is necessary to make Dynare work with the `use_dll` option on macOS.\n\nIf you cannot establish this connection or do not want to use the `use_dll` option of Dynare, please run the installer again and choose \"Customize\" from the \"Installation Type\" screen and uncheck the `GCC` option." as critical'
|
||||
echo "Command Line Tools not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure git is in the path
|
||||
if ! which git >/dev/null; then
|
||||
osascript -e 'display alert "Dynare Installation Error" message "Not able to find Git even though the Command Line Tools have already been installed. This is likely a problem with your PATH environment variable.\n\nGit is necessary to make Dynare work with the `use_dll` option on macOS.\n\nIf you cannot establish this connection or do not want to use the `use_dll` option of Dynare, please run the installer again and choose \"Customize\" from the \"Installation Type\" screen and uncheck the `GCC` option." as critical'
|
||||
echo $PATH
|
||||
echo "Git not found in PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install Homebrew
|
||||
BREWDIR="$2"/.brew
|
||||
[ -d "$BREWDIR" ] || mkdir -p "$BREWDIR"
|
||||
|
||||
BREW_URL="https://github.com/Homebrew/brew"
|
||||
BREW_BRANCH="master"
|
||||
|
||||
curl -\# -L "$BREW_URL"/tarball/"$BREW_BRANCH" | tar xz -m --strip 1 -C "$BREWDIR"
|
||||
|
||||
# Change ownership of Dynare directory
|
||||
chown -R "$USER":staff "$2"
|
||||
|
||||
sudo -u "$USER" "$BREWDIR"/bin/brew tap homebrew/core
|
||||
HOMEBREW_CACHE="$HOME"/Library/Caches/Homebrew-Dynare
|
||||
HOMEBREW_NO_AUTO_UPDATE=1
|
||||
[[ -z "${HOMEBREW_NO_ANALYTICS}" ]] && HOMEBREW_NO_ANALYTICS=1
|
||||
|
||||
# Move modified formulas to Homebrew Formula directory
|
||||
mv "$2"/*.rb "$BREWDIR"/Library/Taps/homebrew/homebrew-core/Formula
|
||||
|
||||
# Install GCC & deps
|
||||
sudo -u "$USER" "$BREWDIR"/bin/brew install gcc -v --force-bottle
|
||||
|
||||
exit 0
|
|
@ -1,15 +1,37 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Dynare Installer</title>
|
||||
<style>
|
||||
.center-text {
|
||||
text-align: center;
|
||||
}
|
||||
.bold-text {
|
||||
font-weight: bold;
|
||||
}
|
||||
code {
|
||||
font-family: "Courier New", Courier, monospace;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h3 style="text-align: center;">Welcome to Dynare</h3>
|
||||
<p style="text-align: center;">Version VERSION_NO_SPACE</p>
|
||||
<p style="text-align: center;">DATE</p>
|
||||
<header class="center-text">
|
||||
<h1>Welcome to Dynare</h1>
|
||||
<p>Version VERSION_NO_SPACE</p>
|
||||
<p>DATE</p>
|
||||
</header>
|
||||
|
||||
<p><b>Just a few things to note</b>. This installation can be customized as you can choose not to install the GNU Compiler Collection (GCC). Installing GCC is necessary if you want to use the <tt>use_dll</tt> option in Dynare, but otherwise unnecessary.</p>
|
||||
<main>
|
||||
<p>Thank you for choosing Dynare!</p>
|
||||
<p>This installation does not require administrative privileges. If for some reason admin rights are requested, use 'Change Install Location' and select 'Install for me only'.</p>
|
||||
<p>By default Dynare will be installed into /Applications/Dynare. To modify the installation path, click <strong>Customize</strong> after accepting the license. Then, under <strong>Location</strong>, select your desired folder.</p>
|
||||
<p>Installing into /Applications/Dynare might fail if you have older versions of Dynare installed in /Applications/Dynare. To fix this, modify the ownership by executing the following command in Terminal.app:</p>
|
||||
<code>
|
||||
sudo chown -R "$USER":staff /Applications/Dynare
|
||||
</code>
|
||||
</main>
|
||||
|
||||
<p>To install GCC we run a script that first installs the XCode Command Line Tools (an Apple product). The script then installs Homebrew, a package manager for macOS and, finally, GCC itself. Both Homebrew and GCC will be installed in your Dynare installation folder. So, when you delete this folder, they too will be deleted.</p>
|
||||
|
||||
<p>Installing GCC will require an active internet connection with the ability to connect to the Apple servers and GitHub. The installation will take anywhere from a few minutes to a half an hour during the <i>Running package scripts</i> phase of Installation. The time it takes depends on your internet speed, the speed of your computer, and whether or not you already have XCode Command Line Tools installed. The progress bar will not advance during this phase. Please be patient.</p>
|
||||
|
||||
<p> You can choose not to install GCC by choosing <i>Customize</i> from the <i>Installation Type</i> screen and deselecting <i>GCC compiler</i>. If you already have <tt>GCC_BINARY</tt> installed under <tt>/usr/local</tt>, you can forgo the installation of GCC here as Dynare will find your system compiler when you use <tt>use_dll</tt>.</p>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
|
@ -1,5 +1,5 @@
|
|||
function write(DynareModel)
|
||||
|
||||
function write(M_)
|
||||
% write(M_)
|
||||
% Writes the nonlinear problem to be solved for computing the growth
|
||||
% rates and levels along the Balanced Growth Path. Note that for
|
||||
% the variables growing along the BGP, the identified levels are
|
||||
|
@ -7,7 +7,7 @@ function write(DynareModel)
|
|||
% sharing the same trend(s) are relevant.
|
||||
%
|
||||
% INPUTS
|
||||
% - DynareModel [struct] Dynare generated stucture describing the model (M_).
|
||||
% - M_ [struct] Dynare generated stucture describing the model (M_).
|
||||
%
|
||||
% OUTPUTS
|
||||
% None
|
||||
|
@ -15,7 +15,7 @@ function write(DynareModel)
|
|||
% REMARKS
|
||||
% - The trends are assumed to be multiplicative.
|
||||
|
||||
% Copyright © 2019 Dynare Team
|
||||
% Copyright © 2019-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -32,18 +32,18 @@ function write(DynareModel)
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
if DynareModel.maximum_lag && ~DynareModel.maximum_lead
|
||||
i0 = transpose(DynareModel.lead_lag_incidence(1,:)); % Indices of the lagged variables.
|
||||
i1 = transpose(DynareModel.lead_lag_incidence(2,:)); % Indices of the current variables.
|
||||
if M_.maximum_lag && ~M_.maximum_lead
|
||||
i0 = transpose(M_.lead_lag_incidence(1,:)); % Indices of the lagged variables.
|
||||
i1 = transpose(M_.lead_lag_incidence(2,:)); % Indices of the current variables.
|
||||
i2 = []; % Indices of the leaded variables.
|
||||
elseif DynareModel.maximum_lag && DynareModel.maximum_lead
|
||||
i0 = transpose(DynareModel.lead_lag_incidence(1,:)); % Indices of the lagged variables.
|
||||
i1 = transpose(DynareModel.lead_lag_incidence(2,:)); % Indices of the current variables.
|
||||
i2 = transpose(DynareModel.lead_lag_incidence(3,:)); % Indices of the leaded variables.
|
||||
elseif ~DynareModel.maximum_lag && DynareModel.maximum_lead
|
||||
elseif M_.maximum_lag && M_.maximum_lead
|
||||
i0 = transpose(M_.lead_lag_incidence(1,:)); % Indices of the lagged variables.
|
||||
i1 = transpose(M_.lead_lag_incidence(2,:)); % Indices of the current variables.
|
||||
i2 = transpose(M_.lead_lag_incidence(3,:)); % Indices of the leaded variables.
|
||||
elseif ~M_.maximum_lag && M_.maximum_lead
|
||||
i0 = []; % Indices of the lagged variables.
|
||||
i1 = transpose(DynareModel.lead_lag_incidence(1,:)); % Indices of the current variables.
|
||||
i2 = transpose(DynareModel.lead_lag_incidence(2,:)); % Indices of the leaded variables.
|
||||
i1 = transpose(M_.lead_lag_incidence(1,:)); % Indices of the current variables.
|
||||
i2 = transpose(M_.lead_lag_incidence(2,:)); % Indices of the leaded variables.
|
||||
else
|
||||
error('The model is static. The BGP is trivial.')
|
||||
end
|
||||
|
@ -71,7 +71,7 @@ else
|
|||
end
|
||||
|
||||
% Create function in mod namespace.
|
||||
fid = fopen(sprintf('+%s/bgpfun.m', DynareModel.fname), 'w');
|
||||
fid = fopen(sprintf('+%s/bgpfun.m', M_.fname), 'w');
|
||||
|
||||
% Write header.
|
||||
fprintf(fid, 'function [F, JAC] = bgpfun(z)\n\n');
|
||||
|
@ -80,8 +80,8 @@ fprintf(fid, '%% This file has been generated by dynare (%s).\n\n', datestr(now)
|
|||
% The function admits a unique vector as input argument. The first
|
||||
% half of the elements are for the levels of the endogenous
|
||||
% variables, the second half for the growth factors.
|
||||
fprintf(fid, 'y = z(1:%u);\n\n', DynareModel.endo_nbr);
|
||||
fprintf(fid, 'g = z(%u:%u);\n', DynareModel.endo_nbr+1, 2*DynareModel.endo_nbr);
|
||||
fprintf(fid, 'y = z(1:%u);\n\n', M_.endo_nbr);
|
||||
fprintf(fid, 'g = z(%u:%u);\n', M_.endo_nbr+1, 2*M_.endo_nbr);
|
||||
|
||||
% Define the point where the dynamic model is to be evaluated.
|
||||
fprintf(fid, 'Y = zeros(%u, 1);\n', 2*(n0+n1+n2));
|
||||
|
@ -118,39 +118,39 @@ end
|
|||
fprintf(fid, '\n');
|
||||
|
||||
% Define the vector of parameters.
|
||||
fprintf(fid, 'p = zeros(%u, 1);\n', DynareModel.param_nbr);
|
||||
for i = 1:DynareModel.param_nbr
|
||||
fprintf(fid, 'p(%u) = %16.12f;\n', i, DynareModel.params(i));
|
||||
fprintf(fid, 'p = zeros(%u, 1);\n', M_.param_nbr);
|
||||
for i = 1:M_.param_nbr
|
||||
fprintf(fid, 'p(%u) = %16.12f;\n', i, M_.params(i));
|
||||
end
|
||||
fprintf(fid, '\n');
|
||||
|
||||
% Initialize the vector holding the residuals over the two periods.
|
||||
fprintf(fid, 'F = NaN(%u, 1);\n', 2*DynareModel.endo_nbr);
|
||||
fprintf(fid, 'F = NaN(%u, 1);\n', 2*M_.endo_nbr);
|
||||
|
||||
% Set vector of exogenous variables to 0.
|
||||
fprintf(fid, 'x = zeros(1, %u);\n\n', DynareModel.exo_nbr);
|
||||
fprintf(fid, 'x = zeros(1, %u);\n\n', M_.exo_nbr);
|
||||
|
||||
% Evaluate the residuals and jacobian of the dynamic model in periods t and t+1.
|
||||
fprintf(fid, 'if nargout>1\n');
|
||||
fprintf(fid, ' J = zeros(%u, %u);\n', 2*DynareModel.endo_nbr, n0+n1+n2+DynareModel.endo_nbr);
|
||||
fprintf(fid, ' [F(1:%u), tmp] = %s.dynamic(Y(1:%u), x, p, y, 1);\n', DynareModel.endo_nbr, DynareModel.fname, n0+n1+n2);
|
||||
fprintf(fid, ' J(1:%u,1:%u) = tmp(:,1:%u);\n', DynareModel.endo_nbr, n0+n1+n2, n0+n1+n2);
|
||||
fprintf(fid, ' [F(%u:%u), tmp] = %s.dynamic(Y(1+%u:%u), x, p, y, 1);\n', DynareModel.endo_nbr+1, 2*DynareModel.endo_nbr, DynareModel.fname, n0+n1+n2, 2*(n0+n1+n2));
|
||||
fprintf(fid, ' J(%u:%u,1:%u) = tmp(:,1:%u);\n', DynareModel.endo_nbr+1, 2*DynareModel.endo_nbr, n0+n1+n2, n0+n1+n2);
|
||||
fprintf(fid, ' J = zeros(%u, %u);\n', 2*M_.endo_nbr, n0+n1+n2+M_.endo_nbr);
|
||||
fprintf(fid, ' [F(1:%u), tmp] = %s.dynamic(Y(1:%u), x, p, y, 1);\n', M_.endo_nbr, M_.fname, n0+n1+n2);
|
||||
fprintf(fid, ' J(1:%u,1:%u) = tmp(:,1:%u);\n', M_.endo_nbr, n0+n1+n2, n0+n1+n2);
|
||||
fprintf(fid, ' [F(%u:%u), tmp] = %s.dynamic(Y(1+%u:%u), x, p, y, 1);\n', M_.endo_nbr+1, 2*M_.endo_nbr, M_.fname, n0+n1+n2, 2*(n0+n1+n2));
|
||||
fprintf(fid, ' J(%u:%u,1:%u) = tmp(:,1:%u);\n', M_.endo_nbr+1, 2*M_.endo_nbr, n0+n1+n2, n0+n1+n2);
|
||||
fprintf(fid, 'else\n');
|
||||
fprintf(fid, ' F(1:%u) = %s.dynamic(Y(1:%u), x, p, y, 1);\n', DynareModel.endo_nbr, DynareModel.fname, n0+n1+n2);
|
||||
fprintf(fid, ' F(%u:%u) = %s.dynamic(Y(1+%u:%u), x, p, y, 1);\n', DynareModel.endo_nbr+1, 2*DynareModel.endo_nbr, DynareModel.fname, n0+n1+n2, 2*(n0+n1+n2));
|
||||
fprintf(fid, ' F(1:%u) = %s.dynamic(Y(1:%u), x, p, y, 1);\n', M_.endo_nbr, M_.fname, n0+n1+n2);
|
||||
fprintf(fid, ' F(%u:%u) = %s.dynamic(Y(1+%u:%u), x, p, y, 1);\n', M_.endo_nbr+1, 2*M_.endo_nbr, M_.fname, n0+n1+n2, 2*(n0+n1+n2));
|
||||
fprintf(fid, 'end\n\n');
|
||||
|
||||
% Compute the jacobian if required.
|
||||
fprintf(fid, 'if nargout>1\n');
|
||||
fprintf(fid, ' JAC = zeros(%u,%u);\n', 2*DynareModel.endo_nbr, 2*DynareModel.endo_nbr);
|
||||
fprintf(fid, ' JAC = zeros(%u,%u);\n', 2*M_.endo_nbr, 2*M_.endo_nbr);
|
||||
|
||||
% Compute the derivatives of the first block of equations (period t)
|
||||
% with respect to the endogenous variables.
|
||||
if purely_backward_model || purely_forward_model
|
||||
for i=1:DynareModel.eq_nbr
|
||||
for j=1:DynareModel.endo_nbr
|
||||
for i=1:M_.eq_nbr
|
||||
for j=1:M_.endo_nbr
|
||||
if I1(j)
|
||||
if I0(j)
|
||||
fprintf(fid, ' JAC(%u,%u) = J(%u,%u)+J(%u,%u)*g(%u);\n', i, j, i, I0(j), i, I1(j), j);
|
||||
|
@ -165,8 +165,8 @@ if purely_backward_model || purely_forward_model
|
|||
end
|
||||
end
|
||||
else
|
||||
for i=1:DynareModel.eq_nbr
|
||||
for j=1:DynareModel.endo_nbr
|
||||
for i=1:M_.eq_nbr
|
||||
for j=1:M_.endo_nbr
|
||||
if I2(j)
|
||||
if I1(j)
|
||||
if I0(j)
|
||||
|
@ -201,8 +201,8 @@ end
|
|||
% Compute the derivatives of the second block of equations (period t+1)
|
||||
% with respect to the endogenous variables.
|
||||
if purely_backward_model || purely_forward_model
|
||||
for i=DynareModel.eq_nbr+1:2*DynareModel.eq_nbr
|
||||
for j=1:DynareModel.endo_nbr
|
||||
for i=M_.eq_nbr+1:2*M_.eq_nbr
|
||||
for j=1:M_.endo_nbr
|
||||
if I1(j)
|
||||
if I0(j)
|
||||
fprintf(fid, ' JAC(%u,%u) = J(%u,%u)*g(%u)+J(%u,%u)*g(%u)*g(%u);\n', i, j, i, I0(j), j, i, I1(j), j, j);
|
||||
|
@ -217,8 +217,8 @@ if purely_backward_model || purely_forward_model
|
|||
end
|
||||
end
|
||||
else
|
||||
for i=DynareModel.eq_nbr+1:2*DynareModel.eq_nbr
|
||||
for j=1:DynareModel.endo_nbr
|
||||
for i=M_.eq_nbr+1:2*M_.eq_nbr
|
||||
for j=1:M_.endo_nbr
|
||||
if I2(j)
|
||||
if I1(j)
|
||||
if I0(j)
|
||||
|
@ -253,16 +253,16 @@ end
|
|||
% Compute the derivatives of the first block of equations (period t)
|
||||
% with respect to the growth factors.
|
||||
if purely_backward_model || purely_forward_model
|
||||
for i=1:DynareModel.eq_nbr
|
||||
for j=1:DynareModel.endo_nbr
|
||||
for i=1:M_.eq_nbr
|
||||
for j=1:M_.endo_nbr
|
||||
if I1(j)
|
||||
fprintf(fid, ' J(%u,%u) = J(%u,%u)*y(%u);\n', i, n0+n1+n2+j, i, I1(j), j);
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
for i=1:DynareModel.eq_nbr
|
||||
for j=1:DynareModel.endo_nbr
|
||||
for i=1:M_.eq_nbr
|
||||
for j=1:M_.endo_nbr
|
||||
if I2(j)
|
||||
if I1(j)
|
||||
fprintf(fid, ' J(%u,%u) = J(%u,%u)*y(%u)+J(%u,%u)*2*g(%u)*y(%u);\n', i, n0+n1+n2+j, i, I1(j), j, i, I2(j), j, j);
|
||||
|
@ -281,8 +281,8 @@ end
|
|||
% Compute the derivatives of the second block of equations (period t+1)
|
||||
% with respect to the endogenous variables.
|
||||
if purely_backward_model || purely_forward_model
|
||||
for i=DynareModel.eq_nbr+1:2*DynareModel.eq_nbr
|
||||
for j=1:DynareModel.endo_nbr
|
||||
for i=M_.eq_nbr+1:2*M_.eq_nbr
|
||||
for j=1:M_.endo_nbr
|
||||
if I0(j)
|
||||
fprintf(fid, ' J(%u,%u) = J(%u,%u)+J(%u,%u)*y(%u);\n', i, n0+n1+n2+j, i, n0+n1+n2+j, i, I0(j), j);
|
||||
end
|
||||
|
@ -292,8 +292,8 @@ if purely_backward_model || purely_forward_model
|
|||
end
|
||||
end
|
||||
else
|
||||
for i=DynareModel.eq_nbr+1:2*DynareModel.eq_nbr
|
||||
for j=1:DynareModel.endo_nbr
|
||||
for i=M_.eq_nbr+1:2*M_.eq_nbr
|
||||
for j=1:M_.endo_nbr
|
||||
if I2(j)
|
||||
if I1(j)
|
||||
if I0(j)
|
||||
|
@ -325,7 +325,7 @@ else
|
|||
end
|
||||
end
|
||||
|
||||
fprintf(fid, ' JAC(:,%u:%u) = J(:,%u:%u);\n', DynareModel.endo_nbr+1, 2*DynareModel.endo_nbr, n0+n1+n2+1, n0+n1+n2+DynareModel.endo_nbr);
|
||||
fprintf(fid, ' JAC(:,%u:%u) = J(:,%u:%u);\n', M_.endo_nbr+1, 2*M_.endo_nbr, n0+n1+n2+1, n0+n1+n2+M_.endo_nbr);
|
||||
|
||||
fprintf(fid,'end\n');
|
||||
fclose(fid);
|
|
@ -1,5 +1,5 @@
|
|||
function bvar_density(maxnlags)
|
||||
% function bvar_density(maxnlags)
|
||||
function density(maxnlags)
|
||||
% function density(maxnlags)
|
||||
% computes the density of a bayesian var
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -12,7 +12,7 @@ function bvar_density(maxnlags)
|
|||
% none
|
||||
|
||||
% Copyright © 2003-2007 Christopher Sims
|
||||
% Copyright © 2007-2017 Dynare Team
|
||||
% Copyright © 2007-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -34,7 +34,7 @@ global oo_
|
|||
oo_.bvar.log_marginal_data_density=NaN(maxnlags,1);
|
||||
|
||||
for nlags = 1:maxnlags
|
||||
[ny, nx, posterior, prior] = bvar_toolbox(nlags);
|
||||
[ny, ~, posterior, prior] = bvar.toolbox(nlags);
|
||||
oo_.bvar.posterior{nlags}=posterior;
|
||||
oo_.bvar.prior{nlags}=prior;
|
||||
|
||||
|
@ -75,8 +75,8 @@ function w = matrictint(S, df, XXi)
|
|||
|
||||
k=size(XXi,1);
|
||||
ny=size(S,1);
|
||||
[cx,p]=chol(XXi);
|
||||
[cs,q]=chol(S);
|
||||
[cx,p] = chol(XXi); %second output required to prevent error
|
||||
[cs,p] = chol(S); %second output required to prevent error
|
||||
|
||||
if any(diag(cx)<100*eps)
|
||||
error('singular XXi')
|
|
@ -1,5 +1,5 @@
|
|||
function bvar_forecast(nlags)
|
||||
% function bvar_forecast(nlags)
|
||||
function forecast(nlags)
|
||||
% function forecast(nlags)
|
||||
% builds forecats for a bvar model
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -11,7 +11,7 @@ function bvar_forecast(nlags)
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
|
||||
% Copyright © 2007-2017 Dynare Team
|
||||
% Copyright © 2007-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -31,9 +31,9 @@ function bvar_forecast(nlags)
|
|||
global options_ oo_ M_
|
||||
|
||||
if options_.forecast == 0
|
||||
error('bvar_forecast: you must specify "forecast" option')
|
||||
error('bvar.forecast: you must specify "forecast" option')
|
||||
end
|
||||
[ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags);
|
||||
[ny, nx, posterior, ~, forecast_data] = bvar.toolbox(nlags);
|
||||
|
||||
sims_no_shock = NaN(options_.forecast, ny, options_.bvar_replic);
|
||||
sims_with_shocks = NaN(options_.forecast, ny, options_.bvar_replic);
|
||||
|
@ -95,7 +95,7 @@ end
|
|||
|
||||
if p > 0
|
||||
skipline()
|
||||
disp(['Some of the VAR models sampled from the posterior distribution'])
|
||||
disp('Some of the VAR models sampled from the posterior distribution')
|
||||
disp(['were found to be explosive (' num2str(p/options_.bvar_replic) ' percent).'])
|
||||
skipline()
|
||||
end
|
||||
|
@ -116,10 +116,10 @@ sims_with_shocks_up_conf = sims_with_shocks_sort(:, :, sort_idx(2));
|
|||
|
||||
OutputDirectoryName = CheckPath('graphs',M_.dname);
|
||||
|
||||
dyn_graph=dynare_graph_init(sprintf('BVAR forecasts (nlags = %d)', nlags), ny, {'b-' 'g-' 'g-' 'r-' 'r-'});
|
||||
dyn_graph=bvar.graph_init(sprintf('BVAR forecasts (nlags = %d)', nlags), ny, {'b-' 'g-' 'g-' 'r-' 'r-'});
|
||||
|
||||
for i = 1:ny
|
||||
dyn_graph=dynare_graph(dyn_graph,[ sims_no_shock_median(:, i) ...
|
||||
dyn_graph=plot_graph(dyn_graph,[ sims_no_shock_median(:, i) ...
|
||||
sims_no_shock_up_conf(:, i) sims_no_shock_down_conf(:, i) ...
|
||||
sims_with_shocks_up_conf(:, i) sims_with_shocks_down_conf(:, i) ], ...
|
||||
options_.varobs{i});
|
||||
|
@ -154,8 +154,8 @@ end
|
|||
% Store results
|
||||
|
||||
DirectoryName = [ M_.dname '/bvar_forecast' ];
|
||||
if ~isdir(DirectoryName)
|
||||
if ~isdir(M_.dname)
|
||||
if ~isfolder(DirectoryName)
|
||||
if ~isfolder(M_.dname)
|
||||
mkdir(M_.dname);
|
||||
end
|
||||
mkdir(DirectoryName);
|
||||
|
@ -166,20 +166,48 @@ for i = 1:length(options_.varobs)
|
|||
name = options_.varobs{i};
|
||||
|
||||
sims = squeeze(sims_with_shocks(:,i,:));
|
||||
eval(['oo_.bvar.forecast.with_shocks.Mean.' name ' = mean(sims, 2);']);
|
||||
eval(['oo_.bvar.forecast.with_shocks.Median.' name ' = median(sims, 2);']);
|
||||
eval(['oo_.bvar.forecast.with_shocks.Var.' name ' = var(sims, 0, 2);']);
|
||||
eval(['oo_.bvar.forecast.with_shocks.HPDsup.' name ' = sims_with_shocks_up_conf(:,i);']);
|
||||
eval(['oo_.bvar.forecast.with_shocks.HPDinf.' name ' = sims_with_shocks_down_conf(:,i);']);
|
||||
oo_.bvar.forecast.with_shocks.Mean.(name) = mean(sims, 2);
|
||||
oo_.bvar.forecast.with_shocks.Median.(name) = median(sims, 2);
|
||||
oo_.bvar.forecast.with_shocks.Var.(name) = var(sims, 0, 2);
|
||||
oo_.bvar.forecast.with_shocks.HPDsup.(name) = sims_with_shocks_up_conf(:,i);
|
||||
oo_.bvar.forecast.with_shocks.HPDinf.(name) = sims_with_shocks_down_conf(:,i);
|
||||
|
||||
sims = squeeze(sims_no_shock(:,i,:));
|
||||
eval(['oo_.bvar.forecast.no_shock.Mean.' name ' = sims_no_shock_mean(:,i);']);
|
||||
eval(['oo_.bvar.forecast.no_shock.Median.' name ' = sims_no_shock_median(:,i);']);
|
||||
eval(['oo_.bvar.forecast.no_shock.Var.' name ' = var(sims, 0, 2);']);
|
||||
eval(['oo_.bvar.forecast.no_shock.HPDsup.' name ' = sims_no_shock_up_conf(:,i);']);
|
||||
eval(['oo_.bvar.forecast.no_shock.HPDinf.' name ' = sims_no_shock_down_conf(:,i);']);
|
||||
oo_.bvar.forecast.no_shock.Mean.(name) = sims_no_shock_mean(:,i);
|
||||
oo_.bvar.forecast.no_shock.Median.(name) = sims_no_shock_median(:,i);
|
||||
oo_.bvar.forecast.no_shock.Var.(name) = var(sims, 0, 2);
|
||||
oo_.bvar.forecast.no_shock.HPDsup.(name) = sims_no_shock_up_conf(:,i);
|
||||
oo_.bvar.forecast.no_shock.HPDinf.(name) = sims_no_shock_down_conf(:,i);
|
||||
|
||||
if exist('rmse')
|
||||
eval(['oo_.bvar.forecast.rmse.' name ' = rmse(i);']);
|
||||
if exist('rmse','var')
|
||||
oo_.bvar.forecast.rmse.(name) = rmse(i);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function dyn_graph=plot_graph(dyn_graph,y,tit,x)
|
||||
% function plot_graph(dyn_graph, y,tit,x)
|
||||
|
||||
if nargin < 4
|
||||
x = (1:size(y,1))';
|
||||
end
|
||||
nplot = dyn_graph.plot_nbr + 1;
|
||||
if nplot > dyn_graph.max_nplot
|
||||
figure('Name',dyn_graph.figure_name);
|
||||
nplot = 1;
|
||||
end
|
||||
dyn_graph.plot_nbr = nplot;
|
||||
subplot(dyn_graph.nr,dyn_graph.nc,nplot);
|
||||
|
||||
line_types = dyn_graph.line_types;
|
||||
line_type = line_types{1};
|
||||
for i=1:size(y,2)
|
||||
if length(line_types) > 1
|
||||
line_type = line_types{i};
|
||||
end
|
||||
|
||||
plot(x,y(:,i),line_type);
|
||||
hold on
|
||||
end
|
||||
title(tit);
|
||||
hold off
|
|
@ -1,5 +1,5 @@
|
|||
function dyn_graph=dynare_graph_init(figure_name,nplot,line_types,line_width)
|
||||
% function dynare_graph_init(figure_name,colors)
|
||||
function dyn_graph=graph_init(figure_name,nplot,line_types,line_width)
|
||||
% function graph_init(figure_name,colors)
|
||||
% initializes set of graphs
|
||||
%
|
||||
% INPUTS:
|
||||
|
@ -12,7 +12,7 @@ function dyn_graph=dynare_graph_init(figure_name,nplot,line_types,line_width)
|
|||
% SPECIAL REQUIREMENT
|
||||
% none
|
||||
|
||||
% Copyright © 2006-2017 Dynare Team
|
||||
% Copyright © 2006-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
|
@ -1,5 +1,6 @@
|
|||
function bvar_irf(nlags,identification)
|
||||
% builds IRFs for a bvar model
|
||||
function irf(nlags,identification)
|
||||
% function irf(nlags,identification)
|
||||
% builds IRFs for a BVAR model
|
||||
%
|
||||
% INPUTS
|
||||
% nlags [integer] number of lags for the bvar
|
||||
|
@ -11,7 +12,7 @@ function bvar_irf(nlags,identification)
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
|
||||
% Copyright © 2007-2017 Dynare Team
|
||||
% Copyright © 2007-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -34,7 +35,7 @@ if nargin==1
|
|||
identification = 'Cholesky';
|
||||
end
|
||||
|
||||
[ny, nx, posterior, prior] = bvar_toolbox(nlags);
|
||||
[ny, nx, posterior] = bvar.toolbox(nlags);
|
||||
|
||||
S_inv_upper_chol = chol(inv(posterior.S));
|
||||
|
||||
|
@ -77,12 +78,14 @@ for draw=1:options_.bvar_replic
|
|||
StructuralMat = Sigma_lower_chol;
|
||||
elseif strcmpi(identification,'SquareRoot')
|
||||
StructuralMat = sqrtm(Sigma);
|
||||
else
|
||||
error('Unknown identification option. Valid choices are ''Cholesky'' and ''SquareRoot''.')
|
||||
end
|
||||
|
||||
% Build the IRFs...
|
||||
lags_data = zeros(ny,ny*nlags) ;
|
||||
sampled_irfs(:,:,1,draw) = Sigma_lower_chol ;
|
||||
lags_data(:,1:ny) = Sigma_lower_chol ;
|
||||
sampled_irfs(:,:,1,draw) = StructuralMat ;
|
||||
lags_data(:,1:ny) = StructuralMat ;
|
||||
for t=2:options_.irf
|
||||
sampled_irfs(:,:,t,draw) = lags_data(:,:)*Phi(1:ny*nlags,:) ;
|
||||
lags_data(:,ny+1:end) = lags_data(:,1:end-ny) ;
|
||||
|
@ -93,7 +96,7 @@ end
|
|||
|
||||
if p > 0
|
||||
skipline()
|
||||
disp(['Some of the VAR models sampled from the posterior distribution'])
|
||||
disp('Some of the VAR models sampled from the posterior distribution')
|
||||
disp(['were found to be explosive (' int2str(p) ' samples).'])
|
||||
skipline()
|
||||
end
|
||||
|
@ -127,7 +130,7 @@ end
|
|||
|
||||
% Save intermediate results
|
||||
DirectoryName = [ M_.dname '/bvar_irf' ];
|
||||
if ~isdir(DirectoryName)
|
||||
if ~isfolder(DirectoryName)
|
||||
mkdir('.',DirectoryName);
|
||||
end
|
||||
save([ DirectoryName '/simulations.mat'], 'sampled_irfs');
|
||||
|
@ -137,10 +140,10 @@ for i=1:ny
|
|||
shock_name = options_.varobs{i};
|
||||
for j=1:ny
|
||||
variable_name = options_.varobs{j};
|
||||
eval(['oo_.bvar.irf.Mean.' variable_name '.' shock_name ' = posterior_mean_irfs(' int2str(j) ',' int2str(i) ',:);'])
|
||||
eval(['oo_.bvar.irf.Median.' variable_name '.' shock_name ' = posterior_median_irfs(' int2str(j) ',' int2str(i) ',:);'])
|
||||
eval(['oo_.bvar.irf.Var.' variable_name '.' shock_name ' = posterior_variance_irfs(' int2str(j) ',' int2str(i) ',:);'])
|
||||
eval(['oo_.bvar.irf.Upper_bound.' variable_name '.' shock_name ' = posterior_up_conf_irfs(' int2str(j) ',' int2str(i) ',:);'])
|
||||
eval(['oo_.bvar.irf.Lower_bound.' variable_name '.' shock_name ' = posterior_down_conf_irfs(' int2str(j) ',' int2str(i) ',:);'])
|
||||
oo_.bvar.irf.Mean.(variable_name).(shock_name) = posterior_mean_irfs(j,i,:);
|
||||
oo_.bvar.irf.Median.(variable_name).(shock_name) = posterior_median_irfs(j,i,:);
|
||||
oo_.bvar.irf.Var.(variable_name).(shock_name) = posterior_variance_irfs(j,i,:);
|
||||
oo_.bvar.irf.Upper_bound.(variable_name).(shock_name) = posterior_up_conf_irfs(j,i,:);
|
||||
oo_.bvar.irf.Lower_bound.(variable_name).(shock_name) = posterior_down_conf_irfs(j,i,:);
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,5 +1,5 @@
|
|||
function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags)
|
||||
%function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags)
|
||||
function [ny, nx, posterior, prior, forecast_data] = toolbox(nlags)
|
||||
%function [ny, nx, posterior, prior, forecast_data] = toolbox(nlags)
|
||||
% bvar_toolbox Routines shared between BVAR methods
|
||||
% Computes several things for the estimations of a BVAR(nlags)
|
||||
%
|
||||
|
@ -42,7 +42,7 @@ function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags)
|
|||
% - bvar_prior_{tau,decay,lambda,mu,omega,flat,train}
|
||||
|
||||
% Copyright © 2003-2007 Christopher Sims
|
||||
% Copyright © 2007-2017 Dynare Team
|
||||
% Copyright © 2007-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
|
@ -1,5 +1,5 @@
|
|||
function [forcs, e] = mcforecast3(cL, H, mcValue, shocks, forcs, T, R, mv, mu)
|
||||
|
||||
function [forcs, e] = get_shock_paths(cL, H, mcValue, shocks, forcs, T, R, mv, mu)
|
||||
% [forcs, e] = get_shock_paths(cL, H, mcValue, shocks, forcs, T, R, mv, mu)
|
||||
% Computes the shock values for constrained forecasts necessary to keep
|
||||
% endogenous variables at their constrained paths
|
||||
%
|
|
@ -1,4 +1,5 @@
|
|||
function plot_icforecast(Variables,periods,options_,oo_)
|
||||
function plot(Variables,periods,options_,oo_)
|
||||
% plot(Variables,periods,options_,oo_)
|
||||
% Build plots for the conditional forecasts.
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -11,9 +12,9 @@ function plot_icforecast(Variables,periods,options_,oo_)
|
|||
% None.
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% This routine has to be called after imcforecast.m.
|
||||
% This routine has to be called after conditional_forecasts.run
|
||||
|
||||
% Copyright © 2006-2019 Dynare Team
|
||||
% Copyright © 2006-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -44,7 +45,7 @@ else
|
|||
end
|
||||
|
||||
if periods>forecast_periods
|
||||
fprintf('\nplot_icforecast:: Number of periods for plotting exceeds forecast horizon. Setting periods to %d.\n',forecast_periods-1)
|
||||
fprintf('\nconditional_forecasts.plot:: Number of periods for plotting exceeds forecast horizon. Setting periods to %d.\n',forecast_periods-1)
|
||||
periods=forecast_periods;
|
||||
end
|
||||
|
||||
|
@ -59,7 +60,7 @@ for i=1:length(Variables)
|
|||
end
|
||||
|
||||
function build_figure(name,cci1,cci2,mm1,mm2,options_,graphoptions)
|
||||
hh = dyn_figure(options_.nodisplay,'Name',['Conditional forecast (' graphoptions.title ,'): ' name '.']);
|
||||
hh_fig = dyn_figure(options_.nodisplay,'Name',['Conditional forecast (' graphoptions.title ,'): ' name '.']);
|
||||
H = length(mm1);
|
||||
h1 = area(1:H,cci1(2,1:H),'BaseValue',min([min(cci1(1,:)),min(cci2(1,:))]),'FaceColor',[.9 .9 .9]);
|
||||
hold on
|
||||
|
@ -70,4 +71,4 @@ plot(1:H,cci2(1,:),'--k','linewidth',1)
|
|||
plot(1:H,cci2(2,:),'--k','linewidth',1)
|
||||
axis tight
|
||||
hold off
|
||||
dyn_saveas(hh,[graphoptions.OutputDirectoryName '/Conditional_forecast_',strrep(deblank(graphoptions.title),' ','_'),'_',name],options_.nodisplay,options_.graph_format)
|
||||
dyn_saveas(hh_fig,[graphoptions.OutputDirectoryName '/Conditional_forecast_',strrep(deblank(graphoptions.title),' ','_'),'_',name],options_.nodisplay,options_.graph_format)
|
|
@ -1,11 +1,16 @@
|
|||
function imcforecast(constrained_paths, constrained_vars, options_cond_fcst)
|
||||
|
||||
function forecasts=run(M_,options_,oo_,bayestopt_,estim_params_,constrained_paths, constrained_vars, options_cond_fcst)
|
||||
% run(constrained_paths, constrained_vars, options_cond_fcst)
|
||||
% Computes conditional forecasts.
|
||||
%
|
||||
% INPUTS
|
||||
% - constrained_paths [double] m*p array, where m is the number of constrained endogenous variables and p is the number of constrained periods.
|
||||
% - constrained_vars [integer] m*1 array, indices in M_.endo_names of the constrained variables.
|
||||
% - options_cond_fcst [structure] containing the options. The fields are:
|
||||
% M_ [structure] describing the model
|
||||
% options_ [structure] describing the options
|
||||
% oo_: [structure] storing the results
|
||||
% bayestopt_ [structure] describing the priors
|
||||
% estim_params_ [structure] characterizing parameters to be estimated
|
||||
% - constrained_paths [double] m*p array, where m is the number of constrained endogenous variables and p is the number of constrained periods.
|
||||
% - constrained_vars [integer] m*1 array, indices in M_.endo_names of the constrained variables.
|
||||
% - options_cond_fcst [structure] containing the options. The fields are:
|
||||
%
|
||||
% + replic [integer] scalar, number of monte carlo simulations.
|
||||
% + parameter_set [char] values of the estimated parameters:
|
||||
|
@ -19,16 +24,16 @@ function imcforecast(constrained_paths, constrained_vars, options_cond_fcst)
|
|||
% + conf_sig [double] scalar in [0,1], probability mass covered by the confidence bands.
|
||||
%
|
||||
% OUTPUTS
|
||||
% None.
|
||||
% - forecasts [structure] results of the conditional forecast exercise
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% This routine has to be called after an estimation statement or an estimated_params block.
|
||||
%
|
||||
% REMARKS
|
||||
% [1] Results are stored in oo_.conditional_forecast.
|
||||
% [2] Use the function plot_icforecast to plot the results.
|
||||
% [2] Use the function conditional_forecasts.plot to plot the results.
|
||||
|
||||
% Copyright © 2006-2020 Dynare Team
|
||||
% Copyright © 2006-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -45,8 +50,6 @@ function imcforecast(constrained_paths, constrained_vars, options_cond_fcst)
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
global options_ oo_ M_ bayestopt_ estim_params_
|
||||
|
||||
if ~isfield(options_cond_fcst,'parameter_set') || isempty(options_cond_fcst.parameter_set)
|
||||
if isfield(oo_,'posterior_mode')
|
||||
options_cond_fcst.parameter_set = 'posterior_mode';
|
||||
|
@ -123,10 +126,9 @@ if estimated_model
|
|||
missing_value = dataset_info.missing.state;
|
||||
|
||||
%store qz_criterium
|
||||
qz_criterium_old=options_.qz_criterium;
|
||||
options_=select_qz_criterium_value(options_);
|
||||
options_smoothed_state_uncertainty_old = options_.smoothed_state_uncertainty;
|
||||
[atT, ~, ~, ~,ys, ~, ~, ~, ~, ~, ~, ~, ~, ~,M_,oo_,bayestopt_] = ...
|
||||
[atT, ~, ~, ~,ys, ~, ~, ~, ~, ~, ~, ~, ~, ~,oo_,bayestopt_] = ...
|
||||
DsgeSmoother(xparam, gend, data, data_index, missing_value, M_, oo_, options_, bayestopt_, estim_params_);
|
||||
options_.smoothed_state_uncertainty = options_smoothed_state_uncertainty_old;
|
||||
%get constant part
|
||||
|
@ -155,7 +157,6 @@ if estimated_model
|
|||
trend = constant(oo_.dr.order_var,:);
|
||||
InitState(:,1) = atT(:,end);
|
||||
else
|
||||
qz_criterium_old=options_.qz_criterium;
|
||||
if isempty(options_.qz_criterium)
|
||||
options_.qz_criterium = 1+1e-6;
|
||||
end
|
||||
|
@ -171,7 +172,7 @@ if options_.logged_steady_state %if steady state was previously logged, undo thi
|
|||
options_.logged_steady_state=0;
|
||||
end
|
||||
|
||||
[T, R, ys, ~, M_, oo_] = dynare_resolve(M_, options_, oo_);
|
||||
[T, R, ys, ~, oo_.dr,M_.params] = dynare_resolve(M_, options_, oo_.dr,oo_.steady_state,oo_.exo_steady_state,oo_.exo_det_steady_state);
|
||||
|
||||
if options_.loglinear && isfield(oo_.dr,'ys') && options_.logged_steady_state==0 %log steady state
|
||||
oo_.dr.ys=log_variable(1:M_.endo_nbr,oo_.dr.ys,M_);
|
||||
|
@ -246,7 +247,7 @@ FORCS1_shocks = zeros(n1,cL,options_cond_fcst.replic);
|
|||
for b=1:options_cond_fcst.replic %conditional forecast using cL set to constrained values
|
||||
shocks = sQ*randn(ExoSize,options_cond_fcst.periods);
|
||||
shocks(controlled_varexo,:) = zeros(n1, options_cond_fcst.periods);
|
||||
[FORCS1(:,:,b), FORCS1_shocks(:,:,b)] = mcforecast3(cL,options_cond_fcst.periods,constrained_paths,shocks,FORCS1(:,:,b),T,R,mv, mu);
|
||||
[FORCS1(:,:,b), FORCS1_shocks(:,:,b)] = conditional_forecasts.get_shock_paths(cL,options_cond_fcst.periods,constrained_paths,shocks,FORCS1(:,:,b),T,R,mv, mu);
|
||||
FORCS1(:,:,b)=FORCS1(:,:,b)+trend; %add trend
|
||||
end
|
||||
if max(max(max(abs(bsxfun(@minus,FORCS1(constrained_vars,1+1:1+cL,:),trend(constrained_vars,1:cL)+constrained_paths)))))>1e-4
|
||||
|
@ -292,7 +293,7 @@ FORCS2(:,1,:) = repmat(InitState,1,options_cond_fcst.replic); %set initial stead
|
|||
for b=1:options_cond_fcst.replic %conditional forecast using cL set to 0
|
||||
shocks = sQ*randn(ExoSize,options_cond_fcst.periods);
|
||||
shocks(controlled_varexo,:) = zeros(n1, options_cond_fcst.periods);
|
||||
FORCS2(:,:,b) = mcforecast3(0,options_cond_fcst.periods,constrained_paths,shocks,FORCS2(:,:,b),T,R,mv, mu)+trend;
|
||||
FORCS2(:,:,b) = conditional_forecasts.get_shock_paths(0,options_cond_fcst.periods,constrained_paths,shocks,FORCS2(:,:,b),T,R,mv, mu)+trend;
|
||||
end
|
||||
|
||||
mFORCS2 = mean(FORCS2,3);
|
||||
|
@ -307,8 +308,4 @@ for i = 1:EndoSize
|
|||
forecasts.uncond.ci.(M_.endo_names{oo_.dr.order_var(i)}) = [tmp(t1,:)' ,tmp(t2,:)' ]';
|
||||
end
|
||||
forecasts.graph.title = graph_title;
|
||||
forecasts.graph.fname = M_.fname;
|
||||
|
||||
%reset qz_criterium
|
||||
options_.qz_criterium=qz_criterium_old;
|
||||
oo_.conditional_forecast = forecasts;
|
||||
forecasts.graph.fname = M_.fname;
|
|
@ -28,7 +28,7 @@ function nls(eqname, params, data, range, optimizer, varargin)
|
|||
% equation must have NaN values in the object.
|
||||
% [4] It is assumed that the residual is additive.
|
||||
|
||||
% Copyright © 2021-2022 Dynare Team
|
||||
% Copyright © 2021-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -179,12 +179,6 @@ write_residuals_routine(lhs, rhs, eqname, ipnames_, M_);
|
|||
% Create a routine for evaluating the sum of squared residuals of the nonlinear model
|
||||
write_ssr_routine(lhs, rhs, eqname, ipnames_, M_);
|
||||
|
||||
% Workaround for Octave bug https://savannah.gnu.org/bugs/?46282
|
||||
% Octave will randomly fail to read the ssr_* file generated in the +folder
|
||||
if isoctave && octave_ver_less_than('7')
|
||||
path(path)
|
||||
end
|
||||
|
||||
% Create a function handle returning the sum of square residuals for a given vector of parameters.
|
||||
ssrfun = @(p) feval([M_.fname '.ssr_' eqname], p, DATA, M_, oo_);
|
||||
|
||||
|
@ -298,23 +292,23 @@ end
|
|||
%
|
||||
|
||||
if is_gauss_newton
|
||||
[params1, SSR, exitflag] = gauss_newton(resfun, params0);
|
||||
[params1, SSR] = gauss_newton(resfun, params0);
|
||||
elseif is_lsqnonlin
|
||||
if ismember('levenberg-marquardt', varargin)
|
||||
% Levenberg Marquardt does not handle boundary constraints.
|
||||
[params1, SSR, ~, exitflag] = lsqnonlin(resfun, params0, [], [], optimset(varargin{:}));
|
||||
[params1, SSR] = lsqnonlin(resfun, params0, [], [], optimset(varargin{:}));
|
||||
else
|
||||
[params1, SSR, ~, exitflag] = lsqnonlin(resfun, params0, bounds(:,1), bounds(:,2), optimset(varargin{:}));
|
||||
[params1, SSR] = lsqnonlin(resfun, params0, bounds(:,1), bounds(:,2), optimset(varargin{:}));
|
||||
end
|
||||
else
|
||||
% Estimate the parameters by minimizing the sum of squared residuals.
|
||||
[params1, SSR, exitflag] = dynare_minimize_objective(ssrfun, params0, ...
|
||||
minalgo, ...
|
||||
options_, ...
|
||||
bounds, ...
|
||||
parameter_names, ...
|
||||
[], ...
|
||||
[]);
|
||||
[params1, SSR] = dynare_minimize_objective(ssrfun, params0, ...
|
||||
minalgo, ...
|
||||
options_, ...
|
||||
bounds, ...
|
||||
parameter_names, ...
|
||||
[], ...
|
||||
[]);
|
||||
end
|
||||
|
||||
% Revert local modifications to the options.
|
||||
|
|
|
@ -6,20 +6,20 @@ function [SAmeas, OutMatrix] = Morris_Measure_Groups(NumFact, Sample, Output, p,
|
|||
% INPUTS
|
||||
% -------------------------------------------------------------------------
|
||||
% Group [NumFactor, NumGroups] := Matrix describing the groups.
|
||||
% Each column represents one group.
|
||||
% The element of each column are zero if the factor is not in the
|
||||
% group. Otherwise it is 1.
|
||||
% Each column represents one group.
|
||||
% The element of each column are zero if the factor is not in the
|
||||
% group. Otherwise it is 1.
|
||||
%
|
||||
% Sample := Matrix of the Morris sampled trajectories
|
||||
%
|
||||
% Output := Matrix of the output(s) values in correspondence of each point
|
||||
% of each trajectory
|
||||
% of each trajectory
|
||||
%
|
||||
% k = Number of factors
|
||||
% -------------------------------------------------------------------------
|
||||
% OUTPUTS
|
||||
% OutMatrix (NumFactor*NumOutputs, 3)= [Mu*, Mu, StDev]
|
||||
% for each output it gives the three measures of each factor
|
||||
% for each output it gives the three measures of each factor
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Written by Jessica Cariboni and Francesca Campolongo
|
||||
|
@ -27,7 +27,7 @@ function [SAmeas, OutMatrix] = Morris_Measure_Groups(NumFact, Sample, Output, p,
|
|||
%
|
||||
|
||||
% Copyright © 2005 European Commission
|
||||
% Copyright © 2012-2017 Dynare Team
|
||||
% Copyright © 2012-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -50,32 +50,34 @@ if nargin==0
|
|||
return
|
||||
end
|
||||
|
||||
OutMatrix=[];
|
||||
if nargin < 5, Group=[]; end
|
||||
|
||||
NumGroups = size(Group,2);
|
||||
if nargin < 4 | isempty(p)
|
||||
|
||||
if nargin < 4 || isempty(p)
|
||||
p = 4;
|
||||
end
|
||||
Delt = p/(2*p-2);
|
||||
|
||||
if NumGroups ~ 0
|
||||
if NumGroups ~= 0
|
||||
sizea = NumGroups; % Number of groups
|
||||
GroupMat=Group;
|
||||
GroupMat = GroupMat';
|
||||
else
|
||||
sizea = NumFact;
|
||||
end
|
||||
|
||||
r=size(Sample,1)/(sizea+1); % Number of trajectories
|
||||
if NumGroups > 0
|
||||
OutMatrix = NaN(sizea*size(Output,2),1);
|
||||
else
|
||||
OutMatrix = NaN(sizea*size(Output,2),3);
|
||||
end
|
||||
|
||||
% For Each Output
|
||||
for k=1:size(Output,2)
|
||||
|
||||
OutValues=Output(:,k);
|
||||
|
||||
% For each r trajectory
|
||||
for i=1:r
|
||||
|
||||
% For each step j in the trajectory
|
||||
% Read the orientation matrix fact for the r-th sampling
|
||||
% Read the corresponding output values
|
||||
|
@ -86,13 +88,11 @@ for k=1:size(Output,2)
|
|||
|
||||
% For each point of the fixed trajectory compute the values of the Morris function. The function
|
||||
% is partitioned in four parts, from order zero to order 4th.
|
||||
% SAmeas=NaN();
|
||||
for j=1:sizea % For each point in the trajectory i.e for each factor
|
||||
% matrix of factor which changes
|
||||
if NumGroups ~ 0
|
||||
if NumGroups ~= 0
|
||||
AuxFind (:,1) = A(:,j);
|
||||
% AuxFind(find(A(:,j)),1)=1;
|
||||
% Pippo = sum((Group - repmat(AuxFind,1,NumGroups)),1);
|
||||
% Change_factor(j,i) = find(Pippo==0);
|
||||
Change_factor = find(abs(AuxFind)>1e-010);
|
||||
% If we deal with groups we can only estimate the new mu*
|
||||
% measure since factors in the same groups can move in
|
||||
|
@ -100,7 +100,6 @@ for k=1:size(Output,2)
|
|||
% Morris mu cannopt be applied.
|
||||
% In the new version the elementary effect is defined with
|
||||
% the absolute value.
|
||||
%SAmeas(find(GroupMat(Change_factor(j,i),:)),i) = abs((Single_OutValues(j) - Single_OutValues(j+1) )/Delt); %(2/3));
|
||||
SAmeas(i,Change_factor') = abs((Single_OutValues(j) - Single_OutValues(j+1) )/Delt);
|
||||
else
|
||||
Change_factor(j,i) = find(Single_Sample(j+1,:)-Single_Sample(j,:));
|
||||
|
@ -116,12 +115,17 @@ for k=1:size(Output,2)
|
|||
|
||||
end %for i=1:r
|
||||
|
||||
if NumGroups ~ 0
|
||||
if NumGroups ~= 0
|
||||
SAmeas = SAmeas';
|
||||
end
|
||||
|
||||
% Compute Mu AbsMu and StDev
|
||||
if any(any(isnan(SAmeas)))
|
||||
AbsMu=NaN(NumFact,1);
|
||||
if NumGroups == 0
|
||||
Mu=NaN(NumFact,1);
|
||||
StDev=NaN(NumFact,1);
|
||||
end
|
||||
for j=1:NumFact
|
||||
SAm = SAmeas(j,:);
|
||||
SAm = SAm(find(~isnan(SAm)));
|
||||
|
@ -143,8 +147,8 @@ for k=1:size(Output,2)
|
|||
% Define the output Matrix - if we have groups we cannot define the old
|
||||
% measure mu, only mu* makes sense
|
||||
if NumGroups > 0
|
||||
OutMatrix = [OutMatrix; AbsMu];
|
||||
OutMatrix((k-1)*sizea+1:k*sizea,:) = AbsMu;
|
||||
else
|
||||
OutMatrix = [OutMatrix; AbsMu, Mu, StDev];
|
||||
OutMatrix((k-1)*sizea+1:k*sizea,:) = [AbsMu, Mu, StDev];
|
||||
end
|
||||
end % For Each Output
|
|
@ -1,6 +1,7 @@
|
|||
function [Outmatrix, OutFact] = Sampling_Function_2(p, k, r, UB, LB, GroupMat)
|
||||
%[Outmatrix, OutFact] = Sampling_Function_2(p, k, r, UB, LB, GroupMat)
|
||||
% Inputs: k (1,1) := number of factors examined or number of groups examined.
|
||||
% Inputs:
|
||||
% k (1,1) := number of factors examined or number of groups examined.
|
||||
% In case the groups are chosen the number of factors is stores in NumFact and
|
||||
% sizea becomes the number of created groups.
|
||||
% NumFact (1,1) := number of factors examined in the case when groups are chosen
|
||||
|
@ -13,7 +14,7 @@ function [Outmatrix, OutFact] = Sampling_Function_2(p, k, r, UB, LB, GroupMat)
|
|||
% are set to 1 in correspondence of the factors that belong to the fixed group. All
|
||||
% the other elements are zero.
|
||||
% Local Variables:
|
||||
% sizeb (1,1) := sizea+1
|
||||
% sizeb (1,1) := sizea+1
|
||||
% sizec (1,1) := 1
|
||||
% randmult (sizea,1) := vector of random +1 and -1
|
||||
% perm_e(1,sizea) := vector of sizea random permutated indeces
|
||||
|
@ -34,7 +35,8 @@ function [Outmatrix, OutFact] = Sampling_Function_2(p, k, r, UB, LB, GroupMat)
|
|||
% AuxMat(sizeb,sizea) := Delta*0.5*((2*B - A) * DD0 + A) in Morris, 1991. The AuxMat is used as in Morris design
|
||||
% for single factor analysis, while it constitutes an intermediate step for the group analysis.
|
||||
%
|
||||
% Output: Outmatrix(sizeb*r, sizea) := for the entire sample size computed In(i,j) matrices
|
||||
% Outputs:
|
||||
% Outmatrix(sizeb*r, sizea) := for the entire sample size computed In(i,j) matrices
|
||||
% OutFact(sizea*r,1) := for the entire sample size computed Fact(i,1) vectors
|
||||
%
|
||||
% Note: B0 is constructed as in Morris design when groups are not considered. When groups are considered the routine
|
||||
|
@ -56,7 +58,7 @@ function [Outmatrix, OutFact] = Sampling_Function_2(p, k, r, UB, LB, GroupMat)
|
|||
%
|
||||
|
||||
% Copyright © 2005 European Commission
|
||||
% Copyright © 2012-2017 Dynare Team
|
||||
% Copyright © 2012-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -80,25 +82,23 @@ Delta = p/(2*p-2);
|
|||
NumFact = sizea;
|
||||
GroupNumber = size(GroupMat,2);
|
||||
|
||||
if GroupNumber ~ 0;
|
||||
if GroupNumber ~= 0
|
||||
sizea = size(GroupMat,2);
|
||||
end
|
||||
|
||||
sizeb = sizea + 1;
|
||||
sizec = 1;
|
||||
Outmatrix = [];
|
||||
OutFact = [];
|
||||
|
||||
% For each i generate a trajectory
|
||||
for i=1:r
|
||||
|
||||
% Construct DD0 - OLD VERSION - it does not need communication toolbox
|
||||
% RAND(N,M) is an NXM matrix with random entries, chosen from a uniform distribution on the interval (0.0,1.0).
|
||||
% Note that DD0 tells if the factor have to be increased or ddecreased
|
||||
% by Delta.
|
||||
randmult = ones(k,1);
|
||||
v = rand(k,1);
|
||||
randmult (find(v < 0.5))=-1;
|
||||
randmult (v < 0.5)=-1;
|
||||
randmult = repmat(randmult,1,k);
|
||||
DD0 = randmult .* eye(k);
|
||||
|
||||
|
@ -133,7 +133,7 @@ for i=1:r
|
|||
|
||||
% When groups are present the random permutation is done only on B. The effect is the same since
|
||||
% the added part (A0*x0') is completely random.
|
||||
if GroupNumber ~ 0
|
||||
if GroupNumber ~= 0
|
||||
B = B * (GroupMat*P0')';
|
||||
end
|
||||
|
||||
|
@ -147,7 +147,7 @@ for i=1:r
|
|||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% a --> Define the random vector x0 for the factors. Note that x0 takes value in the hypercube
|
||||
% [0,...,1-Delta]*[0,...,1-Delta]*[0,...,1-Delta]*[0,...,1-Delta]
|
||||
MyInt = repmat([0:(1/(p-1)):(1-Delta)],NumFact,1); % Construct all possible values of the factors
|
||||
MyInt = repmat(0:(1/(p-1)):(1-Delta),NumFact,1); % Construct all possible values of the factors
|
||||
|
||||
% OLD VERSION - it needs communication toolbox
|
||||
% w = randint(NumFact,1,[1,size(MyInt,2)]);
|
||||
|
@ -158,9 +158,9 @@ for i=1:r
|
|||
% 3) check in which interval the random numbers fall
|
||||
% 4) generate the corresponding integer
|
||||
v = repmat(rand(NumFact,1),1,size(MyInt,2)+1); % 1)
|
||||
IntUsed = repmat([0:1/size(MyInt,2):1],NumFact,1); % 2)
|
||||
IntUsed = repmat(0:1/size(MyInt,2):1,NumFact,1); % 2)
|
||||
DiffAuxVec = IntUsed - v; % 3)
|
||||
|
||||
w=NaN(1,size(DiffAuxVec,1));
|
||||
for ii = 1:size(DiffAuxVec,1)
|
||||
w(1,ii) = max(find(DiffAuxVec(ii,:)<0)); % 4)
|
||||
end
|
||||
|
@ -168,7 +168,7 @@ for i=1:r
|
|||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% b --> Compute the matrix B*, here indicated as B0. Each row in B0 is a
|
||||
% trajectory for Morris Calculations. The dimension of B0 is (Numfactors+1,Numfactors)
|
||||
if GroupNumber ~ 0
|
||||
if GroupNumber ~= 0
|
||||
B0 = (A0*x0' + AuxMat);
|
||||
else
|
||||
B0 = (A0*x0' + AuxMat)*P0;
|
||||
|
@ -183,6 +183,7 @@ for i=1:r
|
|||
|
||||
% Create the Factor vector. Each component of this vector indicate which factor or group of factor
|
||||
% has been changed in each step of the trajectory.
|
||||
Fact=NaN(1,sizea);
|
||||
for j=1:sizea
|
||||
Fact(1,j) = find(P0(j,:));
|
||||
end
|
||||
|
@ -190,5 +191,4 @@ for i=1:r
|
|||
|
||||
Outmatrix = [Outmatrix; In];
|
||||
OutFact = [OutFact; Fact'];
|
||||
|
||||
end
|
|
@ -1,10 +1,8 @@
|
|||
function sout = boxplot (data,notched,symbol,vertical,maxwhisker)
|
||||
% sout = boxplot (data,notched,symbol,vertical,maxwhisker)
|
||||
% Creates a box plot
|
||||
|
||||
function sout = myboxplot (data,notched,symbol,vertical,maxwhisker)
|
||||
|
||||
% sout = myboxplot (data,notched,symbol,vertical,maxwhisker)
|
||||
|
||||
%
|
||||
% Copyright © 2010-2017 Dynare Team
|
||||
% Copyright © 2010-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -21,7 +19,6 @@ function sout = myboxplot (data,notched,symbol,vertical,maxwhisker)
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% % % % endif
|
||||
if nargin < 5 || isempty(maxwhisker), maxwhisker = 1.5; end
|
||||
if nargin < 4 || isempty(vertical), vertical = 1; end
|
||||
if nargin < 3 || isempty(symbol), symbol = ['+','o']; end
|
||||
|
@ -32,7 +29,7 @@ if length(symbol)==1, symbol(2)=symbol(1); end
|
|||
if notched==1, notched=0.25; end
|
||||
a=1-notched;
|
||||
|
||||
% ## figure out how many data sets we have
|
||||
% % figure out how many data sets we have
|
||||
if iscell(data)
|
||||
nc = length(data);
|
||||
else
|
||||
|
@ -40,11 +37,11 @@ else
|
|||
nc = size(data,2);
|
||||
end
|
||||
|
||||
% ## compute statistics
|
||||
% ## s will contain
|
||||
% ## 1,5 min and max
|
||||
% ## 2,3,4 1st, 2nd and 3rd quartile
|
||||
% ## 6,7 lower and upper confidence intervals for median
|
||||
% compute statistics
|
||||
% s will contain
|
||||
% 1,5 min and max
|
||||
% 2,3,4 1st, 2nd and 3rd quartile
|
||||
% 6,7 lower and upper confidence intervals for median
|
||||
s = zeros(7,nc);
|
||||
box = zeros(1,nc);
|
||||
whisker_x = ones(2,1)*[1:nc,1:nc];
|
||||
|
@ -55,44 +52,36 @@ outliers2_x = [];
|
|||
outliers2_y = [];
|
||||
|
||||
for i=1:nc
|
||||
% ## Get the next data set from the array or cell array
|
||||
% Get the next data set from the array or cell array
|
||||
if iscell(data)
|
||||
col = data{i}(:);
|
||||
else
|
||||
col = data(:,i);
|
||||
end
|
||||
% ## Skip missing data
|
||||
% Skip missing data
|
||||
% % % % % % % col(isnan(col) | isna (col)) = [];
|
||||
col(isnan(col)) = [];
|
||||
|
||||
% ## Remember the data length
|
||||
% Remember the data length
|
||||
nd = length(col);
|
||||
box(i) = nd;
|
||||
if (nd > 1)
|
||||
% ## min,max and quartiles
|
||||
% s(1:5,i) = statistics(col)(1:5);
|
||||
% min,max and quartiles
|
||||
s(1,i)=min(col);
|
||||
s(5,i)=max(col);
|
||||
s(2,i)=myprctilecol(col,25);
|
||||
s(3,i)=myprctilecol(col,50);
|
||||
s(4,i)=myprctilecol(col,75);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
% ## confidence interval for the median
|
||||
% confidence interval for the median
|
||||
est = 1.57*(s(4,i)-s(2,i))/sqrt(nd);
|
||||
s(6,i) = max([s(3,i)-est, s(2,i)]);
|
||||
s(7,i) = min([s(3,i)+est, s(4,i)]);
|
||||
% ## whiskers out to the last point within the desired inter-quartile range
|
||||
% whiskers out to the last point within the desired inter-quartile range
|
||||
IQR = maxwhisker*(s(4,i)-s(2,i));
|
||||
whisker_y(:,i) = [min(col(col >= s(2,i)-IQR)); s(2,i)];
|
||||
whisker_y(:,nc+i) = [max(col(col <= s(4,i)+IQR)); s(4,i)];
|
||||
% ## outliers beyond 1 and 2 inter-quartile ranges
|
||||
% outliers beyond 1 and 2 inter-quartile ranges
|
||||
outliers = col((col < s(2,i)-IQR & col >= s(2,i)-2*IQR) | (col > s(4,i)+IQR & col <= s(4,i)+2*IQR));
|
||||
outliers2 = col(col < s(2,i)-2*IQR | col > s(4,i)+2*IQR);
|
||||
outliers_x = [outliers_x; i*ones(size(outliers))];
|
||||
|
@ -100,41 +89,37 @@ for i=1:nc
|
|||
outliers2_x = [outliers2_x; i*ones(size(outliers2))];
|
||||
outliers2_y = [outliers2_y; outliers2];
|
||||
elseif (nd == 1)
|
||||
% ## all statistics collapse to the value of the point
|
||||
% all statistics collapse to the value of the point
|
||||
s(:,i) = col;
|
||||
% ## single point data sets are plotted as outliers.
|
||||
% single point data sets are plotted as outliers.
|
||||
outliers_x = [outliers_x; i];
|
||||
outliers_y = [outliers_y; col];
|
||||
else
|
||||
% ## no statistics if no points
|
||||
% no statistics if no points
|
||||
s(:,i) = NaN;
|
||||
end
|
||||
end
|
||||
% % % % if isempty(outliers2_y)
|
||||
% % % % outliers2_y=
|
||||
% ## Note which boxes don't have enough stats
|
||||
% Note which boxes don't have enough stats
|
||||
chop = find(box <= 1);
|
||||
|
||||
% ## Draw a box around the quartiles, with width proportional to the number of
|
||||
% ## items in the box. Draw notches if desired.
|
||||
% Draw a box around the quartiles, with width proportional to the number of
|
||||
% items in the box. Draw notches if desired.
|
||||
box = box*0.23/max(box);
|
||||
quartile_x = ones(11,1)*[1:nc] + [-a;-1;-1;1;1;a;1;1;-1;-1;-a]*box;
|
||||
quartile_y = s([3,7,4,4,7,3,6,2,2,6,3],:);
|
||||
|
||||
% ## Draw a line through the median
|
||||
% Draw a line through the median
|
||||
median_x = ones(2,1)*[1:nc] + [-a;+a]*box;
|
||||
% median_x=median(col);
|
||||
median_y = s([3,3],:);
|
||||
|
||||
% ## Chop all boxes which don't have enough stats
|
||||
% Chop all boxes which don't have enough stats
|
||||
quartile_x(:,chop) = [];
|
||||
quartile_y(:,chop) = [];
|
||||
whisker_x(:,[chop,chop+nc]) = [];
|
||||
whisker_y(:,[chop,chop+nc]) = [];
|
||||
median_x(:,chop) = [];
|
||||
median_y(:,chop) = [];
|
||||
% % % %
|
||||
% ## Add caps to the remaining whiskers
|
||||
% Add caps to the remaining whiskers
|
||||
cap_x = whisker_x;
|
||||
cap_x(1,:) =cap_x(1,:)- 0.05;
|
||||
cap_x(2,:) =cap_x(2,:)+ 0.05;
|
||||
|
@ -144,12 +129,14 @@ cap_y = whisker_y([1,1],:);
|
|||
% #whisker_x,whisker_y
|
||||
% #median_x,median_y
|
||||
% #cap_x,cap_y
|
||||
%
|
||||
% ## Do the plot
|
||||
|
||||
% Do the plot
|
||||
mm=min(min(data));
|
||||
MM=max(max(data));
|
||||
if isnan(mm), mm=0; MM=0; end
|
||||
if isnan(mm)
|
||||
mm=0;
|
||||
MM=0;
|
||||
end
|
||||
|
||||
if vertical
|
||||
plot (quartile_x, quartile_y, 'b', ...
|
||||
|
@ -161,17 +148,30 @@ if vertical
|
|||
set(gca,'XTick',1:nc);
|
||||
set(gca, 'XLim', [0.5, nc+0.5]);
|
||||
set(gca, 'YLim', [mm-(MM-mm)*0.05-eps, MM+(MM-mm)*0.05+eps]);
|
||||
|
||||
else
|
||||
% % % % % plot (quartile_y, quartile_x, "b;;",
|
||||
% % % % % whisker_y, whisker_x, "b;;",
|
||||
% % % % % cap_y, cap_x, "b;;",
|
||||
% % % % % median_y, median_x, "r;;",
|
||||
% % % % % outliers_y, outliers_x, [symbol(1),"r;;"],
|
||||
% % % % % outliers2_y, outliers2_x, [symbol(2),"r;;"]);
|
||||
end
|
||||
|
||||
if nargout
|
||||
sout=s;
|
||||
end
|
||||
% % % endfunction
|
||||
|
||||
function y = myprctilecol(x,p)
|
||||
|
||||
xx = sort(x);
|
||||
[m,n] = size(x);
|
||||
|
||||
if m==1 | n==1
|
||||
m = max(m,n);
|
||||
if m == 1
|
||||
y = x*ones(length(p),1);
|
||||
return
|
||||
end
|
||||
n = 1;
|
||||
q = 100*(0.5:m - 0.5)./m;
|
||||
xx = [min(x); xx(:); max(x)];
|
||||
else
|
||||
q = 100*(0.5:m - 0.5)./m;
|
||||
xx = [min(x); xx; max(x)];
|
||||
end
|
||||
|
||||
q = [0 q 100];
|
||||
y = interp1(q,xx,p);
|
|
@ -1,5 +1,10 @@
|
|||
function h = cumplot(x)
|
||||
%function h =cumplot(x)
|
||||
% Inputs:
|
||||
% - x [double] data series
|
||||
%
|
||||
% Outputs:
|
||||
% - h [handle] figure handle
|
||||
|
||||
% Written by Marco Ratto
|
||||
% Joint Research Centre, The European Commission,
|
||||
|
@ -26,9 +31,5 @@ function h = cumplot(x)
|
|||
n=length(x);
|
||||
x=[-inf; sort(x); Inf];
|
||||
y=[0:n n]./n;
|
||||
h0 = stairs(x,y);
|
||||
grid on,
|
||||
|
||||
if nargout
|
||||
h=h0;
|
||||
end
|
||||
h = stairs(x,y);
|
||||
grid on
|
|
@ -1,4 +1,29 @@
|
|||
function [yy, xdir, isig, lam]=log_trans_(y0,xdir0,isig,lam)
|
||||
function [yy, xdir, isig, lam]=log_transform(y0,xdir0,isig,lam)
|
||||
% [yy, xdir, isig, lam]=log_transform(y0,xdir0,isig,lam)
|
||||
% Conduct automatic log transformation lam(yy/isig+lam)
|
||||
% Inputs:
|
||||
% - y0 [double] series to transform
|
||||
% - xdir [char] string indating the type of transformation:
|
||||
% - log: standard log transformation
|
||||
% - minuslog: log of minus (y0)
|
||||
% - logsquared: log of y0^2
|
||||
% - logskew: log of y0 shifted by lam
|
||||
% - isig [double] scaling factor for y0
|
||||
% - lam [double] shifting for y0
|
||||
%
|
||||
% Outputs:
|
||||
% - yy [double] transformed series
|
||||
% - xdir [char] string indating the type of transformation:
|
||||
% - log: standard log transformation
|
||||
% - minuslog: log of minus (y0)
|
||||
% - logsquared: log of y0^2
|
||||
% - logskew: log of y0 shifted by lam
|
||||
% - isig [double] scaling factor for y0
|
||||
% - lam [double] shifting for y0
|
||||
%
|
||||
% Notes: takes either one or four arguments. For one argument, the log
|
||||
% transformation is conducted. For four arguments, the inverse
|
||||
% transformation is applied.
|
||||
|
||||
% Written by Marco Ratto
|
||||
% Joint Research Centre, The European Commission,
|
||||
|
@ -31,14 +56,18 @@ end
|
|||
if nargin==1
|
||||
xdir0='';
|
||||
end
|
||||
f=@(lam,y)gsa_skewness(log(y+lam));
|
||||
f=@(lam,y)gsa.skewness(log(y+lam));
|
||||
isig=1;
|
||||
if ~(max(y0)<0 | min(y0)>0)
|
||||
if gsa_skewness(y0)<0,
|
||||
if ~(max(y0)<0 || min(y0)>0)
|
||||
if gsa.skewness(y0)<0
|
||||
isig=-1;
|
||||
y0=-y0;
|
||||
end
|
||||
n=hist(y0,10);
|
||||
if isoctave
|
||||
n=hist(y0,10);
|
||||
else
|
||||
n=histcounts(y0,10);
|
||||
end
|
||||
if n(1)>20*n(end)
|
||||
try
|
||||
lam=fzero(f,[-min(y0)+10*eps -min(y0)+abs(median(y0))],[],y0);
|
||||
|
@ -48,7 +77,7 @@ if ~(max(y0)<0 | min(y0)>0)
|
|||
if abs(yl(1))<abs(yl(2))
|
||||
lam=-min(y0)+eps;
|
||||
else
|
||||
lam = -min(y0)+abs(median(y0)); %abs(100*(1+min(y0)));
|
||||
lam = -min(y0)+abs(median(y0));
|
||||
end
|
||||
end
|
||||
yy = log(y0+lam);
|
||||
|
@ -63,10 +92,8 @@ else
|
|||
if max(y0)<0
|
||||
isig=-1;
|
||||
y0=-y0;
|
||||
%yy=log(-y0);
|
||||
xdir=[xdir0,'_minuslog'];
|
||||
elseif min(y0)>0
|
||||
%yy=log(y0);
|
||||
xdir=[xdir0,'_log'];
|
||||
end
|
||||
try
|
||||
|
@ -77,7 +104,7 @@ else
|
|||
if abs(yl(1))<abs(yl(2))
|
||||
lam=-min(y0)+eps;
|
||||
else
|
||||
lam = -min(y0)+abs(median(y0)); %abs(100*(1+min(y0)));
|
||||
lam = -min(y0)+abs(median(y0));
|
||||
end
|
||||
end
|
||||
lam = max(lam,0);
|
|
@ -1,11 +1,19 @@
|
|||
function map_calibration(OutputDirectoryName, Model, DynareOptions, DynareResults, EstimatedParameters, BayesInfo)
|
||||
|
||||
function map_calibration(OutputDirectoryName, M_, options_, oo_, estim_params_, bayestopt_)
|
||||
% map_calibration(OutputDirectoryName, M_, options_, oo_, estim_params_, bayestopt_)
|
||||
% Inputs:
|
||||
% - OutputDirectoryName [string] name of the output directory
|
||||
% - M_ [structure] describing the model
|
||||
% - options_ [structure] describing the options
|
||||
% - oo_ [structure] storing the results
|
||||
% - estim_params_ [structure] characterizing parameters to be estimated
|
||||
% - bayestopt_ [structure] describing the priors
|
||||
%
|
||||
% Written by Marco Ratto
|
||||
% Joint Research Centre, The European Commission,
|
||||
% marco.ratto@ec.europa.eu
|
||||
|
||||
% Copyright © 2014-2016 European Commission
|
||||
% Copyright © 2014-2018 Dynare Team
|
||||
% Copyright © 2014-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -22,33 +30,32 @@ function map_calibration(OutputDirectoryName, Model, DynareOptions, DynareResult
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
fname_ = Model.fname;
|
||||
fname_ = M_.fname;
|
||||
|
||||
np = EstimatedParameters.np;
|
||||
nshock = EstimatedParameters.nvx + EstimatedParameters.nvn + EstimatedParameters.ncx + EstimatedParameters.ncn;
|
||||
np = estim_params_.np;
|
||||
nshock = estim_params_.nvx + estim_params_.nvn + estim_params_.ncx + estim_params_.ncn;
|
||||
pnames=cell(np,1);
|
||||
pnames_tex=cell(np,1);
|
||||
for jj=1:np
|
||||
if DynareOptions.TeX
|
||||
[param_name_temp, param_name_tex_temp]= get_the_name(nshock+jj, DynareOptions.TeX, Model, EstimatedParameters, DynareOptions);
|
||||
pnames_tex{jj,1} = strrep(param_name_tex_temp,'$','');
|
||||
if options_.TeX
|
||||
[param_name_temp, param_name_tex_temp]= get_the_name(nshock+jj, options_.TeX, M_, estim_params_, options_.varobs);
|
||||
pnames_tex{jj,1} = param_name_tex_temp;
|
||||
pnames{jj,1} = param_name_temp;
|
||||
else
|
||||
param_name_temp = get_the_name(nshock+jj, DynareOptions.TeX, Model, EstimatedParameters, DynareOptions);
|
||||
param_name_temp = get_the_name(nshock+jj, options_.TeX, M_, estim_params_, options_.varobs);
|
||||
pnames{jj,1} = param_name_temp;
|
||||
end
|
||||
end
|
||||
|
||||
pvalue_ks = DynareOptions.opt_gsa.pvalue_ks;
|
||||
indx_irf = [];
|
||||
indx_moment = [];
|
||||
init = ~DynareOptions.opt_gsa.load_stab;
|
||||
init = ~options_.opt_gsa.load_stab;
|
||||
|
||||
options_mcf.pvalue_ks = DynareOptions.opt_gsa.pvalue_ks;
|
||||
options_mcf.pvalue_corr = DynareOptions.opt_gsa.pvalue_corr;
|
||||
options_mcf.alpha2 = DynareOptions.opt_gsa.alpha2_stab;
|
||||
options_mcf.pvalue_ks = options_.opt_gsa.pvalue_ks;
|
||||
options_mcf.pvalue_corr = options_.opt_gsa.pvalue_corr;
|
||||
options_mcf.alpha2 = options_.opt_gsa.alpha2_stab;
|
||||
options_mcf.param_names = pnames;
|
||||
if DynareOptions.TeX
|
||||
if options_.TeX
|
||||
options_mcf.param_names_tex = pnames_tex;
|
||||
end
|
||||
options_mcf.fname_ = fname_;
|
||||
|
@ -57,24 +64,24 @@ options_mcf.OutputDirectoryName = OutputDirectoryName;
|
|||
skipline()
|
||||
disp('Sensitivity analysis for calibration criteria')
|
||||
|
||||
if DynareOptions.opt_gsa.ppost
|
||||
filetoload=dir([Model.dname filesep 'metropolis' filesep fname_ '_param_irf*.mat']);
|
||||
if options_.opt_gsa.ppost
|
||||
filetoload=dir([M_.dname filesep 'metropolis' filesep fname_ '_param_irf*.mat']);
|
||||
lpmat=[];
|
||||
for j=1:length(filetoload)
|
||||
load([Model.dname filesep 'metropolis' filesep fname_ '_param_irf',int2str(j),'.mat'])
|
||||
load([M_.dname filesep 'metropolis' filesep fname_ '_param_irf',int2str(j),'.mat'],'stock')
|
||||
lpmat = [lpmat; stock];
|
||||
clear stock
|
||||
end
|
||||
type = 'post';
|
||||
else
|
||||
if DynareOptions.opt_gsa.pprior
|
||||
if options_.opt_gsa.pprior
|
||||
filetoload=[OutputDirectoryName '/' fname_ '_prior'];
|
||||
load(filetoload,'lpmat','lpmat0','istable','iunstable','iindeterm','iwrong' ,'infox')
|
||||
load(filetoload,'lpmat','lpmat0')
|
||||
lpmat = [lpmat0 lpmat];
|
||||
type = 'prior';
|
||||
else
|
||||
filetoload=[OutputDirectoryName '/' fname_ '_mc'];
|
||||
load(filetoload,'lpmat','lpmat0','istable','iunstable','iindeterm','iwrong' ,'infox')
|
||||
load(filetoload,'lpmat','lpmat0')
|
||||
lpmat = [lpmat0 lpmat];
|
||||
type = 'mc';
|
||||
end
|
||||
|
@ -83,31 +90,31 @@ end
|
|||
npar = size(pnames,1);
|
||||
nshock = np - npar;
|
||||
|
||||
nbr_irf_restrictions = size(DynareOptions.endogenous_prior_restrictions.irf,1);
|
||||
nbr_moment_restrictions = size(DynareOptions.endogenous_prior_restrictions.moment,1);
|
||||
nbr_irf_restrictions = size(options_.endogenous_prior_restrictions.irf,1);
|
||||
nbr_moment_restrictions = size(options_.endogenous_prior_restrictions.moment,1);
|
||||
|
||||
if init
|
||||
mat_irf=cell(nbr_irf_restrictions,1);
|
||||
for ij=1:nbr_irf_restrictions
|
||||
mat_irf{ij}=NaN(Nsam,length(DynareOptions.endogenous_prior_restrictions.irf{ij,3}));
|
||||
mat_irf{ij}=NaN(Nsam,length(options_.endogenous_prior_restrictions.irf{ij,3}));
|
||||
end
|
||||
|
||||
mat_moment=cell(nbr_moment_restrictions,1);
|
||||
for ij=1:nbr_moment_restrictions
|
||||
mat_moment{ij}=NaN(Nsam,length(DynareOptions.endogenous_prior_restrictions.moment{ij,3}));
|
||||
mat_moment{ij}=NaN(Nsam,length(options_.endogenous_prior_restrictions.moment{ij,3}));
|
||||
end
|
||||
|
||||
irestrictions = [1:Nsam];
|
||||
irestrictions = 1:Nsam;
|
||||
h = dyn_waitbar(0,'Please wait...');
|
||||
for j=1:Nsam
|
||||
Model = set_all_parameters(lpmat(j,:)',EstimatedParameters,Model);
|
||||
M_ = set_all_parameters(lpmat(j,:)',estim_params_,M_);
|
||||
if nbr_moment_restrictions
|
||||
[Tt,Rr,SteadyState,info,Model,DynareResults] = dynare_resolve(Model,DynareOptions,DynareResults);
|
||||
[Tt,Rr,~,info,oo_.dr, M_.params] = dynare_resolve(M_,options_,oo_.dr, oo_.steady_state, oo_.exo_steady_state, oo_.exo_det_steady_state);
|
||||
else
|
||||
[Tt,Rr,SteadyState,info,Model,DynareResults] = dynare_resolve(Model,DynareOptions,DynareResults,'restrict');
|
||||
[Tt,Rr,~,info,oo_.dr, M_.params] = dynare_resolve(M_,options_,oo_.dr, oo_.steady_state, oo_.exo_steady_state, oo_.exo_det_steady_state,'restrict');
|
||||
end
|
||||
if info(1)==0
|
||||
[info, info_irf, info_moment, data_irf, data_moment]=endogenous_prior_restrictions(Tt,Rr,Model,DynareOptions,DynareResults);
|
||||
[~, info_irf, info_moment, data_irf, data_moment]=endogenous_prior_restrictions(Tt,Rr,M_,options_,oo_.dr,oo_.steady_state,oo_.exo_steady_state,oo_.exo_det_steady_state);
|
||||
if ~isempty(info_irf)
|
||||
for ij=1:nbr_irf_restrictions
|
||||
mat_irf{ij}(j,:)=data_irf{ij}(:,2)';
|
||||
|
@ -123,14 +130,16 @@ if init
|
|||
else
|
||||
irestrictions(j)=0;
|
||||
end
|
||||
dyn_waitbar(j/Nsam,h,['MC iteration ',int2str(j),'/',int2str(Nsam)])
|
||||
if mod(j,3)==0
|
||||
dyn_waitbar(j/Nsam,h,['MC iteration ',int2str(j),'/',int2str(Nsam)])
|
||||
end
|
||||
end
|
||||
dyn_waitbar_close(h);
|
||||
|
||||
irestrictions=irestrictions(find(irestrictions));
|
||||
xmat=lpmat(irestrictions,:);
|
||||
skipline()
|
||||
endo_prior_restrictions=DynareOptions.endogenous_prior_restrictions;
|
||||
endo_prior_restrictions=options_.endogenous_prior_restrictions;
|
||||
save([OutputDirectoryName,filesep,fname_,'_',type,'_restrictions'],'xmat','mat_irf','mat_moment','irestrictions','indx_irf','indx_moment','endo_prior_restrictions');
|
||||
else
|
||||
load([OutputDirectoryName,filesep,fname_,'_',type,'_restrictions'],'xmat','mat_irf','mat_moment','irestrictions','indx_irf','indx_moment','endo_prior_restrictions');
|
||||
|
@ -181,7 +190,7 @@ if ~isempty(indx_irf)
|
|||
maxijv=0;
|
||||
for ij=1:nbr_irf_restrictions
|
||||
if length(endo_prior_restrictions.irf{ij,3})>maxijv
|
||||
maxij=ij;maxijv=length(endo_prior_restrictions.irf{ij,3});
|
||||
maxijv=length(endo_prior_restrictions.irf{ij,3});
|
||||
end
|
||||
plot_indx(ij) = find(strcmp(irf_couples,all_irf_couples(ij,:)));
|
||||
time_matrix{plot_indx(ij)} = [time_matrix{plot_indx(ij)} endo_prior_restrictions.irf{ij,3}];
|
||||
|
@ -189,8 +198,8 @@ if ~isempty(indx_irf)
|
|||
iplot_indx = ones(size(plot_indx));
|
||||
|
||||
indx_irf = indx_irf(irestrictions,:);
|
||||
if ~DynareOptions.nograph
|
||||
h1=dyn_figure(DynareOptions.nodisplay,'name',[type ' evaluation of irf restrictions']);
|
||||
if ~options_.nograph
|
||||
h1=dyn_figure(options_.nodisplay,'name',[type ' evaluation of irf restrictions']);
|
||||
nrow=ceil(sqrt(nbr_irf_couples));
|
||||
ncol=nrow;
|
||||
if nrow*(nrow-1)>nbr_irf_couples
|
||||
|
@ -203,7 +212,7 @@ if ~isempty(indx_irf)
|
|||
indx_irf_matrix(:,plot_indx(ij)) = indx_irf_matrix(:,plot_indx(ij)) + indx_irf(:,ij);
|
||||
for ik=1:size(mat_irf{ij},2)
|
||||
[Mean,Median,Var,HPD,Distrib] = ...
|
||||
posterior_moments(mat_irf{ij}(:,ik),0,DynareOptions.mh_conf_sig);
|
||||
posterior_moments(mat_irf{ij}(:,ik),options_.mh_conf_sig);
|
||||
irf_mean{plot_indx(ij)} = [irf_mean{plot_indx(ij)}; Mean];
|
||||
irf_median{plot_indx(ij)} = [irf_median{plot_indx(ij)}; Median];
|
||||
irf_var{plot_indx(ij)} = [irf_var{plot_indx(ij)}; Var];
|
||||
|
@ -217,10 +226,10 @@ if ~isempty(indx_irf)
|
|||
aleg = [aleg,'-' ,num2str(endo_prior_restrictions.irf{ij,3}(end))];
|
||||
iplot_indx(ij)=0;
|
||||
end
|
||||
if ~DynareOptions.nograph && length(time_matrix{plot_indx(ij)})==1
|
||||
if ~options_.nograph && length(time_matrix{plot_indx(ij)})==1
|
||||
set(0,'currentfigure',h1),
|
||||
subplot(nrow,ncol, plot_indx(ij)),
|
||||
hc = cumplot(mat_irf{ij}(:,ik));
|
||||
hc = gsa.cumplot(mat_irf{ij}(:,ik));
|
||||
a=axis;
|
||||
delete(hc);
|
||||
x1val=max(endo_prior_restrictions.irf{ij,4}(1),a(1));
|
||||
|
@ -228,47 +237,34 @@ if ~isempty(indx_irf)
|
|||
hp = patch([x1val x2val x2val x1val],a([3 3 4 4]),'b');
|
||||
hold all,
|
||||
set(hp,'FaceColor', [0.7 0.8 1])
|
||||
hc = cumplot(mat_irf{ij}(:,ik));
|
||||
hc = gsa.cumplot(mat_irf{ij}(:,ik));
|
||||
set(hc,'color','k','linewidth',2)
|
||||
hold off,
|
||||
% hold off,
|
||||
title([endo_prior_restrictions.irf{ij,1},' vs ',endo_prior_restrictions.irf{ij,2}, '(', leg,')'],'interpreter','none'),
|
||||
%set(legend_h,'Xlim',[0 1]);
|
||||
% if ij==maxij
|
||||
% leg1 = num2str(endo_prior_restrictions.irf{ij,3}(:));
|
||||
% [legend_h,object_h,plot_h,text_strings]=legend(leg1);
|
||||
% Position=get(legend_h,'Position');Position(1:2)=[-0.055 0.95-Position(4)];
|
||||
% set(legend_h,'Position',Position);
|
||||
% end
|
||||
end
|
||||
% hc = get(h,'Children');
|
||||
%for i=2:2:length(hc)
|
||||
%end
|
||||
indx1 = find(indx_irf(:,ij)==0);
|
||||
indx2 = find(indx_irf(:,ij)~=0);
|
||||
atitle0=[endo_prior_restrictions.irf{ij,1},' vs ',endo_prior_restrictions.irf{ij,2}, '(', leg,')'];
|
||||
fprintf(['%4.1f%% of the ',type,' support matches IRF ',atitle0,' inside [%4.1f, %4.1f]\n'],length(indx1)/length(irestrictions)*100,endo_prior_restrictions.irf{ij,4})
|
||||
% aname=[type '_irf_calib_',int2str(ij)];
|
||||
aname=[type '_irf_calib_',endo_prior_restrictions.irf{ij,1},'_vs_',endo_prior_restrictions.irf{ij,2},'_',aleg];
|
||||
atitle=[type ' IRF Calib: Parameter(s) driving ',endo_prior_restrictions.irf{ij,1},' vs ',endo_prior_restrictions.irf{ij,2}, '(', leg,')'];
|
||||
options_mcf.amcf_name = aname;
|
||||
options_mcf.amcf_title = atitle;
|
||||
options_mcf.beha_title = 'IRF restriction';
|
||||
options_mcf.nobeha_title = 'NO IRF restriction';
|
||||
if options_.TeX
|
||||
options_mcf.beha_title_latex = 'IRF restriction';
|
||||
options_mcf.nobeha_title_latex = 'NO IRF restriction';
|
||||
end
|
||||
options_mcf.title = atitle0;
|
||||
if ~isempty(indx1) && ~isempty(indx2)
|
||||
mcf_analysis(xmat(:,nshock+1:end), indx1, indx2, options_mcf, DynareOptions);
|
||||
gsa.monte_carlo_filtering_analysis(xmat(:,nshock+1:end), indx1, indx2, options_mcf, M_, options_, bayestopt_, estim_params_);
|
||||
end
|
||||
|
||||
% [proba, dproba] = stab_map_1(xmat, indx1, indx2, aname, 0);
|
||||
% indplot=find(proba<pvalue_ks);
|
||||
% if ~isempty(indplot)
|
||||
% stab_map_1(xmat, indx1, indx2, aname, 1, indplot, OutputDirectoryName,[],atitle);
|
||||
% end
|
||||
end
|
||||
for ij=1:nbr_irf_couples
|
||||
if length(time_matrix{ij})>1
|
||||
if ~DynareOptions.nograph
|
||||
if ~options_.nograph
|
||||
set(0,'currentfigure',h1);
|
||||
subplot(nrow,ncol, ij)
|
||||
itmp = (find(plot_indx==ij));
|
||||
|
@ -282,7 +278,6 @@ if ~isempty(indx_irf)
|
|||
tmp(temp_index,:) = endo_prior_restrictions.irf{itmp(ir),4};
|
||||
end
|
||||
end
|
||||
% tmp = cell2mat(endo_prior_restrictions.irf(itmp,4));
|
||||
tmp(isinf(tmp(:,1)),1)=a(3);
|
||||
tmp(isinf(tmp(:,2)),2)=a(4);
|
||||
hp = patch([time_matrix{ij} time_matrix{ij}(end:-1:1)],[tmp(:,1); tmp(end:-1:1,2)],'c');
|
||||
|
@ -295,7 +290,6 @@ if ~isempty(indx_irf)
|
|||
hold off
|
||||
axis([max(1,a(1)) a(2:4)])
|
||||
box on
|
||||
%set(gca,'xtick',sort(time_matrix{ij}))
|
||||
itmp = min(itmp);
|
||||
title([endo_prior_restrictions.irf{itmp,1},' vs ',endo_prior_restrictions.irf{itmp,2}],'interpreter','none'),
|
||||
end
|
||||
|
@ -309,23 +303,27 @@ if ~isempty(indx_irf)
|
|||
aleg = 'ALL';
|
||||
atitle0=[endo_prior_restrictions.irf{itmp,1},' vs ',endo_prior_restrictions.irf{itmp,2}, '(', leg,')'];
|
||||
fprintf(['%4.1f%% of the ',type,' support matches IRF restrictions ',atitle0,'\n'],length(indx1)/length(irestrictions)*100)
|
||||
% aname=[type '_irf_calib_',int2str(ij)];
|
||||
aname=[type '_irf_calib_',endo_prior_restrictions.irf{itmp,1},'_vs_',endo_prior_restrictions.irf{itmp,2},'_',aleg];
|
||||
atitle=[type ' IRF Calib: Parameter(s) driving ',endo_prior_restrictions.irf{itmp,1},' vs ',endo_prior_restrictions.irf{itmp,2}, '(', leg,')'];
|
||||
options_mcf.amcf_name = aname;
|
||||
options_mcf.amcf_title = atitle;
|
||||
options_mcf.beha_title = 'IRF restriction';
|
||||
options_mcf.nobeha_title = 'NO IRF restriction';
|
||||
if options_.TeX
|
||||
options_mcf.beha_title_latex = 'IRF restriction';
|
||||
options_mcf.nobeha_title_latex = 'NO IRF restriction';
|
||||
end
|
||||
|
||||
options_mcf.title = atitle0;
|
||||
if ~isempty(indx1) && ~isempty(indx2)
|
||||
mcf_analysis(xmat(:,nshock+1:end), indx1, indx2, options_mcf, DynareOptions);
|
||||
gsa.monte_carlo_filtering_analysis(xmat(:,nshock+1:end), indx1, indx2, options_mcf, M_, options_, bayestopt_, estim_params_);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if ~DynareOptions.nograph
|
||||
dyn_saveas(h1,[OutputDirectoryName,filesep,fname_,'_',type,'_irf_restrictions'],DynareOptions.nodisplay,DynareOptions.graph_format);
|
||||
create_TeX_loader(DynareOptions,[OutputDirectoryName,filesep,fname_,'_',type,'_irf_restrictions'],[type ' evaluation of irf restrictions'],'irf_restrictions',type,DynareOptions.figures.textwidth*min(ij/ncol,1))
|
||||
if ~options_.nograph
|
||||
dyn_saveas(h1,[OutputDirectoryName,filesep,fname_,'_',type,'_irf_restrictions'],options_.nodisplay,options_.graph_format);
|
||||
create_TeX_loader(options_,[OutputDirectoryName,filesep,fname_,'_',type,'_irf_restrictions'],[type ' evaluation of irf restrictions'],'irf_restrictions',type,options_.figures.textwidth*min(ij/ncol,1))
|
||||
end
|
||||
skipline()
|
||||
end
|
||||
|
@ -361,24 +359,24 @@ if ~isempty(indx_moment)
|
|||
skipline()
|
||||
|
||||
%get parameter names including standard deviations
|
||||
np=size(BayesInfo.name,1);
|
||||
np=size(bayestopt_.name,1);
|
||||
name=cell(np,1);
|
||||
name_tex=cell(np,1);
|
||||
for jj=1:np
|
||||
if DynareOptions.TeX
|
||||
[param_name_temp, param_name_tex_temp]= get_the_name(jj,DynareOptions.TeX,Model,EstimatedParameters,DynareOptions);
|
||||
name_tex{jj,1} = strrep(param_name_tex_temp,'$','');
|
||||
if options_.TeX
|
||||
[param_name_temp, param_name_tex_temp]= get_the_name(jj,options_.TeX,M_,estim_params_,options_.varobs);
|
||||
name_tex{jj,1} = param_name_tex_temp;
|
||||
name{jj,1} = param_name_temp;
|
||||
else
|
||||
param_name_temp = get_the_name(jj,DynareOptions.TeX,Model,EstimatedParameters,DynareOptions);
|
||||
param_name_temp = get_the_name(jj,options_.TeX,M_,estim_params_,options_.varobs);
|
||||
name{jj,1} = param_name_temp;
|
||||
end
|
||||
end
|
||||
options_mcf.param_names = name;
|
||||
if DynareOptions.TeX
|
||||
if options_.TeX
|
||||
options_mcf.param_names_tex = name_tex;
|
||||
end
|
||||
options_mcf.param_names = BayesInfo.name;
|
||||
options_mcf.param_names = bayestopt_.name;
|
||||
all_moment_couples = cellstr([char(endo_prior_restrictions.moment(:,1)) char(endo_prior_restrictions.moment(:,2))]);
|
||||
moment_couples = unique(all_moment_couples);
|
||||
nbr_moment_couples = size(moment_couples,1);
|
||||
|
@ -396,7 +394,7 @@ if ~isempty(indx_moment)
|
|||
for ij=1:nbr_moment_restrictions
|
||||
endo_prior_restrictions.moment{ij,3} = sort(endo_prior_restrictions.moment{ij,3});
|
||||
if length(endo_prior_restrictions.moment{ij,3})>maxijv
|
||||
maxij=ij;maxijv=length(endo_prior_restrictions.moment{ij,3});
|
||||
maxijv=length(endo_prior_restrictions.moment{ij,3});
|
||||
end
|
||||
plot_indx(ij) = find(strcmp(moment_couples,all_moment_couples(ij,:)));
|
||||
time_matrix{plot_indx(ij)} = [time_matrix{plot_indx(ij)} endo_prior_restrictions.moment{ij,3}];
|
||||
|
@ -404,8 +402,8 @@ if ~isempty(indx_moment)
|
|||
iplot_indx = ones(size(plot_indx));
|
||||
|
||||
indx_moment = indx_moment(irestrictions,:);
|
||||
if ~DynareOptions.nograph
|
||||
h2=dyn_figure(DynareOptions.nodisplay,'name',[type ' evaluation of moment restrictions']);
|
||||
if ~options_.nograph
|
||||
h2=dyn_figure(options_.nodisplay,'name',[type ' evaluation of moment restrictions']);
|
||||
nrow=ceil(sqrt(nbr_moment_couples));
|
||||
ncol=nrow;
|
||||
if nrow*(nrow-1)>nbr_moment_couples
|
||||
|
@ -419,7 +417,7 @@ if ~isempty(indx_moment)
|
|||
indx_moment_matrix(:,plot_indx(ij)) = indx_moment_matrix(:,plot_indx(ij)) + indx_moment(:,ij);
|
||||
for ik=1:size(mat_moment{ij},2)
|
||||
[Mean,Median,Var,HPD,Distrib] = ...
|
||||
posterior_moments(mat_moment{ij}(:,ik),0,DynareOptions.mh_conf_sig);
|
||||
posterior_moments(mat_moment{ij}(:,ik),options_.mh_conf_sig);
|
||||
moment_mean{plot_indx(ij)} = [moment_mean{plot_indx(ij)}; Mean];
|
||||
moment_median{plot_indx(ij)} = [moment_median{plot_indx(ij)}; Median];
|
||||
moment_var{plot_indx(ij)} = [moment_var{plot_indx(ij)}; Var];
|
||||
|
@ -433,10 +431,10 @@ if ~isempty(indx_moment)
|
|||
aleg = [aleg,'_' ,num2str(endo_prior_restrictions.moment{ij,3}(end))];
|
||||
iplot_indx(ij)=0;
|
||||
end
|
||||
if ~DynareOptions.nograph && length(time_matrix{plot_indx(ij)})==1
|
||||
if ~options_.nograph && length(time_matrix{plot_indx(ij)})==1
|
||||
set(0,'currentfigure',h2);
|
||||
subplot(nrow,ncol,plot_indx(ij)),
|
||||
hc = cumplot(mat_moment{ij}(:,ik));
|
||||
hc = gsa.cumplot(mat_moment{ij}(:,ik));
|
||||
a=axis; delete(hc),
|
||||
% hist(mat_moment{ij}),
|
||||
x1val=max(endo_prior_restrictions.moment{ij,4}(1),a(1));
|
||||
|
@ -444,43 +442,34 @@ if ~isempty(indx_moment)
|
|||
hp = patch([x1val x2val x2val x1val],a([3 3 4 4]),'b');
|
||||
set(hp,'FaceColor', [0.7 0.8 1])
|
||||
hold all
|
||||
hc = cumplot(mat_moment{ij}(:,ik));
|
||||
hc = gsa.cumplot(mat_moment{ij}(:,ik));
|
||||
set(hc,'color','k','linewidth',2)
|
||||
hold off
|
||||
title([endo_prior_restrictions.moment{ij,1},' vs ',endo_prior_restrictions.moment{ij,2},'(',leg,')'],'interpreter','none'),
|
||||
% if ij==maxij
|
||||
% leg1 = num2str(endo_prior_restrictions.moment{ij,3}(:));
|
||||
% [legend_h,object_h,plot_h,text_strings]=legend(leg1);
|
||||
% Position=get(legend_h,'Position');Position(1:2)=[-0.055 0.95-Position(4)];
|
||||
% set(legend_h,'Position',Position);
|
||||
% end
|
||||
end
|
||||
indx1 = find(indx_moment(:,ij)==0);
|
||||
indx2 = find(indx_moment(:,ij)~=0);
|
||||
atitle0=[endo_prior_restrictions.moment{ij,1},' vs ',endo_prior_restrictions.moment{ij,2}, '(', leg,')'];
|
||||
fprintf(['%4.1f%% of the ',type,' support matches MOMENT ',atitle0,' inside [%4.1f, %4.1f]\n'],length(indx1)/length(irestrictions)*100,endo_prior_restrictions.moment{ij,4})
|
||||
% aname=[type '_moment_calib_',int2str(ij)];
|
||||
aname=[type '_moment_calib_',endo_prior_restrictions.moment{ij,1},'_vs_',endo_prior_restrictions.moment{ij,2},'_',aleg];
|
||||
atitle=[type ' MOMENT Calib: Parameter(s) driving ',endo_prior_restrictions.moment{ij,1},' vs ',endo_prior_restrictions.moment{ij,2}, '(', leg,')'];
|
||||
options_mcf.amcf_name = aname;
|
||||
options_mcf.amcf_title = atitle;
|
||||
options_mcf.beha_title = 'moment restriction';
|
||||
options_mcf.nobeha_title = 'NO moment restriction';
|
||||
if options_.TeX
|
||||
options_mcf.beha_title_latex = 'moment restriction';
|
||||
options_mcf.nobeha_title_latex = 'NO moment restriction';
|
||||
end
|
||||
options_mcf.title = atitle0;
|
||||
if ~isempty(indx1) && ~isempty(indx2)
|
||||
mcf_analysis(xmat, indx1, indx2, options_mcf, DynareOptions);
|
||||
gsa.monte_carlo_filtering_analysis(xmat, indx1, indx2, options_mcf, M_, options_, bayestopt_, estim_params_);
|
||||
end
|
||||
|
||||
% [proba, dproba] = stab_map_1(xmat, indx1, indx2, aname, 0);
|
||||
% indplot=find(proba<pvalue_ks);
|
||||
% if ~isempty(indplot)
|
||||
% stab_map_1(xmat, indx1, indx2, aname, 1, indplot, OutputDirectoryName,[],atitle);
|
||||
% end
|
||||
end
|
||||
for ij=1:nbr_moment_couples
|
||||
time_matrix{ij} = sort(time_matrix{ij});
|
||||
if length(time_matrix{ij})>1
|
||||
if ~DynareOptions.nograph
|
||||
if ~options_.nograph
|
||||
itmp = (find(plot_indx==ij));
|
||||
set(0,'currentfigure',h2);
|
||||
subplot(nrow,ncol, ij)
|
||||
|
@ -494,7 +483,6 @@ if ~isempty(indx_moment)
|
|||
tmp(temp_index,:) = endo_prior_restrictions.moment{itmp(ir),4};
|
||||
end
|
||||
end
|
||||
% tmp = cell2mat(endo_prior_restrictions.moment(itmp,4));
|
||||
tmp(isinf(tmp(:,1)),1)=a(3);
|
||||
tmp(isinf(tmp(:,2)),2)=a(4);
|
||||
hp = patch([time_matrix{ij} time_matrix{ij}(end:-1:1)],[tmp(:,1); tmp(end:-1:1,2)],'b');
|
||||
|
@ -507,7 +495,6 @@ if ~isempty(indx_moment)
|
|||
hold off
|
||||
axis(a)
|
||||
box on
|
||||
% set(gca,'xtick',sort(time_matrix{ij}))
|
||||
itmp = min(itmp);
|
||||
title([endo_prior_restrictions.moment{itmp,1},' vs ',endo_prior_restrictions.moment{itmp,2}],'interpreter','none'),
|
||||
end
|
||||
|
@ -521,23 +508,26 @@ if ~isempty(indx_moment)
|
|||
aleg = 'ALL';
|
||||
atitle0=[endo_prior_restrictions.moment{itmp,1},' vs ',endo_prior_restrictions.moment{itmp,2}, '(', leg,')'];
|
||||
fprintf(['%4.1f%% of the ',type,' support matches MOMENT restrictions ',atitle0,'\n'],length(indx1)/length(irestrictions)*100)
|
||||
% aname=[type '_moment_calib_',int2str(ij)];
|
||||
aname=[type '_moment_calib_',endo_prior_restrictions.moment{itmp,1},'_vs_',endo_prior_restrictions.moment{itmp,2},'_',aleg];
|
||||
atitle=[type ' MOMENT Calib: Parameter(s) driving ',endo_prior_restrictions.moment{itmp,1},' vs ',endo_prior_restrictions.moment{itmp,2}, '(', leg,')'];
|
||||
options_mcf.amcf_name = aname;
|
||||
options_mcf.amcf_title = atitle;
|
||||
options_mcf.beha_title = 'moment restriction';
|
||||
options_mcf.nobeha_title = 'NO moment restriction';
|
||||
if options_.TeX
|
||||
options_mcf.beha_title_latex = 'moment restriction';
|
||||
options_mcf.nobeha_title_latex = 'NO moment restriction';
|
||||
end
|
||||
options_mcf.title = atitle0;
|
||||
if ~isempty(indx1) && ~isempty(indx2)
|
||||
mcf_analysis(xmat, indx1, indx2, options_mcf, DynareOptions);
|
||||
gsa.monte_carlo_filtering_analysis(xmat, indx1, indx2, options_mcf, M_, options_, bayestopt_, estim_params_);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if ~DynareOptions.nograph
|
||||
dyn_saveas(h2,[OutputDirectoryName,filesep,fname_,'_',type,'_moment_restrictions'],DynareOptions.nodisplay,DynareOptions.graph_format);
|
||||
create_TeX_loader(DynareOptions,[OutputDirectoryName,filesep,fname_,'_',type,'_moment_restrictions'],[type ' evaluation of moment restrictions'],'moment_restrictions',type,DynareOptions.figures.textwidth*min(ij/ncol,1))
|
||||
if ~options_.nograph
|
||||
dyn_saveas(h2,[OutputDirectoryName,filesep,fname_,'_',type,'_moment_restrictions'],options_.nodisplay,options_.graph_format);
|
||||
create_TeX_loader(options_,[OutputDirectoryName,filesep,fname_,'_',type,'_moment_restrictions'],[type ' evaluation of moment restrictions'],'moment_restrictions',type,options_.figures.textwidth*min(ij/ncol,1))
|
||||
end
|
||||
|
||||
skipline()
|
|
@ -0,0 +1,305 @@
|
|||
function map_identification(OutputDirectoryName,opt_gsa,M_,oo_,options_,estim_params_,bayestopt_)
|
||||
% map_identification(OutputDirectoryName,opt_gsa,M_,oo_,options_,estim_params_,bayestopt_)
|
||||
% Inputs
|
||||
% - OutputDirectoryName [string] name of the output directory
|
||||
% - opt_gsa [structure] GSA options structure
|
||||
% - M_ [structure] Matlab's structure describing the model
|
||||
% - oo_ [structure] Matlab's structure describing the results
|
||||
% - options_ [structure] Matlab's structure describing the current options
|
||||
% - estim_params_ [structure] characterizing parameters to be estimated
|
||||
% - bayestopt_ [structure] describing the priors
|
||||
|
||||
% Written by Marco Ratto
|
||||
% Joint Research Centre, The European Commission,
|
||||
% marco.ratto@ec.europa.eu
|
||||
|
||||
% Copyright © 2012-2016 European Commission
|
||||
% Copyright © 2012-2023 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
fname_ = M_.fname;
|
||||
dr=oo_.dr;
|
||||
nliv = opt_gsa.morris_nliv;
|
||||
itrans = opt_gsa.trans_ident;
|
||||
|
||||
np = size(estim_params_.param_vals,1);
|
||||
|
||||
pnames = M_.param_names(estim_params_.param_vals(:,1));
|
||||
if opt_gsa.pprior
|
||||
filetoload=[OutputDirectoryName '/' fname_ '_prior'];
|
||||
else
|
||||
filetoload=[OutputDirectoryName '/' fname_ '_mc'];
|
||||
end
|
||||
load(filetoload,'lpmat','lpmat0','istable','T','yys')
|
||||
if ~isempty(lpmat0)
|
||||
lpmatx=lpmat0(istable,:);
|
||||
else
|
||||
lpmatx=[];
|
||||
end
|
||||
Nsam = size(lpmat,1);
|
||||
nshock = size(lpmat0,2);
|
||||
npT = np+nshock;
|
||||
|
||||
fname_ = M_.fname;
|
||||
|
||||
if opt_gsa.load_ident_files==0
|
||||
mss = yys(bayestopt_.mfys,:);
|
||||
mss = gsa.teff(mss(:,istable),Nsam,istable);
|
||||
yys = gsa.teff(yys(dr.order_var,istable),Nsam,istable);
|
||||
if exist('T','var')
|
||||
[vdec, cc, ac] = gsa.monte_carlo_moments(T, lpmatx, dr, M_, options_, estim_params_);
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
if opt_gsa.morris==2
|
||||
pdraws = identification.run(M_,oo_,options_,bayestopt_,estim_params_,options_.options_ident,[lpmatx lpmat(istable,:)]);
|
||||
if ~isempty(pdraws) && max(max(abs(pdraws-[lpmatx lpmat(istable,:)])))==0
|
||||
disp(['Sample check OK. Largest difference: ', num2str(max(max(abs(pdraws-[lpmatx lpmat(istable,:)]))))]),
|
||||
clear pdraws;
|
||||
end
|
||||
clear GAM gas
|
||||
end
|
||||
if opt_gsa.morris~=1 && M_.exo_nbr>1
|
||||
ifig=0;
|
||||
for j=1:M_.exo_nbr
|
||||
if mod(j,6)==1
|
||||
hh_fig=dyn_figure(options_.nodisplay,'name','Variance decomposition shocks');
|
||||
ifig=ifig+1;
|
||||
iplo=0;
|
||||
end
|
||||
iplo=iplo+1;
|
||||
subplot(2,3,iplo)
|
||||
gsa.boxplot(squeeze(vdec(:,j,:))',[],'.',[],10)
|
||||
set(gca,'xticklabel',' ','fontsize',10,'xtick',1:size(options_.varobs,1))
|
||||
set(gca,'xlim',[0.5 size(options_.varobs,1)+0.5])
|
||||
set(gca,'ylim',[-2 102])
|
||||
for ip=1:size(options_.varobs,1)
|
||||
if options_.TeX
|
||||
text(ip,-4,deblank(opt_gsa.varobs_tex(ip,:)),'rotation',90,'HorizontalAlignment','right','interpreter','latex')
|
||||
else
|
||||
text(ip,-4,deblank(options_.varobs(ip,:)),'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
||||
end
|
||||
end
|
||||
xlabel(' ')
|
||||
ylabel(' ')
|
||||
title(M_.exo_names{j},'interpreter','none')
|
||||
if mod(j,6)==0 || j==M_.exo_nbr
|
||||
dyn_saveas(hh_fig,[OutputDirectoryName,'/',fname_,'_vdec_exo_',int2str(ifig)],options_.nodisplay,options_.graph_format);
|
||||
create_TeX_loader(options_,[OutputDirectoryName,'/',fname_,'_vdec_exo_',int2str(ifig)],ifig,'Variance decomposition shocks','vdec_exo',options_.figures.textwidth*min(iplo/3,1))
|
||||
end
|
||||
end
|
||||
end
|
||||
for j=1:size(cc,1)
|
||||
cc(j,j,:)=gsa.standardize_columns(squeeze(log(cc(j,j,:))))./2;
|
||||
end
|
||||
[vdec, ~, ir_vdec, ic_vdec] = gsa.teff(vdec,Nsam,istable);
|
||||
[cc, ~, ir_cc, ic_cc] = gsa.teff(cc,Nsam,istable);
|
||||
[ac, ~, ir_ac, ic_ac] = gsa.teff(ac,Nsam,istable);
|
||||
|
||||
nc1= size(T,2);
|
||||
endo_nbr = M_.endo_nbr;
|
||||
nstatic = M_.nstatic;
|
||||
nspred = M_.nspred;
|
||||
iv = (1:endo_nbr)';
|
||||
ic = [ nstatic+(1:nspred) endo_nbr+(1:size(dr.ghx,2)-nspred) ]';
|
||||
|
||||
dr.ghx = T(:, 1:(nc1-M_.exo_nbr),1);
|
||||
dr.ghu = T(:, (nc1-M_.exo_nbr+1):end, 1);
|
||||
[Aa,Bb] = kalman_transition_matrix(dr,iv,ic);
|
||||
A = zeros(size(Aa,1),size(Aa,2)+size(Aa,1),length(istable));
|
||||
if ~isempty(lpmatx)
|
||||
M_=gsa.set_shocks_param(M_,estim_params_,lpmatx(1,:));
|
||||
end
|
||||
A(:,:,1)=[Aa, triu(Bb*M_.Sigma_e*Bb')];
|
||||
for j=2:length(istable)
|
||||
dr.ghx = T(:, 1:(nc1-M_.exo_nbr),j);
|
||||
dr.ghu = T(:, (nc1-M_.exo_nbr+1):end, j);
|
||||
[Aa,Bb] = kalman_transition_matrix(dr, iv, ic);
|
||||
if ~isempty(lpmatx)
|
||||
M_=gsa.set_shocks_param(M_,estim_params_,lpmatx(j,:));
|
||||
end
|
||||
A(:,:,j)=[Aa, triu(Bb*M_.Sigma_e*Bb')];
|
||||
end
|
||||
clear T
|
||||
clear lpmatx
|
||||
|
||||
[yt, j0]=gsa.teff(A,Nsam,istable);
|
||||
yt = [yys yt];
|
||||
if opt_gsa.morris==2
|
||||
clear TAU A
|
||||
else
|
||||
clear A
|
||||
end
|
||||
save([OutputDirectoryName,'/',fname_,'_main_eff.mat'],'ac','cc','vdec','yt','mss')
|
||||
else %load identification files
|
||||
load([OutputDirectoryName,'/',fname_,'_main_eff.mat'],'ac','cc','vdec','yt','mss')
|
||||
end
|
||||
|
||||
if opt_gsa.morris==1
|
||||
if ~isempty(vdec)
|
||||
if opt_gsa.load_ident_files==0
|
||||
SAMorris=NaN(npT,3,size(vdec,2));
|
||||
for i=1:size(vdec,2)
|
||||
[~, SAMorris(:,:,i)] = gsa.Morris_Measure_Groups(npT, [lpmat0 lpmat], vdec(:,i),nliv);
|
||||
end
|
||||
SAvdec = squeeze(SAMorris(:,1,:))';
|
||||
save([OutputDirectoryName,'/',fname_,'_morris_IDE.mat'],'SAvdec','vdec','ir_vdec','ic_vdec')
|
||||
else
|
||||
load([OutputDirectoryName,'/',fname_,'_morris_IDE.mat'],'SAvdec')
|
||||
end
|
||||
|
||||
hh_fig = dyn_figure(options_.nodisplay,'name','Screening identification: variance decomposition');
|
||||
gsa.boxplot(SAvdec,[],'.',[],10)
|
||||
set(gca,'xticklabel',' ','fontsize',10,'xtick',1:npT)
|
||||
set(gca,'xlim',[0.5 npT+0.5])
|
||||
ydum = get(gca,'ylim');
|
||||
set(gca,'ylim',[0 ydum(2)])
|
||||
set(gca,'position',[0.13 0.2 0.775 0.7])
|
||||
for ip=1:npT
|
||||
if options_.TeX
|
||||
[~, param_name_tex_temp]= get_the_name(ip,options_.TeX,M_,estim_params_,options_.varobs);
|
||||
text(ip,-2,param_name_tex_temp,'rotation',90,'HorizontalAlignment','right','interpreter','latex')
|
||||
else
|
||||
text(ip,-2,bayestopt_.name{ip},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
||||
end
|
||||
end
|
||||
xlabel(' ')
|
||||
title('Elementary effects variance decomposition')
|
||||
dyn_saveas(hh_fig,[OutputDirectoryName,'/',fname_,'_morris_vdec'],options_.nodisplay,options_.graph_format);
|
||||
create_TeX_loader(options_,[OutputDirectoryName,'/',fname_,'_morris_vdec'],1,'Screening identification: variance decomposition','morris_vdec',1)
|
||||
else
|
||||
save([OutputDirectoryName,'/',fname_,'_morris_IDE.mat'],'vdec')
|
||||
end
|
||||
|
||||
if opt_gsa.load_ident_files==0
|
||||
ccac = [mss cc ac];
|
||||
SAMorris=NaN(npT,3,size(ccac,2));
|
||||
for i=1:size(ccac,2)
|
||||
[~, SAMorris(:,:,i)] = gsa.Morris_Measure_Groups(npT, [lpmat0 lpmat], [ccac(:,i)],nliv);
|
||||
end
|
||||
SAcc = squeeze(SAMorris(:,1,:))';
|
||||
SAcc = SAcc./(max(SAcc,[],2)*ones(1,npT));
|
||||
save([OutputDirectoryName,'/',fname_,'_morris_IDE.mat'],'SAcc','cc','ir_cc','ic_cc','-append')
|
||||
save([OutputDirectoryName,'/',fname_,'_morris_IDE.mat'],'ac','ir_ac','ic_ac','-append')
|
||||
else
|
||||
load([OutputDirectoryName,'/',fname_,'_morris_IDE'],'SAcc','cc','ir_cc','ic_cc')
|
||||
load([OutputDirectoryName,'/',fname_,'_morris_IDE'],'ac','ir_ac','ic_ac')
|
||||
end
|
||||
|
||||
hh_fig=dyn_figure(options_.nodisplay,'name','Screening identification: theoretical moments');
|
||||
gsa.boxplot(SAcc,[],'.',[],10)
|
||||
set(gca,'xticklabel',' ','fontsize',10,'xtick',1:npT)
|
||||
set(gca,'xlim',[0.5 npT+0.5])
|
||||
set(gca,'ylim',[0 1])
|
||||
set(gca,'position',[0.13 0.2 0.775 0.7])
|
||||
for ip=1:npT
|
||||
if options_.TeX
|
||||
[~, param_name_tex_temp]= get_the_name(ip,options_.TeX,M_,estim_params_,options_.varobs);
|
||||
text(ip,-0.02,param_name_tex_temp,'rotation',90,'HorizontalAlignment','right','interpreter','latex')
|
||||
else
|
||||
text(ip,-0.02,bayestopt_.name{ip},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
||||
end
|
||||
end
|
||||
xlabel(' ')
|
||||
title('Elementary effects in the moments')
|
||||
dyn_saveas(hh_fig,[OutputDirectoryName,'/',fname_,'_morris_moments'],options_.nodisplay,options_.graph_format);
|
||||
create_TeX_loader(options_,[OutputDirectoryName,'/',fname_,'_morris_moments'],1,'Screening identification: theoretical moments','morris_moments',1)
|
||||
|
||||
if opt_gsa.load_ident_files==0
|
||||
SAMorris=NaN(npT,3,j0);
|
||||
for j=1:j0
|
||||
[~, SAMorris(:,:,j)] = gsa.Morris_Measure_Groups(npT, [lpmat0 lpmat], yt(:,j),nliv);
|
||||
end
|
||||
|
||||
SAM = squeeze(SAMorris(1:end,1,:));
|
||||
SAnorm=NaN(npT,j0);
|
||||
irex=NaN(j0);
|
||||
for j=1:j0
|
||||
SAnorm(:,j)=SAM(:,j)./max(SAM(:,j));
|
||||
irex(j)=length(find(SAnorm(:,j)>0.01));
|
||||
end
|
||||
|
||||
SAMmu = squeeze(SAMorris(1:end,2,:));
|
||||
SAmunorm=NaN(npT,j0);
|
||||
for j=1:j0
|
||||
SAmunorm(:,j)=SAMmu(:,j)./max(SAM(:,j)); % normalised w.r.t. mu*
|
||||
end
|
||||
SAMsig = squeeze(SAMorris(1:end,3,:));
|
||||
SAsignorm=NaN(npT,j0);
|
||||
for j=1:j0
|
||||
SAsignorm(:,j)=SAMsig(:,j)./max(SAMsig(:,j));
|
||||
end
|
||||
save([OutputDirectoryName,'/',fname_,'_morris_IDE.mat'],'SAnorm','SAmunorm','SAsignorm','-append')
|
||||
else
|
||||
load([OutputDirectoryName,'/',fname_,'_morris_IDE'],'SAnorm')
|
||||
end
|
||||
hh_fig=dyn_figure(options_.nodisplay,'name','Screening identification: model');
|
||||
gsa.boxplot(SAnorm',[],'.',[],10)
|
||||
set(gca,'xticklabel',' ','fontsize',10,'xtick',1:npT)
|
||||
set(gca,'xlim',[0.5 npT+0.5])
|
||||
set(gca,'ylim',[0 1])
|
||||
set(gca,'position',[0.13 0.2 0.775 0.7])
|
||||
xlabel(' ')
|
||||
for ip=1:npT
|
||||
if options_.TeX
|
||||
[~, param_name_tex_temp]= get_the_name(ip,options_.TeX,M_,estim_params_,options_.varobs);
|
||||
text(ip,-0.02,param_name_tex_temp,'rotation',90,'HorizontalAlignment','right','interpreter','latex')
|
||||
else
|
||||
text(ip,-0.02,bayestopt_.name{ip},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
||||
end
|
||||
end
|
||||
xlabel(' ')
|
||||
title('Elementary effects in the model')
|
||||
dyn_saveas(hh_fig,[OutputDirectoryName,'/',fname_,'_morris_par'],options_.nodisplay,options_.graph_format);
|
||||
create_TeX_loader(options_,[OutputDirectoryName,'/',fname_,'_morris_par'],1,'Screening identification: model','morris_par',1)
|
||||
|
||||
elseif opt_gsa.morris==3
|
||||
return
|
||||
elseif opt_gsa.morris==2 % ISKREV stuff
|
||||
return
|
||||
else
|
||||
error('gsa/map_identification: unsupported option morris=%u',opt_gsa.morris)
|
||||
end
|
||||
|
||||
function []=create_TeX_loader(options_,figpath,ifig_number,caption,label_name,scale_factor)
|
||||
if nargin<6
|
||||
scale_factor=1;
|
||||
end
|
||||
if options_.TeX && any(strcmp('eps',cellstr(options_.graph_format)))
|
||||
fidTeX = fopen([figpath '.tex'],'w');
|
||||
fprintf(fidTeX,'%% TeX eps-loader file generated by map_ident_.m (Dynare).\n');
|
||||
fprintf(fidTeX,['%% ' datestr(now,0) '\n\n']);
|
||||
fprintf(fidTeX,'\\begin{figure}[H]\n');
|
||||
fprintf(fidTeX,'\\centering \n');
|
||||
fprintf(fidTeX,'\\includegraphics[width=%2.2f\\textwidth]{%s}\n',scale_factor,strrep(figpath,'\','/'));
|
||||
fprintf(fidTeX,'\\caption{%s.}',caption);
|
||||
fprintf(fidTeX,'\\label{Fig:%s:%u}\n',label_name,ifig_number);
|
||||
fprintf(fidTeX,'\\end{figure}\n\n');
|
||||
fprintf(fidTeX,'%% End Of TeX file. \n');
|
||||
fclose(fidTeX);
|
||||
end
|
||||
|
||||
|
||||
function yr = trank(y)
|
||||
% yr is the rank transformation of y
|
||||
yr=NaN(size(y));
|
||||
[nr, nc] = size(y);
|
||||
for j=1:nc
|
||||
[~, is]=sort(y(:,j));
|
||||
yr(is,j)=[1:nr]'./nr;
|
||||
end
|
|
@ -1,5 +1,25 @@
|
|||
function [rmse_MC, ixx] = filt_mc_(OutDir,options_gsa_,dataset_,dataset_info)
|
||||
% function [rmse_MC, ixx] = filt_mc_(OutDir)
|
||||
function [rmse_MC, ixx] = monte_carlo_filtering(OutDir,options_gsa_,dataset_,dataset_info,M_,oo_,options_,bayestopt_,estim_params_)
|
||||
% [rmse_MC, ixx] = monte_carlo_filtering(OutDir,options_gsa_,dataset_,dataset_info,M_,oo_,options_,bayestopt_,estim_params_
|
||||
% Inputs:
|
||||
% - OutputDirectoryName [string] name of the output directory
|
||||
% - options_gsa_ [structure] GSA options
|
||||
% - dataset_ [dseries] object storing the dataset
|
||||
% - dataset_info [structure] storing informations about the sample.
|
||||
% - M_ [structure] Matlab's structure describing the model
|
||||
% - oo_ [structure] storing the results
|
||||
% - options_ [structure] Matlab's structure describing the current options
|
||||
% - bayestopt_ [structure] describing the priors
|
||||
% - estim_params_ [structure] characterizing parameters to be estimated
|
||||
%
|
||||
% Outputs:
|
||||
% - rmse_MC [double] RMSE by nvar matrix of the RMSEs
|
||||
% - ixx [double] RMSE by nvar matrix of sorting
|
||||
% indices (descending order of RMSEs)
|
||||
%
|
||||
% Notes: the R^2 definition is 1-var(ymodel-ydata)/var(ydata). It ranges
|
||||
% bewteen (-inf, 1], with negative values indicating that themodel is a worse
|
||||
% predictor than the sample mean of the data
|
||||
|
||||
% inputs (from opt_gsa structure)
|
||||
% vvarvecm = options_gsa_.var_rmse;
|
||||
% loadSA = options_gsa_.load_rmse;
|
||||
|
@ -7,7 +27,6 @@ function [rmse_MC, ixx] = filt_mc_(OutDir,options_gsa_,dataset_,dataset_info)
|
|||
% alpha = options_gsa_.alpha_rmse;
|
||||
% alpha2 = options_gsa_.alpha2_rmse;
|
||||
% istart = options_gsa_.istart_rmse;
|
||||
% alphaPC = 0.5;
|
||||
%
|
||||
% Written by Marco Ratto
|
||||
% Joint Research Centre, The European Commission,
|
||||
|
@ -31,9 +50,6 @@ function [rmse_MC, ixx] = filt_mc_(OutDir,options_gsa_,dataset_,dataset_info)
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
global bayestopt_ estim_params_ M_ options_ oo_
|
||||
|
||||
% options_gsa_=options_.opt_gsa;
|
||||
vvarvecm = options_gsa_.var_rmse;
|
||||
if options_.TeX
|
||||
vvarvecm_tex = options_gsa_.var_rmse_tex;
|
||||
|
@ -46,13 +62,10 @@ alpha = options_gsa_.alpha_rmse;
|
|||
alpha2 = 0;
|
||||
pvalue = options_gsa_.alpha2_rmse;
|
||||
istart = max(2,options_gsa_.istart_rmse);
|
||||
alphaPC = 0.5;
|
||||
|
||||
fname_ = M_.fname;
|
||||
lgy_ = M_.endo_names;
|
||||
dr_ = oo_.dr;
|
||||
|
||||
skipline(2)
|
||||
skipline(1)
|
||||
disp('Starting sensitivity analysis')
|
||||
disp('for the fit of EACH observed series ...')
|
||||
skipline()
|
||||
|
@ -61,12 +74,12 @@ if ~options_.nograph
|
|||
a=dir([OutDir,filesep,'*.*']);
|
||||
tmp1='0';
|
||||
if options_.opt_gsa.ppost
|
||||
tmp=['_rmse_post'];
|
||||
tmp='_rmse_post';
|
||||
else
|
||||
if options_.opt_gsa.pprior
|
||||
tmp=['_rmse_prior'];
|
||||
tmp='_rmse_prior';
|
||||
else
|
||||
tmp=['_rmse_mc'];
|
||||
tmp='_rmse_mc';
|
||||
end
|
||||
if options_gsa_.lik_only
|
||||
tmp1 = [tmp,'_post_SA'];
|
||||
|
@ -75,17 +88,23 @@ if ~options_.nograph
|
|||
end
|
||||
for j=1:length(a)
|
||||
if strmatch([fname_,tmp],a(j).name)
|
||||
disp(a(j).name)
|
||||
if options_.debug
|
||||
disp(a(j).name)
|
||||
end
|
||||
delete([OutDir,filesep,a(j).name])
|
||||
end
|
||||
if strmatch([fname_,tmp1],a(j).name)
|
||||
disp(a(j).name)
|
||||
if options_.debug
|
||||
disp(a(j).name)
|
||||
end
|
||||
delete([OutDir,filesep,a(j).name])
|
||||
end
|
||||
end
|
||||
disp('done !')
|
||||
end
|
||||
|
||||
[param_names,param_names_tex]=get_LaTeX_parameter_names(M_,options_,estim_params_,bayestopt_);
|
||||
|
||||
nshock=estim_params_.nvx + estim_params_.nvn + estim_params_.ncx + estim_params_.ncn;
|
||||
npar=estim_params_.np;
|
||||
if ~isempty(options_.mode_file)
|
||||
|
@ -94,10 +113,12 @@ end
|
|||
if options_.opt_gsa.ppost
|
||||
c=load([M_.dname filesep 'Output' filesep fname_,'_mean.mat'],'xparam1');
|
||||
xparam1_mean=c.xparam1;
|
||||
xparam1=c.xparam1;
|
||||
clear c
|
||||
elseif ~isempty(options_.mode_file) && exist([M_.dname filesep 'Output' filesep fname_,'_mean.mat'])==2
|
||||
elseif ~isempty(options_.mode_file) && exist([M_.dname filesep 'Output' filesep fname_,'_mean.mat'],'file')==2
|
||||
c=load([M_.dname filesep 'Output' filesep fname_,'_mean.mat'],'xparam1');
|
||||
xparam1_mean=c.xparam1;
|
||||
xparam1=c.xparam1;
|
||||
clear c
|
||||
end
|
||||
|
||||
|
@ -124,31 +145,11 @@ if loadSA
|
|||
end
|
||||
end
|
||||
if ~loadSA
|
||||
if exist('xparam1','var')
|
||||
M_ = set_all_parameters(xparam1,estim_params_,M_);
|
||||
ys_mode=evaluate_steady_state(oo_.steady_state,[oo_.exo_steady_state; oo_.exo_det_steady_state],M_,options_,~options_.steadystate.nocheck);
|
||||
end
|
||||
if exist('xparam1_mean','var')
|
||||
M_ = set_all_parameters(xparam1_mean,estim_params_,M_);
|
||||
ys_mean=evaluate_steady_state(oo_.steady_state,[oo_.exo_steady_state; oo_.exo_det_steady_state],M_,options_,~options_.steadystate.nocheck);
|
||||
end
|
||||
Y = transpose(dataset_.data);
|
||||
gend = dataset_.nobs;
|
||||
data_index = dataset_info.missing.aindex;
|
||||
missing_value = dataset_info.missing.state;
|
||||
for jx=1:gend
|
||||
data_indx(jx,data_index{jx})=true;
|
||||
end
|
||||
load([DirectoryName filesep M_.fname '_data.mat']);
|
||||
filfilt = dir([DirectoryName filesep M_.fname '_filter_step_ahead*.mat']);
|
||||
temp_smooth_file_list = dir([DirectoryName filesep M_.fname '_smooth*.mat']);
|
||||
jfile=0;
|
||||
for j=1:length(temp_smooth_file_list)
|
||||
if isempty(strfind(temp_smooth_file_list(j).name,'smoothed')),
|
||||
jfile=jfile+1;
|
||||
filsmooth(jfile)=temp_smooth_file_list(j);
|
||||
end
|
||||
end
|
||||
filupdate = dir([DirectoryName filesep M_.fname '_update*.mat']);
|
||||
filparam = dir([DirectoryName filesep M_.fname '_param*.mat']);
|
||||
x=[];
|
||||
|
@ -156,11 +157,11 @@ if ~loadSA
|
|||
sto_ys=[];
|
||||
for j=1:length(filparam)
|
||||
if isempty(strmatch([M_.fname '_param_irf'],filparam(j).name))
|
||||
load([DirectoryName filesep filparam(j).name]);
|
||||
x=[x; stock];
|
||||
logpo2=[logpo2; stock_logpo];
|
||||
sto_ys=[sto_ys; stock_ys];
|
||||
clear stock stock_logpo stock_ys;
|
||||
temp=load([DirectoryName filesep filparam(j).name]); % from prior_posterior_statistics_core
|
||||
x=[x; temp.stock];
|
||||
logpo2=[logpo2; temp.stock_logpo];
|
||||
sto_ys=[sto_ys; temp.stock_ys];
|
||||
clear temp;
|
||||
end
|
||||
end
|
||||
nruns=size(x,1);
|
||||
|
@ -168,38 +169,41 @@ if ~loadSA
|
|||
if options_.opt_gsa.ppost || (options_.opt_gsa.ppost==0 && options_.opt_gsa.lik_only==0)
|
||||
skipline()
|
||||
disp('Computing RMSE''s...')
|
||||
jxj=NaN(length(vvarvecm),1);
|
||||
js=NaN(length(vvarvecm),1);
|
||||
yss=NaN(length(vvarvecm),gend,size(sto_ys,1));
|
||||
for i = 1:length(vvarvecm)
|
||||
vj = vvarvecm{i};
|
||||
jxj(i) = strmatch(vj, lgy_(dr_.order_var), 'exact');
|
||||
js(i) = strmatch(vj, lgy_, 'exact');
|
||||
jxj(i) = strmatch(vj, M_.endo_names(oo_.dr.order_var), 'exact');
|
||||
js(i) = strmatch(vj, M_.endo_names, 'exact');
|
||||
yss(i,:,:)=repmat(sto_ys(:,js(i))',[gend,1]);
|
||||
end
|
||||
if exist('xparam1','var')
|
||||
[alphahat,etahat,epsilonhat,ahat,SteadyState,trend_coeff,aK] = DsgeSmoother(xparam1,gend,Y,data_index,missing_value,M_,oo_,options_,bayestopt_,estim_params_);
|
||||
y0 = reshape( squeeze(aK(1,jxj,1:gend)),[gend length(jxj)]);% + kron(ys_mode(js),ones(1,gend)));
|
||||
yobs = transpose( ahat(jxj,:));% + kron(ys_mode(js),ones(1,gend)));
|
||||
[~,~,~,ahat,~,~,aK] = DsgeSmoother(xparam1,gend,Y,data_index,missing_value,M_,oo_,options_,bayestopt_,estim_params_);
|
||||
y0 = reshape( squeeze(aK(1,jxj,1:gend)),[gend length(jxj)]);
|
||||
yobs = transpose( ahat(jxj,:));
|
||||
rmse_mode = sqrt(mean((yobs(istart:end,:)-y0(istart:end,:)).^2));
|
||||
r2_mode = 1-sum((yobs(istart:end,:)-y0(istart:end,:)).^2)./sum(yobs(istart:end,:).^2);
|
||||
end
|
||||
y0=-yss;
|
||||
|
||||
y0=-yss; %demean everything using the theoretical mean, i.e. steady state
|
||||
nbb=0;
|
||||
for j=1:length(filfilt)
|
||||
load([DirectoryName filesep M_.fname '_filter_step_ahead',num2str(j),'.mat']);
|
||||
nb = size(stock,4);
|
||||
y0(:,:,nbb+1:nbb+nb)=y0(:,:,nbb+1:nbb+nb)+reshape(stock(1,js,1:gend,:),[length(js) gend nb]);
|
||||
temp=load([DirectoryName filesep M_.fname '_filter_step_ahead',num2str(j),'.mat']);
|
||||
nb = size(temp.stock,4);
|
||||
y0(:,:,nbb+1:nbb+nb)=y0(:,:,nbb+1:nbb+nb)+reshape(temp.stock(1,js,1:gend,:),[length(js) gend nb]);
|
||||
nbb=nbb+nb;
|
||||
clear stock;
|
||||
clear temp;
|
||||
end
|
||||
yobs=-yss;
|
||||
nbb=0;
|
||||
for j=1:length(filupdate)
|
||||
load([DirectoryName filesep M_.fname '_update',num2str(j),'.mat']);
|
||||
nb = size(stock,3);
|
||||
yobs(:,:,nbb+1:nbb+nb)=yobs(:,:,nbb+1:nbb+nb)+reshape(stock(js,1:gend,:),[length(js) gend nb]);
|
||||
temp=load([DirectoryName filesep M_.fname '_update',num2str(j),'.mat']);
|
||||
nb = size(temp.stock,3);
|
||||
yobs(:,:,nbb+1:nbb+nb)=yobs(:,:,nbb+1:nbb+nb)+reshape(temp.stock(js,1:gend,:),[length(js) gend nb]);
|
||||
nbb=nbb+nb;
|
||||
clear stock;
|
||||
clear temp;
|
||||
end
|
||||
y0M=mean(y0,2);
|
||||
rmse_MC=zeros(nruns,length(js));
|
||||
r2_MC=zeros(nruns,length(js));
|
||||
for j=1:nruns
|
||||
|
@ -207,14 +211,15 @@ if ~loadSA
|
|||
r2_MC(j,:) = 1-mean((yobs(:,istart:end,j)'-y0(:,istart:end,j)').^2)./mean((yobs(:,istart:end,j)').^2);
|
||||
end
|
||||
if exist('xparam1_mean','var')
|
||||
[alphahat,etahat,epsilonhat,ahat,SteadyState,trend_coeff,aK] = DsgeSmoother(xparam1_mean,gend,Y,data_index,missing_value,M_,oo_,options_,bayestopt_,estim_params_);
|
||||
y0 = reshape( squeeze(aK(1,jxj,1:gend)),[gend length(jxj)]);% + kron(ys_mean(js),ones(1,gend)));
|
||||
yobs = transpose( ahat(jxj,:));% + kron(ys_mean(js),ones(1,gend)));
|
||||
[~,~,~,ahat,~,~,aK] = DsgeSmoother(xparam1_mean,gend,Y,data_index,missing_value,M_,oo_,options_,bayestopt_,estim_params_);
|
||||
y0 = reshape( squeeze(aK(1,jxj,1:gend)),[gend length(jxj)]);
|
||||
yobs = transpose( ahat(jxj,:));
|
||||
rmse_pmean = sqrt(mean((yobs(istart:end,:)-y0(istart:end,:)).^2));
|
||||
r2_pmean = 1-mean((yobs(istart:end,:)-y0(istart:end,:)).^2)./mean(yobs(istart:end,:).^2);
|
||||
end
|
||||
clear stock_filter;
|
||||
end
|
||||
lnprior=NaN(nruns,1);
|
||||
for j=1:nruns
|
||||
lnprior(j,1) = priordens(x(j,:)',bayestopt_.pshape,bayestopt_.p6,bayestopt_.p7,bayestopt_.p3,bayestopt_.p4);
|
||||
end
|
||||
|
@ -242,7 +247,7 @@ if ~loadSA
|
|||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
else % loadSA
|
||||
if options_.opt_gsa.lik_only && options_.opt_gsa.ppost==0
|
||||
load([OutDir,filesep,fnamtmp, '.mat'],'x','logpo2','likelihood');
|
||||
else
|
||||
|
@ -252,27 +257,27 @@ else
|
|||
nruns=size(x,1);
|
||||
nfilt=floor(pfilt*nruns);
|
||||
end
|
||||
% smirnov tests
|
||||
% Smirnov tests
|
||||
nfilt0 = nfilt*ones(length(vvarvecm), 1);
|
||||
logpo2=logpo2(:);
|
||||
if ~options_.opt_gsa.ppost
|
||||
[dum, ipost]=sort(-logpo2);
|
||||
[dum, ilik]=sort(-likelihood);
|
||||
[~, ipost]=sort(-logpo2);
|
||||
[~, ilik]=sort(-likelihood);
|
||||
end
|
||||
|
||||
% visual scatter analysis!
|
||||
if options_.opt_gsa.ppost
|
||||
tmp_title='R2 Posterior:';
|
||||
atitle='R2 Posterior:';
|
||||
tmp_title='R2 Scatter plot: Posterior';
|
||||
atitle='R2 Scatter plot: Posterior';
|
||||
asname='r2_post';
|
||||
else
|
||||
if options_.opt_gsa.pprior
|
||||
tmp_title='R2 Prior:';
|
||||
atitle='R2 Prior:';
|
||||
tmp_title='R2 Scatter plot: Prior';
|
||||
atitle='R2 Scatter plot: Prior';
|
||||
asname='r2_prior';
|
||||
else
|
||||
tmp_title='R2 MC:';
|
||||
atitle='R2 MC:';
|
||||
tmp_title='R2 Scatter plot: MC';
|
||||
atitle='R2 Scatter plot: MC';
|
||||
asname='r2_mc';
|
||||
end
|
||||
end
|
||||
|
@ -283,7 +288,7 @@ options_scatter.OutputDirectoryName = OutDir;
|
|||
options_scatter.amcf_name = asname;
|
||||
options_scatter.amcf_title = atitle;
|
||||
options_scatter.title = tmp_title;
|
||||
scatter_analysis(r2_MC, x,options_scatter, options_);
|
||||
gsa.scatter_analysis(r2_MC, x,options_scatter, options_);
|
||||
% end of visual scatter analysis
|
||||
|
||||
if ~options_.opt_gsa.ppost && options_.opt_gsa.lik_only
|
||||
|
@ -297,13 +302,10 @@ if ~options_.opt_gsa.ppost && options_.opt_gsa.lik_only
|
|||
options_mcf.pvalue_ks = alpha;
|
||||
options_mcf.pvalue_corr = pvalue;
|
||||
options_mcf.alpha2 = alpha2;
|
||||
options_mcf.param_names = param_names;
|
||||
if options_.TeX
|
||||
[pnames,pnames_tex]=get_LaTeX_parameter_names(M_,options_,estim_params_,bayestopt_);
|
||||
options_mcf.param_names = pnames;
|
||||
options_mcf.param_names_tex = pnames_tex;
|
||||
options_mcf.param_names_tex = param_names_tex;
|
||||
else
|
||||
[pnames]=get_LaTeX_parameter_names(M_,options_,estim_params_,bayestopt_);
|
||||
options_mcf.param_names = pnames;
|
||||
options_mcf.param_names_tex = {};
|
||||
end
|
||||
options_mcf.fname_ = fname_;
|
||||
|
@ -313,7 +315,12 @@ if ~options_.opt_gsa.ppost && options_.opt_gsa.lik_only
|
|||
options_mcf.title = atitle;
|
||||
options_mcf.beha_title = 'better posterior kernel';
|
||||
options_mcf.nobeha_title = 'worse posterior kernel';
|
||||
mcf_analysis(x, ipost(1:nfilt), ipost(nfilt+1:end), options_mcf, options_);
|
||||
if options_.TeX
|
||||
options_mcf.beha_title_latex = 'better posterior kernel';
|
||||
options_mcf.nobeha_title_latex = 'worse posterior kernel';
|
||||
end
|
||||
|
||||
gsa.monte_carlo_filtering_analysis(x, ipost(1:nfilt), ipost(nfilt+1:end), options_mcf, M_, options_, bayestopt_, estim_params_);
|
||||
if options_.opt_gsa.pprior
|
||||
anam = 'rmse_prior_lik';
|
||||
atitle = 'RMSE prior: Log Likelihood Kernel';
|
||||
|
@ -326,15 +333,20 @@ if ~options_.opt_gsa.ppost && options_.opt_gsa.lik_only
|
|||
options_mcf.title = atitle;
|
||||
options_mcf.beha_title = 'better likelihood';
|
||||
options_mcf.nobeha_title = 'worse likelihood';
|
||||
mcf_analysis(x, ilik(1:nfilt), ilik(nfilt+1:end), options_mcf, options_);
|
||||
if options_.TeX
|
||||
options_mcf.beha_title_latex = 'better likelihood';
|
||||
options_mcf.nobeha_title_latex = 'worse likelihood';
|
||||
end
|
||||
|
||||
gsa.monte_carlo_filtering_analysis(x, ilik(1:nfilt), ilik(nfilt+1:end), options_mcf, M_, options_, bayestopt_, estim_params_);
|
||||
|
||||
else
|
||||
if options_.opt_gsa.ppost
|
||||
rmse_txt=rmse_pmean;
|
||||
r2_txt=r2_pmean;
|
||||
else
|
||||
if options_.opt_gsa.pprior || ~exist('rmse_pmean')
|
||||
if exist('rmse_mode')
|
||||
if options_.opt_gsa.pprior || ~exist('rmse_pmean','var')
|
||||
if exist('rmse_mode','var')
|
||||
rmse_txt=rmse_mode;
|
||||
r2_txt=r2_mode;
|
||||
else
|
||||
|
@ -346,18 +358,19 @@ else
|
|||
r2_txt=r2_pmean;
|
||||
end
|
||||
end
|
||||
ixx=NaN(size(rmse_MC,1),length(vvarvecm));
|
||||
for i = 1:length(vvarvecm)
|
||||
[dum, ixx(:,i)] = sort(rmse_MC(:,i));
|
||||
[~, ixx(:,i)] = sort(rmse_MC(:,i));
|
||||
end
|
||||
PP = ones(npar+nshock, length(vvarvecm));
|
||||
PPV = ones(length(vvarvecm), length(vvarvecm), npar+nshock);
|
||||
SS = zeros(npar+nshock, length(vvarvecm));
|
||||
for j = 1:npar+nshock
|
||||
for i = 1:length(vvarvecm)
|
||||
[H, P, KSSTAT] = smirnov(x(ixx(nfilt0(i)+1:end,i),j),x(ixx(1:nfilt0(i),i),j), alpha);
|
||||
[H1, P1, KSSTAT1] = smirnov(x(ixx(nfilt0(i)+1:end,i),j),x(ixx(1:nfilt0(i),i),j),alpha,1);
|
||||
[H2, P2, KSSTAT2] = smirnov(x(ixx(nfilt0(i)+1:end,i),j),x(ixx(1:nfilt0(i),i),j),alpha,-1);
|
||||
if H1 & H2==0
|
||||
[~, P] = gsa.smirnov_test(x(ixx(nfilt0(i)+1:end,i),j),x(ixx(1:nfilt0(i),i),j), alpha);
|
||||
[H1] = gsa.smirnov_test(x(ixx(nfilt0(i)+1:end,i),j),x(ixx(1:nfilt0(i),i),j),alpha,1);
|
||||
[H2] = gsa.smirnov_test(x(ixx(nfilt0(i)+1:end,i),j),x(ixx(1:nfilt0(i),i),j),alpha,-1);
|
||||
if H1==0 && H2==0
|
||||
SS(j,i)=1;
|
||||
elseif H1==0
|
||||
SS(j,i)=-1;
|
||||
|
@ -369,7 +382,7 @@ else
|
|||
for i = 1:length(vvarvecm)
|
||||
for l = 1:length(vvarvecm)
|
||||
if l~=i && PP(j,i)<alpha && PP(j,l)<alpha
|
||||
[H,P,KSSTAT] = smirnov(x(ixx(1:nfilt0(i),i),j),x(ixx(1:nfilt0(l),l),j), alpha);
|
||||
[~,P] = gsa.smirnov_test(x(ixx(1:nfilt0(i),i),j),x(ixx(1:nfilt0(l),l),j), alpha);
|
||||
PPV(i,l,j) = P;
|
||||
elseif l==i
|
||||
PPV(i,l,j) = PP(j,i);
|
||||
|
@ -391,34 +404,38 @@ else
|
|||
end
|
||||
if mod(i,9)==1
|
||||
ifig=ifig+1;
|
||||
hh=dyn_figure(options_.nodisplay,'name',[temp_name,' ',int2str(ifig)]);
|
||||
hh_fig=dyn_figure(options_.nodisplay,'name',[temp_name,' ',int2str(ifig)]);
|
||||
end
|
||||
subplot(3,3,i-9*(ifig-1))
|
||||
h=cumplot(lnprior(ixx(1:nfilt0(i),i)));
|
||||
h=gsa.cumplot(lnprior(ixx(1:nfilt0(i),i)));
|
||||
set(h,'color','blue','linewidth',2)
|
||||
hold on, h=cumplot(lnprior);
|
||||
hold on, h=gsa.cumplot(lnprior);
|
||||
set(h,'color','k','linewidth',1)
|
||||
h=cumplot(lnprior(ixx(nfilt0(i)+1:end,i)));
|
||||
h=gsa.cumplot(lnprior(ixx(nfilt0(i)+1:end,i)));
|
||||
set(h,'color','red','linewidth',2)
|
||||
title(vvarvecm{i},'interpreter','none')
|
||||
if options_.TeX
|
||||
title(vvarvecm_tex{i},'interpreter','latex')
|
||||
else
|
||||
title(vvarvecm{i},'interpreter','none')
|
||||
end
|
||||
if mod(i,9)==0 || i==length(vvarvecm)
|
||||
if ~isoctave
|
||||
annotation('textbox', [0.1,0,0.35,0.05],'String', 'Log-prior for BETTER R2','Color','Blue','horizontalalignment','center');
|
||||
annotation('textbox', [0.55,0,0.35,0.05],'String', 'Log-prior for WORSE R2', 'Color','Red','horizontalalignment','center');
|
||||
end
|
||||
if options_.opt_gsa.ppost
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_post_lnprior',int2str(ifig)],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_post_lnprior',int2str(ifig)],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir '/' fname_ '_rmse_post_lnprior',int2str(ifig)],ifig,[temp_name,' ',int2str(ifig)],'rmse_post_lnprior',options_.figures.textwidth*min((i-9*(ifig-1))/3,1))
|
||||
end
|
||||
else
|
||||
if options_.opt_gsa.pprior
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_prior_lnprior',int2str(ifig) ],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_prior_lnprior',int2str(ifig) ],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir '/' fname_ '_rmse_prior_lnprior',int2str(ifig)],ifig,[temp_name,' ',int2str(ifig)],'rmse_prior_lnprior',options_.figures.textwidth*min((i-9*(ifig-1))/3,1))
|
||||
end
|
||||
else
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_mc_lnprior',int2str(ifig) ],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_mc_lnprior',int2str(ifig) ],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir '/' fname_ '_rmse_mc_lnprior',int2str(ifig)],ifig,[temp_name,' ',int2str(ifig)],'rmse_mc_lnprior',options_.figures.textwidth*min((i-9*(ifig-1))/3,1))
|
||||
end
|
||||
|
@ -439,16 +456,20 @@ else
|
|||
end
|
||||
if mod(i,9)==1
|
||||
ifig=ifig+1;
|
||||
hh = dyn_figure(options_.nodisplay,'Name',[temp_name,' ',int2str(ifig)]);
|
||||
hh_fig = dyn_figure(options_.nodisplay,'Name',[temp_name,' ',int2str(ifig)]);
|
||||
end
|
||||
subplot(3,3,i-9*(ifig-1))
|
||||
h=cumplot(likelihood(ixx(1:nfilt0(i),i)));
|
||||
h=gsa.cumplot(likelihood(ixx(1:nfilt0(i),i)));
|
||||
set(h,'color','blue','linewidth',2)
|
||||
hold on, h=cumplot(likelihood);
|
||||
hold on, h=gsa.cumplot(likelihood);
|
||||
set(h,'color','k','linewidth',1)
|
||||
h=cumplot(likelihood(ixx(nfilt0(i)+1:end,i)));
|
||||
h=gsa.cumplot(likelihood(ixx(nfilt0(i)+1:end,i)));
|
||||
set(h,'color','red','linewidth',2)
|
||||
title(vvarvecm{i},'interpreter','none')
|
||||
if options_.TeX
|
||||
title(vvarvecm_tex{i},'interpreter','latex')
|
||||
else
|
||||
title(vvarvecm{i},'interpreter','none')
|
||||
end
|
||||
if options_.opt_gsa.ppost==0
|
||||
set(gca,'xlim',[min( likelihood(ixx(1:nfilt0(i),i)) ) max( likelihood(ixx(1:nfilt0(i),i)) )])
|
||||
end
|
||||
|
@ -458,18 +479,18 @@ else
|
|||
annotation('textbox', [0.55,0,0.35,0.05],'String', 'Log-likelihood for WORSE R2', 'Color','Red','horizontalalignment','center');
|
||||
end
|
||||
if options_.opt_gsa.ppost
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_post_lnlik',int2str(ifig) ],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_post_lnlik',int2str(ifig) ],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_post_lnprior',int2str(ifig)],ifig,[temp_name,' ',int2str(ifig)],'rmse_post_lnprior',options_.figures.textwidth*min((i-9*(ifig-1))/3,1));
|
||||
end
|
||||
else
|
||||
if options_.opt_gsa.pprior
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_prior_lnlik',int2str(ifig)],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_prior_lnlik',int2str(ifig)],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_prior_lnlik',int2str(ifig)],ifig,[temp_name,' ',int2str(ifig)],'rmse_prior_lnlik',options_.figures.textwidth*min((i-9*(ifig-1))/3,1));
|
||||
end
|
||||
else
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_mc_lnlik',int2str(ifig) ],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_mc_lnlik',int2str(ifig) ],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_mc_lnlik',int2str(ifig) ],ifig,[temp_name,' ',int2str(ifig)],'rmse_mc_lnlik',options_.figures.textwidth*min((i-9*(ifig-1))/3,1));
|
||||
end
|
||||
|
@ -490,16 +511,20 @@ else
|
|||
end
|
||||
if mod(i,9)==1
|
||||
ifig=ifig+1;
|
||||
hh = dyn_figure(options_.nodisplay,'Name',[temp_name,' ',int2str(ifig)]);
|
||||
hh_fig = dyn_figure(options_.nodisplay,'Name',[temp_name,' ',int2str(ifig)]);
|
||||
end
|
||||
subplot(3,3,i-9*(ifig-1))
|
||||
h=cumplot(logpo2(ixx(1:nfilt0(i),i)));
|
||||
h=gsa.cumplot(logpo2(ixx(1:nfilt0(i),i)));
|
||||
set(h,'color','blue','linewidth',2)
|
||||
hold on, h=cumplot(logpo2);
|
||||
hold on, h=gsa.cumplot(logpo2);
|
||||
set(h,'color','k','linewidth',1)
|
||||
h=cumplot(logpo2(ixx(nfilt0(i)+1:end,i)));
|
||||
h=gsa.cumplot(logpo2(ixx(nfilt0(i)+1:end,i)));
|
||||
set(h,'color','red','linewidth',2)
|
||||
title(vvarvecm{i},'interpreter','none')
|
||||
if options_.TeX
|
||||
title(vvarvecm_tex{i},'interpreter','latex')
|
||||
else
|
||||
title(vvarvecm{i},'interpreter','none')
|
||||
end
|
||||
if options_.opt_gsa.ppost==0
|
||||
set(gca,'xlim',[min( logpo2(ixx(1:nfilt0(i),i)) ) max( logpo2(ixx(1:nfilt0(i),i)) )])
|
||||
end
|
||||
|
@ -509,18 +534,18 @@ else
|
|||
annotation('textbox', [0.55,0,0.35,0.05],'String', 'Log-posterior for WORSE R2', 'Color','Red','horizontalalignment','center');
|
||||
end
|
||||
if options_.opt_gsa.ppost
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_post_lnpost',int2str(ifig) ],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_post_lnpost',int2str(ifig) ],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_post_lnpost',int2str(ifig) ],ifig,[temp_name,' ',int2str(ifig)],'rmse_post_lnpost',options_.figures.textwidth*min((i-9*(ifig-1))/3,1));
|
||||
end
|
||||
else
|
||||
if options_.opt_gsa.pprior
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_prior_lnpost',int2str(ifig)],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_prior_lnpost',int2str(ifig)],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_prior_lnpost',int2str(ifig)],ifig,[temp_name,' ',int2str(ifig)],'rmse_prior_lnpost',options_.figures.textwidth*min((i-9*(ifig-1))/3,1));
|
||||
end
|
||||
else
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_mc_lnpost',int2str(ifig)],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_mc_lnpost',int2str(ifig)],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_mc_lnpost',int2str(ifig)],ifig,[temp_name,' ',int2str(ifig)],'rmse_mc_lnpost',options_.figures.textwidth*min((i-9*(ifig-1))/3,1));
|
||||
end
|
||||
|
@ -529,15 +554,6 @@ else
|
|||
end
|
||||
end
|
||||
end
|
||||
if options_.TeX
|
||||
[pnames,pnames_tex]=get_LaTeX_parameter_names(M_,options_,estim_params_,bayestopt_);
|
||||
param_names = pnames;
|
||||
param_names_tex = pnames_tex;
|
||||
else
|
||||
[pnames]=get_LaTeX_parameter_names(M_,options_,estim_params_,bayestopt_);
|
||||
param_names = pnames;
|
||||
param_names_tex = {};
|
||||
end
|
||||
skipline()
|
||||
title_string='RMSE over the MC sample:';
|
||||
data_mat=[min(rmse_MC)' max(rmse_MC)'];
|
||||
|
@ -549,7 +565,7 @@ else
|
|||
end
|
||||
invar = find( std(rmse_MC)./mean(rmse_MC)<=0.0001 );
|
||||
if ~isempty(invar)
|
||||
skipline(2)
|
||||
skipline(1)
|
||||
disp('RMSE is not varying significantly over the MC sample for the following variables:')
|
||||
disp(vvarvecm{invar})
|
||||
disp('These variables are excluded from SA')
|
||||
|
@ -561,8 +577,7 @@ else
|
|||
rmse_MC = rmse_MC(:,ivar);
|
||||
skipline()
|
||||
disp(['Sample filtered the ',num2str(pfilt*100),'% best RMSE''s for each observed series ...' ])
|
||||
skipline(2)
|
||||
disp('RMSE ranges after filtering:')
|
||||
skipline(1)
|
||||
title_string='RMSE ranges after filtering:';
|
||||
if options_.opt_gsa.ppost==0 && options_.opt_gsa.pprior
|
||||
headers = {'Variable'; 'min'; 'max'; 'min'; 'max'; 'posterior mode'};
|
||||
|
@ -589,7 +604,7 @@ else
|
|||
else
|
||||
values_length = max(ceil(max(max(log10(abs(data_mat(isfinite(data_mat))))))),1)+val_precis+1;
|
||||
end
|
||||
if any(data_mat) < 0 %add one character for minus sign
|
||||
if any(data_mat < 0) %add one character for minus sign
|
||||
values_length = values_length+1;
|
||||
end
|
||||
headers_length = cellofchararraymaxlength(headers(2:end));
|
||||
|
@ -598,7 +613,6 @@ else
|
|||
else
|
||||
val_width = max(headers_length, values_length)+2;
|
||||
end
|
||||
value_format = sprintf('%%%d.%df',val_width,val_precis);
|
||||
header_string_format = sprintf('%%%ds',val_width);
|
||||
if options_.opt_gsa.ppost==0 && options_.opt_gsa.pprior
|
||||
optional_header=sprintf([label_format_leftbound,header_string_format,header_string_format,header_string_format,header_string_format],'','',['best ',num2str(pfilt*100),'% filtered'],'','remaining 90%');
|
||||
|
@ -610,7 +624,7 @@ else
|
|||
if options_.opt_gsa.ppost==0 && options_.opt_gsa.pprior
|
||||
optional_header={[' & \multicolumn{2}{c}{best ',num2str(pfilt*100),' filtered} & \multicolumn{2}{c}{remaining 90\%}\\']};
|
||||
else
|
||||
optional_header={[' & \multicolumn{2}{c}{best filtered} & \multicolumn{2}{c}{remaining}\\']};
|
||||
optional_header={' & \multicolumn{2}{c}{best filtered} & \multicolumn{2}{c}{remaining}\\'};
|
||||
end
|
||||
dyn_latex_table(M_, options_, title_string, 'RMSE_ranges_after_filtering', headers_tex, vvarvecm_tex, data_mat, 0, val_width, val_precis, optional_header);
|
||||
end
|
||||
|
@ -657,7 +671,7 @@ else
|
|||
else
|
||||
values_length = max(ceil(max(max(log10(abs(data_mat(isfinite(data_mat))))))),1)+val_precis+1;
|
||||
end
|
||||
if any(data_mat) < 0 %add one character for minus sign
|
||||
if any(data_mat < 0) %add one character for minus sign
|
||||
values_length = values_length+1;
|
||||
end
|
||||
headers_length = cellofchararraymaxlength(headers(2:end));
|
||||
|
@ -666,7 +680,6 @@ else
|
|||
else
|
||||
val_width = max(headers_length, values_length)+2;
|
||||
end
|
||||
value_format = sprintf('%%%d.%df',val_width,val_precis);
|
||||
header_string_format = sprintf('%%%ds',val_width);
|
||||
|
||||
if options_.opt_gsa.ppost==0 && options_.opt_gsa.pprior
|
||||
|
@ -679,7 +692,7 @@ else
|
|||
if ~options_.opt_gsa.ppost && options_.opt_gsa.pprior
|
||||
optional_header = {[' & \multicolumn{2}{c}{best ',num2str(pfilt*100),' filtered} & \multicolumn{2}{c}{remaining 90\%}\\']};
|
||||
else
|
||||
optional_header = {[' & \multicolumn{2}{c}{best filtered} & \multicolumn{2}{c}{remaining}\\']};
|
||||
optional_header = {' & \multicolumn{2}{c}{best filtered} & \multicolumn{2}{c}{remaining}\\'};
|
||||
end
|
||||
dyn_latex_table(M_, options_, title_string, 'R2_ranges_after_filtering', headers_tex, vvarvecm_tex, data_mat, 0, val_width, val_precis, optional_header);
|
||||
end
|
||||
|
@ -690,16 +703,15 @@ else
|
|||
SP(ns,j)=ones(size(ns));
|
||||
SS(:,j)=SS(:,j).*SP(:,j);
|
||||
end
|
||||
|
||||
for j=1:npar+nshock %estim_params_.np,
|
||||
nsp=NaN(npar+nshock,1);
|
||||
for j=1:npar+nshock
|
||||
nsp(j)=length(find(SP(j,:)));
|
||||
end
|
||||
snam0=param_names(find(nsp==0));
|
||||
snam1=param_names(find(nsp==1));
|
||||
snam2=param_names(find(nsp>1));
|
||||
snam=param_names(find(nsp>0));
|
||||
snam0=param_names(nsp==0);
|
||||
snam1=param_names(nsp==1);
|
||||
snam2=param_names(nsp>1);
|
||||
nsnam=(find(nsp>1));
|
||||
skipline(2)
|
||||
skipline(1)
|
||||
disp('These parameters do not affect significantly the fit of ANY observed series:')
|
||||
disp(char(snam0))
|
||||
skipline()
|
||||
|
@ -708,7 +720,6 @@ else
|
|||
skipline()
|
||||
disp('These parameters affect MORE THAN ONE observed series: trade off exists!')
|
||||
disp(char(snam2))
|
||||
pnam=bayestopt_.name;
|
||||
% plot trade-offs
|
||||
if ~options_.nograph
|
||||
a00=jet(length(vvarvecm));
|
||||
|
@ -740,62 +751,74 @@ else
|
|||
options_mcf.amcf_title = [atitle ' ' vvarvecm{iy}];
|
||||
options_mcf.beha_title = ['better fit of ' vvarvecm{iy}];
|
||||
options_mcf.nobeha_title = ['worse fit of ' vvarvecm{iy}];
|
||||
if options_.TeX
|
||||
options_mcf.beha_title_latex = ['better fit of ' vvarvecm_tex{iy}];
|
||||
options_mcf.nobeha_title_latex = ['worse fit of ' vvarvecm_tex{iy}];
|
||||
end
|
||||
options_mcf.title = ['the fit of ' vvarvecm{iy}];
|
||||
mcf_analysis(x, ixx(1:nfilt0(iy),iy), ixx(nfilt0(iy)+1:end,iy), options_mcf, options_);
|
||||
gsa.monte_carlo_filtering_analysis(x, ixx(1:nfilt0(iy),iy), ixx(nfilt0(iy)+1:end,iy), options_mcf, M_, options_, bayestopt_, estim_params_);
|
||||
end
|
||||
for iy = 1:length(vvarvecm)
|
||||
ipar = find(any(squeeze(PPV(iy,:,:))<alpha));
|
||||
for ix=1:ceil(length(ipar)/5)
|
||||
hh = dyn_figure(options_.nodisplay,'name',[temp_name,' observed variable ', vvarvecm{iy}]);
|
||||
hh_fig = dyn_figure(options_.nodisplay,'name',[temp_name,' observed variable ', vvarvecm{iy}]);
|
||||
for j=1+5*(ix-1):min(length(ipar),5*ix)
|
||||
subplot(2,3,j-5*(ix-1))
|
||||
h0=cumplot(x(:,ipar(j)));
|
||||
h0=gsa.cumplot(x(:,ipar(j)));
|
||||
set(h0,'color',[0 0 0])
|
||||
hold on,
|
||||
iobs=find(squeeze(PPV(iy,:,ipar(j)))<alpha);
|
||||
for i = 1:length(vvarvecm)
|
||||
if any(iobs==i) || i==iy
|
||||
h0=cumplot(x(ixx(1:nfilt0(i),i),ipar(j)));
|
||||
h0=gsa.cumplot(x(ixx(1:nfilt0(i),i),ipar(j)));
|
||||
if ~isoctave
|
||||
hcmenu = uicontextmenu;
|
||||
uimenu(hcmenu,'Label',vvarvecm{i});
|
||||
set(h0,'uicontextmenu',hcmenu)
|
||||
end
|
||||
else
|
||||
h0=cumplot(x(ixx(1:nfilt0(i),i),ipar(j))*NaN);
|
||||
h0=gsa.cumplot(x(ixx(1:nfilt0(i),i),ipar(j))*NaN);
|
||||
end
|
||||
set(h0,'color',a00(i,:),'linewidth',2)
|
||||
end
|
||||
ydum=get(gca,'ylim');
|
||||
if exist('xparam1')
|
||||
if exist('xparam1','var')
|
||||
xdum=xparam1(ipar(j));
|
||||
h1=plot([xdum xdum],ydum);
|
||||
set(h1,'color',[0.85 0.85 0.85],'linewidth',2)
|
||||
end
|
||||
xlabel('')
|
||||
title([pnam{ipar(j)}],'interpreter','none')
|
||||
if options_.TeX
|
||||
title([param_names_tex{ipar(j)}],'interpreter','latex')
|
||||
else
|
||||
title([param_names{ipar(j)}],'interpreter','none')
|
||||
end
|
||||
end
|
||||
if isoctave
|
||||
legend(vertcat('base',vvarvecm),'location','eastoutside');
|
||||
else
|
||||
h0=legend(vertcat('base',vvarvecm));
|
||||
set(h0,'fontsize',6,'position',[0.7 0.1 0.2 0.3],'interpreter','none');
|
||||
if options_.TeX
|
||||
h0=legend(vertcat('base',vvarvecm_tex),'interpreter','latex');
|
||||
else
|
||||
h0=legend(vertcat('base',vvarvecm),'interpreter','none');
|
||||
end
|
||||
set(h0,'fontsize',6,'position',[0.7 0.1 0.2 0.3]);
|
||||
end
|
||||
if options_.opt_gsa.ppost
|
||||
dyn_saveas(hh,[ OutDir filesep fname_ '_rmse_post_' vvarvecm{iy} '_' int2str(ix)],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[ OutDir filesep fname_ '_rmse_post_' vvarvecm{iy} '_' int2str(ix)],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[ OutDir filesep fname_ '_rmse_post_' vvarvecm{iy} '_' int2str(ix)],ix,[temp_name,' observed variable $',vvarvecm_tex{iy} '$'],['rmse_post_' vvarvecm{iy}],1)
|
||||
create_TeX_loader(options_,[ OutDir filesep fname_ '_rmse_post_' vvarvecm{iy} '_' int2str(ix)],ix,[temp_name,' observed variable ',vvarvecm_tex{iy} ],['rmse_post_' vvarvecm{iy}],1)
|
||||
end
|
||||
else
|
||||
if options_.opt_gsa.pprior
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_prior_' vvarvecm{iy} '_' int2str(ix) ],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_prior_' vvarvecm{iy} '_' int2str(ix) ],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_prior_' vvarvecm{iy} '_' int2str(ix) ],ix,[temp_name,' observed variable $',vvarvecm_tex{iy} '$'],['rmse_prior_' vvarvecm{iy}],1)
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_prior_' vvarvecm{iy} '_' int2str(ix) ],ix,[temp_name,' observed variable ',vvarvecm_tex{iy}],['rmse_prior_' vvarvecm{iy}],1)
|
||||
end
|
||||
else
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_mc_' vvarvecm{iy} '_' int2str(ix)],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_mc_' vvarvecm{iy} '_' int2str(ix)],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_mc_' vvarvecm{iy} '_' int2str(ix)],ix,[temp_name,' observed variable $',vvarvecm_tex{iy} '$'],['rmse_mc_' vvarvecm{iy}],1)
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_mc_' vvarvecm{iy} '_' int2str(ix)],ix,[temp_name,' observed variable ',vvarvecm_tex{iy}],['rmse_mc_' vvarvecm{iy}],1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -803,18 +826,18 @@ else
|
|||
end
|
||||
% now I plot by individual parameters
|
||||
for ix=1:ceil(length(nsnam)/5)
|
||||
hh = dyn_figure(options_.nodisplay,'name',[temp_name,' estimated params and shocks ',int2str(ix)]);
|
||||
hh_fig = dyn_figure(options_.nodisplay,'name',[temp_name,' estimated params and shocks ',int2str(ix)]);
|
||||
for j=1+5*(ix-1):min(size(snam2,1),5*ix)
|
||||
subplot(2,3,j-5*(ix-1))
|
||||
h0=cumplot(x(:,nsnam(j)));
|
||||
h0=gsa.cumplot(x(:,nsnam(j)));
|
||||
set(h0,'color',[0 0 0])
|
||||
hold on,
|
||||
npx=find(SP(nsnam(j),:)==0);
|
||||
for i = 1:length(vvarvecm)
|
||||
if any(npx==i)
|
||||
h0=cumplot(x(ixx(1:nfilt0(i),i),nsnam(j))*NaN);
|
||||
h0=gsa.cumplot(x(ixx(1:nfilt0(i),i),nsnam(j))*NaN);
|
||||
else
|
||||
h0=cumplot(x(ixx(1:nfilt0(i),i),nsnam(j)));
|
||||
h0=gsa.cumplot(x(ixx(1:nfilt0(i),i),nsnam(j)));
|
||||
if ~isoctave
|
||||
hcmenu = uicontextmenu;
|
||||
uimenu(hcmenu,'Label', vvarvecm{i});
|
||||
|
@ -824,34 +847,42 @@ else
|
|||
set(h0,'color',a00(i,:),'linewidth',2)
|
||||
end
|
||||
ydum=get(gca,'ylim');
|
||||
if exist('xparam1')
|
||||
if exist('xparam1','var')
|
||||
xdum=xparam1(nsnam(j));
|
||||
h1=plot([xdum xdum],ydum);
|
||||
set(h1,'color',[0.85 0.85 0.85],'linewidth',2)
|
||||
end
|
||||
xlabel('')
|
||||
title([pnam{nsnam(j)}],'interpreter','none')
|
||||
if options_.TeX
|
||||
title([param_names_tex{nsnam(j)}],'interpreter','latex')
|
||||
else
|
||||
title([param_names{nsnam(j)}],'interpreter','none')
|
||||
end
|
||||
end
|
||||
%subplot(3,2,6)
|
||||
if isoctave
|
||||
legend(vertcat('base',vvarvecm),'location','eastoutside');
|
||||
else
|
||||
h0=legend(vertcat('base',vvarvecm));
|
||||
set(h0,'fontsize',6,'position',[0.7 0.1 0.2 0.3],'interpreter','none');
|
||||
if options_.TeX
|
||||
h0=legend(vertcat('base',vvarvecm_tex),'interpreter','latex');
|
||||
else
|
||||
h0=legend(vertcat('base',vvarvecm),'interpreter','none');
|
||||
end
|
||||
set(h0,'fontsize',6,'position',[0.7 0.1 0.2 0.3]);
|
||||
end
|
||||
if options_.opt_gsa.ppost
|
||||
dyn_saveas(hh,[ OutDir filesep fname_ '_rmse_post_params_' int2str(ix)],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[ OutDir filesep fname_ '_rmse_post_params_' int2str(ix)],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[ OutDir filesep fname_ '_rmse_post_params_' int2str(ix)],ix,[temp_name,' estimated params and shocks ',int2str(ix)],'rmse_post_params',1)
|
||||
end
|
||||
else
|
||||
if options_.opt_gsa.pprior
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_prior_params_' int2str(ix) ],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_prior_params_' int2str(ix) ],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_prior_params_' int2str(ix) ],ix,[temp_name,' estimated params and shocks ',int2str(ix)],'rmse_prior_params',1)
|
||||
end
|
||||
else
|
||||
dyn_saveas(hh,[OutDir filesep fname_ '_rmse_mc_params_' int2str(ix)],options_.nodisplay,options_.graph_format);
|
||||
dyn_saveas(hh_fig,[OutDir filesep fname_ '_rmse_mc_params_' int2str(ix)],options_.nodisplay,options_.graph_format);
|
||||
if options_.TeX
|
||||
create_TeX_loader(options_,[OutDir filesep fname_ '_rmse_mc_params_' int2str(ix)],ix,[temp_name,' estimated params and shocks ',int2str(ix)],'rmse_mc_params',1)
|
||||
end
|
||||
|
@ -885,11 +916,11 @@ pnames=cell(np,1);
|
|||
pnames_tex=cell(np,1);
|
||||
for ii=1:length(bayestopt_.name)
|
||||
if options_.TeX
|
||||
[param_name_temp, param_name_tex_temp]= get_the_name(ii,options_.TeX,M_,estim_params_,options_);
|
||||
pnames_tex{ii,1} = strrep(param_name_tex_temp,'$','');
|
||||
[param_name_temp, param_name_tex_temp]= get_the_name(ii,options_.TeX,M_,estim_params_,options_.varobs);
|
||||
pnames_tex{ii,1} = param_name_tex_temp;
|
||||
pnames{ii,1} = param_name_temp;
|
||||
else
|
||||
param_name_temp = get_the_name(ii,options_.TeX,M_,estim_params_,options_);
|
||||
param_name_temp = get_the_name(ii,options_.TeX,M_,estim_params_,options_.varobs);
|
||||
pnames{ii,1} = param_name_temp;
|
||||
end
|
||||
end
|
|
@ -0,0 +1,115 @@
|
|||
function indmcf = monte_carlo_filtering_analysis(lpmat, ibeha, inobeha, options_mcf, M_, options_, bayestopt_, estim_params_)
|
||||
% indmcf = monte_carlo_filtering_analysis(lpmat, ibeha, inobeha, options_mcf, M_, options_, bayestopt_, estim_params_)
|
||||
% Inputs:
|
||||
% - lpmat [double] Monte Carlo matrix
|
||||
% - ibeha [integer] index of behavioural runs
|
||||
% - inobeha [integer] index of non-behavioural runs
|
||||
% - options_gsa_ [structure] GSA options_
|
||||
% - M_ [structure] describing the model
|
||||
% - options_ [structure] describing the options
|
||||
% - bayestopt_ [structure] describing the priors
|
||||
% - estim_params_ [structure] characterizing parameters to be estimated
|
||||
%
|
||||
% Outputs:
|
||||
% - indmcf [double] results of matrix
|
||||
|
||||
% Written by Marco Ratto
|
||||
% Joint Research Centre, The European Commission,
|
||||
% marco.ratto@ec.europa.eu
|
||||
%
|
||||
|
||||
% Copyright © 2014 European Commission
|
||||
% Copyright © 2016-2023 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
pvalue_ks = options_mcf.pvalue_ks;
|
||||
pvalue_corr = options_mcf.pvalue_corr;
|
||||
alpha2 = options_mcf.alpha2;
|
||||
param_names = options_mcf.param_names;
|
||||
|
||||
if options_.TeX
|
||||
if ~isfield(options_mcf,'param_names_tex')
|
||||
param_names_tex = options_mcf.param_names;
|
||||
else
|
||||
param_names_tex = options_mcf.param_names_tex;
|
||||
end
|
||||
else
|
||||
param_names_tex = strrep(options_mcf.param_names,'_','\_');
|
||||
end
|
||||
amcf_name = options_mcf.amcf_name;
|
||||
amcf_title = options_mcf.amcf_title;
|
||||
beha_title = options_mcf.beha_title;
|
||||
nobeha_title = options_mcf.nobeha_title;
|
||||
if options_.TeX
|
||||
beha_title_latex = options_mcf.beha_title_latex;
|
||||
nobeha_title_latex = options_mcf.nobeha_title_latex;
|
||||
end
|
||||
title = options_mcf.title;
|
||||
fname_ = options_mcf.fname_;
|
||||
xparam1=[];
|
||||
if isfield(options_mcf,'xparam1')
|
||||
xparam1=options_mcf.xparam1;
|
||||
end
|
||||
OutputDirectoryName = options_mcf.OutputDirectoryName;
|
||||
|
||||
[proba, dproba] = gsa.stability_mapping_univariate(lpmat, ibeha, inobeha, [],fname_, options_, bayestopt_.name, estim_params_,0);
|
||||
indmcf=find(proba<pvalue_ks);
|
||||
[~,jtmp] = sort(proba(indmcf),1,'ascend');
|
||||
indmcf = indmcf(jtmp);
|
||||
if ~isempty(indmcf)
|
||||
skipline()
|
||||
headers = {'Parameter','d-stat','p-value'};
|
||||
labels = param_names(indmcf);
|
||||
data_mat=[dproba(indmcf) proba(indmcf)];
|
||||
options_temp.noprint=0;
|
||||
dyntable(options_temp,['Smirnov statistics in driving ', title],headers,labels,data_mat,size(labels,2)+2,16,3);
|
||||
if options_.TeX
|
||||
labels_TeX=param_names_tex(indmcf);
|
||||
M_temp.dname=OutputDirectoryName ;
|
||||
M_temp.fname=fname_;
|
||||
dyn_latex_table(M_temp,options_temp,['Smirnov statistics in driving ', strrep(title,'_','\\_')],amcf_name,headers,labels_TeX,data_mat,size(labels,2)+2,16,6);
|
||||
end
|
||||
end
|
||||
|
||||
if length(ibeha)>10 && length(inobeha)>10
|
||||
if options_.TeX
|
||||
indcorr1 = gsa.stability_mapping_bivariate(lpmat(ibeha,:),alpha2, pvalue_corr, M_, options_, bayestopt_, estim_params_, beha_title, beha_title_latex);
|
||||
indcorr2 = gsa.stability_mapping_bivariate(lpmat(inobeha,:),alpha2, pvalue_corr, M_, options_, bayestopt_, estim_params_, nobeha_title, nobeha_title_latex);
|
||||
else
|
||||
indcorr1 = gsa.stability_mapping_bivariate(lpmat(ibeha,:),alpha2, pvalue_corr, M_, options_, bayestopt_, estim_params_, beha_title);
|
||||
indcorr2 = gsa.stability_mapping_bivariate(lpmat(inobeha,:),alpha2, pvalue_corr, M_, options_, bayestopt_, estim_params_, nobeha_title);
|
||||
end
|
||||
indcorr = union(indcorr1(:), indcorr2(:));
|
||||
indcorr = indcorr(~ismember(indcorr(:),indmcf));
|
||||
indmcf = [indmcf(:); indcorr(:)];
|
||||
end
|
||||
if ~isempty(indmcf) && ~options_.nograph
|
||||
skipline()
|
||||
xx=[];
|
||||
if ~ isempty(xparam1)
|
||||
xx=xparam1(indmcf);
|
||||
end
|
||||
if options_.TeX
|
||||
gsa.scatter_mcf(lpmat(ibeha,indmcf),lpmat(inobeha,indmcf), param_names_tex(indmcf), ...
|
||||
'.', [fname_,'_',amcf_name], OutputDirectoryName, amcf_title,xx, options_, ...
|
||||
beha_title, nobeha_title, beha_title_latex, nobeha_title_latex)
|
||||
else
|
||||
gsa.scatter_mcf(lpmat(ibeha,indmcf),lpmat(inobeha,indmcf), param_names_tex(indmcf), ...
|
||||
'.', [fname_,'_',amcf_name], OutputDirectoryName, amcf_title,xx, options_, ...
|
||||
beha_title, nobeha_title)
|
||||
end
|
||||
end
|
|
@ -0,0 +1,60 @@
|
|||
function [vdec, cc, ac] = monte_carlo_moments(mm, ss, dr, M_, options_, estim_params_)
|
||||
% [vdec, cc, ac] = monte_carlo_moments(mm, ss, dr, M_, options_,estim_params_)
|
||||
% Conduct Monte Carlo simulation of second moments for GSA
|
||||
% Inputs:
|
||||
% - dr [structure] decision rules
|
||||
% - M_ [structure] model structure
|
||||
% - options_ [structure] Matlab's structure describing the current options
|
||||
% - estim_params_ [structure] characterizing parameters to be estimated
|
||||
%
|
||||
% Outputs:
|
||||
% - vdec [double] variance decomposition matrix
|
||||
% - cc [double] vector of unique elements of cross correlation matrix
|
||||
% - ac [cell] autocorrelation matrix
|
||||
|
||||
|
||||
% Copyright © 2012-2023 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
[~, nc1, nsam] = size(mm);
|
||||
nobs=length(options_.varobs);
|
||||
disp('monte_carlo_moments: Computing theoretical moments ...')
|
||||
h = dyn_waitbar(0,'Theoretical moments ...');
|
||||
vdec = zeros(nobs,M_.exo_nbr,nsam);
|
||||
cc = zeros(nobs,nobs,nsam);
|
||||
ac = zeros(nobs,nobs*options_.ar,nsam);
|
||||
|
||||
for j=1:nsam
|
||||
dr.ghx = mm(:, 1:(nc1-M_.exo_nbr),j);
|
||||
dr.ghu = mm(:, (nc1-M_.exo_nbr+1):end, j);
|
||||
if ~isempty(ss)
|
||||
M_=gsa.set_shocks_param(M_,estim_params_,ss(j,:));
|
||||
end
|
||||
[vdec(:,:,j), corr, autocorr] = gsa.th_moments(dr,options_,M_);
|
||||
cc(:,:,j)=triu(corr);
|
||||
dum=NaN(nobs,nobs*options_.ar);
|
||||
for i=1:options_.ar
|
||||
dum(:,(i-1)*nobs+1:i*nobs)=autocorr{i};
|
||||
end
|
||||
ac(:,:,j)=dum;
|
||||
if mod(j,3)==0
|
||||
dyn_waitbar(j/nsam,h)
|
||||
end
|
||||
end
|
||||
dyn_waitbar_close(h)
|
||||
skipline()
|
||||
disp('... done !')
|
|
@ -1,9 +1,14 @@
|
|||
function pdraw = prior_draw_gsa(init,rdraw)
|
||||
function pdraw = prior_draw(M_,bayestopt_,options_,estim_params_,init,rdraw)
|
||||
% pdraw = prior_draw(M_,bayestopt_,options_,estim_params_,init,rdraw)
|
||||
% Draws from the prior distributions for use with Sensitivity Toolbox for DYNARE
|
||||
%
|
||||
% INPUTS
|
||||
% o init [integer] scalar equal to 1 (first call) or 0.
|
||||
% o rdraw
|
||||
% - M_ [structure] describing the model
|
||||
% - bayestopt_ [structure] describing the priors
|
||||
% - options_ [structure] describing the options
|
||||
% - estim_params_ [structure] characterizing parameters to be estimated
|
||||
% - init [integer] scalar equal to 1 (first call) or 0.
|
||||
% - rdraw
|
||||
%
|
||||
% OUTPUTS
|
||||
% o pdraw [double] draw from the joint prior density.
|
||||
|
@ -35,8 +40,7 @@ function pdraw = prior_draw_gsa(init,rdraw)
|
|||
%
|
||||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
global bayestopt_ options_ estim_params_ M_
|
||||
|
||||
persistent npar pshape p6 p7 p3 p4 lbcum ubcum
|
||||
|
||||
if init
|
||||
|
@ -49,7 +53,7 @@ if init
|
|||
pdraw = zeros(npar,1);
|
||||
lbcum = zeros(npar,1);
|
||||
ubcum = ones(npar,1);
|
||||
[~,~,~,lb,ub,~] = set_prior(estim_params_,M_,options_); %Prepare bounds
|
||||
[~,~,~,lb,ub] = set_prior(estim_params_,M_,options_); %Prepare bounds
|
||||
if ~isempty(bayestopt_) && any(bayestopt_.pshape > 0)
|
||||
% Set prior bounds
|
||||
bounds = prior_bounds(bayestopt_, options_.prior_trunc);
|
||||
|
@ -64,29 +68,29 @@ if init
|
|||
% set bounds for cumulative probabilities
|
||||
for i = 1:npar
|
||||
switch pshape(i)
|
||||
case 5% Uniform prior.
|
||||
p4(i) = min(p4(i),bounds.ub(i));
|
||||
p3(i) = max(p3(i),bounds.lb(i));
|
||||
case 3% Gaussian prior.
|
||||
lbcum(i) = 0.5 * erfc(-(bounds.lb(i)-p6(i))/p7(i) ./ sqrt(2));
|
||||
ubcum(i) = 0.5 * erfc(-(bounds.ub(i)-p6(i))/p7(i) ./ sqrt(2));
|
||||
case 2% Gamma prior.
|
||||
lbcum(i) = gamcdf(bounds.lb(i)-p3(i),p6(i),p7(i));
|
||||
ubcum(i) = gamcdf(bounds.ub(i)-p3(i),p6(i),p7(i));
|
||||
case 1% Beta distribution (TODO: generalized beta distribution)
|
||||
lbcum(i) = betainc((bounds.lb(i)-p3(i))./(p4(i)-p3(i)),p6(i),p7(i));
|
||||
ubcum(i) = betainc((bounds.ub(i)-p3(i))./(p4(i)-p3(i)),p6(i),p7(i));
|
||||
case 2% Gamma prior.
|
||||
lbcum(i) = gamcdf(bounds.lb(i)-p3(i),p6(i),p7(i));
|
||||
ubcum(i) = gamcdf(bounds.ub(i)-p3(i),p6(i),p7(i));
|
||||
case 3% Gaussian prior.
|
||||
lbcum(i) = 0.5 * erfc(-(bounds.lb(i)-p6(i))/p7(i) ./ sqrt(2));
|
||||
ubcum(i) = 0.5 * erfc(-(bounds.ub(i)-p6(i))/p7(i) ./ sqrt(2));
|
||||
case 4% INV-GAMMA1 distribution
|
||||
% TO BE CHECKED
|
||||
lbcum(i) = gamcdf(1/(bounds.ub(i)-p3(i))^2,p7(i)/2,2/p6(i));
|
||||
ubcum(i) = gamcdf(1/(bounds.lb(i)-p3(i))^2,p7(i)/2,2/p6(i));
|
||||
case 5% Uniform prior.
|
||||
p4(i) = min(p4(i),bounds.ub(i));
|
||||
p3(i) = max(p3(i),bounds.lb(i));
|
||||
case 6% INV-GAMMA2 distribution
|
||||
% TO BE CHECKED
|
||||
lbcum(i) = gamcdf(1/(bounds.ub(i)-p3(i)),p7(i)/2,2/p6(i));
|
||||
ubcum(i) = gamcdf(1/(bounds.lb(i)-p3(i)),p7(i)/2,2/p6(i));
|
||||
case 8
|
||||
lbcum(i) = weibcdf(bounds.lb(i)-p3(i),p6(i),p7(i));
|
||||
ubcum(i) = weibcdf(bounds.ub(i)-p3(i),p6(i),p7(i));
|
||||
lbcum(i) = wblcdf(bounds.lb(i)-p3(i),p6(i),p7(i));
|
||||
ubcum(i) = wblcdf(bounds.ub(i)-p3(i),p6(i),p7(i));
|
||||
otherwise
|
||||
% Nothing to do here.
|
||||
end
|
||||
|
@ -94,7 +98,7 @@ if init
|
|||
return
|
||||
end
|
||||
|
||||
|
||||
pdraw=NaN(size(rdraw,1),npar);
|
||||
for i = 1:npar
|
||||
rdraw(:,i) = rdraw(:,i).*(ubcum(i)-lbcum(i))+lbcum(i);
|
||||
switch pshape(i)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue