SuanShu, a Java numerical and statistical library

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

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.distribution.univariate.EmpiricalDistribution
      extended by com.numericalmethod.suanshu.stats.test.timeseries.adf.AdfFiniteSampleDistribution
All Implemented Interfaces:
UnivariateDistribution

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. NO_CONSTANT: test for a unit root without drift or time trend;
  2. CONSTANT: test for a unit root with drift;
  3. CONSTANT_TIME: test for a unit root with drift and deterministic time trend.

The p-values in R are interpolated using the values from Table 4.2, p. 103 of Banerjee et al. (1993).

See Also:

Field Summary
 boolean lagAdjust
          indicate whether the distribution is adjusted for lags
 int lagOrder
          the lag order used to calculate the test statistics; lagOrder = 0 yields the Dickey-Fuller distribution
 int nSim
          the number of simulations
 int sampleSize
          the (finite) sample size
 AugmentedDickeyFuller.TrendType trend
          the type of augmented Dickey-Fuller (ADF) test
 int truncation
          the number of truncated values
 
Constructor Summary
AdfFiniteSampleDistribution(int sampleSize)
          Construct the finite sample distribution for the augmented Dickey-Fuller test statistics.
AdfFiniteSampleDistribution(int sampleSize, AugmentedDickeyFuller.TrendType trend)
          Construct the finite sample distribution for the augmented Dickey-Fuller test statistics.
AdfFiniteSampleDistribution(int sampleSize, AugmentedDickeyFuller.TrendType trend, boolean lagAdjust, int lagOrder)
          Construct the finite sample distribution for the augmented Dickey-Fuller test statistics.
AdfFiniteSampleDistribution(int sampleSize, AugmentedDickeyFuller.TrendType trend, boolean lagAdjust, int lagOrder, int truncation, int nSim)
          Construct the finite sample distribution for the augmented Dickey-Fuller test statistics.
 
Method Summary
 
Methods inherited from class com.numericalmethod.suanshu.stats.distribution.univariate.EmpiricalDistribution
cdf, density, entropy, kurtosis, mean, median, moment, quantile, skew, variance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sampleSize

public final int sampleSize
the (finite) sample size


trend

public final AugmentedDickeyFuller.TrendType trend
the type of augmented Dickey-Fuller (ADF) test


lagAdjust

public final boolean lagAdjust
indicate whether the distribution is adjusted for lags


lagOrder

public final int lagOrder
the lag order used to calculate the test statistics; lagOrder = 0 yields the Dickey-Fuller distribution


truncation

public final int truncation
the number of truncated values


nSim

public final int nSim
the number of simulations

Constructor Detail

AdfFiniteSampleDistribution

public AdfFiniteSampleDistribution(int sampleSize,
                                   AugmentedDickeyFuller.TrendType trend,
                                   boolean lagAdjust,
                                   int lagOrder,
                                   int truncation,
                                   int nSim)
Construct the finite sample distribution for the augmented Dickey-Fuller test statistics.

Parameters:
sampleSize - the (finite) sample size
trend - the type of augmented Dickey-Fuller test
lagAdjust - indicator of whether the distribution is adjusted for lags
lagOrder - the lag order; lagOrder = 0 yields the Dickey-Fuller distribution
truncation - the number of truncated values
nSim - the number of simulations

AdfFiniteSampleDistribution

public AdfFiniteSampleDistribution(int sampleSize,
                                   AugmentedDickeyFuller.TrendType trend,
                                   boolean lagAdjust,
                                   int lagOrder)
Construct the finite sample distribution for the augmented Dickey-Fuller test statistics. The number of truncated values is 50.

Parameters:
sampleSize - the (finite) sample size
trend - the type of augmented Dickey-Fuller test
lagAdjust - indicator of whether the distribution is adjusted for lags
lagOrder - the lag order; lagOrder = 0 yields the Dickey-Fuller distribution

AdfFiniteSampleDistribution

public AdfFiniteSampleDistribution(int sampleSize,
                                   AugmentedDickeyFuller.TrendType trend)
Construct the finite sample distribution for the augmented Dickey-Fuller test statistics. 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 the finite sample distribution for the augmented Dickey-Fuller test statistics. We test for a unit root with drift and deterministic time trend.

Parameters:
sampleSize - the (finite) sample size

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.