Simulating a local-linear-trend process directly

Hi,
How do you simulate a local-linear-trend process directly? To be explicit, can you simulate y where
y = y(-1) + mu + x
x = rhox(-1) + e
without resorting to writing the model as
z =mu + x
x = rho
x(-1) + e
and cumulating simulated z to obtain a simulated y?
If you run the attached program (with the _steadystate.m file), simulated y makes no sense (given the trend and variance, it should be a straight line).
The reason I ask is that I am estimating a much bigger model that includes several unit root variables as observables, and simulating these observables
directly in levels by running stoch-simul on a calibrated version seems to produce nonsensical results.
Thanks for your reply.
Pierre
llt_steadystate.m (109 Bytes)
llt.mod (291 Bytes)

In fact, I just noticed that simulated y in the first model is cumulated simulated x, not (x + mu), which is why the trend is missing. Is this a bug?

Dynare is not able to simulate non-stationary variables (it gives NaN as a mean and Infinity as variance for these variables). It is able to estimate non-stationary models under certain conditions.

Note that in former versions of Dynare, there was a bug in the output results for non-stationary variables. Make sure you are using the latest Dynare (4.1.3 at this time).

Best,