pDickeyFullerConstant

pDickeyFullerConstant(x, tail=False)

Cumulative distribution function of the Dickey-Fuller statistic.

Parameters:
xfloat

The location.

tailbool, optional

Tail flag. Default value is False. If True, the complementary CDF is computed.

Returns:
pfloat

The CDF or its complementary at x.

Notes

Refer to Dickey-Fuller stationarity test.

Let (X_1, \hdots, X_n) denote the data and W(r) the Wiener process. Let us define W^{a}(r) = W(r) - \int_{0}^{1} W(r)\di{r} and W^{b}(r) = W^{a}(r) - 12 \left(r - \frac{1}{2} \right) \int_{0}^{1} \left(s - \frac{1}{2} \right) W(s)\di{s}.

The Dickey-Fuller statistic is the asymptotic distribution of the Student statistic used to test the model with drift but no trend in a time series:

\boldsymbol{X_t = a + \rho X_{t-1} + \varepsilon_{t}}

We test:

\left\{
\begin{array}{lr}
  \cH_0: & \rho = 1 \\
  \cH_1: & \rho < 1
\end{array}
\right.

thanks to the Student statistic defined by:

t_{\rho=1} = \frac{\rho_n-1}{\hat{\sigma}_{\rho_n}}

where \sigma_{\rho_n} is the least square estimate of the standard deviation of \Hat{\rho}_n. Under the null hypothesis \cH_0, t_{\rho=1} converges towards the Dickey-Fuller distribution:

t_{\rho = 1} \stackrel{\mathcal{L}}{\longrightarrow} \frac{\int_{0}^{1}W^{a}(r) \di{W(r)}}{\int_{1}^{0} W^{a}(r)^2 \di{r}}

Examples

>>> import openturns as ot
>>> q = ot.DistFunc.pDickeyFullerConstant(5.4)
>>> q = ot.DistFunc.pDickeyFullerConstant(5.4, True)