config-i1 / smooth

The set of functions used for time series analysis and in forecasting.
89 stars 20 forks source link

Find out why the following happens in es(): #104

Closed config-i1 closed 6 years ago

config-i1 commented 6 years ago

newXreg <- xregExpander(BJsales.lead,lags=c(-10:10)) es(BJsales, c("ANN"), xreg=newXreg, h=10, holdout=TRUE, silent=FALSE, xregDo="u", intervals="sp")

Time elapsed: 0.65 seconds Model estimated: ETSX(ANN) Persistence vector g: alpha 0.886 Initial values were optimised. 24 parameters were estimated in the process Residuals standard deviation: 0.288 Xreg coefficients were estimated in a normal style Cost function type: MSE; Cost function value: 0.069

Information criteria: AIC AICc BIC 70.84976 81.28455 141.44918 95% semiparametric prediction intervals were constructed 100% of values are in the prediction interval Forecast errors: MPE: 0%; sCE: 0%; Bias: 29%; MAPE: 0.1% MASE: 0.123; sMAE: 0.1%; RelMAE: 0.04; sMSE: 0%

es(BJsales, c("XXN"), xreg=newXreg, h=10, holdout=TRUE, silent=FALSE, xregDo="u", intervals="sp")

Forming the pool of models based on... ANN, AAN, Estimation progress: ... Done! Time elapsed: 1.76 seconds Model estimated: ETSX(ANN) Persistence vector g: alpha 0.922 Initial values were optimised. 24 parameters were estimated in the process Residuals standard deviation: 0.287 Xreg coefficients were estimated in a normal style Cost function type: MSE; Cost function value: 0.068

Information criteria: AIC AICc BIC 69.23731 79.67209 139.83673 95% semiparametric prediction intervals were constructed 100% of values are in the prediction interval Forecast errors: MPE: 0%; sCE: -0.4%; Bias: 55.7%; MAPE: 0.1% MASE: 0.166; sMAE: 0.1%; RelMAE: 0.055; sMSE: 0%

So eventually the same model, but different optimal parameters values.

config-i1 commented 6 years ago

This is because of the different calculations of the initials of the state bector. In the former case it is done via a simple moving average, while in the latter it is done via OLS on a trend model on the first 12 observations.