I have a system of equations (f).

This system has a set of variables, among them the variables (x_t) and (x_{t-1}).

How can I represent the variable (x_{t-1}) within this system?

Thanks in advance

I have a system of equations (f).

This system has a set of variables, among them the variables (x_t) and (x_{t-1}).

How can I represent the variable (x_{t-1}) within this system?

Thanks in advance

Yes.

Using “DifferentialEquations.jl” I understood how to specify a discrete problem (“give no dt and not tstops”).

But I still don’t know how to represent a lagged variable.

Here is an example for illustrative purposes only:

x_{t} = a\cdot y_{t-1}+ b

y_{t} = c\cdot x_{t-1} + d\cdot x_{t} + e

z_{t} = log(x_{t}- y_{t})

João Marcelo develops what I need, but using the R language. He identifies the lagged variables with [-1]

Oh I see, yeah you’ll need to put NonlinearSolve.jl in the right hand side.

That should work. I thought of creating a matrix with the results of NonlinearSolve.jl. Then I could call the elements of the last row of this matrix to be the lagged variables. Among the initial conditions would be these lagged variables.