DickeyFullerTest

class DickeyFullerTest(*args)

The Dickey-Fuller stationarity test.

Refer to Dickey-Fuller stationarity test.

Notes

The Dickey-Fuller test checks the stationarity of a scalar time series using one time series.

Examples

Create an ARMA process and generate a time series:

>>> import openturns as ot
>>> arcoefficients = ot.ARMACoefficients([0.3])
>>> macoefficients = ot.ARMACoefficients(0)
>>> timeGrid = ot.RegularGrid(0.0, 0.1, 10)
>>> whiteNoise = ot.WhiteNoise(ot.Normal(), timeGrid)
>>> myARMA = ot.ARMA(arcoefficients, macoefficients, whiteNoise)
>>> realization = ot.TimeSeries(myARMA.getRealization())
>>> test = ot.DickeyFullerTest(realization)

Test the stationarity of the data without any asumption on the model:

>>> globalRes = test.runStrategy()

Test the stationarity knowing you have a drift and linear trend model:

>>> res1 = test.testUnitRootInDriftAndLinearTrendModel(0.95)

Test the stationarity knowing you have a drift model:

>>> res2 = test.testUnitRootInDriftModel(0.95)

Test the stationarity knowing you have an AR1 model:

>>> res3 = test.testUnitRootInAR1Model(0.95)

Methods

getClassName(self)

Accessor to the object’s name.

getId(self)

Accessor to the object’s id.

getName(self)

Accessor to the object’s name.

getShadowedId(self)

Accessor to the object’s shadowed id.

getVisibility(self)

Accessor to the object’s visibility state.

hasName(self)

Test if the object is named.

hasVisibleName(self)

Test if the object has a distinguishable name.

runStrategy(self[, level])

Test the stationarity without any assumption on the model.

setName(self, name)

Accessor to the object’s name.

setShadowedId(self, id)

Accessor to the object’s shadowed id.

setVisibility(self, visible)

Accessor to the object’s visibility state.

testNoUnitRootAndNoDriftInDriftModel(self[, …])

Test for null drift in model without unit root.

testNoUnitRootAndNoLinearTrendInDriftAndLinearTrendModel(self)

Test for trend in model without unit root.

testUnitRootAndNoDriftInDriftModel(self[, level])

Test for null drift in model with unit root.

testUnitRootAndNoLinearTrendInDriftAndLinearTrendModel(self)

Test for linear trend in model with unit root.

testUnitRootInAR1Model(self[, level])

Test for unit root in AR1 model.

testUnitRootInDriftAndLinearTrendModel(self)

Test for unit root in model with drift and trend.

testUnitRootInDriftModel(self[, level])

Test for unit root in model with drift.

getVerbose

setVerbose

__init__(self, \*args)

Initialize self. See help(type(self)) for accurate signature.

getClassName(self)

Accessor to the object’s name.

Returns
class_namestr

The object class name (object.__class__.__name__).

getId(self)

Accessor to the object’s id.

Returns
idint

Internal unique identifier.

getName(self)

Accessor to the object’s name.

Returns
namestr

The name of the object.

getShadowedId(self)

Accessor to the object’s shadowed id.

Returns
idint

Internal unique identifier.

getVisibility(self)

Accessor to the object’s visibility state.

Returns
visiblebool

Visibility flag.

hasName(self)

Test if the object is named.

Returns
hasNamebool

True if the name is not empty.

hasVisibleName(self)

Test if the object has a distinguishable name.

Returns
hasVisibleNamebool

True if the name is not empty and not the default one.

runStrategy(self, level=0.05)

Test the stationarity without any assumption on the model.

Parameters
alphafloat, 0 < \alpha < 1

The first kind risk of the test.

By default, \alpha=0.05.

Returns
testResultTestResult

Results container of the tests. The strategy if the one described above.

setName(self, name)

Accessor to the object’s name.

Parameters
namestr

The name of the object.

setShadowedId(self, id)

Accessor to the object’s shadowed id.

Parameters
idint

Internal unique identifier.

setVisibility(self, visible)

Accessor to the object’s visibility state.

Parameters
visiblebool

Visibility flag.

testNoUnitRootAndNoDriftInDriftModel(self, level=0.05)

Test for null drift in model without unit root.

Parameters
alphafloat, 0 < \alpha < 1

The first kind risk of the test.

By default, \alpha=0.05.

Returns
testResultTestResult

Results container of the test detailed in (10).

testNoUnitRootAndNoLinearTrendInDriftAndLinearTrendModel(self, level=0.05)

Test for trend in model without unit root.

Parameters
alphafloat, 0 < \alpha < 1

The first kind risk of the test.

By default, \alpha=0.05.

Returns
testResultTestResult

Results container of the test detailed in (5).

testUnitRootAndNoDriftInDriftModel(self, level=0.05)

Test for null drift in model with unit root.

Parameters
alphafloat, 0 < \alpha < 1

The first kind risk of the test.

By default, \alpha=0.05.

Returns
testResultTestResult

Results container of the test detailed in (11).

testUnitRootAndNoLinearTrendInDriftAndLinearTrendModel(self, level=0.05)

Test for linear trend in model with unit root.

Parameters
alphafloat, 0 < \alpha < 1

The first kind risk of the test.

By default, \alpha=0.05

Returns
testResultTestResult

Results container of the test detailed in (6).

testUnitRootInAR1Model(self, level=0.05)

Test for unit root in AR1 model.

Parameters
alphafloat, 0 < \alpha < 1

The first kind risk of the test.

By default, \alpha=0.05.

Returns
testResultTestResult

Results container of the test detailed in (14).

testUnitRootInDriftAndLinearTrendModel(self, level=0.05)

Test for unit root in model with drift and trend.

Parameters
alphafloat, 0 < \alpha < 1

The first kind risk of the test.

By default, \alpha=0.05.

Returns
testResultTestResult

Results container of the test detailed in (4).

testUnitRootInDriftModel(self, level=0.05)

Test for unit root in model with drift.

Parameters
alphafloat, 0 < \alpha < 1

The first kind risk of the test.

By default, \alpha=0.05.

Returns
testResultTestResult

Results container of the test detailed in (9).