Home » date » 2009 » Mar » 15 »

*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: Sun, 15 Mar 2009 04:13:52 -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/Mar/15/t1237112069opdzrat1i19b7h8.htm/, Retrieved Sun, 15 Mar 2009 11:14:33 +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/2009/Mar/15/t1237112069opdzrat1i19b7h8.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
112 118 132 129 121 135 148 148 136 119 104 118 115 126 141 135 125 149 170 170 158 133 114 140 145 150 178 163 172 178 199 199 184 162 146 166 171 180 193 181 183 218 230 242 209 191 172 194 196 196 236 235 229 243 264 272 237 211 180 201 204 188 235 227 234 264 302 293 259 229 203 229 242 233 267 269 270 315 364 347 312 274 237 278 284 277 317 313 318 374 413 405 355 306 271 306 315 301 356 348 355 422 465 467 404 347 305 336 340 318 362 348 363 435 491 505 404 359 310 337 360 342 406 396 420 472 548 559 463 407 362 405 417 391 419 461 472 535 622 606 508 461 390 432
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.275592931492333
beta0.0326927269947438
gamma0.870730972374008


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13115111.0818087088673.91819129113328
14126122.3314538747423.66854612525761
15141137.4390153761573.56098462384284
16135132.3233832202932.67661677970653
17125123.4796828181471.52031718185303
18149147.6672902331881.33270976681194
19170162.4432448018997.55675519810066
20170165.5295923942174.47040760578255
21158153.8877144649334.11228553506743
22133136.318642929536-3.3186429295356
23114119.090609201624-5.09060920162396
24140133.9887149606776.0112850393225
25145134.83037010966310.1696298903367
26150149.7051460153790.294853984620914
27178166.54082485992411.4591751400757
28163161.7497291200691.25027087993098
29172149.75750588289122.2424941171092
30178185.647729927987-7.64772992798655
31199206.262157804499-7.26215780449877
32199203.180877899402-4.18087789940233
33184186.419241979639-2.41924197963931
34162158.1477827595373.85221724046292
35146138.3687169810807.63128301892016
36166169.141347816413-3.14134781641266
37171170.3609458701890.639054129810944
38180177.4381780479192.56182195208055
39193206.247937689468-13.2479376894684
40181185.960724160939-4.96072416093864
41183184.798364145754-1.79836414575391
42218195.68435973357222.3156402664278
43230227.4983879410452.5016120589554
44242229.00476968851912.9952303114810
45209215.630988418267-6.63098841826653
46191186.2865983510884.71340164891208
47172166.0376439935575.96235600644326
48194192.8425095100711.15749048992947
49196198.309952885667-2.30995288566717
50196206.984486038046-10.9844860380456
51236224.19294089623311.8070591037674
52235214.06541785565920.9345821443406
53229222.6752524470976.32474755290255
54243256.738013695458-13.7380136954578
55264268.357973304421-4.35797330442080
56272275.595124348779-3.59512434877928
57237240.950022441534-3.95002244153355
58211216.418700337475-5.41870033747466
59180191.302342357419-11.3023423574190
60201212.165187519317-11.1651875193170
61204211.884585973233-7.88458597323302
62188213.278482377796-25.2784823777957
63235241.844280631679-6.84428063167888
64227231.126644343174-4.12664434317369
65234222.84756235744411.1524376425561
66264244.40357368199619.5964263180045
67302270.92543678752531.0745632124749
68293288.4633043826304.53669561737041
69259253.3255731144295.67442688557071
70229228.4572425854800.542757414519542
71203198.7667237110574.23327628894256
72229226.3253709300382.67462906996178
73242232.5076979211129.49230207888777
74233226.1554706830966.84452931690356
75267284.984135370815-17.984135370815
76269271.954055875764-2.95405587576425
77270274.414364054006-4.41436405400611
78315301.11087543871913.8891245612812
79364337.48148399701926.5185160029808
80347335.98551213636611.0144878636339
81312297.83665553117714.1633444688228
82274267.3004377139336.69956228606708
83237236.9925415061950.00745849380476216
84278266.90068203576711.0993179642327
85284281.6339304999812.36606950001874
86277269.9672327497047.03276725029627
87317320.174971097699-3.17497109769943
88313321.276901514013-8.2769015140127
89318322.045741716523-4.04574171652263
90374367.951193908366.04880609163985
91413417.20324189844-4.20324189843973
92405394.60621928243910.3937807175610
93355352.3066369650062.69336303499392
94306308.449783989787-2.44978398978702
95271266.696313192674.30368680732988
96306309.394151440329-3.39415144032859
97315315.103159698916-0.103159698916272
98301304.405343346902-3.4053433469017
99356349.0581654503796.94183454962058
100348349.292530352998-1.29253035299848
101355355.07317102392-0.0731710239203949
102422414.3609383732847.6390616267164
103465462.0911562758252.90884372417509
104467448.97971785271118.0202821472888
105404397.6350099221196.36499007788103
106347345.4509662878941.54903371210571
107305304.2430311120760.756968887924245
108336345.615225431220-9.61522543121976
109340352.616275490595-12.6162754905953
110318334.810864863475-16.8108648634752
111362386.941342201651-24.9413422016506
112348372.190810667806-24.1908106678064
113363372.090086438278-9.09008643827758
114435435.498520155361-0.498520155360723
115491478.41837009479112.5816299052085
116505476.29775492897928.7022450710215
117404417.219149854204-13.2191498542045
118359354.4369029627594.56309703724105
119310311.876475452214-1.87647545221381
120337345.975115388041-8.97511538804093
121360350.643058140329.35694185967964
122342334.9945802071107.0054197928896
123406390.68587542554615.3141245744536
124396386.4988658447969.50113415520354
125420407.13076227321912.8692377267807
126472491.605011219962-19.6050112199623
127548543.7800465587394.2199534412614
128559549.93532739179.0646726082997
129463449.63874670942213.3612532905782
130407399.9130342117697.08696578823083
131362348.39721266746913.6027873325311
132405386.65208470331618.3479152966844
133417413.9167814674313.08321853256905
134391392.451160427228-1.45116042722816
135419460.170497130596-41.1704971305962
136461435.42175557135625.5782444286439
137472465.0951028577916.90489714220945
138535534.3526743899110.647325610088842
139622616.735366186225.26463381378016
140606627.551069242193-21.5510692421930
141508510.133139879417-2.1331398794174
142461446.16279163776914.8372083622306
143390395.452817969955-5.45281796995471
144432434.572452493995-2.57245249399460


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
145447.055907793748427.306081839881466.805733747616
146419.712252491685399.132529133936440.291975849435
147464.867062938332442.962936376578486.771189500086
148496.08393808204472.832869325636519.335006838444
149507.532607460917483.13745188183531.927763040004
150575.45083938456548.708168067514602.193510701605
151666.592241551587636.628745108668696.555737994505
152657.913647955767627.181984104084688.64531180745
153550.308727275651521.63972761341578.977726937891
154492.985286976115465.015260234151520.955313718078
155420.207239449315393.468712587999446.945766310631
156465.634459283973443.300359438534487.968559129412
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Mar/15/t1237112069opdzrat1i19b7h8/172r91237112025.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Mar/15/t1237112069opdzrat1i19b7h8/172r91237112025.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Mar/15/t1237112069opdzrat1i19b7h8/2ygze1237112025.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Mar/15/t1237112069opdzrat1i19b7h8/2ygze1237112025.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Mar/15/t1237112069opdzrat1i19b7h8/3g55u1237112025.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Mar/15/t1237112069opdzrat1i19b7h8/3g55u1237112025.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
 
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