Investigate crash of Octave under Windows
There are two problems with the following mod-file under Octave
var ygap pinf i u p a r_nat;
varexo eu ea;
parameters csigma cbeta crhou ckappa cweightygap crpinf cry clambda cepsilon ctheta cphi crhoa calfa;
csigma = 1.0;
cbeta = 0.99;
crhou = 0.8 ;
cweightygap = .1;
crpinf = 1.5;
cry = 0.125;
cepsilon = 6;
ctheta = 2/3;
calfa = 0.33;
cphi = 1;
clambda = (1-ctheta)*(1-ctheta*cbeta)/ctheta *(1-calfa)/(1-calfa+calfa*cepsilon);
ckappa = clambda*(csigma+(cphi+calfa)/(1-calfa));
calphax = ckappa/cepsilon;
crhoa =0.9;
model(linear);
ygap = ygap(+1) - (1/csigma)*(i-pinf(+1) - r_nat);
pinf = cbeta*pinf(+1) + ckappa*ygap + u;
u = crhou*u(-1) + eu;
p=p(-1)+pinf;
// the exogenous processes for productivity
a = crhoa*a(-1) + ea;
// the process for the natural rate can be derived from the flexible economy solution
r_nat = csigma*(1+cphi)/((1-calfa)*csigma+cphi+calfa)*(crhoa-1)*a;
end;
shocks;
var eu; stderr 1;
var ea; stderr 1;
end;
// ramsey
planner_objective(ckappa/cepsilon*ygap^2+pinf^2);
ramsey_policy(planner_discount=0.99,order=1,instruments=(i),irf=12);
First of all, when no mex-files are present, mjdgges.m
returns very different results than Matlab or the mex-file. While Octave then returns a rank failure, Matlab finds a small, but OK condition number and continues.
Second, when using the mex-files, Dynare crashes Octave 3.8.2 when computing theoretical moments. The culprit is the call to ordschur.oct
in lyap_symm
. The attached files allow to reproduce the error:
crash_octave.zip
My guess is that the problem stems from p
, which has a unit root and therefore non-finite second moments. This seems to be incorrectly handled.