# R auto.arima() with non-stationary covariates

I want to fit an ARMA model with covariates to a non-stationary time series. I have daily measurements for water flow for 4 stations (S1-S4) and the time series is not stationary, so I will have to take a first difference.

I want to find an ARMA model that takes as covariates the other 3 stations.

What I have done:
a) m1 = auto.arima(S1, d=1, max.p, max.q, xreg=data.frame(S2,S3,S4))
b) m2 = auto.arima(diff(S1), d=0, max.p, max.q, xreg=data.frame(diff(S2),diff(S3),diff(S4)))

My question: which model is correct, considering the series are non-stationary?

I will appreciate any suggestion.

Thank you,
Patricia

Assuming you are actually interested in S1 rather than its differences, then you should use m1.