Home » date » 2010 » Jan » 23 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 23 Jan 2010 08:32:33 -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/23/t1264260844ckgkec0ulsc2yek.htm/, Retrieved Sat, 23 Jan 2010 16:34:09 +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/23/t1264260844ckgkec0ulsc2yek.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 «
8357,00 7454,00 8076,00 7248,00 7339,00 7292,00 7359,00 7537,00 7441,00 8057,00 8037,00 8257,00 8692,00 8119,00 8236,00 7432,00 7669,00 7453,00 7566,00 7731,00 7657,00 8130,00 8401,00 8737,00 9009,00 7919,00 8228,00 7903,00 7912,00 7857,00 7965,00 8091,00 8024,00 8772,00 8656,00 8953,00 9014,00 8103,00 8876,00 8231,00 8173,00 8087,00 8296,00 8007,00 8382,00 9168,00 9137,00 9321,00 9234,00 8451,00 9101,00 8279,00 8284,00 8225,00 8597,00 8305,00 8620,00 9102,00 9258,00 9652,00 9522,00 8874,00 9415,00 8525,00 8862,00 8421,00 8626,00 8750,00 8852,00 9412,00 9570,00 9513,00 9986,00 8907,00 9663,00 8799,00 8931,00 8732,00 8936,00 9127,00 9070,00 9773,00 9670,00 9929,00 10095,00 9025,00 9659,00 8954,00 9022,00 8855,00 9034,00 9196,00 9038,00 9650,00 9715,00 10052,00 10436,00 9314,00 9717,00 8997,00 9062,00 8885,00 9058,00 9095,00 9149,00 9857,00 9848,00 10269,00 10341,00 9690,00 10125,00 9349,00 9224,00 9 etc...
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.249369978113487
beta0.0512362761576963
gamma0.657312630987632


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1386928548.66232091143143.337679088572
1481198023.7000900971295.2999099028793
1582368169.481341624666.5186583754003
1674327397.8207346580934.1792653419134
1776697648.200480192620.7995198074041
1874537427.7149964385925.2850035614083
1975667598.44488785889-32.4448878588855
2077317755.71198879056-24.7119887905565
2176577639.8915740204117.1084259795907
2281308286.65203467525-156.652034675255
2384018227.36023747515173.63976252485
2487378500.49708831971236.502911680291
2590099097.23287630184-88.232876301845
2679198466.0280075195-547.028007519495
2782288436.35517880576-208.355178805758
2879037557.2685429604345.731457039593
2979127882.673097129629.3269028704008
3078577657.07585408722199.924145912775
3179657846.85190019147118.148099808531
3280918053.3112479479837.6887520520186
3380247971.7587042390252.2412957609777
3487728567.71744196488204.28255803512
3586568775.66001583302-119.660015833022
3689539021.29804052152-68.2980405215221
3790149395.4329276704-381.432927670394
3881038431.71485293299-328.714852932986
3988768631.76307605621244.236923943788
4082318113.69363333018117.306366669819
4181738230.70430729582-57.704307295824
4280878061.1694881666225.8305118333783
4382968168.18391119161127.816088808388
4480078339.84475650069-332.84475650069
4583828164.77055208496217.229447915038
4691688888.58196810876279.418031891239
4791378951.16601916727185.833980832735
4893219308.7225000796312.2774999203684
4992349556.16180007207-322.161800072066
5084518599.30506630544-148.305066305436
5191019155.87752096593-54.8775209659252
5282798476.48027346981-197.480273469810
5382848424.83301748166-140.833017481658
5482258268.26822296387-43.2682229638667
5585978405.81277949528191.187220504722
5683058357.46770846207-52.4677084620726
5786208527.1610826135392.8389173864725
5891029265.12395011131-163.123950111309
5992589161.3127090470596.687290952952
6096529403.46064217936248.539357820642
6195229537.57826164334-15.5782616433353
6288748721.12160883256152.878391167438
6394159419.8185948305-4.81859483049811
6485258658.58048560047-133.580485600472
6588628653.38448638428208.615513615725
6684218634.89050222635-213.890502226353
6786268860.340629945-234.340629945000
6887508578.15524642156171.844753578436
6988528886.37440435157-34.3744043515671
7094129485.42011074136-73.4201107413592
7195709535.6686796318234.3313203681846
7295139846.76492259804-333.764922598042
7399869697.67727031745288.322729682553
7489079018.45659956016-111.456599560161
7596639577.4192085312885.5807914687248
7687998754.2488934128944.7511065871131
7789318963.896244905-32.8962449050014
7887328665.9965981681366.0034018318693
7989368954.8953605796-18.8953605796105
8091278926.35282553768200.647174462321
8190709146.00299447824-76.0029944782418
8297739733.4652668806439.5347331193607
8396709870.94145799384-200.941457993844
8499299942.57289149-13.5728914899919
851009510190.7613141764-95.761314176405
8690259192.2698425214-167.269842521408
8796599848.39537533675-189.395375336746
8889548916.7797339732737.2202660267321
8990229083.2375842558-61.2375842557922
9088558817.872444757837.1275552421994
9190349054.47436459077-20.4743645907674
9291969128.1129712380667.8870287619357
9390389170.45919614657-132.459196146574
9496509795.18450790367-145.184507903668
9597159756.09127649013-41.0912764901295
96100529950.98278995913101.017210040869
971043610179.6998236911256.300176308887
9893149217.3900538639196.60994613609
9997179940.7449940658-223.744994065793
10089979097.570878582-100.570878582004
10190629180.17584585839-118.175845858388
10288858943.57199518728-58.5719951872779
10390589125.45346179411-67.4534617941099
10490959226.91280897517-131.912808975174
10591499112.8891681182436.1108318817569
10698579771.072030630685.9279693693952
10798489838.734598909869.26540109014059
1081026910117.2782594510151.721740549019
1091034110436.4725050627-95.4725050626876
11096909297.62395618912392.376043810884
111101259940.41776090334184.582239096660
11293499246.94836594103102.051634058973
11392249379.52310059401-155.523100594015
11492249163.1465887526360.8534112473735
11594549383.0404345587270.959565441277
11693479498.55958523773-151.559585237732
11794309470.8612575514-40.8612575514107
118993310165.8085450773-232.808545077309
1191014810120.169753590327.8302464097178
1201067710487.3872203150189.612779685043
1211073510703.301317953231.6986820468064
12297609811.31170663398-51.3117066339801
1231056710250.0906302738316.909369726232
12493339530.63742867883-197.637428678832
12594099458.3778133175-49.377813317491
12695029372.77647567843129.223524321573
12793489618.92803529406-270.928035294060
12893199534.5549359088-215.554935908796
12995949540.9522548854553.0477451145543
1301016010167.0173484601-7.01734846014915
1311018210307.2232652350-125.223265234954
1321081010718.008903327891.9910966721909
1331110510827.8014351240277.198564876016
13498749939.50382730206-65.5038273020637
1351095810563.0296290246394.970370975407
13693119590.0358574624-279.035857462410
13796109569.386997699340.6130023006936
13893989593.55671546348-195.556715463485
13997849555.61160341727228.388396582734
14094259624.00204125265-199.002041252646
14195579772.71324168863-215.713241688629
1421016610308.6708856380-142.670885637965
1431033710353.8566286324-16.8566286324203
1441077010903.6756264918-133.675626491780
1451126511043.8318408342221.168159165794
146101839960.36324991165222.636750088348
1471094110890.117923479450.8820765206365
14896289486.2460519468141.753948053205
14997099730.9513695131-21.9513695131027
15096379620.0530231193816.9469768806230
15195799849.27991346124-270.279913461243
15297419576.20786233132164.792137668685
15397549809.57950400727-55.579504007268
1541050810435.279700423372.720299576742
1551074910604.6353901295144.364609870532
1561107911158.4005351526-79.4005351526084
1571160811505.5818424813102.418157518663
1581066810365.7092055812302.290794418832
1591093311262.4383274395-329.438327439499
16097039778.82993137044-75.8299313704356
16197999890.20791095798-91.207910957979
16296569778.4844879191-122.484487919101
16396489828.15242422552-180.152424225518
16497129789.97724271547-77.9772427154749
16597669849.54577236036-83.545772360365
1661054010530.02353638029.9764636198106
1671056410712.8844517297-148.884451729693
1681091111070.9316303691-159.931630369090
1691121811472.6181496528-254.618149652755
1701023010342.1171907060-112.117190706040
1711041010788.3328955721-378.332895572081
17292279435.88250930809-208.882509308087
17393789481.01981363205-103.019813632045
17491059333.63238072211-228.632380722114
17591289303.32683566798-175.326835667978


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1769291.523923881039044.406646590659538.6412011714
1779342.447669865849080.188937881799604.70640184988
17810033.55356992229751.2784322242410315.8287076202
17910107.76157488769808.4331707251210407.0899790500
18010457.409673915710136.842993795810777.9763540356
18110813.358069475310469.751358651911156.9647802986
1829842.247412966369497.2763747170610187.2184512157
18310154.65711052649785.2511221685410524.0630988842
1849009.853561467588646.951179987859372.7559429473
1859148.114338467068763.313638243349532.91503869078
1868963.459597612788564.657803660929362.26139156465
1879012.447126844568672.885999507289352.00825418184
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264260844ckgkec0ulsc2yek/130t41264260749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264260844ckgkec0ulsc2yek/130t41264260749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/23/t1264260844ckgkec0ulsc2yek/2742n1264260749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264260844ckgkec0ulsc2yek/2742n1264260749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/23/t1264260844ckgkec0ulsc2yek/3gx8r1264260749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264260844ckgkec0ulsc2yek/3gx8r1264260749.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=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