Test a time series for trend by either fitting exponential smoothing models and comparing then using the AICc, or by using the non-parametric Cox-Stuart test. The tests can be augmented by using multiple temporal aggregation.
trendtest(
y,
extract = c("FALSE", "TRUE"),
type = c("aicc", "cs"),
mta = c(FALSE, TRUE)
)
The function returns TRUE
when there is evidence of trend and FALSE
otherwise.
a time series that must be of either ts
or msts
class.
if TRUE
then the centred moving average of the time series is calculated and the test is performed on that. Otherwise, the test is performed on the raw data.
type of test. Can be:
"aicc"
: test by comparing the AICc of exponential smoothing models. See details.
"cs"
: test by using the Cox-Stuart test. See details.<
If TRUE
augment testing by using Multiple Temporal Aggregation.
Nikolaos Kourentzes, nikolaos@kourentzes.com.
All tests are performed at 5
The multiple temporal aggregation follows the construction approach suggested by Kourentzes, N., Petropoulos, F., & Trapero, J. R. (2014). Improving forecasting by estimating time series structural components across multiple frequencies. International Journal of Forecasting, 30(2), 291-302.