Home » date » 2011 » May » 29 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 29 May 2011 11:49:58 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/29/t1306669571zl6vq66uv347m46.htm/, Retrieved Sun, 29 May 2011 13:46:14 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
505,7 55,7 735,7 575,9 545,8 905,8 765,8 945,7 15,7 645,7 155,9 416 825,8 725,9 925,9 556 116,1 876,3 336,2 186,1 286,1 26 915,8 405,7 965,7 395,6 425,8 545,6 65,6 445,6 895,5 175,4 715,4 865,5 57,4 145,4 315,3 635,4 5,2 515,2 515,1 955 955 634,9 205 275 425 84,9 534,7 4,8 704,7 684,7 884,6 994,6 294,7 524,7 914,5 564,4 984,5 934,4 514,6 474,5 784,4 504,5 824,4 414,6 964,7 64,6 244,7 344,7 34,7 685 425 484,8 785,1 704,9 245,4 285,6 218,8 706,1 856,2 456,6 606,8 527,3 657,8 948,2 486,6 238,9 289,4 969,5 589,5 189,7 639,8 9710,1 969,9 939,9 859,7 679,9 879,9 329,8 349,6 39,5 849,5 449,6 749,6 249,7 649,8 619,4 939 778,9
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.29089981285969
beta0.129402100573134
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3735.7-394.31130
4575.9-473.0465685389261048.94656853893
5545.8-535.8860203089521081.68602030895
6905.8-548.4836141568791454.28361415688
7765.8-397.9489714755751163.74897147557
8945.7-288.1237449358261233.82374493583
915.7-111.468894886917127.168894886917
10645.7-251.952708950638897.652708950638
11155.9-134.512542722383290.412542722383
12416-182.786414262083598.786414262083
13825.8-118.814239240618944.614239240618
14725.981.3173434025964644.582656597404
15925.9218.433849937693707.466150062307
16556400.474334378469155.525665621531
17116.1427.809895101609-311.709895101609
18876.3307.493008467076568.806991532924
19336.2464.729947599733-128.529947599733
20186.1414.273442800663-228.173442800663
21286.1326.241520299882-40.141520299882
2226291.396999737334-265.396999737334
23915.8181.035350668403734.764649331597
24405.7389.27931825450516.4206817454948
25965.7389.175284593019576.524715406981
26395.6573.707556372317-178.107556372316
27425.8532.012930425985-106.212930425985
28545.6507.2342593979838.3657406020197
2965.6525.957700086072-460.357700086072
30445.6382.2733187415963.3266812584102
31895.5393.312435156616502.187564843384
32175.4550.919970504003-375.519970504003
33715.4439.066832234116276.333167765884
34865.5527.239672276702338.260327723298
3557.4646.16026092256-588.76026092256
36145.4473.248003734599-327.848003734599
37315.3363.89387557431-48.5938755743102
38635.4333.945499501746301.454500498254
395.2417.173796403027-411.973796403027
40515.2277.357986331911237.842013668089
41515.1335.526571864868179.573428135132
42955383.504527737267571.495472262733
43955567.00536373342387.994636266579
44634.9711.731141145494-76.8311411454937
45205718.347028651095-513.347028651095
46275578.656579926155-303.656579926155
47425488.534484632216-63.534484632216
4884.9465.872230341771-380.972230341771
49534.7336.526439718177198.173560281823
504.8383.113907817676-378.313907817676
51704.7247.760391178728456.939608821272
52684.7372.58256531853312.11743468147
53884.6467.025047316543417.574952683457
54994.6607.863895069212386.736104930788
55294.7754.289653094595-459.589653094595
56524.7637.219051653267-112.519051653267
57914.5616.875663288503297.624336711497
58564.4727.046396692355-162.646396692355
59984.5697.201953955125287.298046044875
60934.4809.061039211828125.338960788172
61514.6878.524397248303-363.924397248303
62474.5791.96191286089-317.461912860891
63784.4706.96512283091577.4348771690849
64504.5739.758619827906-235.258619827906
65824.4672.733785820247151.666214179753
66414.6723.974492020653-309.374492020653
67964.7629.45274457231335.247255427689
6864.6735.07107096115-670.471070961149
69244.7522.887550484607-278.187550484607
70344.7414.34740570933-69.6474057093298
7134.7363.849809467486-329.149809467486
72685225.47281084047459.52718915953
73425333.81980702675491.1801929732464
74484.8338.447031230024146.352968769976
75785.1364.63317724615420.46682275385
76704.9486.38664439218218.513355607821
77245.4557.617394219456-312.217394219456
78285.6462.705854248112-177.105854248112
79218.8400.431432002451-181.631432002451
80706.1330.003359532417376.096640467583
81856.2435.975702424141420.224297575859
82456.6570.603295427711-114.003295427711
83606.8545.53275021231861.2672497876823
84527.3573.754659753437-46.4546597534367
85657.8568.89159103510388.9084089648967
86948.2606.752397078215341.447602921785
87486.6730.929935493442-244.329935493442
88238.9675.507574399983-436.607574399983
89289.4547.716444757507-258.316444757507
90969.5462.066353332924507.433646667076
91589.5618.274168730914-28.7741687309144
92189.7617.416083594395-427.716083594395
93639.8484.405333513077155.394666486923
949710.1526.87092021629183.2290797838
95969.93541.21657067186-2571.31657067186
96939.93039.37490104804-2099.47490104804
97859.72595.76125277685-1736.06125277685
98679.92192.51393172237-1512.61393172237
99879.91797.32799746341-917.427997463409
100329.81540.74675501591-1210.94675501591
101349.61153.19723550532-803.597235505315
10239.5853.895766611914-814.395766611914
103849.5520.796669051269328.703330948731
104449.6532.598279934586-82.9982799345859
105749.6421.511661118665328.088338881335
106249.7442.360307493709-192.660307493709
107649.8304.47094911205345.32905088795
108619.4336.081832042037283.318167957963
109939360.318719799598578.681280200402
110778.9492.260008170372286.639991829628


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
111550.036543045553-1559.585579167652659.65866525876
112524.429557939392-1696.132283056482744.99139893526
113498.822572833231-1852.277722521722849.92286818818
114473.21558772707-2027.474586882312973.90576233645
115447.608602620909-2220.88233138273116.09953662452
116422.001617514748-2431.498490895243275.50172592474
117396.394632408587-2658.261008471443451.05027328861
118370.787647302426-2900.119143683153641.694438288
119345.180662196265-3156.077118234233846.43844262676
120319.573677090104-3425.217136420294064.3644906005
121293.966691983942-3706.708317881134294.64170184902
122268.359706877781-3999.806838760934536.52625251649
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/29/t1306669571zl6vq66uv347m46/16aoi1306669796.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/29/t1306669571zl6vq66uv347m46/16aoi1306669796.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/29/t1306669571zl6vq66uv347m46/2hg0u1306669796.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/29/t1306669571zl6vq66uv347m46/2hg0u1306669796.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/29/t1306669571zl6vq66uv347m46/3rky81306669796.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/29/t1306669571zl6vq66uv347m46/3rky81306669796.ps (open in new window)


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