AR model modified

Hi,

i need to modify the standard AR(2) model using two inputs data. I would fit the model as:

Y(t) = a0 + a1Y(t-1) + a2Y(t-2) + a3X(t-1) + e(t)

where:

Y(t) e X(t): input time-series

a0,a1,a2,a3: coefficients to be estimated

t:time

e(t): error term

How can i fix my problem with matlab's scripting?

Can you help me please?

Thanks

I am not an Matlab expert, but you might want to check out the Lag Column node in KNIME.