Commit Graph

5783 Commits (fe6f63aa2e8a7b04cb143325cfa4cd4c4f9b4dc1)

Author SHA1 Message Date
Sébastien Villemot 214ff84429 Incorporate unit test for correlation in measurement errors 2013-03-22 15:01:40 +01:00
Sébastien Villemot 8531d994b0 Merge pull request #329 from JohannesPfeifer/master
Fixing of potentially serious bugs in estimation
2013-03-22 06:38:16 -07:00
Johannes Pfeifer 82c6ff3b1b Merge commit '34fb9f1c62c63e7e4ab41656a7690167449e596f' 2013-03-21 21:22:20 +01:00
Johannes Pfeifer 34fb9f1c62 Clarify treatment of measurement error and correlations in manual 2013-03-21 20:51:22 +01:00
Johannes Pfeifer 0311c4add4 Add unit test for correlated measurement error
Tests both ML and Bayesian estimation and test calibrated correlation of
those shocks
2013-03-21 20:51:21 +01:00
Johannes Pfeifer 7518072e77 Fix several bugs related to estimated measurement errors
1. The first call to set_prior overwrote the first column of
estim_params_.var_endo storing the position of the variable with
measurement error in M_.endo_names with the position in
options_.var_obs. All subsequent calls to set_prior then lead to
crashes.
2. At the same time, for correlations of ME, the first column of
estim_params_.corrn still stored the position of the variable with
measurement error in M_.endo_names. But subsequent calls to it were done
as if it stored the position in options_.var_obs

I introduced two new variables in estim_params_ storing the respective
positions in var_obs so as to not necessitate changes in the
preprocessors.

3. For cases of calibrated measurement error correlations, the
covariance matrix was not updated.

4. Fixing a lot of smaller bugs related to measurement errors, including
some copy and paste errors
-
2013-03-21 20:51:12 +01:00
Johannes Pfeifer ebc7d6f67a Add comment why use of old correlation matrix from previous draw is correct and revert change
Due to only using the diagonal of Sigma_e and the correlation matrix having ones on the diagonal, the diagonal entries of the covariance matrix are correctly built from recent draw. Later, when using the new draw for the correlations, only the correctly updated diagonal entries of Sigma_e are used.
2013-03-21 20:49:33 +01:00
Sébastien Villemot 3bbdbf8387 Provisions for MATLAB 8.1 (R2013a) 2013-03-21 18:26:04 +01:00
Sébastien Villemot db2999d84e Add Frédéric and Johannes to userguide; remove useless spam obsfuscating 2013-03-21 18:26:04 +01:00
Stéphane Adjemian (Charybdis) 894a81efb2 Added two new routines to rename name and tex name of a variable in a dynSeries object. 2013-03-21 16:42:13 +01:00
Stéphane Adjemian (Charybdis) 262c6a3a1c Changed the naming convention of the variables in the overloaded operators for the dynSeries class.
Names for the results of basic operations on dynSeries objects was '--NA--'. The name of the result
variables now keep track of the operations. For instance, if we have two dynSeries objects, ts1 and
ts2, respectively holding two variables 'A1' and 'B1', then:

 - the name of the variable in ts3=ts1+ts2 is 'plus(A1,B1)'
 - the name of the variable in ts3=ts1-ts2 is 'minus(A1,B1)'
 - the name of the variable in ts3=ts1*ts2 is 'multiply(A1,B1)'
 - the name of the variable in ts3=ts1/ts2 is 'divide(A1,B1)'
 - the tex name of the variable in ts3=ts1+ts2 is '(A1+B1)'
 - the tex name of the variable in ts3=ts1-ts2 is '(A1-B1)'
 - the tex name of the variable in ts3=ts1*ts2 is '(A1*B1)'
 - the tex name of the variable in ts3=ts1/ts2 is '(A1/B1)'
2013-03-21 16:42:13 +01:00
Stéphane Adjemian (Charybdis) 055ae25785 Fixed typo. 2013-03-21 16:42:13 +01:00
Stéphane Adjemian (Charybdis) 0be1b434d1 Fixed typo. 2013-03-21 16:42:13 +01:00
Stéphane Adjemian (Charybdis) e6a1fbbd81 Fixed typo. 2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) 0d16bffff9 Added @dynSeries/check function.
Returns zero if the input argument is a well defined dynSeries object.
2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) bb7a1c134d Rewrote @dynSeries/subsasgn method.
+ Added the possibility to rename the assigned variables.
 + Added unitary tests.
2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) b195f0ce89 Added @dynSeries/insert method. 2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) e60087e671 Added new routine to insert an arbitrary object in a one dimensional cell array. 2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) 31d4fe5e6d Added new routine to insert column vector in a matrix. 2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) 6c8e1ca94a Added @dynSeries/align method. 2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) 6d7a9d6f93 Fixed bug. 2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) 54ad672453 Issue an error if two dynSeries objects with common variable names are concatenated. Added a unitary test. 2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) 4d09ee6ae2 Added new routine.
Compare two one dimensional cells of strings and count the number of common strings. The
optional second argument returns a formated list of common variables.

*Example*

If we have:

A = {'A1'; 'A2'; 'A3'; 'A4'; 'A5'; 'A6'};
B = {'B1'; 'A2'; 'B3'; 'A4'; 'A1'};

then

[n,message] = common_strings_in_cell_arrays(A,B);

returns n=3 and message='A2, A4 and A1'.
2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) 78a89f874c Handle the case where the variable to be removed does not exist. Added a unitary test. 2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) 9b4b7c46a7 Added @dynSeries/eq method. 2013-03-21 16:42:12 +01:00
Stéphane Adjemian (Charybdis) 2e10cbc2c5 Added @dynSeries/pop method.
Removes a variable form a dynSeries object.
2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) fdfb1173ee Added unitary test in @dynSeries/merge. 2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) b67ed0bb1f Removed useless deblank command. 2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) 7d798f60ed Added missing tex member in @dynSeries/merge method. 2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) 603fdbddd1 Changed default names for the variables.
If the names of the variables are not provided when instantiating a dynSeries object
then the default name is of the form Variable_i (i=1,...,N, where N is the number of
variables in the dataset).
2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) 69b86d8223 Changed unitary test. 2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) b03bd4c647 Removed useless condition in @dynSeries/subsasgn. 2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) d8d913c9eb Removed useless test. 2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) 5dff466669 Fixed bug (added missing tex member to extracted variables). 2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) e5fba538a3 Changed behaviour of @dynSeries/qgrowth (name of the variables).
+ Prefix variable names with QGROWTH_
+ Prefix tex variable names with \delta_i with i=nothing or 3 depending on the frequency.
2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) baf741a496 Changed behaviour of @dynSeries/ygrowth (name of the variables).
+ Prefix variable names with YGROWTH_
 + Prefix tex variable names with \delta_i with i=nothing, 4, 12  or 52 depending on the frequency.
2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) cc199bb80b Changed behaviour of @dynSeries/qdiff (name of the variables).
+ Prefix variable names with QDIFF_
+ Prefix tex variable names with \Delta_i with i=nothing or 3 depending on the frequency.
2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) 69aaac1fb8 Added unitary test for @dynSeries/ydiff. 2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) bb061f9f2d Changed behaviour of @dynSeries/ydiff (name of the variables).
+ Prefix variable names with YDIFF_
 + Prefix tex variable names with \Delta_i with i=nothing, 4, 12 or 52 depending on the frequency.
2013-03-21 16:42:11 +01:00
Stéphane Adjemian (Charybdis) 2c0683a4a3 Changed copyright year. 2013-03-21 16:42:10 +01:00
Stéphane Adjemian (Charybdis) a975761600 Changed behaviour of @dynSeries/uminus and fixed bug.
+ Prefix variable names with the minus symbol.
 + Set tex member.
2013-03-21 16:42:10 +01:00
Stéphane Adjemian (Charybdis) 865f300032 Make load and save routines for dynSeries objects support tex variable names. 2013-03-21 16:42:10 +01:00
Stéphane Adjemian (Charybdis) 9a9f8ebf38 Deduce tex names from the names of the variables in dynSeries objects. 2013-03-21 16:42:10 +01:00
Stéphane Adjemian (Charybdis) 3850167d07 Added a routine to convert variable names with underscores into somthing readable by a tex processor. 2013-03-21 16:42:10 +01:00
Stéphane Adjemian (Charybdis) 7631851c98 Added @dynDates/union function. 2013-03-21 16:42:10 +01:00
Stéphane Adjemian (Charybdis) f0c87fa183 Changed behaviour of @dynDates/display. 2013-03-21 16:42:10 +01:00
Houtan Bastani 2673729a2d reporting: @vspace 2013-03-20 18:17:36 +01:00
Houtan Bastani 09d6d0d855 reporting: spacing cleanup 2013-03-20 16:07:06 +01:00
Houtan Bastani 664f94afbc reporting: @table, @graph: require data to be dynSeries, simplify checks 2013-03-20 15:42:56 +01:00
Houtan Bastani 86296ba1f5 reporting: @table: vlines 2013-03-20 12:56:49 +01:00