cs_dispersion function

Compute Cross-Sectional Dispersion

Compute Cross-Sectional Dispersion

Computes (time-varying) dispersion measures for the cross section of individual model forecasts that are the input of forecast combination.

cs_dispersion(x, measure = "SD", plot = FALSE)

Arguments

  • x: An object of class foreccomb. Contains training set (actual values + matrix of model forecasts) and optionally a test set.
  • measure: Cross-sectional dispersion measure, one of: "SD" = standard deviation (default); "IQR" = interquartile range; or "Range" = range.
  • plot: logical. If TRUE, evolution of cross-sectional forecast dispersion is plotted as ggplot.

Returns

Returns a vector of the evolution of cross-sectional dispersion over the sample period (using the selected dispersion measure)

Details

The available measures of scale are defined as in Davison (2003). Let y(i)y_(i) denote the i-th order statistic of the sample, then:

Ranget=y(n),ty(1),t Range_t = y_{(n), t} - y_{(1), t} IQRt=y(3n/4),ty(n/4),t IQR_t = y_{(3n/4),t} - y_{(n/4),t} SDt=1n1Σi=1n(yi,tyˉt)SDt=sqrt(1/(n1)Σi=1n(yi,tyˉt)) SD_t = \sqrt{\frac{1}{n-1} \Sigma_{i=1}^n \left(y_{i,t} - \bar{y}_t \right)}SD_t = sqrt(1/(n-1) \Sigma_{i=1}^n (y_{i,t} - \bar{y}_t))

Previous research in the forecast combination literature has documented that regression-based combination methods tend to have relative advantage when one or more individual model forecasts are better than the rest, while eigenvector-based methods tend to have relative advantage when individual model forecasts are in the same ball park.

Examples

obs <- rnorm(100) preds <- matrix(rnorm(1000, 1), 100, 10) train_o<-obs[1:80] train_p<-preds[1:80,] test_o<-obs[81:100] test_p<-preds[81:100,] data<-foreccomb(train_o, train_p, test_o, test_p) cs_dispersion(data, measure = "IQR")

References

Davison, A. C. (2003). Statistical Models. Cambridge University Press.

Hsiao, C., and Wan, S. K. (2014). Is There An Optimal Forecast Combination? Journal of Econometrics, 178(2) , 294--309.

See Also

foreccomb, sd, IQR, range

  • Maintainer: Christoph E. Weiss
  • License: GPL (>= 2)
  • Last published: 2016-11-27