Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
235.10 280.70 264.60 240.70 201.40 240.80 241.10 223.80 206.10 174.70 203.30 220.50 299.50 347.40 338.30 327.70 351.60 396.60 438.80 395.60 363.50 378.80 357.00 369.00 464.80 479.10 431.30 366.50 326.30 355.10 331.60 261.30 249.00 205.50 235.60 240.90 264.90 253.80 232.30 193.80 177.00 213.20 207.20 180.60 188.60 175.40 199.00 179.60 225.80 234.00 200.20 183.60 178.20 203.20 208.50 191.80 172.80 148.00 159.40 154.50 213.20 196.40 182.80 176.40 153.60 173.20 171.00 151.20 161.90 157.20 201.70 236.40 356.10 398.30 403.70 384.60 365.80 368.10 367.90 347.00 343.30 292.90 311.50 300.90 366.90 356.90 329.70 316.20 269.00 289.30 266.20 253.60 233.80 228.40 253.60 260.10 306.60 309.20 309.50 271.00 279.90 317.90 298.40 246.70 227.30 209.10 259.90 266.00 320.60 308.50 282.20 262.70 263.50 313.10 284.30 252.60 250.30 246.50 312.70 333.20 446.40 511.60 515.50 506.40 483.20 522.30 509.80 460.70 405.80 375.00 378.50 406.80 467.80 469.80 429.80 355.80 332.70 378.00 360.50 334.70 319.50 323.10 363.60 352.10 411.90 388.60 416.40 360.70 338.00 417.20 388.40 371.10 331.50 353.70 396.70 447.00 533.50 565.40 542.30 488.70 467.10 531.30 496.10 444.00 403.40 386.30 394.10 404.10 462.10 448.10 432.30 386.30 395.20 421.90 382.90 384.20 345.50 323.40 372.60 376.00 462.70 487.00 444.20 399.30 394.90 455.40 414.00 375.50 347.00 339.40 385.80 378.80 451.80 446.10 422.50 383.10 352.80 445.30 367.50 355.10 326.20 319.80 331.80 340.90 394.10 417.20 369.90 349.20 321.40 405.70 342.90 316.50 284.20 270.90 288.80 278.80 324.40 310.90 299.00 273.00 279.30 359.20 305.00 282.10 250.30 246.50 257.90 266.50 315.90 318.40 295.40 266.40 245.80 362.80 324.90 294.20 289.50 295.20 290.30 272.00 307.40 328.70 292.90 249.10 230.40 361.50 321.70 277.20 260.70 251.00 257.60 241.80 287.50 292.30 274.70 254.20 230.00 339.00 318.20 287.00 295.80 284.00 271.00 262.70 340.60 379.40 373.30 355.20 338.40 466.90 451.00 422.00 429.20 425.90 460.70 463.60 541.40 544.20 517.50 469.40 439.40 549.00 533.00 506.10 484.00 457.00 481.50 469.50 544.70 541.20 521.50 469.70 434.40 542.60 517.30 485.70 465.80 447.00 426.60 411.60 467.50 484.50 451.20 417.40 379.90 484.70 455.00 420.80 416.50 376.30 405.60 405.80 500.80 514.00 475.50 430.10 414.40 538.00 526.00 488.50 520.20 504.40 568.50 610.60 818.00 830.90 835.90 782.00 762.30 856.90 820.90 769.60 752.20 724.40 723.10 719.50 817.40 803.30 752.50 689.00 630.40 765.50 757.70 732.20 702.60 683.30 709.50 702.20 784.80 810.90 755.60 656.80 615.10 745.30 694.10 675.70 643.70 622.10 634.60 588.00 689.70 673.90 647.90 568.80 545.70 632.60 643.80 593.10 579.70 546.00 562.90 572.50
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
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
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation