you want to do an autoregressive model (time series) for a system of equations.

such that Y = intercept + X + Z + error

and X = intercept + Y + Z + error

correct? That's a little bit of a tougher model to work with since its non-recursive.

You might get more mileage out of something like =

Y = intercept + X + Z + error

X = intercept + Z + Error