Closed nikhilwoodruff closed 3 years ago
@nikhilwoodruff Sorry to miss this.
There maybe some difference in the solvers used on your computer and what is run on GH Actions.
Often, you can get the SS to solve by changing the initial values, especially the interest rate. To do this, modify line 70 of the run_og_uk.py
script (p.initial_guess_r_SS = 0.07
) to be some other value (e.g., 0.05 or 0.09). You might focus on the toy data first then move to the full data after you get that to work.
Hi Jason,
Thanks very much for this, it seems to have worked. (I changed the initial guess of the interest rate from 0.07 to 0.04, with the microdata and the errors were then all < 1e-10.
Happy to say it did indeed finish, returning this output for the PA reduction from £12.5k to £10k. @jdebacker does anything look off here?
Percentage changes in aggregates:
Year Variable 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2018-2027 SS
0 GDP ($Y_t$) -0.00 -0.01 0.00 0.01 0.01 0.01 0.01 0.01 0.01 0.00 0.00 -0.00
1 Consumption ($C_t$) 0.02 -0.08 -0.08 0.01 0.01 0.01 0.01 0.01 0.01 0.01 -0.01 -0.00
2 Capital Stock ($K_t$) -0.00 -0.01 0.01 0.03 0.03 0.03 0.03 0.02 0.02 0.02 0.02 0.00
3 Labor ($L_t$) -0.01 -0.01 -0.01 -0.00 -0.00 -0.00 -0.00 -0.00 -0.00 -0.00 -0.00 -0.00
4 Real interest rate ($r_t$) -0.01 -0.00 -0.02 -0.04 -0.04 -0.03 -0.03 -0.03 -0.03 -0.02 -0.03 0.00
5 Wage rate 0.00 0.00 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.00
Closing this because I can now solve for the steady-state, thanks Jason.
LGTM - glad you got it to solve!
@jdebacker @rickecon @jpycroft
Just thought I'd put this here for reference, as I haven't so far been able to get an error-free output. The only difference in my installation is that I commented out the OG-USA pip requirement in
environment.yml
and installed first from the repo for reasons described here. I've now run the model with both the toy dataset and the FRS microdata, and I've put the outputs below. For the steady-state not found, is there any parameter I could try changing (keep solving for longer before timing out, have a higher error tolerance)?I guess the good news is that since the synthetic dataset is known to solve (in the GH actions), so this must be a local issue rather than a more fundamental problem.
Synthetic dataset
2018 FRS Microdata
The NaNs seem strange in the microdata one, and even stranger they only appear after this line:
K_d has negative elements. Setting them positive to prevent NAN.