I played around with some unit root testing in R and I am not entirely sure what to make of the k lag parameter. I used the augmented Dickey Fuller test and the Philipps Perron test from the tseries package. Obviously the default $k$ parameter (for the adf.test
) depends only on the length of the series. If I choose different $k$-values I get pretty different results wrt. rejecting the null:
Dickey-Fuller = -3.9828, Lag order = 4, p-value = 0.01272
alternative hypothesis: stationary
# 103^(1/3)=k=4
Dickey-Fuller = -2.7776, Lag order = 0, p-value = 0.2543
alternative hypothesis: stationary
# k=0
Dickey-Fuller = -2.5365, Lag order = 6, p-value = 0.3542
alternative hypothesis: stationary
# k=6
plus the PP test result:
Dickey-Fuller Z(alpha) = -18.1799, Truncation lag parameter = 4, p-value = 0.08954
alternative hypothesis: stationary
Looking at the data, I would think the underlying data is non-stationary, but still I do not consider these results a strong backup, in particular since I do not understand the role of the $k$ parameter. If I look at decompose / stl I see that the trend has strong impact as opposed to only small contribution from remainder or seasonal variation. My series is of quarterly frequency.
Any hints?