OLG transition simulation

Hi Team,

Hope you are well. I am attempting to replicate “Automation, stagnation and implications of a robot tax”, by Gasteiger and Prettner 2020.

I have successfully solved for the steady state and been able to incorporate a tax on robots, tau.

However I am struggling to understand how to implement tau varying over time, as done in figure 4 of said paper. I have attempted to use a varexo e and to use the simul command, but it was asking me to add a junk variable. When added I then had a further issue that end of life consumption, r and phi doesn’t appear as current period variables.

What is the best way to implement this please? I’ve spent several days reading documentation, but I think I’ve gotten as far as I currently can.

Thanks for all your hard work, dynare is the best tool for computational econ I’ve used so far!
attempt4.mod (2.3 KB)

Your setup must be wrong. You have

MODEL_DIAGNOSTICS: The following endogenous variables aren't present at the current period in the model:

That implies that these variables are not determined at time t. This suggests a serious timing problem.

Hi Professor,

Thanks for the feedback. This timing problem was exactly the issue.
For anyone else struggling with the same OLG issue, the convention in the literature is to describe the consumption for the old period as t+1. That isn’t correct in Dynare, where one should treat it as being in the same period, as that is when it is determined.

This result was confirmed by successfully deriving the same results as the underlying replication paper, but only once this code change was made.