Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
40.2453 28.3025 50.1838 18.5372 13.2234 2.69663 0.73349 1.48275 22.5372 27.8739 28.5014 22.4246 56.8225 42.5477 32.4106 32.1644 32.4135 4.86863 6.78436 3.38038 7.3815 16.3402 37.6227 59.9719 15.9901 27.7013 32.932 5.30796 20.235 0.40635 0.19128 0.49735 19.6238 20.2378 23.9959 29.8478 41.719 41.9024 15.5262 34.2797 15.1086 3.49392 2.06101 0.5266 18.9923 61.2872 4.86423 13.8919 40.5358 2.10184 21.2907 21.1981 1.12524 9.6789 0.19448 12.4337 62.8434 67.8521 25.3673 42.5751 40.5516 75.554 43.4839 31.7864 23.3477 16.768 3.31832 10.4819 20.8095 17.4945 7.75182 11.3388 32.5735 12.6831 9.94708 30.6057 3.22945 7.67496 0.33063 14.0623 67.7373 51.2128 34.8158 36.931 21.5298 18.1479 15.6614 23.4153 13.8576 5.65728 0.00037 9.98467 24.1366 48.1304 28.7438 18.1211 83.5082 23.1473 24.3529 5.24317 6.61097 3.62741 8.34275 4.1008 13.5328 10.3331 58.2424 39.7096 17.9361 18.8617 5.28761 15.904 30.8125 9.68255 0.55701 2.06946 7.93662 49.1467 9.48761 16.1402 44.1871 23.117 9.02296 15.757 32.5591 3.21543 0.18363 6.14313 22.6247 4.45593 18.2657 35.1582 8.50123 13.2474 17.0931 19.9722 22.2757 3.18537 4.99307 14.3119 14.8071 19.4883 57.6238 28.3736 80.306 44.1515 15.4538 44.4953 14.2136 2.90152 1.26388 0.38535 39.263 38.962 26.5036 92.5996 32.0321 5.84661 45.7843 25.3632 12.8705 12.2161 1.40274 2.82807 20.2751 18.0367 47.4188 38.4316 25.1409 44.5304 13.4249 29.9678 3.68928 9.36498 2.39156 10.4321 19.8609 11.9491 21.7586 64.4925 85.3548 24.6297 9.67922 11.9868 22.9564 3.15223 2.55028 9.41052 29.3937 25.847 30.7254 64.9509 4.10501 26.7405 61.7433 40.6527 8.48328 17.8127 0.65015 3.43915 17.516 43.7894 12.3096 56.1325 19.1635 6.78617 25.6015 5.28787 14.4712 6.6884 3.32373 5.71062 29.0767 24.0977 24.7476 26.9051 86.394 22.5889 30.24 46.9935 18.6894 0.28025 0.92917 6.62722 52.0524 22.0441 8.44233 13.2674 28.2157 15.4124 23.9767 37.2193 14.721 6.61501 2.55233 3.60923 21.8501 41.8435 42.9358 15.8962 28.0142 38.7025 31.3456 31.2651 21.8131 7.29904 7.37828 5.69357 7.83963 74.5807 26.6286 28.8588 28.2797 37.5816 38.5858 21.6668 4.92847 4.57462 1.56336 7.97082 18.9359 23.5402 10.9313 8.84617 20.1567 27.474 23.3036 28.026 4.50058 1.47364 2.98536 19.1295 24.0186 32.4497 46.5529 40.6873 22.4805 15.6733 54.9962 8.03105 11.6475 6.68338 4.89316 0.92721 10.0487 29.2531 23.9266 33.7378 28.6204 72.9069 37.846 0.82766 6.25154 3.44599 5.70136 23.2625 38.3339 29.7796 34.1489 4.78633 16.1338 11.9186 25.0659 21.005 28.2335 3.66396 0.42848 0.98931 38.9491 12.8728 20.3035 65.668
Seasonal period
12
12
1
2
3
4
5
6
7
8
9
10
11
12
Type of Exponential Smoothing
(?)
Triple
Single
Double
Triple
Type of seasonality
(?)
additive
additive
multiplicative
Number of Forecasts
12
12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Chart options
R Code
par4 <- '12' par3 <- 'additive' par2 <- 'Triple' par1 <- '12' par1 <- as.numeric(par1) par4 <- as.numeric(par4) if (par2 == 'Single') K <- 1 if (par2 == 'Double') K <- 2 if (par2 == 'Triple') K <- par1 nx <- length(x) nxmK <- nx - K x <- ts(x, frequency = par1) if (par2 == 'Single') fit <- HoltWinters(x, gamma=F, beta=F) if (par2 == 'Double') fit <- HoltWinters(x, gamma=F) if (par2 == 'Triple') fit <- HoltWinters(x, seasonal=par3) fit myresid <- x - fit$fitted[,'xhat'] bitmap(file='test1.png') op <- par(mfrow=c(2,1)) plot(fit,ylab='Observed (black) / Fitted (red)',main='Interpolation Fit of Exponential Smoothing') plot(myresid,ylab='Residuals',main='Interpolation Prediction Errors') par(op) dev.off() bitmap(file='test2.png') p <- predict(fit, par4, prediction.interval=TRUE) np <- length(p[,1]) plot(fit,p,ylab='Observed (black) / Fitted (red)',main='Extrapolation Fit of Exponential Smoothing') dev.off() bitmap(file='test3.png') op <- par(mfrow = c(2,2)) acf(as.numeric(myresid),lag.max = nx/2,main='Residual ACF') spectrum(myresid,main='Residals Periodogram') cpgram(myresid,main='Residal Cumulative Periodogram') qqnorm(myresid,main='Residual Normal QQ Plot') qqline(myresid) par(op) dev.off() load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Estimated Parameters of Exponential Smoothing',2,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Parameter',header=TRUE) a<-table.element(a,'Value',header=TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'alpha',header=TRUE) a<-table.element(a,fit$alpha) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'beta',header=TRUE) a<-table.element(a,fit$beta) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'gamma',header=TRUE) a<-table.element(a,fit$gamma) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Interpolation Forecasts of Exponential Smoothing',4,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'t',header=TRUE) a<-table.element(a,'Observed',header=TRUE) a<-table.element(a,'Fitted',header=TRUE) a<-table.element(a,'Residuals',header=TRUE) a<-table.row.end(a) for (i in 1:nxmK) { a<-table.row.start(a) a<-table.element(a,i+K,header=TRUE) a<-table.element(a,x[i+K]) a<-table.element(a,fit$fitted[i,'xhat']) a<-table.element(a,myresid[i]) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable1.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Extrapolation Forecasts of Exponential Smoothing',4,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'t',header=TRUE) a<-table.element(a,'Forecast',header=TRUE) a<-table.element(a,'95% Lower Bound',header=TRUE) a<-table.element(a,'95% Upper Bound',header=TRUE) a<-table.row.end(a) for (i in 1:np) { a<-table.row.start(a) a<-table.element(a,nx+i,header=TRUE) a<-table.element(a,p[i,'fit']) a<-table.element(a,p[i,'lwr']) a<-table.element(a,p[i,'upr']) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable2.tab')
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation