|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.stats.test.HypothesisTest
com.numericalmethod.suanshu.stats.test.timeseries.adf.AugmentedDickeyFuller
public class AugmentedDickeyFuller
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.
| Nested Class Summary | |
|---|---|
static class |
AugmentedDickeyFuller.TrendType
the three versions of augmented Dickey-Fuller (ADF) test |
| Field Summary | |
|---|---|
int |
lagOrder
the lag order |
AugmentedDickeyFuller.TrendType |
type
the trend type |
| Fields inherited from class com.numericalmethod.suanshu.stats.test.HypothesisTest |
|---|
k, N, pValue, testStatistics |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
java.lang.String |
alternativeHypothesis()
Get a description of the alternative hypothesis. |
java.lang.String |
nullHypothesis()
Get a description of the null hypothesis. |
| Methods inherited from class com.numericalmethod.suanshu.stats.test.HypothesisTest |
|---|
oneSidedPvalue, pValue, rejectNull, testStatistics |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final AugmentedDickeyFuller.TrendType type
public final int lagOrder
| Constructor Detail |
|---|
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 series| Method Detail |
|---|
public java.lang.String nullHypothesis()
HypothesisTest
nullHypothesis in class HypothesisTestpublic java.lang.String alternativeHypothesis()
HypothesisTest
alternativeHypothesis in class HypothesisTest
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||