Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
8357.00 7454.00 8076.00 7248.00 7339.00 7292.00 7359.00 7537.00 7441.00 8057.00 8037.00 8257.00 8692.00 8119.00 8236.00 7432.00 7669.00 7453.00 7566.00 7731.00 7657.00 8130.00 8401.00 8737.00 9009.00 7919.00 8228.00 7903.00 7912.00 7857.00 7965.00 8091.00 8024.00 8772.00 8656.00 8953.00 9014.00 8103.00 8876.00 8231.00 8173.00 8087.00 8296.00 8007.00 8382.00 9168.00 9137.00 9321.00 9234.00 8451.00 9101.00 8279.00 8284.00 8225.00 8597.00 8305.00 8620.00 9102.00 9258.00 9652.00 9522.00 8874.00 9415.00 8525.00 8862.00 8421.00 8626.00 8750.00 8852.00 9412.00 9570.00 9513.00 9986.00 8907.00 9663.00 8799.00 8931.00 8732.00 8936.00 9127.00 9070.00 9773.00 9670.00 9929.00 10095.00 9025.00 9659.00 8954.00 9022.00 8855.00 9034.00 9196.00 9038.00 9650.00 9715.00 10052.00 10436.00 9314.00 9717.00 8997.00 9062.00 8885.00 9058.00 9095.00 9149.00 9857.00 9848.00 10269.00 10341.00 9690.00 10125.00 9349.00 9224.00 9224.00 9454.00 9347.00 9430.00 9933.00 10148.00 10677.00 10735.00 9760.00 10567.00 9333.00 9409.00 9502.00 9348.00 9319.00 9594.00 10160.00 10182.00 10810.00 11105.00 9874.00 10958.00 9311.00 9610.00 9398.00 9784.00 9425.00 9557.00 10166.00 10337.00 10770.00 11265.00 10183.00 10941.00 9628.00 9709.00 9637.00 9579.00 9741.00 9754.00 10508.00 10749.00 11079.00 11608.00 10668.00 10933.00 9703.00 9799.00 9656.00 9648.00 9712.00 9766.00 10540.00 10564.00 10911.00 11218.00 10230.00 10410.00 9227.00 9378.00 9105.00 9128.00
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
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) 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, par1, 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