Basic RBC(Hansen(1985))


I just want to replicate a basic RBC model with indivisible labor(Hansen, 1985).

However, I had an error message:

dynare rbc

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.3.3).
Starting preprocessing of the model file …
Found 6 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: File: rbc.m Line: 90 Column: 1
Unexpected MATLAB operator.

Error in dynare (line 120)
evalin(‘base’,fname) ;

Can you guys explain to me why I got an error?

FYI, the utility function is U(c,n)=log©-Bn, gamma is a growth rate, and lambda is a Lagrangian multiplier.

RBC.mod (556 Bytes)

Because there is a fullstop after the semicolon in the first line of your mod-file.

Hi, same problem - I get the error “unexpected MATLAB expression” and then . I feel like I probably have some silly mistake and the problem seems to be on the line with "evalin(‘base’,fname) "

My code is here, pretty rudimentary as it is my first dynare code. So it is possible that the problem is a deeper one of identification, but hopefully it is something silly that I am missing
three_a.mod (296 Bytes)

On my machine your posted file runs. The only problem is that you seem to be trying to determine a price level that is undeterminate (only inflation seems to be determined, see my Guide to Observation Equations).

A replication file is now available at