Houtan Bastani
8f1aef3f57
get_companion_matrix: evalin base not necessary
2019-02-14 12:19:34 +01:00
Houtan Bastani
b92b342c7b
sur, pooled_fgls: user inv(chol()) instead of chol(inv())
2019-02-14 10:55:08 +01:00
Houtan Bastani
db8638ec97
pooled_fgls: use iterative method and fix bug in M_.Sigma_e
2019-02-13 15:57:06 +01:00
Houtan Bastani
9391a770b1
sur: fix bug in setting M_.Sigma_e entries
2019-02-13 15:57:06 +01:00
Houtan Bastani
29c3a86c81
sur: move to iterative method
2019-02-13 15:57:06 +01:00
Stéphane Adjemia (Scylla)
3e3f8fbfbc
Cosmetic changes.
2019-02-13 15:19:19 +01:00
Stéphane Adjemia (Scylla)
3cfd588d3f
Allow initialization with histval block.
...
[skip ci]
(cherry picked from commit e9688560f6
)
2019-02-13 15:19:18 +01:00
Houtan Bastani
98591af846
sur: update M_.Sigma_e using estimated parameters
2019-02-12 19:57:44 +01:00
Houtan Bastani
a110896483
Revert "sur: fix bug with M_.Sigma_e"
...
This reverts commit 9c76b1da51
.
2019-02-12 19:07:55 +01:00
Houtan Bastani
fe4fb7df2d
sur: modify error message
2019-02-12 17:03:11 +01:00
Houtan Bastani
91d99fe645
if find returns empty this ended in a syntax error
2019-02-12 16:59:23 +01:00
Houtan Bastani
9c76b1da51
sur: fix bug with M_.Sigma_e
2019-02-12 16:55:20 +01:00
Houtan Bastani
874ba9a641
put_in_sur_form: simplify function and make robust to potential future changes in dseries
2019-02-11 16:36:25 +01:00
Houtan Bastani
a3867a0b34
put_in_sur_form: fix bug in cross equation restriction
2019-02-11 16:32:04 +01:00
Houtan Bastani
ac171747cd
sur: clean up error messages
2019-02-11 15:23:36 +01:00
Houtan Bastani
c8d04e93b9
sur: fix bug in lhssub when param_names was specified and simplify code
2019-02-11 15:17:10 +01:00
Houtan Bastani
0352e9025a
ols style parsing: allow division in node to be subtracted from LHS
2019-02-06 12:34:13 +01:00
Houtan Bastani
106976e6d5
print info about node on error
2019-02-06 12:16:27 +01:00
Houtan Bastani
f9239d5347
remove unnecessary conversion to string
2019-02-06 12:14:07 +01:00
Houtan Bastani
de573890b7
fix bug in handling unary minus node as uminus is not a valid dseries operation
2019-02-05 19:52:12 +01:00
Houtan Bastani
8fdf805f1f
handle case when node is not passed to error function
2019-02-05 19:36:11 +01:00
Houtan Bastani
fd09ba1fca
ols_style parsing: remove regressors that are equal to zero
2019-02-05 16:38:25 +01:00
Houtan Bastani
553f1d3068
fix bug: line argument was being ignored
2019-02-01 17:05:10 +01:00
Houtan Bastani
b2fcd86c35
print parts of model where there are evaluation errors
2019-02-01 17:05:10 +01:00
Houtan Bastani
c36db13bee
dseries: submodule update
2019-02-01 16:25:52 +01:00
Houtan Bastani
eace56ce49
use switch statement instead of eval
2019-02-01 14:28:27 +01:00
Houtan Bastani
8ddcccf18e
ols-style parsing: modify parsing to accommodate a larger set of expressions
2019-02-01 14:25:35 +01:00
Houtan Bastani
c9423fe3ab
ols parsing: fix bug in check
2019-02-01 13:21:59 +01:00
Houtan Bastani
ff2ca5fc17
remove unnecessary function
2019-02-01 12:04:46 +01:00
Houtan Bastani
f4b8735431
pooled_ols: only save certain variables oo_ structure when passing back to pooled_fgls
2019-02-01 11:50:01 +01:00
Houtan Bastani
0121e709fe
pooled_ols/pooled_fgls: fix bug in call to function
2019-02-01 11:45:16 +01:00
Houtan Bastani
e758d5bdc9
ols parsing: fix bug: node value is not stored as string in AST
2019-02-01 11:37:41 +01:00
Houtan Bastani
1f3e027a09
fix typo
2019-02-01 11:12:25 +01:00
Houtan Bastani
4c64b9108a
Revert "Revert "handle constant equations in preprocessor""
...
This reverts commit 850d1dcc95
.
2019-01-30 12:29:33 +01:00
Houtan Bastani
c544f4a02c
small improvement
2019-01-30 12:29:08 +01:00
Houtan Bastani
850d1dcc95
Revert "handle constant equations in preprocessor"
...
This reverts commit bcce997112
.
2019-01-29 00:38:01 +01:00
Houtan Bastani
bcce997112
handle constant equations in preprocessor
2019-01-28 17:56:10 +01:00
Stéphane Adjemia (Scylla)
74520e77bf
Allow for lags on endogenous variable in growth option of pac_model.
2019-01-28 11:25:30 +01:00
Houtan Bastani
668e641a6a
create report for SUR estimation
2019-01-25 18:11:27 +01:00
Houtan Bastani
6d447f195a
sur: add model_name option
2019-01-25 18:11:26 +01:00
Houtan Bastani
35cabed989
reporting: submodule update
2019-01-25 18:11:26 +01:00
Houtan Bastani
73ea0c2fe3
fix typo in comment
2019-01-24 12:42:08 +01:00
Houtan Bastani
9bc1833a36
sur: fix bug in returned fitted value
2019-01-24 12:21:36 +01:00
Houtan Bastani
ab5a19f08a
sur: fix bug in check of returned matrices
2019-01-24 11:38:40 +01:00
Houtan Bastani
a402554083
fix bug in b219a99a16
2019-01-24 11:30:53 +01:00
Houtan Bastani
b219a99a16
olsgibbs: fix bug in returned fitted value
2019-01-24 11:23:23 +01:00
Houtan Bastani
d52ee5d290
fix comment
2019-01-24 11:20:39 +01:00
Houtan Bastani
99d770382b
change indexing into X.name
2019-01-23 15:48:46 +01:00
Houtan Bastani
7632c4f071
use vobs instead of length(X.name)
2019-01-23 15:48:46 +01:00
Houtan Bastani
d1afd56134
small fixes (comments, argument checks)
2019-01-22 16:11:03 +01:00
Houtan Bastani
e1b01d9225
common parsing: jsonmodel not necessary as tag info is in AST
2019-01-22 16:10:42 +01:00
Houtan Bastani
078e1ab99e
fix bug in ols common parsing routines causing ordering of regressor columns to change
2019-01-22 15:25:17 +01:00
Houtan Bastani
9d413e2f8f
use vobs() instead of length(ds.name)
2019-01-22 15:23:42 +01:00
Houtan Bastani
f514d443b6
aesthetic fix
2019-01-22 00:40:57 +01:00
Houtan Bastani
63054a5728
olsgibbs: fix checks of input arguments
2019-01-22 00:08:09 +01:00
Houtan Bastani
0406a2ae15
handle zeroed out equations in SUR
2019-01-21 15:57:11 +01:00
Houtan Bastani
875381379f
sur: fix bug in creation of SUR matrices; handle random walk equation regardless of order in model equations
2019-01-18 15:07:24 +01:00
Houtan Bastani
cf0d8f319e
remove extra whitespace
2019-01-18 14:09:40 +01:00
Houtan Bastani
3293ff62c1
handle nested UnaryOpNodes in OLS-style equations
2019-01-18 11:50:10 +01:00
Houtan Bastani
0badb00687
handle AR(1) with no parameter
2019-01-17 18:57:24 +01:00
Houtan Bastani
cfd9eff6fb
simplify common parsing
2019-01-17 18:06:43 +01:00
Houtan Bastani
b62ec7dc55
handle hard-coded constant*variable in AR(1)
2019-01-17 18:06:36 +01:00
Houtan Bastani
4c133ac23a
olsgibbs: small fixes
2019-01-16 14:53:22 +01:00
Houtan Bastani
556b5b6e88
small change to avoid an extra conditional
2019-01-16 14:53:22 +01:00
Houtan Bastani
4dbbdb2c09
move common dates to parsing function
2019-01-16 14:53:22 +01:00
Houtan Bastani
ee8e8c4282
small simplification
2019-01-16 14:53:22 +01:00
Houtan Bastani
0fb88114c1
rename functions and change error message to be more general is parsing is shared between several different functions
2019-01-16 14:53:22 +01:00
Houtan Bastani
bb9418a473
dyn_ols: only one output from function, remove varargout
2019-01-16 14:53:21 +01:00
Houtan Bastani
03eaac8b6d
make plot_contributions use get_ast_jsonmodel
2019-01-16 14:53:21 +01:00
Houtan Bastani
9a61c57102
remove functions that are no longer used
2019-01-16 14:53:21 +01:00
Houtan Bastani
f755cfdcd4
surgibbs: small fixes
2019-01-16 14:53:21 +01:00
Houtan Bastani
3247b1aa02
pooled_fgls: fix and update
2019-01-16 14:53:21 +01:00
Houtan Bastani
e4dc7c403e
parse residual information
2019-01-16 14:53:21 +01:00
Houtan Bastani
72081e640e
pooled_ols: fix dates
2019-01-16 14:53:20 +01:00
Houtan Bastani
efe0a15e0e
comment out code
2019-01-16 14:53:20 +01:00
Houtan Bastani
9ed97b88c1
account for potentially differing number of observations per equation when creating SUR matrices
2019-01-16 14:53:20 +01:00
Houtan Bastani
a7181a8151
fix common parsing function to impose same dates per equation
2019-01-16 14:53:20 +01:00
Houtan Bastani
3427d93c09
add comment to function
2019-01-16 14:53:20 +01:00
Houtan Bastani
5d80fc903b
pooled_ols: fix up and use common parsing
2019-01-16 14:53:20 +01:00
Houtan Bastani
1e41235b6b
common parsing: small fixes
2019-01-16 14:53:19 +01:00
Houtan Bastani
934a22c3a7
sur: small fixes
2019-01-16 14:53:19 +01:00
Houtan Bastani
ef391b1304
surgibbs: fix up and make work with sur changes
2019-01-16 14:53:19 +01:00
Houtan Bastani
f8c0282b01
sur: fix up and use common code to create matrices
2019-01-16 14:53:19 +01:00
Houtan Bastani
d8f26525b0
olsgibbs: fix up and use common parsing functions
2019-01-16 14:53:19 +01:00
Houtan Bastani
a477075825
ols: further simplifications
2019-01-16 14:53:19 +01:00
Houtan Bastani
a35fd291c5
ols: move json file parsing to a separate file
2019-01-16 14:53:19 +01:00
Houtan Bastani
013124eedf
ols: move parsing to a helper function
2019-01-16 14:53:18 +01:00
Houtan Bastani
093dd493d8
ols: catch unexpected case
2019-01-16 14:53:18 +01:00
Houtan Bastani
7d35cb5c5a
fix typo
2019-01-14 15:02:32 +01:00
Houtan Bastani
e8333421e7
remove unnecessary file
2019-01-10 10:44:19 +01:00
Stéphane Adjemia (Scylla)
3bc6b34161
Bug fix.
...
Be agnostic about the name of the PAC model.
2019-01-07 13:33:08 +01:00
Stéphane Adjemia (Scylla)
c829e7968d
If possible define boundaries for the share of optimizing agents in PAC/NLS.
...
The parameter is constrained to be in (0,1) for the following algorithms
- lsqnonlin (without Levenberg-Marquardt)
- fmincon
- annealing
- particleswarm
Other algorithms do not allow the definition of boundaries... We should add a
penality function to the objective for these algorithms.
2018-12-19 16:05:34 +01:00
Stéphane Adjemia (Scylla)
df57bf7eb9
Fixed bug.
...
PAC/NLS routine was only working if the PAC model was named `pacman`.
2018-12-19 16:00:57 +01:00
Stéphane Adjemia (Scylla)
11b24a0663
Add a constraint on the share of optimizing agents PAC/Iterative OLS.
...
Ensure that the parameter value lies betwwen 0 and 1.
2018-12-19 15:43:36 +01:00
Stéphane Adjemia (Scylla)
c0570ff0af
Fixed typo.
2018-12-19 15:41:32 +01:00
Stéphane Adjemia (Scylla)
23e37e45c4
Cosmetic change.
...
create a namespace for each {VAR/PAC} expectation model.
2018-12-19 11:43:26 +01:00
Stéphane Adjemia (Scylla)
351da3b865
Do not update a dseries object, but instantiate a new object.
2018-12-19 10:53:09 +01:00
Stéphane Adjemia (Scylla)
4775bca073
Fixed ordering of the columns of the Companion matrix...
...
For the level representation of the trend component model.
2018-12-14 17:37:35 +01:00
Stéphane Adjemia (Scylla)
2cff485113
Fixed bug in the routine evaluating the (PAC/VAR) expectations.
2018-12-14 17:29:46 +01:00
Stéphane Adjemia (Scylla)
38c8462142
If NLS, do not check the ordering of estimated parameters in PAC.
2018-12-12 16:28:19 +01:00
Houtan Bastani
44e5a88ddd
dyn_ols: use AST instead of regex to parse equations
2018-12-07 19:54:32 +01:00
Stéphane Adjemia (Scylla)
cb4384bb27
Create on the fly a routine for evaluating the (VAR/PAC) expectations.
...
The routine takes a dseries object as unique argument and return an updated
object with the expectation term.
If the mod file is named `example.mod` and if the (VAR/PAC) expectation model is
named `toto`, then after
var_expectation.print('toto');
the expectation term can be evaluated:
ts = example.var_expectations.evaluate_varexp(ts);
where ts is a dseries object containing all the time series appearign in the
auxiliary (var or trend_component).
2018-12-03 15:07:43 +01:00
Stéphane Adjemia (Scylla)
53ab321de8
Added the possibility to use linear expressions in VAR_EXPECTATION_MODEL.
...
See tests/var-expectations/9/example.mod for a self documented example.
Also updated all the integration tests using the option `expression` instead of
`variable` (which is deprecated and will be removed at some point).
2018-11-30 23:36:06 +01:00
Stéphane Adjemia (Scylla)
650c78f99d
Merge branch 'master' into ecb-master
2018-11-30 21:34:56 +01:00
Stéphane Adjemia (Scylla)
d501d6d511
Added interface to lsqnonlin (Mathworks' optimization toolbox) in pac.estimate.nls.
2018-11-29 10:29:55 +01:00
Stéphane Adjemia (Scylla)
c79be57447
Fixed definition of h (PAC expectation reduced form).
2018-11-27 10:05:40 +01:00
Stéphane Adjemia (Scylla)
e6c716ae9b
Added the possibility to use Gauss-Newton in pac/nls.
...
Also added the computation of the covariance matrix of the NLS estimator (using
White and Domovitz approach) and integration test.
2018-11-26 09:53:18 +01:00
Stéphane Adjemia (Scylla)
139c58dd76
Added Gauss Newton algorithm for minimizing sum of squared residuals.
2018-11-26 09:48:50 +01:00
Sébastien Villemot
efec664667
Preprocessor update + corresponding change in parameters derivatives
...
In the *_params_derivs.m files, in the "hp" matrix, the preprocessor now fully
outputs the symmetric elements, so getH needs to be adapted.
By the way, also clean up code for "rpp" and "gpp", were full symmetric
elements were also already present (and therefore do not need to be duplicated
in getH).
2018-11-22 17:53:39 +01:00
Stéphane Adjemia (Scylla)
cf35496c06
Fixed bug in the evaluation of the sum of squared residuals (PAC/NLS).
2018-11-21 15:21:23 +01:00
Stéphane Adjemia (Scylla)
7d2d0d6590
Added the possibility to estimate the share of optimizing agents by iterative OLS (PAC).
2018-11-21 15:07:15 +01:00
Sébastien Villemot
635aa65665
Merge branch 'ident_plot_bug' into 'master'
...
identification_analysis.m: Fix bug introduced in 60d95b65f2
See merge request Dynare/dynare!1637
2018-11-16 16:21:14 +00:00
Johannes Pfeifer
b615d2d795
identification_analysis.m: Fix bug introduced in 60d95b65f2
...
We already used a variable called offset
2018-11-16 16:20:27 +01:00
Johannes Pfeifer
4ecbcbb136
evaluate_steady_state_file.m: Remove redundant setting of auxiliary variables
...
The original problems seems to have been fixed by #1133
Essentially reverts 3c7e60b744
and closes #1175
2018-11-16 14:12:55 +01:00
Johannes Pfeifer
f947a31b80
evaluate_steady_state_file.m: fix two bugs in debugging mode
2018-11-16 09:24:43 +00:00
Johannes Pfeifer
60d95b65f2
Identification strength: make plotting consistent
...
1. Rely on actually computed standard deviations in bayestopt_ instead of potentially unset estim_params_
2. Remove arbitrary normalizations/omitted normalization in case of division by 0 in normalization
3. Distinguish between 0 identification and division by 0 due to normalization in plots
(cherry picked from commit 7341e21a381850c47fbed018bf6a7acdda4fa92e)
2018-11-16 10:17:30 +01:00
Sébastien Villemot
ad451ad224
Merge branch 'prior_dens_info' into 'master'
...
Deal with info returned by priordens being a vector
See merge request Dynare/dynare!1629
2018-11-15 09:39:11 +00:00
Sébastien Villemot
513f3ec68e
Merge branch 'evaluate_steady_state' into 'master'
...
evaluate_steady_state.m: consistently use params
Closes #1627
See merge request Dynare/dynare!1630
2018-11-15 09:22:09 +00:00
Johannes Pfeifer
30361ccb49
GSA scatter plots: Correctly pass LaTeX-names to figure
2018-11-14 18:37:54 +01:00
Johannes Pfeifer
022913579a
map_calibration.m: Fix bug that prevented display of restrictions
2018-11-14 18:37:05 +01:00
Johannes Pfeifer
c16c2fb894
evaluate_steady_state.m: consistently use params
...
Prevents erroneously relying on stale parameters from M.params (thanks to Tom Holden); closes #1627
2018-11-14 16:01:55 +01:00
Johannes Pfeifer
09a166f4e7
Revert "adding missing any()"
...
This reverts commit a5b97a28a0
.
2018-11-14 15:04:27 +01:00
Johannes Pfeifer
c1b0bb5ee3
initial_estimation_checks.m: Turn vector info into scalar
...
Related to a5b97a28a0
that needs to be reverted
2018-11-14 15:02:15 +01:00
Sébastien Villemot
18faa9733c
Further updates related to minimal MATLAB version bump
2018-11-13 18:29:20 +01:00
Sébastien Villemot
7a75872f72
Modernization: use tilde (~) syntax for ignored output arguments
2018-11-13 18:02:09 +01:00
Sébastien Villemot
ce49cd95df
Add missing iscolumn and ismatrix for MATLAB < R2010b
...
Also fix a bug in isrow (it was not checking the rank of the array).
2018-11-13 16:59:27 +01:00
Sébastien Villemot
736d43c4e6
Bump minimal MATLAB version requirement to 7.9 (R2009b)
2018-11-13 15:59:16 +01:00
Sébastien Villemot
096936be9c
The preprocessor now compiles the MEX when use_dll is specified
...
Update documentation accordingly (except on macOS where the solution has not
yet been implemented).
Also include MinGW in the Windows installer.
2018-10-29 14:41:34 +01:00
Sébastien Villemot
cc4183d3a5
Fix for recent MATLABs under Windows
2018-10-26 15:02:26 +02:00
Sébastien Villemot
8cb51e26e6
options_.instruments is now a cell array
...
This fixes crashes under Octave (while MATLAB seems to accept array-indexing
with cell arrays).
2018-10-25 15:01:53 +02:00
Stéphane Adjemia (Scylla)
dcea7514d9
Merge branch 'master' into ecb-master
2018-10-24 18:31:31 +02:00
Houtan Bastani
8a2c38cf6c
olsgibbs: save fitted values in dataset; allow use of dictionary as in dyn_ols
2018-10-24 17:17:01 +02:00
Stéphane Adjemia (Scylla)
510bc2e299
Removed unused variable.
2018-10-24 12:08:00 +02:00
Stéphane Adjemia (Scylla)
1c1a3ea0a4
Removed tests on targets.
...
A target does not need to be a random walk. Also added a new integration
test (where the target is a constant, 0).
2018-10-24 12:06:14 +02:00
Stéphane Adjemia (Scylla)
a53c63d6d5
Added routines to print PAC_EXPECTATION and VAR_EXPECTATION in files.
...
Each new routine pac.print() and var_expectation.print(), creates two files
that can be included (using the macro language) in a mod file. The first
file, {pac,var}expectationmodename-parameters.inc saved under
{M_.fname}/model/{pac,var}expectationmodel, contains the declaration of the
parameters created for the expanded (var or pac) expectation model, with
calibrated values. The second file, {pac,var}expectationmodename-parameters.inc
saved in the same subfolder, contains the expanded version of the (pac or var)
expectation term as a linear combination of the variables in the companion
representation of the expectatino model.
2018-10-14 16:57:51 +02:00
Stéphane Adjemia (Scylla)
e5317b17de
Cosmetic change.
2018-10-06 17:52:58 +02:00
Stéphane Adjemia (Scylla)
108854a484
Bug fix. verbosity option was not honoured in simplex algorithm (8).
...
Thanks to Reuben for reporting.
2018-10-06 17:50:37 +02:00
Stéphane Adjemia (Scylla)
dfafe86246
Save teh posterior mean of the slope parameters as a column vector.
2018-10-06 16:55:42 +02:00
Stéphane Adjemian (Charybdis)
82187f9d41
Fixed olsgibbs routine.
2018-10-06 16:08:28 +02:00
Stéphane Adjemian (Charybdis)
798aaaa968
Cosmetic change.
2018-10-04 23:17:49 +02:00
Houtan Bastani
ee2ad1ee15
olsgibbs: linear regression with Gibbs sampler
2018-10-04 17:12:47 +02:00
Houtan Bastani
57bf291c00
add comment
2018-10-04 17:12:47 +02:00
Stéphane Adjemian(Charybdis)
ae71599292
Switch to new get_companion_matrix routine.
2018-09-28 19:27:17 +02:00
Stéphane Adjemian(Charybdis)
bbbaabc702
Cosmetic change.
2018-09-28 12:26:59 +02:00
Michel Juillard
3ad654b9b8
Allowing for different number of periods in conditional_forecast_path.
...
Updated preprocessor submodule.
2018-09-27 18:58:24 +02:00
Stéphane Adjemian(Charybdis)
07141a8681
Various optimizations.
2018-09-26 22:51:05 +02:00
Stéphane Adjemian(Charybdis)
7c83ba7ea7
Fixed documentation header.
2018-09-26 22:51:05 +02:00
Houtan Bastani
973c3955f0
adjust for ‘targets’ keyword instead of ‘trends’
2018-09-25 14:58:36 +02:00
Houtan Bastani
974bcd92ae
Merge branch 'ecb-master' into ecb-master-targets
2018-09-25 14:41:11 +02:00
Houtan Bastani
c6d5b09c29
fix typo
2018-09-25 14:39:48 +02:00