In statistics, the Dickey–Fuller test tests the null hypothesis that a unit root is present in an autoregressive model. The alternative hypothesis is different depending on which version of the test is used, but is usually stationarity or trend-stationarity. It is named after the statisticiansDavid Dickey and Wayne Fuller, who developed the test in 1979.[1]
The null hypothesis of the Augmented Dickey-Fuller t-test is. H0 θ=: 0 (i.e. The data needs to be differenced to make it stationary) versus the alternative hypothesis of.
Explanation[edit]
A simple AR(1) model is
where is the variable of interest, is the time index, is a coefficient, and is the error term. A unit root is present if . The model would be non-stationary in this case.
The regression model can be written as
where is the first difference operator. This model can be estimated and testing for a unit root is equivalent to testing (where ). Since the test is done over the residual term rather than raw data, it is not possible to use standard t-distribution to provide critical values. Therefore, this statistic has a specific distribution simply known as the Dickey–Fuller table.
There are three main versions of the test:
1. Test for a unit root:
![Dickey Fuller T Statistics Of Second Regression Dickey Fuller T Statistics Of Second Regression](https://i1.wp.com/www.real-statistics.com/wp-content/uploads/2016/04/dickey-fuller-with-trend.png?resize=529%2C413)
2. Test for a unit root with drift:
3. Test for a unit root with drift and deterministic time trend:
Each version of the test has its own critical value which depends on the size of the sample. In each case, the null hypothesis is that there is a unit root, . The tests have low statistical power in that they often cannot distinguish between true unit-root processes () and near unit-root processes ( is close to zero). This is called the 'near observation equivalence' problem.
The intuition behind the test is as follows. If the series is stationary (or trend stationary), then it has a tendency to return to a constant (or deterministically trending) mean. Therefore, large values will tend to be followed by smaller values (negative changes), and small values by larger values (positive changes). Accordingly, the level of the series will be a significant predictor of next period's change, and will have a negative coefficient. If, on the other hand, the series is integrated, then positive changes and negative changes will occur with probabilities that do not depend on the current level of the series; in a random walk, where you are now does not affect which way you will go next.
It is notable that
may be rewritten as
with a deterministic trend coming from and a stochastic intercept term coming from , resulting in what is referred to as a stochastic trend.[2]
There is also an extension of the Dickey–Fuller (DF) test called the augmented Dickey–Fuller test (ADF), which removes all the structural effects (autocorrelation) in the time series and then tests using the same procedure.
Dealing with uncertainty about including the intercept and deterministic time trend terms[edit]
Which of the three main versions of the test should be used is not a minor issue. The decision is important for the size of the unit root test (the probability of rejecting the null hypothesis of a unit root when there is one) and the power of the unit root test (the probability of rejecting the null hypothesis of a unit root when there is not one). Inappropriate exclusion of the intercept or deterministic time trend term leads to bias in the coefficient estimate for δ, leading to the actual size for the unit root test not matching the reported one. If the time trend term is inappropriately excluded with the term estimated, then the power of the unit root test can be substantially reduced as a trend may be captured through the random-walk with drift model.[3] On the other hand, inappropriate inclusion of the intercept or time trend term reduces the power of the unit root test, and sometimes that reduced power can be substantial.
Use of prior knowledge about whether the intercept and deterministic time trend should be included is of course ideal but not always possible. When such prior knowledge is unavailable, various testing strategies (series of ordered tests) have been suggested, e.g. by Dolado, Jenkinson, and Sosvilla-Rivero (1990)[4] and by Enders (2004), often with the ADF extension to remove autocorrelation. Elder and Kennedy (2001) present a simple testing strategy that avoids double and triple testing for the unit root that can occur with other testing strategies, and discusses how to use prior knowledge about the existence or not of long-run growth (or shrinkage) in y.[5] Hacker and Hatemi-J (2010) provide simulation results on these matters,[6] including simulations covering the Enders (2004) and Elder and Kennedy (2001) unit-root testing strategies. Simulation results are presented in Hacker (2010) which indicate that using an information criterion such as the Schwarz information criterion may be useful in determining unit root and trend status within a Dickey–Fuller framework.[7]
See also[edit]
References[edit]
- ^Dickey, D. A.; Fuller, W. A. (1979). 'Distribution of the Estimators for Autoregressive Time Series with a Unit Root'. Journal of the American Statistical Association. 74 (366): 427–431. doi:10.1080/01621459.1979.10482531. JSTOR2286348.
- ^Enders, W. (2004). Applied Econometric Time Series (Second ed.). Hoboken: John Wiley & Sons. ISBN978-0-471-23065-6.
- ^Campbell, J. Y.; Perron, P. (1991). 'Pitfalls and Opportunities: What Macroeconomists Should Know about Unit Roots'(PDF). NBER Macroeconomics Annual. 6 (1): 141–201. doi:10.2307/3585053. JSTOR3585053.
- ^Dolado, J. J.; Jenkinson, T.; Sosvilla-Rivero, S. (1990). 'Cointegration and Unit Roots'. Journal of Economic Surveys. 4 (3): 249–273. doi:10.1111/j.1467-6419.1990.tb00088.x.
- ^Elder, J.; Kennedy, P. E. (2001). 'Testing for Unit Roots: What Should Students Be Taught?'. Journal of Economic Education. 32 (2): 137–146. CiteSeerX10.1.1.140.8811. doi:10.1080/00220480109595179.
- ^Hacker, R. S.; Hatemi-J, A. (2010). 'The Properties of Procedures Dealing with Uncertainty about Intercept and Deterministic Trend in Unit Root Testing'. CESIS Electronic Working Paper Series, Paper No. 214. Centre of Excellence for Science and Innovation Studies, The Royal Institute of Technology, Stockholm, Sweden.
- ^Hacker, R. S. (2010). 'The Effectiveness of Information Criteria in Determining Unit Root and Trend Status'(PDF). CESIS Electronic Working Paper Series, Paper No. 213. Centre of Excellence for Science and Innovation Studies, The Royal Institute of Technology, Stockholm, Sweden.[permanent dead link]
Further reading[edit]
- Enders, Walter (2010). Applied Econometric Time Series (Third ed.). New York: Wiley. pp. 206–215. ISBN978-0470-50539-7.
- Hatanaka, Michio (1996). Time-Series-Based Econometrics: Unit Roots and Cointegration. New York: Oxford University Press. pp. 48–49. ISBN978-0-19-877353-5.
External links[edit]
- Statistical tables for unit-root tests – Dickey–Fuller table
Augmented Dickey-Fuller Test
Performs the Augmented Dickey-Fuller test for the null hypothesisof a unit root of a univarate time series x
(equivalently, x
is anon-stationary time series).
Usage
Arguments
- x
- a numeric vector or univariate time series.
- nlag
- the lag order with default to calculate the test statistic. See details forthe default.
- output
- a logical value indicating to print the test results in R console.The default is
TRUE
.
Details
The Augmented Dickey-Fuller test incorporatesthree types of linear regression models. The first type (type1
) is a linear modelwith no drift and linear trend with respect to time:$$dx[t] = rho*x[t-1] + beta[1]*dx[t-1] + ... + beta[nlag - 1]*dx[t - nlag + 1]+e[t],$$where $d$ is an operator of first order difference, i.e.,$dx[t] = x[t] - x[t-1]$, and $e[t]$ is an error term.
The second type (type2
) is a linear model with drift but no linear trend:$$dx[t] = mu + rho*x[t-1] + beta[1]*dx[t-1] + ... +beta[nlag - 1]*dx[t - nlag + 1] +e[t].$$
The third type (type3
) is a linear model with both drift and linear trend:$$dx[t] = mu + beta*t + rho*x[t-1] + beta[1]*dx[t-1] + ... +beta[nlag - 1]*dx[t - nlag + 1] +e[t].$$
We use the default nlag = floor(4*(length(x)/100)^(2/9))
tocalcuate the test statistic.The Augmented Dickey-Fuller test statistic is defined as$$ADF = rho.hat/S.E(rho.hat),$$where $rho.hat$ is the coefficient estimationand $S.E(rho.hat)$ is its corresponding estimation of standard error for eachtype of linear model. The p.value iscalculated by interpolating the test statistics from the corresponding critical valuestables (see Table 10.A.2 in Fuller (1996)) for each type of linear models with givensample size $n$ = length(x
).The Dickey-Fuller test is a special case of Augmented Dickey-Fuller testwhen nlag
= 2.
Value
- A list containing the following components:
type1 a matrix with three columns: lag
,ADF
,p.value
, whereADF
is the Augmented Dickey-Fuller test statistic.type2 same as above for the second type of linear model. type3 same as above for the third type of linear model.
Note
Missing values are removed.
References
Fuller, W. A. (1996). Introduction to Statistical Time Series, second ed., New York: John Wiley and Sons.
See Also
pp.test
, kpss.test
, stationary.test
Aliases
- adf.test