Steady State file did not compute

Hi all,

I’m fairly new to Dynare, and a helpful soul sent me a OLG model, where the retirement age was fixed ( JR = 65). However, I have tried to make the retirement age time-dependent, but I simply cannot fix the steady state file to incorporate my changes. The new variable is ret and it is a 181x80 matrix.

I don’t fully understand where my issue stems from, but the error is the following;

Equation number 1 : 0

Equation number 83 : 1

Equation number 130 : 0

Equation number 332 : 0

Error using print_info (line 76)
The steadystate file did not compute the steady state

Error in steady (line 104)
print_info(info,options_.noprint, options_);

Error in dem_q_2 (line 1998)

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

I have attached my working files and my data. Can someone help a rookie out?

Thanks a ton in advance.
dem_q_2_steadystate.m (4.2 KB) dem_q_2.mod (3.2 KB)

And the last files.
solve_rbeqpen2.m (1.2 KB)
Demography_EA.xlsx (713.1 KB)

The Demography_EA.xlsx is missing to run the file.

Hi Jpfeifer - thank you for returning. I believe I uploaded the document as a comment, because I was only allowed to upload two files. However, I have attached it to this comment as well. Again: thanks for returning :slight_smile: solve_rbeqpen2.m (1.2 KB) Demography_EA.xlsx (713.1 KB)

I am getting an error

Unable to perform assignment because the left and right sides have a different number of elements.

Error in dem_q_2_steadystate (line 92)
c_all(1) = c1;

because your loop

% Calculate the NPV of lifetime income
lti = 0;
for j = 2:J
    lti = lti + ret*((w + beq)/(1+r)^(j-1));

creates a vector.

Hi Jpfeifer,

Thanks for the heads up. I believe the model should be fixed now, but I still get the “steady state file did not compute steady state.”, even though I think my errors are fixed. Obviously, they are not, but I can’t find it and I’m soon going bald with all the hair-pulling :slight_smile:

Would appreciate if you could have a look at it.

Best regards

dem_q_2.mod (2.8 KB) dem_q_2_steadystate.m (4.2 KB) Demography_EA.xlsx (713.1 KB) solve_rbeqpen2.m (1.3 KB)

Have a look at the displayed residuals. The equations 83-128 have a residual of 1.