Finish ARMA
This commit is contained in:
parent
c20180f864
commit
fe179958fb
1 changed files with 41 additions and 8 deletions
49
main.tex
49
main.tex
|
@ -5,18 +5,12 @@
|
||||||
\usepackage{ifthen}
|
\usepackage{ifthen}
|
||||||
\usepackage[a4paper, landscape]{geometry}
|
\usepackage[a4paper, landscape]{geometry}
|
||||||
\usepackage{hyperref}
|
\usepackage{hyperref}
|
||||||
\usepackage{ccicons}
|
|
||||||
\usepackage{amsmath, amsfonts, amssymb, amsthm}
|
\usepackage{amsmath, amsfonts, amssymb, amsthm}
|
||||||
\usepackage{listings}
|
\usepackage{listings}
|
||||||
\usepackage{graphicx}
|
\usepackage{graphicx}
|
||||||
\usepackage{fontawesome5}
|
\usepackage{fontawesome5}
|
||||||
\usepackage{xcolor}
|
\usepackage{xcolor}
|
||||||
\usepackage{float}
|
\usepackage{float}
|
||||||
\usepackage[
|
|
||||||
type={CC},
|
|
||||||
modifier={by-sa},
|
|
||||||
version={3.0}
|
|
||||||
]{doclicense}
|
|
||||||
|
|
||||||
\graphicspath{{./img/}}
|
\graphicspath{{./img/}}
|
||||||
|
|
||||||
|
@ -139,7 +133,6 @@
|
||||||
\Large{Applied Time Series } \\
|
\Large{Applied Time Series } \\
|
||||||
\small{\href{http://vvz.ethz.ch/Vorlesungsverzeichnis/lerneinheit.view?semkez=2021S&ansicht=LEHRVERANSTALTUNGEN&lerneinheitId=149645&lang=de}{401-6624-11L}} \\
|
\small{\href{http://vvz.ethz.ch/Vorlesungsverzeichnis/lerneinheit.view?semkez=2021S&ansicht=LEHRVERANSTALTUNGEN&lerneinheitId=149645&lang=de}{401-6624-11L}} \\
|
||||||
\small{Jannis Portmann \the\year} \\
|
\small{Jannis Portmann \the\year} \\
|
||||||
{\ccbysa}
|
|
||||||
\rule{\linewidth}{0.25pt}
|
\rule{\linewidth}{0.25pt}
|
||||||
\end{center}
|
\end{center}
|
||||||
|
|
||||||
|
@ -784,7 +777,7 @@ As with AR(p) models, there are three main steps:
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
|
|
||||||
\subsubsection{Parameter estimation}
|
\subsubsection{Parameter estimation}\label{ma-parameter-estimation}
|
||||||
The simplest idea is to exploit the relation between model parameters and autocorrelation coefficients («Yule-Walker») after the global mean $m$ has been estimated and subtracted. \\
|
The simplest idea is to exploit the relation between model parameters and autocorrelation coefficients («Yule-Walker») after the global mean $m$ has been estimated and subtracted. \\
|
||||||
In contrast to the Yule-Walker method for AR(p) models, this yields an inefficient estimator that generally generates poor results and hence should not be used in practice.
|
In contrast to the Yule-Walker method for AR(p) models, this yields an inefficient estimator that generally generates poor results and hence should not be used in practice.
|
||||||
|
|
||||||
|
@ -862,8 +855,48 @@ May be more difficult in reality than in theory:
|
||||||
\item In many cases, an AIC grid search over all $ARMA(p,q)$ with $p+q < 5$ may help to identify promising models.
|
\item In many cases, an AIC grid search over all $ARMA(p,q)$ with $p+q < 5$ may help to identify promising models.
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
|
\subsubsection{Parameter estimation}
|
||||||
|
See \ref{ma-parameter-estimation}, with
|
||||||
|
$$E_0 = E_{-1} = E_{-2} = \dots = 0$$
|
||||||
|
and
|
||||||
|
$$X_t = \alpha_1 X_{t-1} + \dots + \alpha_p X_{t-p} + E_t + \beta_1 E_{t-1} + \dots + \beta_q X_{t-q}$$
|
||||||
|
respectively.
|
||||||
|
|
||||||
|
\subsubsection{R example}
|
||||||
|
\begin{lstlisting}[language=R]
|
||||||
|
> fit0 <- arima(nao, order=c(1,0,1));
|
||||||
|
Coefficients:
|
||||||
|
ar1 ma1 intercept
|
||||||
|
0.3273 -0.1285 -0.0012
|
||||||
|
s.e. 0.1495 0.1565 0.0446
|
||||||
|
sigma^2=0.9974; log-likelihood=-1192.28, aic=2392.55
|
||||||
|
\end{lstlisting}
|
||||||
|
|
||||||
|
\subsubsection{Residual analysis}
|
||||||
|
See \ref{residual-analysis} again
|
||||||
|
|
||||||
|
\subsubsection{AIC-based model choice}
|
||||||
|
In R, finding the AIC-minimizing $ARMA(p,q)$-model is convenient with the use of \verb|auto.arima()| from \verb|library(forecast)|. \\
|
||||||
|
\vspace{.2cm}
|
||||||
|
\textbf{Beware}: Handle this function with care! It will always identify a «best fitting» $ARMA(p,q)$, but there is no guarantee that this model provides an adequate fit! \\
|
||||||
|
\vspace{.2cm}
|
||||||
|
Using \verb|auto.arima()| should always be complemented by visual inspection of the time series for assessing stationarity, verifying the ACF/PACF plots for a second thought on suitable models. Finally, model diagnostics with the usual residual plots will decide whether the model is useful in practice.
|
||||||
|
|
||||||
|
\section{General concepts}
|
||||||
|
\subsection{AIC}
|
||||||
|
The \textit{Akaike-information-criterion} is useful for determining the order of an $ARMA(p,q)$ model. The formula is as follows:
|
||||||
|
$$AIC = -2 \log (L) + 2(p+q+k+1)$$
|
||||||
|
where
|
||||||
|
\begin{itemize}
|
||||||
|
\item $\log(L)$: Goodness-of-fit criterion: Log-likelihood function
|
||||||
|
\item $p+q+k+1$: Penalty for model complexity: $p, q$ are the $AR$- resp. $MA$-orders; $k = 1$ if a global mean is in use, else $0$ . The final $+1$ is for the innovation variance
|
||||||
|
\end{itemize}
|
||||||
|
For small samples $n$, often a corrected version is used:
|
||||||
|
$$AICc = AIC + \frac{2(p + q + k + 1)(p + q + k + 2)}{n - p - q - k - 2}$$
|
||||||
\scriptsize
|
\scriptsize
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
|
||||||
\section*{Copyright}
|
\section*{Copyright}
|
||||||
Nearly everything is copy paste from the slides or the script. Copyright belongs to M. Dettling \\
|
Nearly everything is copy paste from the slides or the script. Copyright belongs to M. Dettling \\
|
||||||
\faGlobeEurope \kern 1em \url{https://n.ethz.ch/~jannisp/ats-zf} \\
|
\faGlobeEurope \kern 1em \url{https://n.ethz.ch/~jannisp/ats-zf} \\
|
||||||
|
|
Loading…
Reference in a new issue