public class AugmentedDickeyFuller extends HypothesisTest
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
AugmentedDickeyFuller.TrendType
the three versions of augmented Dickey-Fuller (ADF) test
|
| Modifier and Type | Field and Description |
|---|---|
int |
lagOrder
the lag order
|
AugmentedDickeyFuller.TrendType |
type
the trend type
|
k, N, pValue, testStatistics| Constructor and Description |
|---|
AugmentedDickeyFuller(double[] xt)
Perform the Augmented Dickey-Fuller test statistics to test for the existence of uniroot.
|
AugmentedDickeyFuller(double[] xt,
AugmentedDickeyFuller.TrendType type,
int lagOrder,
ADFDistribution dist)
Perform the Augmented Dickey-Fuller test statistics to test for the existence of uniroot.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlternativeHypothesis()
Get a description of the alternative hypothesis.
|
java.lang.String |
getNullHypothesis()
Get a description of the null hypothesis.
|
isNullRejected, oneSidedPvalue, pValue, statisticspublic final AugmentedDickeyFuller.TrendType type
public final int lagOrder
public AugmentedDickeyFuller(double[] xt,
AugmentedDickeyFuller.TrendType type,
int lagOrder,
ADFDistribution dist)
xt - a time seriestype - the trend typelagOrder - the lags; when lagOrder == 0, we perform the standard Dickey-Fuller test.dist - the ADF distribution to use; in general, the correct ADF distribution to use depends on the trend type, as well as lag order;
to improve accuracy, the user may generate and use a customized ADF distribution;
null if to use the defaultpublic AugmentedDickeyFuller(double[] xt)
Lag order is automatically selected as in R.
nLag = (int) Math.pow((series.length - 1, 1.0 / 3.0));
which corresponds to the suggested upper bound on the rate.xt - a time seriespublic java.lang.String getNullHypothesis()
HypothesisTestgetNullHypothesis in class HypothesisTestpublic java.lang.String getAlternativeHypothesis()
HypothesisTestgetAlternativeHypothesis in class HypothesisTest