Hello All,
I'm still working on constructing the model described in the first post (based on Beidas-Strom and Poghosyan, 2011; see their paper for equations/parameterizations if needed), but I've run into something of an anomaly. I ran the model after finalizing a new equation block, and got the result below:
- Code: Select all
㯿Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.
Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
Found 20 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
SOLVE: maxit has been reached
Residuals of the static equations:
Equation number 1 : 1.2003e-005
Equation number 2 : 2.3483e-006
Equation number 3 : 2.1968e-005
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : -0.00017995
Equation number 7 : -9.2869e-006
Equation number 8 : -2.317e-005
Equation number 9 : -4.7734e-006
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : -3.5556e-006
Equation number 13 : 0
Equation number 14 : -5.6631e-006
Equation number 15 : 2.3031e-005
Equation number 16 : 0
Equation number 17 : -2.5151e-005
Equation number 18 : 0
Equation number 19 : -0.00015429
Equation number 20 : -0.00011251
error: Impossible to find the steady state. Either the model does
n't have a steady state, there are an infinity of steady states,
or the guess values are too far from the solution
error: called from:
error: c:\dynare\4.4.3\matlab\print_info.m at line 74, column 9
error: c:\dynare\4.4.3\matlab\steady.m at line 92, column 5
error: JamTest1.m at line 358, column 1
error: c:\dynare\4.4.3\matlab\dynare.m at line 180, column 1
>> dynare JamTest1.mod
I didn't expect it to converge or find a steady state since the model isn't fully specified yet, I just wanted to make sure the code would run without any errors in the preprocessor or matlab file.
However, I then changed the values of the shocks from 0.1 to 0.0, just to see if it would calculate a deterministic steady state if there weren't any shocks, and the program started to output the results below, with the main component being "error: fprintf: invalid stream number = -1"
- Code: Select all
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.
Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
Found 20 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
error: fprintf: invalid stream number = -1
error: called from:
error: c:\dynare\4.4.3\matlab\dynare.m at line 168, column 5
I then tried changing the shock values back to 0.1 from 0.0, and Dynare persists in giving me the above error. There are no other components of the program I changed other than the shock block values, and changing them back or increasing simul from 2100 periods to 20100 periods didn't do anything either. Dynare is still giving me the "error: fprintf: invalid stream number = -1".
Is there any reason why this would be happening? The relevant code from dynare.m is below:
- Code: Select all
% Save preprocessor result in logfile (if `no_log' option not present)
no_log = 0;
for i=2:nargin
no_log = no_log || strcmp(varargin{i-1}, 'nolog');
end
if ~no_log
logname = [fname(1:end-4) '.log'];
fid = fopen(logname, 'w');
fprintf(fid, '%s', result);
fclose(fid);
end
Thank you in advance for your comments!
Edit:
Turns out I can get the fprintf error to go away by removing pr_M from the varlist and initval list and the last equation from the model block:
- Code: Select all
pr_M=(c_Fm_steady)*rer+(OM_steady)*prstar_O;
What about this equation could be causing the fprintf error?