dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2023-12-14T20:00:14Zhttps://git.dynare.org/Dynare/dynare/-/issues/1846Remove global variables from dynare_sensitivity2023-12-14T20:00:14ZJohannes PfeiferRemove global variables from dynare_sensitivityThe command resets various options permanently, causing unexpected downstream problems. An example is !2009The command resets various options permanently, causing unexpected downstream problems. An example is !20096.xhttps://git.dynare.org/Dynare/dynare/-/issues/1733Fix identification issues around steady state file2020-06-22T08:35:36ZJohannes PfeiferFix identification issues around steady state fileThe issue popped up in https://forum.dynare.org/t/mode-check-plots-with-flat-lines/16020/13 with the attached files. From what I can see, the issue is parameters being updated in the steady state file. Identification in `4.7` seems unabl...The issue popped up in https://forum.dynare.org/t/mode-check-plots-with-flat-lines/16020/13 with the attached files. From what I can see, the issue is parameters being updated in the steady state file. Identification in `4.7` seems unable to handle this. If I am not mistaken (@rattoma should know better), this is a regression as in the past, we resorted to simulation instead of theoretical derivatives which are now unavailable.
[Model.mod](/uploads/7416c13b9a736cfe8133774f9342b9bd/Model.mod)
[SOEMData.xlsx](/uploads/9121d21da0eed219d98bac015f97d9ec/SOEMData.xlsx)
[Model_steadystate.m](/uploads/914342354a7271f21b18cdb9130e03ad/Model_steadystate.m)5.xhttps://git.dynare.org/Dynare/dynare/-/issues/1694Identification tests fail for old matlab2020-01-24T17:25:41ZWilli Mutschlerwilli@mutschler.euIdentification tests fail for old matlabSome identification tests fail under MATLAB R2009b, see https://git.dynare.org/Dynare/dynare/-/jobs/12770. Some functions need to be replaced.Some identification tests fail under MATLAB R2009b, see https://git.dynare.org/Dynare/dynare/-/jobs/12770. Some functions need to be replaced.4.6Willi Mutschlerwilli@mutschler.euWilli Mutschlerwilli@mutschler.euhttps://git.dynare.org/Dynare/dynare/-/issues/1689Clarify licensing information for identification stuff2020-01-24T14:41:20ZSébastien VillemotClarify licensing information for identification stuffSee !1689
The information should be added in the corresponding headers, and in `license.txt`See !1689
The information should be added in the corresponding headers, and in `license.txt`4.6Willi Mutschlerwilli@mutschler.euWilli Mutschlerwilli@mutschler.euhttps://git.dynare.org/Dynare/dynare/-/issues/1651dynare_sensitivity without exogenous variables2019-09-10T09:27:19ZGhost Userdynare_sensitivity without exogenous variablesWhen `dynare_sensitivity` is used for a model without exogenous variables, the following error occurs:
```
Reference to non-existent field 'ghu'.
Error in kalman_transition_matrix (line 42)
B = dr.ghu(iv,:);
```
See the attached f...When `dynare_sensitivity` is used for a model without exogenous variables, the following error occurs:
```
Reference to non-existent field 'ghu'.
Error in kalman_transition_matrix (line 42)
B = dr.ghu(iv,:);
```
See the attached file [test1.mod](/uploads/2c7fa958781bb4ea203ecb1d484c9c8d/test1.mod). An easy workaround is to create a dummy exogenous variable (see attached file [test2.mod](/uploads/31ea2681c8f6b2701ed9da63e39c8968/test2.mod)), but it would help if the error message explains that the code does not work for models without exogenous variables.
This issue is similar to issue https://git.dynare.org/Dynare/dynare/issues/1633.4.6Marco RattoMarco Rattohttps://git.dynare.org/Dynare/dynare/-/issues/1649new plot_shock_decomposition options2019-12-06T15:30:45ZMarco Rattonew plot_shock_decomposition optionsIt would be useful to allow the preprocessor to take the following new options, both for `plot_shock_decomposition` and `initial_condition_decomposition`:
* `diff`: plots the first difference of the requested variable
* `flip`: flip the ...It would be useful to allow the preprocessor to take the following new options, both for `plot_shock_decomposition` and `initial_condition_decomposition`:
* `diff`: plots the first difference of the requested variable
* `flip`: flip the requested variables with sign change (e.g. useful to flip the concept of an exchange rate or trade balance or deficit/surplus variable without having to define it in model definition)
I have already provisions ready to push.4.6Marco 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/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/1611Make dynare_sensitivity compatible with recursive estimation or provide infor...2024-01-17T20:31:14ZJohannes PfeiferMake dynare_sensitivity compatible with recursive estimation or provide informative errorSee https://forum.dynare.org/t/calculating-rmses/11903See https://forum.dynare.org/t/calculating-rmses/119036.xhttps://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/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/1147Do remaining tasks for trends and prefiltering changes2019-06-19T15:37:52ZJohannes PfeiferDo remaining tasks for trends and prefiltering changesLeft after #1145:
- Check treatment of various options and trends in smoother used in `imcforecast.m`
- Check treatment of these issues in `identification`
- Adjust `convert_dyn_45_to_44` to reflect these changes
- Add trend estimate to ...Left after #1145:
- Check treatment of various options and trends in smoother used in `imcforecast.m`
- Check treatment of these issues in `identification`
- Adjust `convert_dyn_45_to_44` to reflect these changes
- Add trend estimate to output from `prior_posterior_statistics_core`
4.5Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1105Fix several identification issues2019-06-19T15:37:52ZJohannes PfeiferFix several identification issuesConsider the following mod-file
```
var C Y T Dd;
varexo eps_1 eps_2 eps_3;
parameters root1 root2;
//rho1=1.5;
//rho2=-0.6;
root1=0.95; //root1=1.5/2+sqrt((1.5/2)^2+(-0.6))
root2=0.55; //root1=1.5/2-sqrt((1.5/2)^2+(-0.6))
model;
// ...Consider the following mod-file
```
var C Y T Dd;
varexo eps_1 eps_2 eps_3;
parameters root1 root2;
//rho1=1.5;
//rho2=-0.6;
root1=0.95; //root1=1.5/2+sqrt((1.5/2)^2+(-0.6))
root2=0.55; //root1=1.5/2-sqrt((1.5/2)^2+(-0.6))
model;
// parameter conversion
# rho1= (root1+root2);
# rho2= - root1*root2;
// model equation
Y = T + C;
C = rho1*C(-1)+rho2*C(-2)+ eps_1;
(T-T(-1))-(T(-1)-T(-2))= Dd(-1) + eps_2-eps_2(-1);
Dd = eps_3;
end;
// 2. Steady-state
steady_state_model;
T = 1;
Y = 1;
Dd=0;
C = 0;
end;
shocks;
var eps_1; stderr 0.1;
var eps_2; stderr 0.1;
var eps_3; stderr 0.1;
end;
stoch_simul(periods=2501, order=1);
save d_obs Y;
//3.2 ML Estimation
estimated_params;
stderr eps_1, 0.01, 0, 1;
stderr eps_2, 0.01, 0, 1;
stderr eps_3, 0.01, 0, 1;
root1, 0.95, -0.9999, 0.9999;
root2, 0.55, -0.9999, 0.9999;
end;
varobs Y;
identification(diffuse_filter);
estimation(datafile=d_obs, presample=4, first_obs=1, mode_compute=4, mode_check, diffuse_filter); // simulated data (MLE)
```
1. The problem is that after `identification_analysis` resets the number of autocorrelations, we have the line
`evalin('caller',['options_ident.ar=',int2str(nlags),';']);`
that is, only in the original caller, which is `dynare_identification.m`, is it reset. When the mod-file now reaches `simulated_moment_uncertainty.m` the variable accessed is `options` and not `options_ident` where `ar` is still at the old value.
I am not sure what is the best design choice to solve this issue. That is why I would leave it to you.
2. Now use
```
estimated_params;
//stderr eps_1, 0.01, 0, 1;
stderr eps_2, 0.01, 0, 1;
//stderr eps_3, 0.01, 0, 1;
root1, 0.95, -0.9999, 0.9999;
// root2, 0.55, -0.9999, 0.9999;
end;
```
instead and there will be a different crash due to nonconformable dimensions in `S=[S;zeros(size(JJ,2)-length(indJJ),1)];` in `identification_analysis`
1. I wonder why the standard deviation of eps_2 is not identifiable in the original mod-file, but the likelihood function shows curvature, although ML is used.
https://git.dynare.org/Dynare/dynare/-/issues/1016Clean up setting of options in dynare_sensitivity.m2019-11-21T08:36:43ZJohannes PfeiferClean up setting of options in dynare_sensitivity.mCurrently, it is very intransparent and prone to bugs.
- `neighborhood_width` forces
```
if options_gsa.neighborhood_width,
options_gsa.pprior=0;
options_gsa.ppost=0;
end
```
but the manual says that `neighborhood_width` on...Currently, it is very intransparent and prone to bugs.
- `neighborhood_width` forces
```
if options_gsa.neighborhood_width,
options_gsa.pprior=0;
options_gsa.ppost=0;
end
```
but the manual says that `neighborhood_width` only works when `pprior=0` and `ppost=0`. This seems like a bug. If we reset options set by the user, we should consistently provide warnings on the screen.
- Even more problematic, without any indication in the manual, using `morris=1` overwrites almost all other user-specified options:
```
if options_gsa.morris==1,
if ~options_gsa.identification,
options_gsa.redform=1;
end
options_gsa.pprior=1;
options_gsa.ppost=0;
%options_gsa.stab=1;
options_gsa.glue=0;
options_gsa.rmse=0;
options_gsa.load_rmse=0;
options_gsa.alpha2_stab=1;
options_gsa.ksstat=1;
options_gsa.pvalue_ks=0;
options_gsa.pvalue_corr=0;
OutputDirectoryName = CheckPath('gsa/screen',M_.dname);
else
OutputDirectoryName = CheckPath('gsa',M_.dname);
end
```
In particular, that results in none of the user-requested output being displayed. See http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=7115. @rattoma Is there a particular reason for this? I could not find any apparent incompatibility of `morris=1` with e.g. posterior sampling.
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/945Fix bug in identification when estimating only standard deviations2019-06-19T15:37:58ZJohannes PfeiferFix bug in identification when estimating only standard deviationsSee email from 05/23/15.
See email from 05/23/15.
4.5https://git.dynare.org/Dynare/dynare/-/issues/796corrcoef in octave2019-06-19T15:38:03ZMarco Rattocorrcoef in octaveAfter my latest commit, gsa crashes with octave. It turns out that the `corrcoef` function in octave is different from natlab, in that no second output argument is given (the pvalue of the corr-coef).
Now, there is a forge package for oc...After my latest commit, gsa crashes with octave. It turns out that the `corrcoef` function in octave is different from natlab, in that no second output argument is given (the pvalue of the corr-coef).
Now, there is a forge package for octave
http://octave.sourceforge.net/nan/function/corrcoef.html
that contains such an extended corrcoef for octave. Could we include that function is we are using octave?
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/789update default values for sensitivity options in doc2019-06-19T15:38:04ZHoutan Bastaniupdate default values for sensitivity options in docIt seems as though some default values in the documentation do not accord with the default values in `dynare_sensitivity.m`. e.g. `alpha_rmse`, `ksstat_redform`. Please review the defaults and update the manual.
It seems as though some default values in the documentation do not accord with the default values in `dynare_sensitivity.m`. e.g. `alpha_rmse`, `ksstat_redform`. Please review the defaults and update the manual.
Johannes PfeiferMarco RattoJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/781deal with dseries in dynare_identification.m2019-06-19T15:38:04ZHoutan Bastanideal with dseries in dynare_identification.mThe following test files break under Octave:
- `identification/kim/kim2.mod`
- `identification/as2007/as2007.mod`
The problem is at line 134 in dynare_identification.m as `info` is not a method in the `dseries` called `dataset_`. Fix pr...The following test files break under Octave:
- `identification/kim/kim2.mod`
- `identification/as2007/as2007.mod`
The problem is at line 134 in dynare_identification.m as `info` is not a method in the `dseries` called `dataset_`. Fix probably consists of replacing `dataset_.info` with `dataset_info`, but @rattoma should verify this change.....
4.5Marco RattoMarco Rattohttps://git.dynare.org/Dynare/dynare/-/issues/766Deal with correlations in identification2019-06-19T15:38:04ZJohannes PfeiferDeal with correlations in identificationCurrently, `identification` does not support specified correlations and simply crashes. We should either support this or block it. See http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6156
Currently, `identification` does not support specified correlations and simply crashes. We should either support this or block it. See http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6156
4.5Marco RattoMarco Ratto