I am fitting monthly data that are expected to be auto-regressive (streamflow), but I want to include other independent variables (in my case it is a multivariate regression, with about 4 variables).
fit = glm(strea~X1+X2+X3+X4)
In order to consider correctly the autoregressive part, I considered ARMAX but I felt like a Linear regression with Autoregressive errors was more suitable for my problem.
I found this article very helpful - https://onlinecourses.science.psu.edu/stat510/node/72
Once I fit my regression, I analyzed my residuals, and as expected (from some preliminary analysis I had done) it seems like my residuals need a seasonal ARMA with ARMA(1,0)(2,1).
These are the ACF and PACF of the residulas:
I fit a sarima model then:
These are the stastitics of this model fitted to the residuals
which are decent - maybe not perfectly normal those quantiles, but definitely good enough for now.
My question is: how do I introduce this complicated model into my regression? The link above shows only simple examples, but not such a complex one.
I expect them to be something like:
y*t = y(t)-(a*y(t-1)+b*y(t-12)+c*y(t-24)+[w(t)+d*w(t-12)])
where a is from the AR(1) of the non seasonal part, and b,c are from the seasonal part, and d is from the seasonal MA(1) part.
But how do I go with my multiple independent variables? I am particuarly confused about the seasonal MA(1) part.
I am new to the SARIMA/ARMA. I basically would need help in deriving the equation that transforms my y(t) and x(t) to include in the regression.