Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
46.4 48.3 54 48.2 52.1 52.6 45.6 46.3 56.1 50.7 55 50.7 54.6 58.1 60.5 56.3 57.6 63.5 49.3 50.6 54.8 58.9 54.3 50.1 57.2 57.3 61.8 60.4 58.1 59.1 57.7 52.8 59.1 62.1 57.9 53.1 64.9 57.1 66.8 63.5 56.5 62.4 60.9 57.4 69.2 68.5 60.3 71.3 59.7 67.2 79.3 71 64.6 78.1 73.4 70.1 82.5 79.4 78.9 88.1 77.8 70.5 82.9 78.9 74.6 79.5 72 71.9 86.6 83.6 80.5 76.7 81.2 81.4 94 77.6 81 86.5 75.8 78.9 88.8 90.6 87.5 84.5 81.2 76.8 87.7 79.6 84 90 88.6 81.6 80.5 86.5 82.7 81.5 89 87.2 92 90.8 86.3 95.1 96.5 82.4 101.5 94.9 81.4 91.1 70 74.7 86.2 74.6 75 84.4 85.3 75.7 87.7 85.9 84.2 87.4 88.9 101.4 107.1 89.8 93.3 109.6 101.5 94.4 103.5 99.3 105.9 105.3 97.7 106.4 138.7 107.3 105.9 109.8 103.6 117 110.5 102 96 93.6 97.9 99.4 126.4 94.4 93.1 98.9 111.7 104.9 110.3 109.2 105.3 99.1 105.1 99.1 119.4 118.2 109.5 118.6 120.8 107.5 112.7 123.5 117.5 111.1 104.2 113.8 124.5 122.9 118.9 132.1 115.7 105.9 138.7 131.5 127 120.1 117.5 101.2 131.1 119.5 110.8 114.9 114 115.2 127.4 120.6 118.7 111.5 108.9 109.8 125.8 118 111.5 136.5 130.5 124.4 131.3 121.4 113.3 144.8 118.9 124.4 138.2 122 122.1 134.8 136.8 133.1
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
(?)
multiplicative
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
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