DWQA QuestionsCategory: R LanguageHow can we test if the time-series model is stationary in R?
Editor Staff asked 9 months ago

How can we test if the time-series model is stationary in R? Take the first column and all
the rows of EuStockMarkets as your time-series data.

1 Answers
Editor Staff answered 9 months ago

For testing if the time-series model is stationary, we make use of the Augmented Dickey
Fuller Test (adf test). If the p-value is below 0.05, then that model is stationary. We can
implement this in R as follows –
library(tseries)
adf.test(timedata)
kpss.test(timedata)
R programming practice questions