Home » date » 2010 » Jan » 25 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 25 Jan 2010 05:28:40 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/25/t1264422596stwjogj24pjy80p.htm/, Retrieved Mon, 25 Jan 2010 13:30:00 +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/Jan/25/t1264422596stwjogj24pjy80p.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
441700 448500 415600 408000 416600 409300 387600 394500 407600 378500 359600 435700 433800 427700 413300 379500 379300 353700 378200 380600 394000 374000 375000 437600 443900 488800 463900 440000 453800 451600 453400 461400 509100 540600 555100 677400 694600 750100 733900 709300 720500 693200 687200 686800 720900 653100 624700 690000 717800 736500 699900 675600 635600 632500 594900 604000 620800 578400 571200 627400 657700 674100 672800 615300 609100 607600 566900 572700 589200 534800 543100 591100 624800 665300 642600 608700 594500 563800 596100 597600 633100 591000 584200 655800 670700 699700 712900 652000 635100 603100 610100 602000 597600 585400 567100 620600 646200 644800 645200 644800 593000 569100 518800 538700 554600 507900 488400 563300 592400 598100 546300 516100 518500 477400 483400 469400 501300 457400 446700 501900 550400 593700 548900 534200 550500 541800 569300 587400 etc...
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.867291126035387
beta0.0984720422261518
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13433800449533.520299145-15733.5202991454
14427700427800.552459051-100.552459050843
15413300411492.3313252551807.66867474484
16379500377201.8087866892298.19121331070
17379300375924.6533174063375.34668259404
18353700350203.3064276823496.69357231836
19378200370648.3339860237551.66601397679
20380600383909.311769447-3309.31176944723
21394000393434.698342544565.301657455857
22374000364489.6150732159510.38492678542
23375000355773.08071155919226.9192884405
24437600453254.831482233-15654.8314822327
25443900437896.4874797316003.51252026879
26488800440060.06790974548739.9320902545
27463900473504.751780232-9604.75178023247
28440000435547.5176944484452.48230555246
29453800442631.77553015911168.2244698409
30451600430700.83624552720899.1637544726
31453400475278.851952642-21878.8519526420
32461400467562.022050441-6162.02205044066
33509100480872.20874531428227.7912546864
34540600485212.86928512155387.1307148786
35555100529599.57421189325500.4257881066
36677400640454.22017304336945.7798269569
37694600690643.5294097043956.4705902962
38750100713581.76061740936518.2393825913
39733900744518.570950148-10618.5709501477
40709300723295.745452703-13995.7454527025
41720500729443.871771988-8943.87177198753
42693200713816.233987742-20616.2339877423
43687200725620.67539042-38420.6753904207
44686800713139.67895271-26339.6789527095
45720900719287.1924484751612.80755152507
46653100707649.571175018-54549.5711750181
47624700646834.264969296-22134.2649692957
48690000707937.822473186-17937.8224731860
49717800691504.97722949326295.0227705069
50736500725402.15313400911097.8468659912
51699900713129.289164922-13229.2891649222
52675600674063.7438800591536.25611994136
53635600680549.273728686-44949.2737286858
54632500615266.64944994617233.3505500542
55594900643888.60064159-48988.60064159
56604000609296.557880548-5296.55788054818
57620800624652.457793821-3852.45779382077
58578400587603.190453828-9203.19045382761
59571200561072.53179172610127.4682082739
60627400644122.923259774-16722.9232597742
61657700628127.21148327429572.788516726
62674100656643.66957786417456.3304221365
63672800640993.37976377131806.6202362288
64615300641129.186146105-25829.1861461053
65609100613557.340366392-4457.3403663924
66607600590948.83872493416651.1612750659
67566900609531.54260713-42631.5426071298
68572700586048.08024902-13348.0802490197
69589200593721.818103614-4521.8181036145
70534800554433.971746831-19633.9717468312
71543100519583.35022339223516.6497766075
72591100609987.474784758-18887.4747847581
73624800597378.15720607527421.8427939246
74665300621357.29718608543942.702813915
75642600631780.99369504110819.0063049587
76608700605471.4009004183228.59909958241
77594500607824.752111993-13324.7521119929
78563800581457.000756397-17657.0007563973
79596100560617.23978697635482.7602130243
80597600613639.103227117-16039.1032271167
81633100624791.748940348308.25105966022
82591000600363.014026969-9363.0140269685
83584200586761.176725511-2561.17672551086
84655800653308.0846686842491.91533131606
85670700671599.718225432-899.718225431745
86699700677002.6502367822697.3497632197
87712900666584.56134838446315.4386516155
88652000675064.858945096-23064.8589450957
89635100655183.250118581-20083.250118581
90603100624567.682693935-21467.6826939352
91610100609338.318846377761.681153623387
92602000624307.423410209-22307.4234102087
93597600631617.314816872-34017.3148168721
94585400562882.68311816322517.316881837
95567100575303.568170968-8203.56817096833
96620600634616.117938667-14016.1179386668
97646200633719.1776685612480.8223314396
98644800650580.021622272-5780.02162227186
99645200612887.55936778332312.4406322171
100644800593109.35698274351690.6430172565
101593000637936.188224223-44936.1882242232
102569100582937.593734109-13837.5937341086
103518800575282.843846143-56482.8438461425
104538700530660.9693287128039.03067128791
105554600558445.93531038-3845.93531037972
106507900521667.945711604-13767.9457116041
107488400493729.731561694-5329.73156169429
108563300550196.51543272113103.4845672792
109592400574085.82350360218314.1764963983
110598100591829.9777214336270.02227856684
111546300568920.210469729-22620.2104697287
112516100498656.19355854217443.8064414584
113518500492618.1218820725881.8781179304
114477400500874.920924275-23474.9209242754
115483400476087.7875362167312.2124637842
116469400497691.160947983-28291.1609479826
117501300491621.0289886559678.9710113448
118457400465642.407236377-8242.40723637666
119446700444474.2476039512225.75239604869
120501900511443.333164543-9543.3331645428
121550400515951.88118652934448.1188134711
122593700547037.51525840546662.4847415945
123548900559722.477973085-10822.4779730854
124534200510411.64900569723788.3509943034
125550500516942.06920922733557.9307907734
126541800531907.83814699892.16185309994
127569300549596.7680585419703.2319414604
128587400587731.483551768-331.483551767771
129627700623846.9758683813853.02413161891
130607000602837.1481361024162.85186389775
131629500607276.54715130522223.4528486948
132704600705194.85077707-594.850777070038
133767700739233.88178406228466.1182159383
134812200782172.93578243630027.0642175641
135824600786801.25217606337798.7478239366
136856300802404.65965368353895.3403463167
137812200857066.684285315-44866.684285315
138764100814900.622545487-50800.6225454874
139801700790095.65257334111604.3474266587
140806000826698.21368536-20698.2136853596
141867200852116.46505430815083.5349456918
142801600848258.328383487-46658.3283834871
143817500814047.8941390943452.10586090630
144920900894084.76030860826815.2396913918
145959700959520.874007458179.125992542249
146997700979486.10778971218213.8922102879
147949100975243.530750466-26143.5307504656
148910900932408.800769329-21508.8007693288
149920400897009.34865690723390.6513430928
150914200907526.689524716673.31047528947
151926300940030.451989342-13730.4519893415
152906400947390.245536353-40990.2455363529
153926100955241.64974575-29141.6497457498
154902500896340.4016043886159.59839561197
155895300910606.136208164-15306.1362081638
156979900971890.1634663958009.83653360454
15710097001010291.13671698-591.136716982699
15810438001024725.3860300119074.6139699878
1599798001008159.87472786-28359.8747278603
160921600956645.907643506-35045.9076435063
161923500906936.18505605116563.8149439488
162914500900202.87962446814297.1203755324
163891700928150.795546316-36450.7955463161
164916000901787.26477120514212.7352287947
165931700953402.134081721-21702.1340817214
166902400900587.2605585221812.73944147793
167893700902812.430476704-9112.43047670356
168941500967669.528021328-26169.5280213284
169980100967473.65200237712626.3479976233
1701006900989297.98904179717602.0109582026
171949200958351.419446583-9151.41944658256
172883200917441.051625647-34241.0516256473
173849900870178.75190878-20278.7519087794
174839200822945.21497899616254.7850210045
175803900837777.299826093-33877.2998260928
176797900812510.028344965-14610.0283449651
177830800824040.1606519456759.83934805507
178753300791140.712777618-37840.7127776179
179764100746248.34415533317851.6558446669
180807600823253.780860587-15653.7808605866
181853700829251.01675686224448.9832431383
182886200854923.37525176831276.6247482317
183815700826388.16515369-10688.1651536893
184743000774786.036391814-31786.0363918135
185753600725686.20042860427913.7995713955
186724800723394.1232554861405.87674451387
187709600715722.917063477-6122.91706347733
188721900716482.0545513885417.94544861186


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
189749327.050707691703244.451869429795409.649545954
190705177.457094367641529.599135961768825.315052773
191704258.111911153624636.804009918783879.419812388
192763573.133119028668598.963427645858547.30281041
193792044.277269829681936.834388177902151.72015148
194798905.82931752673681.233789091924130.42484595
195736491.924632955596050.754046174876933.095219736
196691088.827742808535261.36984541846916.285640206
197679923.245271661508495.124802909851351.365740414
198649963.800898342462691.50609987837236.095696815
199640013.945187637436634.716123001843393.174252274
200648077.723003801428316.092639857867839.353367745
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264422596stwjogj24pjy80p/104bx1264422517.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264422596stwjogj24pjy80p/104bx1264422517.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/25/t1264422596stwjogj24pjy80p/2mdg81264422517.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264422596stwjogj24pjy80p/2mdg81264422517.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/25/t1264422596stwjogj24pjy80p/319ea1264422517.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264422596stwjogj24pjy80p/319ea1264422517.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