Home » date » 2010 » Dec » 29 »

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 29 Dec 2010 09:53:55 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616307imej6mbgxlhl2hc.htm/, Retrieved Wed, 29 Dec 2010 10:51:50 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616307imej6mbgxlhl2hc.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
548604 563668 586111 604378 600991 544686 537034 551531 563250 574761 580112 575093 557560 564478 580523 596594 586570 536214 523597 536535 536322 532638 528222 516141 501866 506174 517945 533590 528379 477580 469357 490243 492622 507561 516922 514258 509846 527070 541657 564591 555362 498662 511038 525919 531673 548854 560576 557274 565742
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.538874295124119
beta0.428829606945443
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13557560561909.007211539-4349.00721153873
14564478565213.514458388-735.514458387857
15580523579984.398521435538.601478564553
16596594596722.625437075-128.625437075272
17586570588016.660810633-1446.66081063310
18536214538635.347156418-2421.34715641825
19523597517241.2624664176355.73753358313
20536535532801.3069793333733.69302066742
21536322545639.200496777-9317.20049677696
22532638549441.318676276-16803.3186762757
23528222539534.40273163-11312.4027316298
24516141519630.937475008-3489.93747500784
25501866488575.88557227713290.1144277233
26506174498028.8684968138145.1315031866
27517945515201.9503585062743.04964149435
28533590530358.9560582573231.04394174251
29528379521170.554771077208.44522892957
30477580476318.7735782141261.22642178612
31469357462122.4321610987234.56783890235
32490243478316.00800106811926.9919989324
33492622492813.352208155-191.352208155207
34507561503452.3578328214108.64216717862
35516922517550.052181178-628.052181177773
36514258519683.934091286-5425.93409128557
37509846507548.641861492297.35813851003
38527070518390.46847588679.53152419964
39541657543169.019293722-1512.01929372235
40564591565083.354085944-492.35408594436
41555362563687.41856105-8325.4185610502
42498662512097.602450021-13435.6024500211
43511038493714.93904622717323.0609537727
44525919520819.0039169295099.99608307052
45531673527782.0194410543890.98055894650
46548854545279.7380357073574.26196429273
47560576559457.7805651641118.21943483583
48557274563276.317756909-6002.31775690883
49565742557214.703067468527.29693253944


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
50578619.182044869564333.878843265592904.485246473
51596277.772930674578248.623997473614306.921863875
52622083.297806153599071.415097421645095.180514884
53620060.635547424591089.02330541649032.247789437
54575244.601477429539519.711746819610969.491208038
55586034.283926987542882.437366341629186.130487634
56601912.557934125550740.383008735653084.732859515
57608136.805448691548407.487304475667866.123592907
58625059.576249047556278.20839093693840.944107163
59637020.886008914558725.026177877715316.745839952
60637536.866208807549290.157616237725783.574801377
61643380.257646964544767.930215956741992.585077973
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616307imej6mbgxlhl2hc/1bwa21293616431.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616307imej6mbgxlhl2hc/1bwa21293616431.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616307imej6mbgxlhl2hc/24ns51293616431.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616307imej6mbgxlhl2hc/24ns51293616431.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616307imej6mbgxlhl2hc/34ns51293616431.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616307imej6mbgxlhl2hc/34ns51293616431.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = additive ;
 
R code (references can be found in the software module):
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')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by