When reading the output of summary(ur.df(ts))
in R, what do the z.diff.lag#
coefficients indicate?
Are they error terms for “at” in the Dickey-Fuller regression expression? For example:
To help with instruction, I'll generate some stationary data and run the ur.df
function with summary
wrapped around it.
# generate white noise
n <- 200
x <- rnorm(n,
mean = 0,
sd = 1)
# make into time series object
y <- ts(x)
Now, for example, I run an ADF test to check if my time series is not a random walk masquerading as stationary data.
For the ADF test, because the data is white noise (with no drift or trend), I leave the ur.df
test type="none"
.
To generate lots of z.diff.lag#
coefficients, I will run the ADF test at 5 lags:
summary(ur.df(y,
type = c("none"),
lags = 5))
And here is the output:
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression none
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.82322 -0.81705 -0.08905 0.62597 2.30963
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## z.lag.1 -1.04664 0.17779 -5.887 1.78e-08 ***
## z.diff.lag1 0.02807 0.15987 0.176 0.861
## z.diff.lag2 0.11422 0.14319 0.798 0.426
## z.diff.lag3 0.06688 0.12474 0.536 0.593
## z.diff.lag4 0.07115 0.10538 0.675 0.500
## z.diff.lag5 -0.01979 0.07381 -0.268 0.789
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9941 on 188 degrees of freedom
## Multiple R-squared: 0.5251, Adjusted R-squared: 0.51
## F-statistic: 34.65 on 6 and 188 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic is: -5.8871
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau1 -2.58 -1.95 -1.62
Lo-and-behold, the data is stationary. No surprises.
In the summary(ur.df(ts))
results, I understand the t value
for z.lag.1
is the test-statistic value at lag 5. I also understand the p-value
for this coefficient and what it means for the Critical values
.
But what I do not understand is the series of five z.diff.lag#
coefficients. My only thought is these are error terms (the “at” values) for the Dickey-Fuller algebraic equation. But again, I do not understand what the p-value means for these five z.diff.lag#
indicate.
Any insight is much appreciated.