I am estimating potential output. The model runs fine if I write potential output and GDP in first differences; however, it seems dynare does not accept nonstationary variables such as potential output and GDP in the model because the model does not solve. Is there a way I can incorporate nonstationary variables in the model code so I do not need to accumulate outside the model?

What is the problem you are facing? The non-existence of a steady state due to a random walk with drift?

Yes, potential output has a unit root y(t) = y(t-1) + g + e(t); dynare says “Impossible to find the steady state”; so I have to run the model as dy(t) = g + e(t) and then obtain potential output outside the model by accumulating dy(t). My question is: Can I run the model in dynare including the nonstationary variable y(t) in the model code?

See