xyz {tsutils}R Documentation

XYZ analysis

Description

Perform XYZ analysis on a set of time series.

Usage

xyz(x, m = NULL, prc = c(0.2, 0.3, 0.5), type = c("naive", "ets", "cv"))

Arguments

x

this can either be an array, where each column is a series, or a vector of values. If x is a vector of values forecastability is not calculated and the input is used as such.

m

seasonal length for time series. Required when type is "naive" or "ets".

prc

a vector of percentages indicating how many items are included in each class. By default this is c(0.2,0.3,0.5), but any set of percentage values can be used as long as 0<=prc[i]<=1 and sum(prc)==1.

type

the type of forecastability calculation. This can be:

  • "naive": fit naive and seasonal naive and calculate forecastability using RMSE/mean level.

  • "ets": fit ets and calculate and calculate forecastability using RMSE/mean level.

  • "cv": use coefficient of variation as a proxy of forecastability.

Value

Return object of class abc and contains:

Author(s)

Nikolaos Kourentzes, nikolaos@kourentzes.com.

References

Ord K., Fildes R., Kourentzes N. (2017) Principles of Business Forecasting, 2e. Wessex Press Publishing Co., p.515-518.

See Also

abc, plot.abc, abcxyz.

Examples

x <- abs(matrix(cumsum(rnorm(5400,0,1)),36,150))
z <- xyz(x,m=12)
print(z)
plot(z)


[Package tsutils version 0.9.4 Index]