> [!tldr] > An ARMA model $(X_{t})$ of order $(p,q)$ is a linear stochastic process with $p$ [[Autoregressive Processes|AR]] terms $(X_{t})$ and $q$ [[Moving Average Processes|MA]] terms of an [[Purely Random Processes|PRP]] $(Z_{t})$: $\begin{align*} X_{t}:&= \underbrace{\alpha_{1}X_{t-1}+ \cdots + \alpha_{p}X_{t-p}}_{\text{AR}(p)}\\[0.2em] &\hphantom{blaj}+\underbrace{Z_{t}+\beta_{1}Z_{t-1}+ \cdots + \beta_{q}Z_{t-q}}_{\text{MA}(q)} \end{align*}$Although ARMA has a larger set of basis functions, it can require fewer terms to model a time series, in accordance with the principle of parsimony. ```R fold arma_params <- list(ar = c(0.7,-0.9), ma=c(-0.4,0.4)) arma_data <- arima.sim(n = 500, arma_params) dev.off() par(mfrow=c(2,1), mai=c(1,4,1,1)/4, oma=c(2,0,0,0), bg=NA) plot(arma_data, type="l", ylab="Series Value", main="ARMA(2,2) Process") acf(arma_data, ylab="Autocorr.", main="") ``` ![[ARMA22ACF.png#invert]] In terms of the backshift operator, the ARMA process can be described as $\phi(B)X_{t}=\theta(B)Z_{t}$Stationarity and invertibility requires $\phi \ne 0$ and $\theta \ne 0$ in the unit circle respectively. The [[Autoregressive Processes#Yule-Walker Equations|Yule-Walker equations]] of an ARMA process can be derived in a way similar to the AR process. For analysis purposes, the ARMA model can also be rewritten as pure AR or MA processes: $\begin{align*} &\mathrm{AR}: &\frac{\phi(B)}{\theta(B)}X_{t}&= Z_{t}\\ &\mathrm{MA}: &X_{t}&= \frac{\theta(B)}{\phi(B)}Z_{t} \end{align*}$