***************
*** 291,320 ****
  \subsection{The KPSS test}
  \label{sec:KPSStest}
  
  \begin{equation}
    \label{eq:KPSStest}
    \eta = \frac{\sum_{i=1}^T S_t^2 }{ T^2 \bar{\sigma}^2 }
  \end{equation}
- where $S_t = \sum_{s=1}^t e_s$ and $\bar{\sigma}^2$ is an
- estimate of the long-run variance of $e_t = (y_t - \bar{y})$.
- \begin{itemize}
- \item $H_0$: $y_t$ is I(0);
- \item one-sided test: $H_0$ is rejected if $\eta$ is ``big'';
- \item extension to deterministic trend ($e_t$ are the residuals from
-   an OLS regression of $y_t$ on a constant and a linear trend);
- \item nonstandard distribution --- we provide 90\%, 95\%, 97.5\% and
-   99\% quantiles.
- \end{itemize}
- Syntax:
  \begin{code}
-   kpss n x1
  \end{code}
- \begin{itemize}
- \item \verb|--trend| option;
- \item \verb|n| is used for estimating $\bar{\sigma}^2$; in the GUI,
-   default is the integer part of $4 \left( \frac{T}{100}
-   \right)^{1/4}$.
- \end{itemize}
  
  \subsection{The Johansen tests}
  \label{sec:Joh-test}
--- 291,353 ----
  \subsection{The KPSS test}
  \label{sec:KPSStest}
  
+ The KPSS test (Kwiatkowski, Phillips, Schmidt and Shin (1992)) is a
+ unit root test in which the null hypothesis is opposite to that in the
+ ADF test: under the null, the series subjected to the test is
+ stationary, against the alternative that it is $I(1)$.
+ 
+ The basic intuition behind this test statistic is very simple: if
+ $y_t$ can be written as $y_t = \mu + u_t$, where $u_t$ is some
+ zero-mean stationary process, then not only the sample average of the
+ $y_t$'s is a consistent estimator of $\mu$, but the long-run variance
+ of $u_t$ is a well-defined, finite number. Neither of these properties
+ hold under the alternative.
+ 
+ The test itself is based on the following statistic:
  \begin{equation}
    \label{eq:KPSStest}
    \eta = \frac{\sum_{i=1}^T S_t^2 }{ T^2 \bar{\sigma}^2 }
  \end{equation}
+ where $S_t = \sum_{s=1}^t e_s$ and $\bar{\sigma}^2$ is an estimate of
+ the long-run variance of $e_t = (y_t - \bar{y})$. Under the null, this
+ statistic has a well-defined (nonstandard) asymptiotic distribution,
+ which is free of nuisance parameters and has been tabulated by
+ simulation. Under the alternative, the statistic diverges.
+ 
+ As a consequence, it is possible to construce a one-sided test based
+ on $\eta$, where $H_0$ is rejected if $\eta$ is bigger than the
+ appropriate critical value; \app{gretl} provides the 90\%, 95\%,
+ 97.5\% and 99\% quantiles.
+ 
+ Usage example:
+ \begin{code}
+   kpss n y
+ \end{code}
+ where \verb|n| is an integer used for estimating $\bar{\sigma}^2$ by
+ the formula 
+ \[
+   \bar{\sigma}^2 = \sum_{i=-m}^m \left( 1 - \frac{|i|}{m+1} \right) \hat{\gamma}_i
+ \]
+ and $\hat{\gamma}_k$ is the empirical $k$-th order empirical
+ autocovariance of $e_t$. For this estimator to be consistent, the
+ bandwidth $m$ must be large enough to accommodate the short-run
+ persistence of $e_t$, but not too large compared to the sample size
+ $T$.  In the GUI interface of \app{gretl}, this value defaults to the
+ integer part of $4 \left( \frac{T}{100} \right)^{1/4}$.
+ 
+ The above concept can be generalized to the case where $y_t$ is
+ thought to be stationary around a deterministic trend. In this case,
+ formula (\ref{eq:KPSStest}) remains unchanged, but the series $e_t$ is
+ defined as the residuals from an OLS regression of $y_t$ on a constant
+ and a linear trend. This second form of the test is obtaining by
+ appending the \verb|--trend| option to the \cmd{kpss} command:
  \begin{code}
+   kpss n y --trend
  \end{code}
+ Note that in this case the asymptotic distribution of the test is
+ different and the critical values reported by \app{gretl} change
+ accordingly.
+ 
  
  \subsection{The Johansen tests}
  \label{sec:Joh-test}
