Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
1.72923686058208 0.122433126801145 0.523768788982079 -0.50175942601324 -1.86386120887019 0.0717422351702872 -0.380578531491989 -0.29851611788274 1.94316215667028 -1.24779901378139 1.35257277275093 2.84406850014719 1.12274878943606 -2.32540657982629 -2.89902363942181 0.246874012745119 -0.731094375584061 1.97769407549524 -0.089308186457892 -1.64931358279907 1.78988776616251 -0.655026882699021 -0.95518008982139 -0.501427837065876 -1.47468882156665 2.4255103110643 -0.388732570521789 -1.41970373897772 -0.435743764210552 0.588337253253952 -1.73087780677345 0.416192838768035 -0.135602934239543 1.5607508968729 -0.619488852927662 0.130061173484127 -0.485714783249833 1.19042117073251 0.504940688912012 -0.266725732456376 1.8987616014054 0.9835731579105 0.221023228988728 -0.176860990484583 -0.162198287814433 0.78911590880292 1.41209201053576 0.518161844628975 2.36462043434148 -1.24446105804486 1.09138861156198 0.422175612267996 -0.997989397904933 0.754650745534752 -1.44375392644115 0.568632265545353 1.35413305240232 -1.34288885715882 -0.0968579661829751 0.242767533935212 0.255744783559028 -0.243232899636027 0.461607264600104 0.0650797112167817 2.25999343044582 1.80462197944889 2.32548979115297 0.682758803307819 -0.335554613197298 -0.997929583796738 0.97507128242145 -1.17268516900173 -0.000337278483281606 -1.71460596672184 -1.34872342854985 -1.6521456119588 -1.48335049731373 0.925016701443022 -0.226525557050897 0.774905929042345 -0.339789522342372 0.89311055438168 -0.864578780222597 -1.95217915873499 -0.11317194501752 1.02470860347022 -1.25650654087286 -0.602130638597027 -0.83233134657693 -0.446577198612737 -4.01053303468812 0.288513333839785 -1.00798474916531 -0.572816189634855 -0.297410570159231 1.21578539483534 -0.727486991378146 -0.843943364912431 -1.20889338911855 -0.649656515850742 3.19984732249364 0.572738529480399 -0.0199646221520179 0.462316869083462 -1.28699501625665 -1.80757939159691 -2.15431670426712 0.707840316820782 1.36410372036211 0.314718394752158 -4.1002515835693 1.26992188862053 1.80144339707427 -0.42970220964945 0.529993653035631 1.18764422512472 -0.398233352310507 -0.421884162222733 -2.6898323919027 1.0140628812162 -0.542058945797581 -0.368690243263354 1.31411524584048 -0.428705333764204 -0.663582558495647 1.37204511801761 -1.27310996987184 0.810157913937622 1.5741305304336 -1.025150115941 -0.998930862337702 -0.0536208441845616 1.66337771592794 -0.178008462116163 -1.09164775518912 1.96797905166753 0.634220496887586 1.38764487483822 0.75570654001001 -2.3214750727902 1.62023993830839 0.423224828517651 -1.7051130142733 0.541981863740972 -0.593027838089475 0.213567450337977 -0.696840242545287 0.0777251570183703 -0.725328497765991 2.1315776363419 -0.33645518676905 -0.979182554450992 -0.242246084610725 -1.82980075345691 -1.14814874978528 0.496126806273696 -0.37803015357093 0.564631359789787 0.268965939275992 0.752661368724124 -2.30203173253409 2.82635859577673 -0.607627712639158 3.77405193258893 1.08426693162876 -2.2508985634727 0.290663952981133 -1.1346060583543 1.41583984485642 0.590041695581542 1.22056539827692 0.0970995178245223 -0.906020145960084 -0.597681226735446 0.437155726246844 0.742487563055592 1.22917286536281 -0.95259160353182 -0.75528682870179
Seasonal period
12
1
2
3
4
5
6
7
8
9
10
11
12
Type of Exponential Smoothing
(?)
Single
Double
Triple
Type of seasonality
(?)
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) 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