dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2019-06-19T15:37:49Zhttps://git.dynare.org/Dynare/dynare/-/issues/1232Remove onlyclearglobals option2019-06-19T15:37:49ZJohannes PfeiferRemove onlyclearglobals optionIt was introduced in master, but is now redundant with the `clear all` command being removed due to Matlab's JIT
It was introduced in master, but is now redundant with the `clear all` command being removed due to Matlab's JIT
4.5Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1227Solve use_dll-incompatibility problem on Windows in master2019-06-19T15:37:49ZJohannes PfeiferSolve use_dll-incompatibility problem on Windows in masterAfter merging the `temporary_terms`-branch (https://github.com/DynareTeam/dynare/commit/127637ffd672fdd8143ee13f2a38234e597d94d3) the `c`-files created are not `C89`-compatible, but require `C99`. This is a problem for Windows machines a...After merging the `temporary_terms`-branch (https://github.com/DynareTeam/dynare/commit/127637ffd672fdd8143ee13f2a38234e597d94d3) the `c`-files created are not `C89`-compatible, but require `C99`. This is a problem for Windows machines as Visual Studio before version 2015 only supported `C89`, resulting in errors of the form
`error C2143: syntax error : missing ';' before 'type'`
Before Matlab version `R2014b` users could use the `cygwin`-option by using the provided `mexopts-win64.bat` from http://www.dynare.org/DynareWiki/ConfigureMatlabWindowsForMexCompilation, which should not have this restriction. Since `R2015b`, `mingw` is available, which also supports `C99` (#1226). Moreover, Visual Studio 2015 finally supports `C99` and has a free available version that is supported since `R2015b`. That leaves 64bit Matlab-versions between `R2014a` and `R2015a` unable to deal with the problem unless someone figures out how to solve #641 for `cygwin` (potentially following the advice on how to set up the `xml`-file at http://stackoverflow.com/questions/8552580/using-gcc-mingw-as-matlabs-mex-compiler). Given that there seems to be not that much demand for `use_dll` on Windows, I would propose for 4.5 to focus on the `mingw`-support and state the above restrictions clearly in the release notes and the manual
4.5https://git.dynare.org/Dynare/dynare/-/issues/1226Support mingw-compiler on Windows2019-06-19T15:37:49ZJohannes PfeiferSupport mingw-compiler on WindowsSince Matlab2014a, the `mexopts.bat` cannot be used anymore to set the mex-compiler to `cygwin`, rendering it pretty much useless for most recent versions. However, Mathworks now has a MinGW-addon (http://de.mathworks.com/help/matlab/mat...Since Matlab2014a, the `mexopts.bat` cannot be used anymore to set the mex-compiler to `cygwin`, rendering it pretty much useless for most recent versions. However, Mathworks now has a MinGW-addon (http://de.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html) that we should support.
For this, we need to
1. Allow for a `mingw` command line flag
2. Adjust `dyn_mex` with the respective case distinction and necessary flags
3. Update http://www.dynare.org/DynareWiki/ConfigureMatlabWindowsForMexCompilation
4.5Johannes PfeiferHoutan BastaniJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1215qz_criterium in estimation2019-06-19T15:37:49ZMarco Rattoqz_criterium in estimationI think it would be useful to allow option `qz_criterium` also in estimation, similarly to simulation. Would it be possible? Is there any strong reason for not allowing this?
I think it would be useful to allow option `qz_criterium` also in estimation, similarly to simulation. Would it be possible? Is there any strong reason for not allowing this?
4.5https://git.dynare.org/Dynare/dynare/-/issues/1209rework recent static model preprocessor changes2019-06-19T15:37:49ZHoutan Bastanirework recent static model preprocessor changesThe changes to the preprocessor made in 6e514b7d1bfc4b76fbc483da1da0ae7416de7cda have been made in the `computingPass` when they should have been made in the `transformPass`. Move these changes from `StaticModel::computingPass` to `Dynam...The changes to the preprocessor made in 6e514b7d1bfc4b76fbc483da1da0ae7416de7cda have been made in the `computingPass` when they should have been made in the `transformPass`. Move these changes from `StaticModel::computingPass` to `DynamicModel::toStatic`
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1211Check newrat-implementation and potentially port Michel's changes2019-06-19T15:37:49ZJohannes PfeiferCheck newrat-implementation and potentially port Michel's changesDuring his first try of removing `objective_function_penalty_base` @MichelJuillard made various changes to `newrat` that were reverted, but potentially still need to be ported to `master`. But I am not entirely sure what these commits do...During his first try of removing `objective_function_penalty_base` @MichelJuillard made various changes to `newrat` that were reverted, but potentially still need to be ported to `master`. But I am not entirely sure what these commits do. @rattoma Could you maybe have a look.
1. In the reverted commits https://github.com/DynareTeam/dynare/commit/fe077fc7103658aab7becba95167aa9d240b07f1 and https://github.com/DynareTeam/dynare/commit/f48a026d89828e9e322333263f56b733a719eb34 the initialization of `mr_hessian` was removed.
2. In https://github.com/DynareTeam/dynare/commit/5ade8d7c6fc71cc4ee4ffbb27dad2ed6b4cf8ccd the `newratflag`was passed to the optimizer, but this was reverted in https://github.com/DynareTeam/dynare/commit/d4cf3576e468202df9d1582a045dfcfd74e2e7db . What is the correct setting here?
3. In https://github.com/DynareTeam/dynare/commit/5ade8d7c6fc71cc4ee4ffbb27dad2ed6b4cf8ccd the part
```
if analytic_derivation,
hhx=hh;
else
hhx = reshape(dum,nx,nx);
end
```
was replaced by
`hhx=hh;`
But when I tried this, the program crashed in tests.
4.5https://git.dynare.org/Dynare/dynare/-/issues/1203In the latest unstable, sparse_hessian_times_B_kronecker_C.mexw64 has a depen...2019-06-19T15:37:50ZTom HoldenIn the latest unstable, sparse_hessian_times_B_kronecker_C.mexw64 has a dependency on libgomp-1.dllI was getting errors about missing dependencies. Running Dependency Walker on it revealed libgomp-1.dll as the problem. Copying this across from MinGW fixed the issue.
I was getting errors about missing dependencies. Running Dependency Walker on it revealed libgomp-1.dll as the problem. Copying this across from MinGW fixed the issue.
4.5https://git.dynare.org/Dynare/dynare/-/issues/1201Depth issue2019-06-19T15:37:50ZStéphane Adjemianstepan@adjemian.euDepth issueLooking into #1175 , by reverting commit 3c7e60b744567f6f39a9c611bce6dcaadcd52bc6, I obtained the following error from matlab when trying to run Christiano-Motto-Rostagno model (the one in subfolder `figure4` of the archive available [he...Looking into #1175 , by reverting commit 3c7e60b744567f6f39a9c611bce6dcaadcd52bc6, I obtained the following error from matlab when trying to run Christiano-Motto-Rostagno model (the one in subfolder `figure4` of the archive available [here](http://faculty.wcas.northwestern.edu/~lchrist/research/ECB/risk_shocks/20100922_data.zip)
```
Error: File: cmr_static.m Line: 1292 Column: 16331
Nesting of {, [, and ( cannot exceed a depth of 32.
```
@MichelJuillard May this be a consequence of your patch about on auxiliary variables in steady state and static files (see #1133)?
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1194Allow for comments in parallel configuration files2019-06-19T15:37:50ZJohannes PfeiferAllow for comments in parallel configuration filesWe would need a way to add comments to configuration files. @rattoma were thinking about using the hashtag # for this (unless someone envisions a role for it on Windows/MAC/Unix).
We would need a way to add comments to configuration files. @rattoma were thinking about using the hashtag # for this (unless someone envisions a role for it on Windows/MAC/Unix).
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1193Make preprocessor recognize state variables introduced by optimal policy2019-06-19T15:37:50ZJohannes PfeiferMake preprocessor recognize state variables introduced by optimal policyIn the mod-file
```
var pai, c, n, r, a;
varexo u;
parameters beta, rho, epsilon, omega, phi, gamma;
beta=0.99;
gamma=3;
omega=17;
epsilon=8;
phi=1;
rho=0.95;
model;
a = rho*a(-1)+u;
1/c = beta*r/(c(+1)*pai(+1));
pai*(pai-1)/c = beta*...In the mod-file
```
var pai, c, n, r, a;
varexo u;
parameters beta, rho, epsilon, omega, phi, gamma;
beta=0.99;
gamma=3;
omega=17;
epsilon=8;
phi=1;
rho=0.95;
model;
a = rho*a(-1)+u;
1/c = beta*r/(c(+1)*pai(+1));
pai*(pai-1)/c = beta*pai(+1)*(pai(+1)-1)/c(+1)+epsilon*phi*n^(gamma+1)/omega -exp(a)*n*(epsilon-1)/(omega*c);
exp(a)*n = c+(omega/2)*(pai-1)^2;
end;
initval;
r=1;
end;
histval;
a(0)=1;
r(0)=1;
end;
steady_state_model;
a = 0;
pai = beta*r;
c = find_c(0.96,pai,beta,epsilon,phi,gamma,omega);
n = c+(omega/2)*(pai-1)^2;
end;
shocks;
var u; stderr 0.008;
var u;
periods 1;
values 1;
end;
options_.dr_display_tol=0;
planner_objective(ln(c)-phi*((n^(1+gamma))/(1+gamma)));
ramsey_policy(planner_discount=0.99,order=1,instruments=(r));
```
`r` becomes a state variable during Ramsey computations (albeit with 0 coefficients). As a state, one should be able to set its lagged value using `histval`. But this is not possible, as the preprocessor does not recognize `r` as a state.
4.5.2Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1187allow to skip 2nd order param derivs2019-06-19T15:37:50ZMarco Rattoallow to skip 2nd order param derivsFor large models, computing the analytic Hessian just produces a too big `_params_derivs.m` file which is untractable.
For running identification or only computing scores, 2nd order derivs would be useless.
@houtanb Would it be possibl...For large models, computing the analytic Hessian just produces a too big `_params_derivs.m` file which is untractable.
For running identification or only computing scores, 2nd order derivs would be useless.
@houtanb Would it be possible to tell the pre-processor to only compute 1st order derivatives, i.e. stop writing the `param_derivs` file when it reaches
`if nargout >= 3 ...`
?
2nd order terms could be just defined as empty, and routines (`dsge_likelihood`) possibly asking for 2nd order ones will trap this and just stop.
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1184Crash in preprocessor in unstable branch2019-06-19T15:37:50ZMarco RattoCrash in preprocessor in unstable branchI get a crash in the preprocessor in the unstable branch, since I rebased my local unstable branch onto the recent commits [pervious preprocessor versions I used date back October 2015 ...] when dealing with our Global Multicountry model...I get a crash in the preprocessor in the unstable branch, since I rebased my local unstable branch onto the recent commits [pervious preprocessor versions I used date back October 2015 ...] when dealing with our Global Multicountry model.
I get the error both in Windows and MacOS.
In MacOS I get the following message:
`
dynare_m(554,0x7fff7411b300) malloc:
`
`
*** error for object 0x7fda6a60ccd0: pointer being freed was not allocated
`
`
*** set a breakpoint in malloc_error_break to debug
`
apparently what triggers the error is the use of `trend_var` and `deflator` instructions.
When I filter out detrending, pre-processing completes.
I can share a replication package privately.
with older versions of the unstable preprocessor everything went fine.
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1183Fix compatibility with matlab 2016a in installer and mex-folder2019-06-19T15:37:51ZStéphane Adjemianstepan@adjemian.euFix compatibility with matlab 2016a in installer and mex-folderI had to revert commit 6072aa0b462484da990ffa00ee39fb141fa9513f (which is PR #1144 by @JohannesPfeifer) because the snapshot build failed this evening. The generated mex files are not saved in the expected directory. They are saved in `m...I had to revert commit 6072aa0b462484da990ffa00ee39fb141fa9513f (which is PR #1144 by @JohannesPfeifer) because the snapshot build failed this evening. The generated mex files are not saved in the expected directory. They are saved in `mex/matlab/win64-7.8-8.6` instead of `mex/matlab/win64-7.8-9.0`. I did not find where the name of this directory is controlled. @houtanb can you fix this?
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1179Fix cross-compilation of Dynare++ for Windows2019-06-19T15:37:51ZJohannes PfeiferFix cross-compilation of Dynare++ for WindowsWith the unstable version under Windows 10 I get an error that `libquadmath-0.dll` is missing, while Dynare 4.4.3 still works.
With the unstable version under Windows 10 I get an error that `libquadmath-0.dll` is missing, while Dynare 4.4.3 still works.
4.5Stéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dynare/-/issues/1178Ship Dynare++ example in Dynare++ folder2019-06-19T15:37:51ZJohannes PfeiferShip Dynare++ example in Dynare++ folderI would suggest we provide the example from the documentation, but with a lower order:
```
var Y, C, K, A, H, B;
varexo EPS, NU;
parameters beta, rho, alpha, delta, theta, psi, tau;
alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 1/(1.03^...I would suggest we provide the example from the documentation, but with a lower order:
```
var Y, C, K, A, H, B;
varexo EPS, NU;
parameters beta, rho, alpha, delta, theta, psi, tau;
alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 1/(1.03^0.25);
delta = 0.025;
psi = 0;
theta = 2.95;
model;
C*theta*H^(1+psi) = (1-alpha)*Y;
beta*exp(B)*C/exp(B(1))/C(1)*
(exp(B(1))*alpha*Y(1)/K(1)+1-delta) = 1;
Y = exp(A)*K^alpha*H^(1-alpha);
K = exp(B(-1))*(Y(-1)-C(-1)) + (1-delta)*K(-1);
A = rho*A(-1) + tau*B(-1) + EPS;
B = tau*A(-1) + rho*B(-1) + NU;
end;
initval;
A = 0;
B = 0;
H = ((1-alpha)/(theta*(1-(delta*alpha)
/(1/beta-1+delta))))^(1/(1+psi));
Y = (alpha/(1/beta-1+delta))^(alpha/(1-alpha))*H;
K = alpha/(1/beta-1+delta)*Y;
C = Y - delta*K;
end;
vcov = [0.0002 0.00005;
0.00005 0.0001
];
order = 5;
```
4.5Stéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dynare/-/issues/1176Investigate crash in sim1_linear.m2019-06-19T15:37:51ZJohannes PfeiferInvestigate crash in sim1_linear.mThe following mod-file crashes Dynare in master
```
var pi y pi_annual;
varexo x;
parameters kappa beta sigma lambda rho phi_pi phi_y;
kappa=.025;
beta=.995;
sigma=1;
lambda=1;
rho=.8;
phi_pi=1.5;
phi_y=.5;
model(linear);
pi =(kappa...The following mod-file crashes Dynare in master
```
var pi y pi_annual;
varexo x;
parameters kappa beta sigma lambda rho phi_pi phi_y;
kappa=.025;
beta=.995;
sigma=1;
lambda=1;
rho=.8;
phi_pi=1.5;
phi_y=.5;
model(linear);
pi =(kappa/(1+beta*lambda))*(-1/sigma*x+1/kappa*pi(+1)-beta/kappa*pi(+2)+1/sigma*beta*pi(+1))+(beta/(1+beta*lambda))*pi(+1)+(lambda/(1+beta*lambda))*pi(-1);
x=sigma*(y(+1)-y)+pi(+1);
pi_annual=4*pi;
end;
shocks;
var x;
periods 1:1;
values -0.005;
end;
simul(periods=1);
```
Setting periods bigger than 1 solves the issue.
4.5https://git.dynare.org/Dynare/dynare/-/issues/1177Implement interface for posterior sampling methods2019-06-19T15:37:51ZJohannes PfeiferImplement interface for posterior sampling methodsRelated to #1174 and #1065
I would propose to use this occasion to further clean up the `options_`-structure and create a field `options_.posterior_sampler_options` that stores as subfields the various options.
The preprocessor shoul...Related to #1174 and #1065
I would propose to use this occasion to further clean up the `options_`-structure and create a field `options_.posterior_sampler_options` that stores as subfields the various options.
The preprocessor should have an option `posterior_sampling_method` that accepts a quoted string that can be `slice`, `random_walk_metropolis_hastings`, `independent_metropolis_hastings` or `tailored_random_block_metropolis_hastings`
It should map into `options_.posterior_sampler_options.posterior_sampling_method` with default
`random_walk_metropolis_hastings`, which replaces the current `options_.posterior_sampling_method`
In addition:
1. We need a subfields `options_.posterior_sampler_options.tarb`, `options_.posterior_sampler_options.rwmh`,`options_.posterior_sampler_options.slice`,
and `options_.posterior_sampler_options.imh` that store the default options for the respective sampler as we already do for different mode_computes.
2. We need the preprocessor to accept name/value pairs like in the already existing `optim`-option in the form of `posterior_sampler_options = (NAME, VALUE,...)`.
It should map into a string `options_.posterior_sampler_options.sampling_opt`, which can then be read out using `read_key_value_string` as we already do in `dynare_minimize_objective`.
3. The already existing but undocumented options `options_.proposal_distribution` and `options_.student_degrees_of_freedom` should now become sampler-specific subfields of the fields introduced in 1.
4.5https://git.dynare.org/Dynare/dynare/-/issues/1172Remove or fix dsgevar_posterior_density.m2019-06-19T15:37:51ZJohannes PfeiferRemove or fix dsgevar_posterior_density.mThe function is nowhere used and is totally buggy as it even does not reflect name changes in the header within the function (e.g. DynareOption instead of options_ )
The function is nowhere used and is totally buggy as it even does not reflect name changes in the header within the function (e.g. DynareOption instead of options_ )
4.5https://git.dynare.org/Dynare/dynare/-/issues/1150derivation with respect to the parameters2019-06-19T15:37:52ZMichelJuillardderivation with respect to the parametersWhen modifying <fname>_static.m in order to address problems with auxiliary variables (see #1133), I realized that the creation of <fname>_params_derivs.m and the code for analytical derivatives of the likelihood function assume that the...When modifying <fname>_static.m in order to address problems with auxiliary variables (see #1133), I realized that the creation of <fname>_params_derivs.m and the code for analytical derivatives of the likelihood function assume that the static model is the static version of the <fname>_dynamic, equation by equation.
This is not obvious in the preprocessor where the static model is stored and handled in a different tree and it stops me to find an efficient solution to the computation of the steady state of auxiliary variables.
For this reason, I will introduce two files for the computation of the derivatives with respect to the parameters: <fname>_params_derivs_static and <fname>_derivs_dynamic
I will also change all calling sequences throughout the code
4.5MichelJuillardMichelJuillardhttps://git.dynare.org/Dynare/dynare/-/issues/1149Harmonize output of objective functions passed to minimizers2019-06-19T15:37:52ZJohannes PfeiferHarmonize output of objective functions passed to minimizersPrerequisite for eliminating the global variable `objective_function_penalty_base` (#1051) and to avoid introducing another layer of functions as in reverted commit https://github.com/DynareTeam/dynare/commit/1ad8df4635d99ba775e22f5693bf...Prerequisite for eliminating the global variable `objective_function_penalty_base` (#1051) and to avoid introducing another layer of functions as in reverted commit https://github.com/DynareTeam/dynare/commit/1ad8df4635d99ba775e22f5693bf18c2cbb6c0aa (see also the discussion there)
4.5Johannes PfeiferJohannes Pfeifer