dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2019-06-19T15:37:49Zhttps://git.dynare.org/Dynare/dynare/-/issues/1237Investigate identification problem2019-06-19T15:37:49ZJohannes PfeiferInvestigate identification problemhttp://www.dynare.org/phpBB3/viewtopic.php?f=1&t=8234
Sent email with mod-file to @rattoma on June 1, 2016
http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=8234
Sent email with mod-file to @rattoma on June 1, 2016
4.5Marco RattoMarco Rattohttps://git.dynare.org/Dynare/dynare/-/issues/1266bug with eig in Matlab R2012a2019-06-19T15:37:49ZHoutan Bastanibug with eig in Matlab R2012aOn line 197 of `matlab/identification_analysis.m`, we have `[V,D,W]=eig(cc);`. In older versions of Matlab, eig only has two output arguments and hence this causes an error. To calculate `W`, the left eigenvectors of cc, the documentatio...On line 197 of `matlab/identification_analysis.m`, we have `[V,D,W]=eig(cc);`. In older versions of Matlab, eig only has two output arguments and hence this causes an error. To calculate `W`, the left eigenvectors of cc, the documentation recommends `[W,junk] = eig(cc.'); W = conj(W)` separately.
4.5Marco RattoMarco Rattohttps://git.dynare.org/Dynare/dynare/-/issues/1642Bug in analytical computations of second-order params derivs (d2A and d2Om)2019-03-27T11:52:59ZWilli Mutschlerwilli@mutschler.euBug in analytical computations of second-order params derivs (d2A and d2Om)The function `get_first_order_solution_params_deriv.m` (previously `getH.m`) does not compute the second-order derivatives `d2A` and `d2Om` correctly when using analytical derivatives (kronflag=0|1). If we use numerical derivatives (kron...The function `get_first_order_solution_params_deriv.m` (previously `getH.m`) does not compute the second-order derivatives `d2A` and `d2Om` correctly when using analytical derivatives (kronflag=0|1). If we use numerical derivatives (kronflag=-1|-2) the computations are correct.
To replicate the bug, I looked at the Brock and Mirman model (i.e. RBC model with log utility and full depreciation), where we know analytically the policy functions, i.e. also the Kalman transition matrices of a first-order approximation (A, B and Om) analytically. Hence, using symbolic computations it is possible to compute the true `d2A` and `d2Om` and compare the values to dynare.
Here is a mod file to replicate the bug:
[BrockMirmanBug.mod](/uploads/006601083ca694efc36c5b9b396c3aa9/BrockMirmanBug.mod)
and the corresponding matlab file that computes the true objects of the Brock Mirman Model analytically using Matlab's symbolic toolbox:
[BrockMirmanTruePolicyAndDerivatives.m](/uploads/f1cf3e22d26d7e904b6e49764520ee5e/BrockMirmanTruePolicyAndDerivatives.m)
@rattoma is already aware of this bug.Marco RattoMarco Rattohttps://git.dynare.org/Dynare/dynare/-/issues/949Fix loop in identification2019-02-08T08:30:47ZJohannes PfeiferFix loop in identificationIn `identification_analysis.m` we have
```
indJJ = (find(max(abs(JJ'),[],1)>1.e-8));
...
while length(indJJ)<nparam && nlags<10,
disp('The number of moments with non-zero derivative is smaller than the number...In `identification_analysis.m` we have
```
indJJ = (find(max(abs(JJ'),[],1)>1.e-8));
...
while length(indJJ)<nparam && nlags<10,
disp('The number of moments with non-zero derivative is smaller than the number of parameters')
disp(['Try increasing ar = ', int2str(nlags+1)])
nlags=nlags+1;
[JJ, H, gam, gp, dA, dOm, dYss] = getJJ(A, B, M_,oo0,options_,kron_flag,indx,indexo,bayestopt_.mf2,nlags,useautocorr);
derivatives_info.DT=dA;
derivatives_info.DOm=dOm;
derivatives_info.DYss=dYss;
evalin('caller',['options_ident.ar=',int2str(nlags),';']);
end
```
As far as I can see, the condition on `indJJ` is not updated in the loop. This looks wrong to me.
4.5https://git.dynare.org/Dynare/dynare/-/issues/1631Fix calls to dynamic routines in identification2019-01-09T14:19:54ZJohannes PfeiferFix calls to dynamic routines in identificationThe attached file contains a moving average process. It crashes identification in calls like
```
[residual, g1 ] = feval([M_.fname,'_dynamic'],yy0, ...
repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_....The attached file contains a moving average process. It crashes identification in calls like
```
[residual, g1 ] = feval([M_.fname,'_dynamic'],yy0, ...
repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1]), M_.params, ...
oo_.dr.ys, 1);
```
Here, the period number (last argument) is always set to 1 instead of presumably `M_.maximum_exo_lag+1 `.
[dsge_mada_debt1.mod](/uploads/cad3e4c1ca2f06c5f85913d13b27a715/dsge_mada_debt1.mod)4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/267design an interface for assigning moment/irf contraints (e.g. sign constraints)2016-05-17T11:03:52ZSébastien Villemotdesign an interface for assigning moment/irf contraints (e.g. sign constraints)Currently there is no way of setting a set of constraints to irfs or moments of DSGE model to feed to some calibration procedure like Monte Carlo filtering in the sensitivity analysis toolbox.
Indeed the threshold_redform option in sens...Currently there is no way of setting a set of constraints to irfs or moments of DSGE model to feed to some calibration procedure like Monte Carlo filtering in the sensitivity analysis toolbox.
Indeed the threshold_redform option in sensitivity analysis would only allow to set, e.g., the SAME sign constraint to a set of irfs, which is not very handy.
So, we may think to the following syntax for sign constraints in moments:
moment_calibration;
y, y(-1), +; [i.e. auto-correlation with 1 lag]
c, g(-3), +; [i.e. auto-correlation with generic lags]
i, g, -; [i.e. cross-correlation, contemporaneous]
end;
for irfs [y c i are endogenous, em eg are exogenous shocks]:
irf_calibration;
y, em, -;
c, eg, +;
i, eg, -;
end;
or the following for more detailed numeric boundaries, in principle mixed with simple sign constraints
moment_calibration;
y, y(-1), [0.5 1]; [auto-correlation with 1 lag]
c, g(-3), +; [auto-correlation with generic lags]
i, g, [-1, -0.5]; [cross-correlation, contemporaneous]
end;
irf_calibration;
y, em, [-0.01 0];
c, eg, [0 0.02];
i, eg, -;
end;
The sign constraint can also be defined using
[0 inf] for +
[-inf 0] for -
JRC-2014M3https://git.dynare.org/Dynare/dynare/-/issues/173fix license problems in GSA2013-02-21T15:01:29ZSébastien Villemotfix license problems in GSASome files in the matlab/gsa subdirectory have copyright status incompatible with inclusion in Dynare. At least:
fdjac.m
LPTAU.m
optget.m
Sampling_Function_2.m
Other files do not have any copyright notice, their status should be checke...Some files in the matlab/gsa subdirectory have copyright status incompatible with inclusion in Dynare. At least:
fdjac.m
LPTAU.m
optget.m
Sampling_Function_2.m
Other files do not have any copyright notice, their status should be checked.
The copyright status of the GSA manual is not explicited.
Once these issues are fixed, the license.txt file should be updated accordingly.