# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.test.timeseries.adf

## Class ADFFiniteSampleDistribution

• All Implemented Interfaces:
ProbabilityDistribution

public class ADFFiniteSampleDistribution
extends EmpiricalDistribution
This class computes the finite sample distribution of the Augmented Dickey-Fuller (ADF) test statistics. There are three main versions of the test and thus three possible asymptotic distributions:
1. test for a unit root without drift or time trend (NO_CONSTANT);
2. test for a unit root with drift (CONSTANT);
3. test for a unit root with drift and deterministic time trend (CONSTANT_TIME).
Note that our results are different from those in R. The p-values in R are interpolated using the values from Table 4.2, p. 103 of Banerjee et al. (1993). SuanShu computes the exact p-values (and hence the whole cdf). See http://numericalmethod.com/forum/index.php/topic,122.0.html
See Also:
• D. A. Dickey and W. A. Fuller, "Distribution of the Estimators for Autoregressive Time Series with a Unit Root," J. Amer. Stat. Assoc., vol. 74, pp. 427-431, 1979.
• E. Said and D. A. Dickey, "Testing for Unit Roots in Autoregressive Moving Average Models of Unknown Order," Biometrika, vol. 71, 599-607, 1984.
• A. Banerjee et al., "ch. 4, pp. 99-135," Cointegration, Error Correction, and the Econometric Analysis of Non-Stationary Data, Oxford, Oxford University Press, 1993.
• ### Constructor Summary

Constructors
Constructor and Description
ADFFiniteSampleDistribution(int sampleSize)
Construct a finite sample distribution for the Augmented Dickey-Fuller test statistic.
ADFFiniteSampleDistribution(int sampleSize, TrendType trend)
Construct a finite sample distribution for the original Dickey-Fuller test statistic.
ADFFiniteSampleDistribution(int sampleSize, TrendType trend, boolean lagAdjust, int lagOrder)
Construct a finite sample distribution for the Augmented Dickey-Fuller test statistic.
ADFFiniteSampleDistribution(int sampleSize, TrendType trend, boolean lagAdjust, int lagOrder, int truncation, int nSims, long seed)
Construct a finite sample distribution for the Augmented Dickey-Fuller test statistic.

• ### Methods inherited from class com.numericalmethod.suanshu.stats.distribution.univariate.EmpiricalDistribution

cdf, density, entropy, kurtosis, mean, median, moment, nSamples, quantile, skew, toArray, variance
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### ADFFiniteSampleDistribution

public ADFFiniteSampleDistribution(int sampleSize,
TrendType trend,
boolean lagAdjust,
int lagOrder,
int truncation,
int nSims,
long seed)
Construct a finite sample distribution for the Augmented Dickey-Fuller test statistic.
Parameters:
sampleSize - the (finite) sample size
trend - the type of Augmented Dickey-Fuller test
lagAdjust - true if the distribution is adjusted for lags
lagOrder - the lag order; lagOrder = 0 yields the original Dickey-Fuller distribution
truncation - the number of truncated values
nSims - the number of simulations
• #### ADFFiniteSampleDistribution

public ADFFiniteSampleDistribution(int sampleSize,
TrendType trend,
boolean lagAdjust,
int lagOrder)
Construct a finite sample distribution for the Augmented Dickey-Fuller test statistic. The number of truncated values is 50.
Parameters:
sampleSize - the (finite) sample size
trend - the type of Augmented Dickey-Fuller test
lagAdjust - true if the distribution is adjusted for lags
lagOrder - the lag order; lagOrder = 0 yields the original Dickey-Fuller distribution
• #### ADFFiniteSampleDistribution

public ADFFiniteSampleDistribution(int sampleSize,
TrendType trend)
Construct a finite sample distribution for the original Dickey-Fuller test statistic. We do not adjust for the lag.
Parameters:
sampleSize - the (finite) sample size
trend - the type of Augmented Dickey-Fuller test
• #### ADFFiniteSampleDistribution

public ADFFiniteSampleDistribution(int sampleSize)
Construct a finite sample distribution for the Augmented Dickey-Fuller test statistic. We test for a unit root with a drift and a deterministic time trend.
Parameters:
sampleSize - the (finite) sample size

Copyright © 2010-2017 Numerical Method Incorporation Limited. All Rights Reserved.