15 ARIMA and SARIMA Models

1 ARMA(p, q) Model Rewrite

Recall ARMA model and its backshift notation. We rewrite ϕ(B)(yt−μ)=θ(B)εt to ϕ(B)yt=δ+θ(B)εt and try to determine δ. We first write yt−μ=θ(B)ϕ(B)εt. Factorize ϕ(z) as ϕ(z)=(1−a1z)⋯(1−apz). Here a1−1,⋯,ap−1 are roots of ϕ(z). Then yt−μ=θ(B)∏k=1p(1−akB)εt=θ(B)(1−a1B)−1⋯(1−apB)−1εt.
Recall expansion in (2.4), if all |ak|<1, rewrite yt=μ+∑j=0∞ψjεt−j. This is a causal stationary process.

Since PACF and ACF have not a clear cut off, we usually use AIC, BIC to determine p,q.

2 Box-Jenkins Time Series Modeling Strategy

The idea is

To implement the first idea, we usually have two ways:

3 ARIMA Models

ARIMA (AutoRegressive Integrated Moving Average)

yt is ARIMA(p,d,q) if ϕ(B)((∇dyt)−μ)=θ(B)εt, where εt∼i.i.dN(0,σ2).

3.1 Seasonal ARMA Models

We say {yt} is a seasonal ARMA(P,Q) with period s, if Φ(Bs)(yt−μ)=Θ(Bs)εt, where Φ(Bs)=1−Φ1Bs−⋯−ΦPBPs,Θ(Bs)=1+Θ1Bs+⋯+ΘQBQs.
This is a special case of an ARMA(Ps,Qs) model. But it has P+Q+1 parameters (1 for σ2) while a general ARMA(Ps,Qs) has Ps+Qs+1.

The ACF and PACF of seasonal ARMA are non-zero only at seasonal lags h=0.s,2s,⋯. At seasonal lags, PACF and ACF behave just like unseasonal ARMA model: Φ(B)Xt=Θ(B)εt.

3.2 Multiplicative Seasonal ARMA Models

Multiplicative Seasonal ARMA Model

ARMA(p,q)×(P,Q)s: Φ(Bs)ϕ(B)(yt−μ)=Θ(Bs)θ(B)εt.

For a dataset that might have sample autocorrelations nonnegligile at lags 0,1,11,12,13 (like co2 dataset), we can use this to reduce parameter.

4 SARIMA Models

SARIMA model

ARIMA(p,d,q)×(P,D,Q)s: Φ(Bs)ϕ(B)∇sD∇d(yt−μ)=δ+Θ(Bs)θ(B)εt. Recall ∇sd=(1−Bs)d and ∇d=(1−B)d.

5 Parameter Estimation in MA(1)

Estimating parameters of ARMA/ARIMA/SARIMA is much harder than AR models. We'll illustrate the difficulty using the example of MA(1). Recall from here, MA(1) is given by (5.1)yt=μ+εt+θεt−1=μ+θ(B)εt,θ(B)=1+θB,εt∼i.i.dN(0,σ2).
The joint density of y1,⋯,yn is multivariate normal with mean m=(μ,⋯,μ)T and covariance matrix Σ: Σ(i,j)={σ2(1+θ2),i=j,σ2θ,|i−j|=1,0,else.
The likelihood is (12π)n(detΣ)−12exp⁡(−12(y−m)TΣ−1(y−m)), where y=(y1,⋯,yn)T. This is a function of μ,θ,σ, which can be estimated by maximizing the logarithm of the likelihood. Σ−1 makes this computationally expensive. We should use some approximation to skip inverse.
An alternative approach is to find a connection to AR models. We can convert to εt=1θ(B)(yt−μ)=(1−θB+θ2B2−θ3B3+⋯)(yt−μ), so that yt−θyt−1+θ2yt−2−θ3yt−3+⋯=μ1+θ+εt. This requires |θ|<1. For this AR model, the likelihood is (12πσ)nexp⁡(−12σ2∑t=1n(yt−μ1+θ−θyt−1+θ2yt−2−θ3yt−3+⋯)2). This involves y0,y−1,y−2,⋯ for which we have no data. We can simply let them to be 0. Now it becomes (12πσ)nexp⁡(−S(μ,θ)2σ2), where S(μ,θ)=(y1−μ1+θ)2+(y2−μ1+θ−θy1)2+⋯+(yn−μ1+θ−θyn−1+θ2yn−2−⋯+(−1)n−1θn−1y1)2.
The MLE of μ,θ comes from minimizeμ^,θ^S(μ,θ).
This is a nonlinear minimization that can be done in packages in Python like scipy. It's easy to see that σ^=S(μ^,θ^)n.

For uncertainty quantification, we can take a Bayesian approach. First assume prior θ∼Uniform(−1,1),μ∼Uniform(−C,C),log⁡σ∼Uniform(−C,C) for a large C→∞. Note that we restrict |θ|<1.
The posterior is then fμ,θ,σ|data(μ,θ,σ)∝(12πσ)nexp⁡(−S(μ,θ)2σ2)×1σ1{−1<θ<1,−C<μ,log⁡σ<C}∝n−n−1exp⁡(−S(μ,θ)2σ2)1{−1<θ<1,−C<μ,log⁡σ<C}. To obtain the posterior of μ,θ alone, we integrate the above w.r.t σ. Then we have fμ,θ|data(μ,θ)∝(1S(μ,θ))n21{−1<θ<1,−C<μ<C}.
This can be evaluated numerically over a grid of μ,θ and then approximated. Or, we can approximate with a suitable t distribution by doing a Taylor expansion of S(μ,θ) near μ^,θ^. I.e., let α=(μ,θ) and α^=(μ^,θ^): S(α)=S(α^)+⟨∇S(α^),α−α^⟩+(α−α^)T(12HS(α^))(α−α^)=S(α^)+(α−α^)T(12HS(α^))(α−α^), where we used ∇S(α^)=0 because α^ is a minimizer, and HS(α^) is the Hessian of S. Thereforefμ,θ|data(μ,θ)∝(1S(μ,θ))n21{−1<θ<1,−C<μ<C}∝(S(α^)S(α))n21{−1<θ<1,−C<μ<C}=(S(α^)S(α^)+(α−α^)T(12HS(α^))(α−α^))n21{−1<θ<1,−C<μ<C}=(11+(α−α^)T(12S(α^)HS(α^))(α−α^))n21{−1<θ<1,−C<μ<C}=(11+1n−2(α−α^)T(n−22S(α^)HS(α^))(α−α^))n−2+221{−1<θ<1,−C<μ<C}
Comparing with (11+1k(x−m)TΣ−1(x−m))k+p2 for the p-variate t-density tk,p(μ,Σ), we see that α|data∼tn−2,2(α^,S(α^)n−2(12HS(α^))−1).