Class AugmentedDickeyFuller


  • public class AugmentedDickeyFuller
    extends HypothesisTest
    The Augmented Dickey Fuller test tests whether a one-time differencing (d = 1) will make the time series stationary. That is, whether the series has a unit root. Cheung and Lai (1995) pointed out that the lag order does have some effect on the critical values, esp. when the sample size is small.

    The R equivalent function is adf.test in package tseries.

    See Also:
    • "S. E. Said and D. A. Dickey, "Testing for Unit Roots in Autoregressive-Moving Average Models of Unknown Order," Biometrika, vol. 71, no. 3, pp.599-607, 1984."
    • "Yin-Wong Cheung, Kon S. Lai, "ESTIMATING FINITE SAMPLE CRITICAL VALUES FOR UNIT ROOT TESTS USING PURE RANDOM WALK PROCESSES," Journal of Time Series Analysis, vol. 16, issue 5, pp.493-498, 1995."
    • Constructor Detail

      • AugmentedDickeyFuller

        public AugmentedDickeyFuller​(double[] x,
                                     TrendType type,
                                     int lagOrder,
                                     ADFDistribution dist)
        Performs the Augmented Dickey-Fuller test to test for the existence of unit root.
        Parameters:
        x - a time series
        type - the trend type
        lagOrder - the lag order; when lagOrder = 0, we perform the original Dickey-Fuller test.
        dist - the ADF distribution to use; in general, the correct ADF distribution depends on the trend type and lag order; to improve accuracy, the user may generate and use a customized ADF distribution; null for the default
      • AugmentedDickeyFuller

        public AugmentedDickeyFuller​(double[] x)
        Performs the Augmented Dickey-Fuller test to test for the existence of unit root. Lag order is automatically selected as in R.
        nLag = (int) Math.pow((series.length - 1, 1.0 / 3.0));
        This corresponds to the suggested upper bound on the rate.
        Parameters:
        x - a time series