Home » date » 2009 » Jun » 07 »

exponential smoothing Filip Bosschaerts 2

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 07 Jun 2009 15:35:43 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/07/t124441057061focgtvkr2adpw.htm/, Retrieved Sun, 07 Jun 2009 23:36:14 +0200
 
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/2009/Jun/07/t124441057061focgtvkr2adpw.htm/},
    year = {2009},
}
@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 = {2009},
    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:
Filip Bosschaerts
 
Dataseries X:
» Textbox « » Textfile « » CSV «
519164 517009 509933 509127 500857 506971 569323 579714 577992 565464 547344 554788 562325 560854 555332 543599 536662 542722 593530 610763 612613 611324 594167 595454 590865 589379 584428 573100 567456 569028 620735 628884 628232 612117 595404 597141 593408 590072 579799 574205 572775 572942 619567 625809 619916 587625 565742 557274 560576 548854 531673 525919 511038 498662 555362 564591 541657 527070 509846 514258 516922 507561 492622 490243 469357 477580 528379 533590 517945 506174 501866 516141
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.932085622762712
beta0.111072200021140
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13562325543510.78498931618814.2150106835
14560854562257.082625005-1403.08262500470
15555332557528.951675197-2196.95167519711
16543599545005.294025158-1406.29402515769
17536662537360.588402685-698.588402684778
18542722543516.617663201-794.617663201061
19593530608666.040283583-15136.0402835835
20610763604066.9713045426696.02869545808
21612613608304.2417565124308.75824348803
22611324600346.99398279810977.0060172023
23594167594549.310356531-382.310356530594
24595454603634.89945451-8180.89945450972
25590865606458.582762683-15593.5827626829
26589379589295.74140339583.2585966045735
27584428583587.891537619840.10846238141
28573100571951.9531159761148.04688402358
29567456565003.8452849672452.15471503336
30569028572683.977763245-3655.97776324546
31620735632490.008431404-11755.0084314037
32628884631172.725617809-2288.72561780910
33628232624590.7885428083641.21145719173
34612117614112.57236219-1995.57236218941
35595404591757.2110193013646.78898069914
36597141600791.09416101-3650.09416100988
37593408604525.981811363-11117.9818113634
38590072590254.35390812-182.353908119840
39579799581977.72012682-2178.72012681945
40574205564863.7414163479341.25858365325
41572775563804.0624579988970.9375420023
42572942575983.396814138-3041.39681413758
43619567634713.823893817-15146.8238938169
44625809629428.419736452-3619.41973645205
45619916620421.569004207-505.569004206918
46587625603678.747719531-16053.7477195309
47565742565131.102672843610.897327156505
48557274567053.351327952-9779.35132795153
49560576560147.154662156428.845337843522
50548854554155.358965362-5301.35896536184
51531673537216.342017777-5543.34201777703
52525919513644.83434624512274.1656537554
53511038511493.580679156-455.580679156468
54498662509294.721496441-10632.7214964412
55555362554565.269475176796.730524823535
56564591561012.1347444433578.86525555735
57541657555760.042110383-14103.0421103832
58527070520713.4015945896356.59840541077
59509846501932.1380522217913.86194777902
60514258508458.0460258375799.95397416304
61516922516881.60421698940.3957830113941
62507561510213.586354658-2652.58635465812
63492622496076.251735346-3454.25173534575
64490243476227.53461788114015.4653821186
65469357475580.577870247-6223.57787024672
66477580467462.91269343410117.0873065657
67528379535147.121509948-6768.1215099484
68533590536245.502109291-2655.50210929057
69517945524849.811186114-6904.81118611363
70506174499515.4878090456658.51219095493
71501866482766.0969620719099.9030379298
72516141502377.56829974413763.4317002557


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
73521459.842109334505491.395619656537428.288599011
74518194.326917147495205.87918015541182.774654145
75510372.651584692481057.851979475539687.45118991
76499185.318632892463785.832415338534584.804850445
77486904.502592433445489.127710203528319.877474663
78489146.107027434441699.794905610536592.419149259
79548654.761921942495116.481243481602193.042600402
80559442.79890431499724.424258574619161.173550046
81553610.476732566487607.227172478619613.726292654
82539724.822665529467321.455022479612128.190308579
83521016.379281091442091.057282510599941.701279672
84523887.59405124438314.400388579609460.787713901
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124441057061focgtvkr2adpw/16tnc1244410540.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124441057061focgtvkr2adpw/16tnc1244410540.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124441057061focgtvkr2adpw/2dkfk1244410540.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124441057061focgtvkr2adpw/2dkfk1244410540.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124441057061focgtvkr2adpw/38erm1244410540.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124441057061focgtvkr2adpw/38erm1244410540.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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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