Stationary test error in Time Series using R -
i have half hourly data 5 years measuring electricity load. checked stationary acf
, shows non stationary. when used adf.test
check stationary, showed opposite result:
adf.test(tsr1$load.mw.,alternative="stationary") # augmented dickey-fuller test # data: tsr1$load.mw. # dickey-fuller = -9.7371, lag order = 11, p-value = 0.01 # alternative hypothesis: stationary
warning message: in adf.test(tsr1$load.mw., alternative = "stationary") : p-value smaller printed p-value
what should consider? though have feeling non stationary. if is, how make stationary using r? tried using command decompose(tsr)
. showed error:
error : time series has no or less 2 periods
what issue?
the first step should visually examine time series see if stationary, , thereafter use adf-test "formally" test stationarity. more or less standard procedure, @ least in finance literature. (you of course use test kpss or pp)
when plotting acf or pacf functions examine ar , ma representation of series.
as series seems stationary according adf-test don't have "make stationary". please keep in mind these tests might give "wrong" answer when dealing small sample data, seasonality or structural breaks.
if don't want soley rely on adf-test, consider kpss test have opposite null-hypothosis.
Comments
Post a Comment