I have a really small time series dataset (21 yearly observations) and I want to check if my data is stationary.
TSdiff2=diff(TS, differences=2) adf.test(TSdiff2) Augmented Dickey-Fuller Test data: TSdiff2 Dickey-Fuller = -2.4232, Lag order = 2, p-value = 0.4112 alternative hypothesis: stationary
According to the explanation in this link [http://www.r-bloggers.com/time-series-analysis-using-r-forecast-package/] : "The null-hypothesis for an ADF test is that the data are non-stationary. So large p-values are indicative of non-stationarity, and small p-values suggest stationarity. Using the usual 5% threshold, differencing is required if the p-value is greater than 0.05.
So it seems that my time series is not stationary despite the fact that I used the ndiffs function to estimate the number of differences.