Octave estimation fails with load_mh

I have tried to use the arguments mode=0 and load_mh to increase the length of the mh chain when estimating the RBC model using Octave (this works fine in Matlab), but I obtain the following error message.

dynare RBC_schat

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

Starting Dynare (version 4.2.1).warning: delete: RBC_schat.log: Permission denied
warning: called from
delete at line 43 column 11
RBC_schat at line 19 column 5
dynare at line 132 column 1


y 0.469438
c 0.414363
k 1.59223
i 0.0550755
l 0.314008
w 0.996657
r 0.0665083
dA 1.01511
Y_obs 1
e 1

You did not declare endogenous variables after the estimation command.

This version of Dynare cannot estimate non linearized models!
Set “order” equal to 1.

Loading 1003 observations from simRBCgrow.m

Initial value of the log posterior (or likelihood): 264.76

prior mean mode s.d. t-stat prior pstdev

alpha 0.330 0.3206 0.0487 6.5876 beta 0.0500
beta 0.930 0.9356 0.0193 48.4484 beta 0.0200
delta 0.030 0.0266 0.0094 2.8139 beta 0.0100
psi 2.700 2.6699 0.2982 8.9545 gamm 0.3000
gamma 0.010 0.0094 0.0015 6.3572 norm 0.0020
epsilon 8.500 8.3857 0.9930 8.4448 gamm 1.0000
standard deviation of shocks
prior mean mode s.d. t-stat prior pstdev

e_a 0.010 0.0216 0.0022 9.8719 invg Inf

Log data density [Laplace approximation] is 245.321465.

MH: I’m loading past metropolis-hastings simulations…
MH:: FAILURE! there is no MH file to load here!
warning: metropolis_hastings_initialization: some elements in list of return values are undefined
error: operator +: nonconformant arguments (op1 is 0x0, op2 is 2x1)
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: called from:
error: M:\p_dsge\Dynare\423323~Z.1\matlab\random_walk_metropolis_hastings.m at line 61, column 15
error: M:\p_dsge\Dynare\423323~Z.1\matlab\dynare_estimation_1.m at line 871, column 17
error: M:\p_dsge\Dynare\423323~Z.1\matlab\dynare_estimation.m at line 62, column 5
error: L:\schatten\RBC\RBC_schat.m at line 184, column 1
error: M:\p_dsge\Dynare\423323~Z.1\matlab\dynare.m at line 132, column 1

Any help with this problem would be greatly appreciated.


Rob Luginbuhl
simRBCgrow.m (15.7 KB)
RBC_schat.mod (1.6 KB)

I’ve now got Octave running by changing line 204 in the file metropolis_hastings_initialization.m to read

files = dir ( strcat ( MhDirectoryName, filesep, ModelName, ‘_mh*.mat’) );

I hope this helps.


Thanks for reporting this problem and for suggesting a fix.

Your fix has been incorporated in the unstable version of Dynare, and will be incorporated in the next stable release (4.2.2).