Commit Graph

4674 Commits (2d39fc62e2453c1d4be931a848c9a430a97a1877)

Author SHA1 Message Date
Stéphane Adjemian (Charybdis) 0c98ba67f6 Fixed bug and added unitary tests. 2014-07-02 16:08:08 +02:00
Johannes Pfeifer 7f15295cda Add saving of parameter names to make loading of mh_mode-file compatible with mode_file option 2014-07-02 15:20:07 +02:00
Stéphane Adjemian (Scylla) 1b36d75947 Rewrote @dates/size and @dseries/size (compatibility fix for Octave). 2014-07-02 12:20:19 +02:00
Johannes Pfeifer 85f336496d Filter out ML of model_comparison.m
Also documents that ML is not supported and adds reference for model comparison
Related to #681
2014-07-01 18:50:24 +02:00
Sébastien Villemot 6ceecd1cf6 Tighten convergence criterion of trust region.
Closes #666
2014-07-01 18:43:16 +02:00
Sébastien Villemot f4f7b8d0a1 Merge pull request #660 from JohannesPfeifer/mode_file
Restore backward compatibility of mode_file option
2014-07-01 18:00:48 +02:00
Sébastien Villemot 40ea09644b Merge pull request #668 from JohannesPfeifer/loglinear
Fix two bugs in resol that lead to crashes instead of error messages when...
2014-07-01 17:59:20 +02:00
Sébastien Villemot 939fb78624 Merge pull request #663 from JohannesPfeifer/master
Bugfix and cosmetic fix
2014-07-01 17:56:48 +02:00
Stéphane Adjemian (Charybdis) daf4cb1491 Added unitary tests. 2014-06-27 23:12:05 +02:00
Stéphane Adjemian (Charybdis) a8cb8ccd29 Merge branch 'use-dseries' 2014-06-27 22:38:07 +02:00
Stéphane Adjemian (Charybdis) 9c92b20f33 Added unitary test. 2014-06-27 22:36:10 +02:00
Stéphane Adjemian (Charybdis) a5ea76d58c Do not issue an error message if the dseries appearing in the recursive/static expression do have common names. 2014-06-27 22:29:57 +02:00
Stéphane Adjemian (Scylla) 20e64aa88c Fix for empty and nan fields. 2014-06-27 18:41:04 +02:00
Stéphane Adjemian (Scylla) d5e873f01f Fixed bug (missing argument). 2014-06-27 18:40:09 +02:00
Stéphane Adjemian (Scylla) 684b6b8c04 Fixed bug in osr. 2014-06-27 18:39:39 +02:00
Stéphane Adjemian (Scylla) 81541ac058 Fixed unitary test. 2014-06-27 18:39:18 +02:00
Houtan Bastani 87b4254ce5 reporting: remove checks on colors that are passed to graphs/series to allow for all color combinations supported by TikZ 2014-06-27 17:06:45 +02:00
Houtan Bastani 56d861787b fix typo 2014-06-27 16:26:34 +02:00
Houtan Bastani 638297f4b8 add missing semicolon 2014-06-27 16:18:05 +02:00
Houtan Bastani 0ef65bc296 reporting: graph: add option tickFontSize 2014-06-27 15:56:06 +02:00
Stéphane Adjemian (Scylla) a29a4d0842 Removed unitary test (needs to be fixed). 2014-06-26 16:09:50 +02:00
Stéphane Adjemian (Scylla) 4359eb6dad Adapted ms sbvar codes (options_.varobs is a row cell array of strings). 2014-06-26 16:07:45 +02:00
Stéphane Adjemian (Scylla) 62e28dac94 Use makedataset in condition forecast routine. 2014-06-26 10:55:54 +02:00
Houtan Bastani c23bb31252 reporting: add graph option to change title font size 2014-06-25 16:30:04 +02:00
Stéphane Adjemian (Scylla) 03395a7425 Fixed bug. Wrong test on the number of input arguments (because of the new input argument dataset_info in dsge_likelihood). 2014-06-25 14:57:20 +02:00
Stéphane Adjemian (Scylla) 38df13bb92 Fixed bug (options_.varobs is a row cell array of strings). 2014-06-25 14:49:49 +02:00
Stéphane Adjemian (Scylla) 0b82874268 Adapted madataset routine for Gsa. 2014-06-25 11:34:39 +02:00
Stéphane Adjemian (Scylla) 18eb81da55 Fixed bug in filt_mc_ (gsa) routine (dataset_.dat need to be transposed). 2014-06-25 11:28:49 +02:00
Stéphane Adjemian (Scylla) 904b8025f3 Adapted dynare_sensitivity routine (options_.varobs is a row cell array of strings). 2014-06-25 11:27:12 +02:00
Houtan Bastani f2b4de1d8a reporting: support a different shape for the axis in a graph 2014-06-24 15:51:29 +02:00
Houtan Bastani 7ccd26a17e dseries: remove strsplit as it was introduced in Matlab R2013a 2014-06-24 12:10:59 +02:00
Stéphane Adjemian (Scylla) b7cf6338db Adapted evaluate_likelihood routine. 2014-06-23 17:11:01 +02:00
Stéphane Adjemian (Scylla) 06f74c4603 Cosmetic change. 2014-06-23 16:06:58 +02:00
Stéphane Adjemian (Scylla) 800de3fcc9 Fixed bug (varobs is a field of options_). 2014-06-23 16:06:29 +02:00
Stéphane Adjemian (Scylla) a0907b2e05 Merge branch 'master' into use-dseries 2014-06-23 15:15:48 +02:00
Stéphane Adjemian (Scylla) 40a60e92fa Fixed bug when loaded m file data is not in the current folder or a subfoler. 2014-06-23 13:54:52 +02:00
Stéphane Adjemian (Scylla) 11f00d041e Fixed bug (options_.varobs is a row cell array of strings) + Cosmetic changes. 2014-06-23 12:53:39 +02:00
Stéphane Adjemian (Scylla) 195a3f8fff Fixed bug (missing transposition). 2014-06-23 12:52:44 +02:00
Stéphane Adjemian (Scylla) d727ba7246 Fixed bug (missing input). 2014-06-23 12:24:36 +02:00
Stéphane Adjemian (Scylla) 0cb1b6795b Fixed bug in set_prior routine (options_.varobs is a cell array of strings). 2014-06-23 12:24:17 +02:00
Stéphane Adjemian (Scylla) f6ce89260a Adapted posterior IRFs routines. 2014-06-23 11:08:48 +02:00
Stéphane Adjemian (Scylla) b11f6e2505 Adapted code for dsge-var models. 2014-06-23 10:55:08 +02:00
Michel Juillard 21d40f6123 fixed minor bug in stochastic extended path 2014-06-21 10:06:01 +02:00
Houtan Bastani 6733c83ff5 reporting: add graph option: zeroLineColor 2014-06-20 15:41:11 +02:00
Stéphane Adjemian (Scylla) 91d74fabb3 Cosmetic changes. 2014-06-20 11:57:46 +02:00
Stéphane Adjemian (Scylla) 50e42777b2 Adapted simplex routine. 2014-06-20 11:27:06 +02:00
Stéphane Adjemian (Scylla) 304ea02a53 Adapted newrat routines (adding dataset_info). 2014-06-20 11:21:30 +02:00
Stéphane Adjemian (Scylla) e4cd72b5b6 Fixed typo. 2014-06-20 11:20:27 +02:00
Stéphane Adjemian (Scylla) 788c528c84 Merge branch 'master' into use-dseries 2014-06-19 18:13:35 +02:00
Stéphane Adjemian (Scylla) f5c2027e18 Do not impose the equality between the initial period as defined by the set_time command and the date of the initial observation defined in the datafile or dseries object. 2014-06-19 18:02:31 +02:00
Stéphane Adjemian (Scylla) c4dac88ed2 Added the possibility to redefine the initial date (and implicitly the frequency) when a dseries object is instantiated with the name of a datafile. 2014-06-19 17:59:19 +02:00
Stéphane Adjemian (Scylla) 653f10df72 Added persistent variable in evaluate_smoother routine (dataset_info which describes the distribution of missing data). Changed type of dataset_. 2014-06-19 12:31:35 +02:00
Stéphane Adjemian (Scylla) 7e862ae72a Fixed bug (forgot some calls to identification_analysis). 2014-06-18 15:37:13 +02:00
Stéphane Adjemian (Charybdis) 4f02e58010 Added the possibility to pass a dseries object to the data command (the user can manipulate the data in the mod file, using dseries class methods, and use them for estimation without writing the data on disk). 2014-06-17 16:03:30 +02:00
Stéphane Adjemian (Charybdis) 42c4aabdcc Adapted identification routines. 2014-06-17 12:04:58 +02:00
Stéphane Adjemian (Charybdis) 8691304b9f Fixed gsa (dataset_ is now a dseries object). 2014-06-17 10:30:45 +02:00
Stéphane Adjemian (Charybdis) 880bb58aef Fixed mode_check and prior_posterior_statistics routines (added dataset_info as an input). 2014-06-17 10:19:07 +02:00
Stéphane Adjemian (Charybdis) efcf6bd9c0 Use dseries object in the estimation routines. 2014-06-16 17:41:59 +02:00
Michel Juillard 499967f9a1 adding an option to extended path to control homotopic steps and
continue in case of failed case
2014-06-16 14:25:23 +02:00
Michel Juillard 6f9720ff84 removing debug code 2014-06-16 14:24:05 +02:00
Stéphane Adjemian (Charybdis) 7795833add Fixed bug in dates class constructor (wrong call to length routine). 2014-06-15 19:17:30 +02:00
Stéphane Adjemian (Charybdis) 4f5ab5a236 Changed logic in dates class constructor. 2014-06-15 19:15:30 +02:00
Stéphane Adjemian (Charybdis) 558c818cca Changed logic in isfreq routine. 2014-06-13 16:32:25 +02:00
Stéphane Adjemian (Charybdis) e41e8effdf Modified isdate behaviour (an integer scalar is interpreted as a year). 2014-06-13 10:10:17 +02:00
Stéphane Adjemian (Charybdis) af1009d8a4 Merge branch 'master' into use-dynSeries 2014-06-12 17:42:52 +02:00
Stéphane Adjemian (Charybdis) 08ea66057c Automagically increase the number of observations in the assigned variable if needed.
So that the following is possible

 y = dseries([0],'1990Q1','y');
 e = dseries(randn(1000,1),'1990Q1','e');
 from 1990Q2 to 2239Q4 do y(t) = .5*y(t-1) + e(t) - .5*e(t-1)*y(t-1) +.1*y(t-1)^2

Initially y has only one observation (which is mandatory because y
depends on its first lag), the routine extends the number of
observations so that y.dates(end)==2239Q4

Note that the exogenous variables are not adjusted, they must be
defined (leads/lags included) between the first and last dates of the
from-to-do syntax.
2014-06-12 15:24:00 +02:00
Stéphane Adjemian (Charybdis) 955dcab449 Removed init and freq members from dseries class (redundant informations).
The frequency and initial date can still be accessed with the usual syntax:

ts.freq
ts.init

It is also possible to get the last date:

ts.last

Added new methods frequency, firstdate and lastdate as alias for ts.dates.freq, ts.dates(1) and ts.dates(end)
2014-06-11 12:22:35 +02:00
Stéphane Adjemian (Charybdis) 8507c27fab Removed display of current path in last unitary test. 2014-06-11 12:22:35 +02:00
Stéphane Adjemian (Charybdis) 3606cbc8ed Added new syntax to remove variables from a dseries object.
If ts is a dseries object, then

ts{'Variable_1','Variable_2'} = [];

or

ts{'Variable_@1,2@} = [];

will remove Variable_1 and Variable_2 from ts (if they exist).
2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) ff27824b29 Fixed bug related to the initialization of the dseries and dates object (test that the input argument is a string). 2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) f0a3d6ad44 Added @dseries/remove method. 2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) d5066e9a44 Added unitary test. 2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) 353bab2117 Fixes issue #652. 2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) 2e280ecdcd Added dseries/end method.
Allows the following syntax to extract variables from a
dseries object ts:

us = ts{2:end};
2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) aa14faf508 Removed the possibility to extract subsamples from a dseries object with a vector of integers.
If ts is a dates object with 100 observations (ts.nobs=100), the
following syntax for selecting the last 90 observations *is not legal*:

ts(11:end)

ts has to be indexed instead with dates objects, as in the following example:

ts(d1:d2)

where d1 and d2 are dates objects.  To select the 90 last observations,
if the last date is unknown, the following syntax can be used:

ts(ts.dates(11:end))
2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) c3029468af Do not display the object returned by from. 2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) 64bdbb525b Allow variables extracted from a dseries object in the dynamic or static expression following the do keyword. 2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) d60565bfc4 Fixed bug in @dates/colon (last years were wrong if r>0). 2014-06-11 12:22:34 +02:00
Stéphane Adjemian (Charybdis) 7a96533339 Allow empty dseries objects in @dseries/horzcat method. Added unitary test. 2014-06-11 12:22:33 +02:00
Stéphane Adjemian (Charybdis) ba726db417 Fixed bug in @dates/colon methood (wrong offset if r>0). 2014-06-11 12:22:33 +02:00
Stéphane Adjemian (Charybdis) 3ae2874fd0 Cosmetic changes (error messages). 2014-06-11 12:22:33 +02:00
Stéphane Adjemian (Charybdis) 34e9f0dc14 Allow dates objects as first and third arguments (initial and terminal dates). 2014-06-11 12:22:33 +02:00
Stéphane Adjemian (Charybdis) ac05826ef0 Test that the names of the variables contained in the dseries objects are different. 2014-06-11 12:22:33 +02:00
Stéphane Adjemian (Charybdis) 1ed0ccff6f Test that dseries are not empty. 2014-06-11 12:22:33 +02:00
Stéphane Adjemian (Charybdis) 03250208c0 Test that each dseries object contains only one variable. 2014-06-11 12:22:33 +02:00
Stéphane Adjemian (Charybdis) 0096611b06 Added the possibility to use parameters in a from-to-do statement. 2014-06-11 12:22:33 +02:00
Stéphane Adjemian (Charybdis) 95d613c53d Cosmetic change. 2014-06-11 12:22:33 +02:00
Stéphane Adjemian (Charybdis) 14819abb5f Added specialized code for static models. 2014-06-11 12:22:33 +02:00
Stéphane Adjemian (Charybdis) 65968bb134 Use new leadlagtable's columns introduced in d0708fcb2c978c7ae47aa8ab7cbdf6f2b162c123 (usefull for sparse dynamic models). 2014-06-11 12:22:32 +02:00
Stéphane Adjemian (Charybdis) f8203911c8 Added two columns to leadlagtable cell array (vectors of lag/lead orders). 2014-06-11 12:22:32 +02:00
Stéphane Adjemian (Charybdis) b858aed1c0 Various optimizations and cosmetic changes. 2014-06-11 12:22:32 +02:00
Stéphane Adjemian (Charybdis) 35645540e5 Bug fix. Wrong number of lines for time member if n<freq. 2014-06-11 12:22:32 +02:00
Stéphane Adjemian (Charybdis) adda8b6b09 Another speed improvement for @dates/colon method (vectorized code, removed loop around add_periods_to_date routine). 2014-06-11 12:22:32 +02:00
Stéphane Adjemian (Charybdis) 8587674317 Removed call to ismember. Test if to_id or do_id are empty instead. 2014-06-11 12:22:32 +02:00
Stéphane Adjemian (Charybdis) cf43c90347 Improve speed of @dates/colon method (added specialized version of add_periods_to_array_of_dates -> add_periods_to_date). 2014-06-11 12:22:32 +02:00
Stéphane Adjemian (Charybdis) cf86c8f721 Improve speed of comparison methods (lt, gt, le and ge) for @dates class. 2014-06-11 12:22:32 +02:00
Stéphane Adjemian (Charybdis) 84caf6d35f Improve speed of @dates/colon method. 2014-06-11 12:22:32 +02:00
Stéphane Adjemian (Charybdis) 6aee567382 Save empty dates and dseries objects in memory (base workspace) instead of disk (faster). Added an initialization mode for dates and dseries constructor. The following commands:
dates('initialization');
dseries('initialization');

create variables emptydatesobject and emptydseriesobject in base workspace.
2014-06-11 12:22:31 +02:00
Stéphane Adjemian (Charybdis) 0206792c12 Save empty dates and dseries objects on disk (in dynareroot), to reduce the time needed to instantiate new objects. 2014-06-11 12:22:31 +02:00
Stéphane Adjemian (Scylla) f5e2fda22a Code optimization. Removed manipulations of dseries objects in the
main loop.
2014-06-11 12:22:31 +02:00
Stéphane Adjemian (Scylla) 6dc0748de5 Added tests on the recursive expression to be evaluated (the endogeous variable
canot depend on its current level or its future level).
2014-06-11 12:22:31 +02:00
Stéphane Adjemian (Scylla) 507b56a055 Added lead/lag incidence table. Also check that the ranges of the
dseries objects appearing in the recursive expression are compatible
with the range of the loop.
2014-06-11 12:22:31 +02:00
Stéphane Adjemian (Scylla) 59a787f47f Check that the initial and terminal dates are in the ranges of the
dseries objects involved in the recursive expression.
2014-06-11 12:22:31 +02:00
Stéphane Adjemian (Scylla) 61d6276d47 Added comments. 2014-06-11 12:22:31 +02:00
Stéphane Adjemian (Scylla) e16e05a50d Removed the loop for building the recursive expression to be evaluated. 2014-06-11 12:22:31 +02:00
Stéphane Adjemian (Scylla) 4da4623c94 Fixed typo in comments. 2014-06-11 12:22:31 +02:00
Stéphane Adjemian (Scylla) 27587e1ea5 Factorized code for the displayed error messages. 2014-06-11 12:22:30 +02:00
Stéphane Adjemian (Scylla) 4fd4436013 Fixed case sensitivity issue with respect to TO and DO keywords. 2014-06-11 12:22:30 +02:00
Stéphane Adjemian (Scylla) 4dad18b222 Added new function from.
Allows the follwing syntax

FROM d1 TO d2 DO y(t)=f(y(t-1),e(t),e(t+1),e(t-1))

where d1 and d2 are @dates objects (d1<d2), y is a @dseries object
defined over d1-1:d2, and e is a @dseries object defined over
d1-1:d2+1.
2014-06-11 12:22:30 +02:00
Houtan Bastani 1958a7b5df reporting: fix shading on Linux 2014-06-10 15:48:49 +02:00
Johannes Pfeifer 39bfc1dd04 Fix two bug in resol that lead to crashes instead of error messages when loglinear option was used and steady state were negative 2014-06-10 10:58:19 +02:00
Houtan Bastani f755a32745 reporting: align graphs based on axis not axis labels 2014-06-10 10:15:24 +02:00
Houtan Bastani 9258aecba0 reporting: add options to control y axis label 2014-06-10 10:15:15 +02:00
Houtan Bastani f101009d0d reporting: change default multiplication operator for graph precision 2014-06-09 11:47:23 +02:00
Sébastien Villemot 1a4df2fedf Merge pull request #659 from JohannesPfeifer/steady_fix
Fix size of NaN vector returned so that resid.m does not crash
2014-06-04 16:59:14 +02:00
Stéphane Adjemian (Charybdis) a9e8dbb752 Merge branch 'master' into use-dynSeries 2014-06-02 16:12:05 +02:00
Johannes Pfeifer ca6803b531 Add forgotten case to likelihood functions
Code 25 was not filtered out, leading to cryptic crashes
2014-06-02 14:10:43 +02:00
Johannes Pfeifer 2caa9eb9d4 Restore backward compatibility of mode_file option
Displays warning and then assumes the user provided a correct mode-file. Closes #658
2014-06-01 15:08:09 +02:00
Michel Juillard 381b0426e3 adding missing file for perfect foresight 2014-05-28 09:32:44 +02:00
Michel Juillard 979c1af53b perfect foresight with lmmcp: removed display of iterations 2014-05-28 09:23:10 +02:00
Johannes Pfeifer 616dad634a Fix size of NaN vector returned so that resid.m does not crash 2014-05-26 16:16:22 +02:00
Stéphane Adjemian (Charybdis) 45d7f15c94 Cosmetic. Deleted trailing white spaces. 2014-05-23 18:16:11 +02:00
Stéphane Adjemian (Charybdis) 78e5fafb07 Updated header. 2014-05-23 18:14:46 +02:00
Stéphane Adjemian (Charybdis) bc7f834241 Added missing flag for unitary test. 2014-05-23 18:14:26 +02:00
Stéphane Adjemian (Charybdis) 56de3979c2 Removed compute_corr routine. 2014-05-23 18:12:43 +02:00
Stéphane Adjemian (Charybdis) 2ee4d62570 Added routine to compute centered marginal moments of order n (possibly with missing observations). 2014-05-23 18:10:59 +02:00
Houtan Bastani 9229a35e71 reporting: add new Paragraph class 2014-05-23 18:10:44 +02:00
Stéphane Adjemian (Charybdis) b2c28530ea Renamed compute_stdv as nanvariance (computes variances instead of standard deviations). 2014-05-23 18:06:32 +02:00
Stéphane Adjemian (Charybdis) bdd7b8aacc Rewrote compute_acov and renamed it as nanautocovariance. 2014-05-23 15:07:46 +02:00
Stéphane Adjemian (Charybdis) dd223e41f5 Rewrote compute_cova and renamed it nancovariance. Added a new routine to test if an array contain at least one NaN. 2014-05-22 19:27:14 +02:00
Houtan Bastani 0f61ae941a reporting: make zerotol work for both graphs and reports 2014-05-22 19:03:25 +02:00
Houtan Bastani bc2274e08a reporting: fix display 2014-05-22 19:03:25 +02:00
Houtan Bastani 1282f12bdc reporting: add new option graphShowInLegend to addSeries 2014-05-22 19:03:20 +02:00
Houtan Bastani 529e779b68 reporting: bug fix for graphHline 2014-05-22 17:03:52 +02:00
Houtan Bastani 4731ee4a89 reporting: bug fix for when a series doesn’t have a data option passed to it 2014-05-22 16:41:43 +02:00
Stéphane Adjemian (Charybdis) 06d1f66242 Fix initialization of the fields in options_.dataset + Cosmetic changes. 2014-05-21 16:47:58 +02:00
Houtan Bastani 41548df963 reporting: replace isa(*,’dseries’) with isdseries() 2014-05-20 14:51:46 +02:00
Houtan Bastani 1435cc5096 reporting: replace isa(*,’dates’) with isdates() 2014-05-20 14:51:41 +02:00
Houtan Bastani afe925cd30 reporting: clean up writeSeriesForGraph.m 2014-05-20 14:39:50 +02:00
Houtan Bastani b0386575d6 reporting: change vline to accept only one dates 2014-05-20 14:38:02 +02:00
Houtan Bastani 0247faa9ed reporting: support horizontal lines 2014-05-20 14:25:01 +02:00
Houtan Bastani d470ef16ca reporting: support vertical lines 2014-05-20 14:17:24 +02:00
Houtan Bastani 106879c46e reporting: add new background layer 2014-05-20 14:16:52 +02:00
Houtan Bastani 7ef1efcd58 reporting: add missing semicolon 2014-05-19 17:52:24 +02:00
Houtan Bastani 2569a0e259 reporting: remove instances of deprecated function strmatch 2014-05-19 17:49:52 +02:00
Houtan Bastani 2434bfa097 reporting: remove unused variable 2014-05-19 17:27:47 +02:00
Houtan Bastani c9a26263d4 reporting: allow vspaces when section is not complete (implies that section is over) 2014-05-19 17:22:29 +02:00
Stéphane Adjemian (Charybdis) 9586f1e516 Fixed bug.Variable available_extensions is a cell array. 2014-05-19 16:42:50 +02:00
Houtan Bastani 0f34cf2029 add missing semicolon 2014-05-19 16:31:37 +02:00
Houtan Bastani 264110835d reporting: add miscTikzAxisOptions option to addGraph 2014-05-19 15:57:43 +02:00