Home » date » 2010 » Jun » 02 »

Exponential Smoothing

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 02 Jun 2010 09:10:04 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469839i0slf4lhsipwwow.htm/, Retrieved Wed, 02 Jun 2010 11:10:43 +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/2010/Jun/02/t1275469839i0slf4lhsipwwow.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 «
112 118 129 99 116 168 118 129 205 147 150 267 126 129 124 97 102 127 222 214 118 141 154 226 89 77 82 97 127 121 117 117 106 112 134 169 75 108 115 85 101 108 109 124 105 95 135 164 88 85 112 87 91 87 87 142 95 108 139 159 61 82 124 93 108 75 87 103 90 108 123 129 57 65 67 71 76 67 110 118 99 85 107 141 58 65 70 86 93 74 87 73 101 100 96 157 63 115 70 66 67 83 79 77 102 116 100 135 71 60 89 74 73 91 86 74 87 87 109 137 43 69 73 77 69 76 78 70 83 65 110 132 54 55 66 65 60 65 96 55 71 63 74 106 34 47 56 53 53 55 67 52 46 51 58 91 33 40 46 45 41 55 57 54 46 52 48 77 30 35 42 48 44 45 46
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.108312065002691
beta0.0447363123542684
gamma0.508451758294713


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13126130.144329985792-4.14432998579227
14129126.5004952538102.49950474619028
15124122.3540813299851.64591867001492
169798.6532008959596-1.65320089595963
17102103.969303655171-1.96930365517079
18127130.957447008567-3.95744700856656
19222124.12039617394997.8796038260514
20214147.19663048307666.8033695169239
21118247.025283584059-129.025283584059
22141168.447717966043-27.4477179660433
23154170.508706787079-16.5087067870791
24226306.535574045117-80.5355740451167
2589136.537427208121-47.5374272081215
2677131.007607161597-54.0076071615966
2782120.031537133320-38.0315371333203
289791.5778575479665.42214245203392
2912796.746556356789530.2534436432105
30121125.192476020700-4.19247602069954
31117159.372314553024-42.3723145530239
32117150.984352890117-33.9843528901169
33106145.979206824267-39.9792068242669
34112125.173964372512-13.1739643725124
35134130.4902328586893.50976714131144
36169216.313367529353-47.313367529353
377591.408556262659-16.4085562626590
3810885.257238080610622.7427619193894
3911588.570857572934426.4291424270656
408586.9470388632552-1.94703886325516
41101100.5942903012280.405709698771844
42108108.651244557116-0.651244557116428
43109122.915443023605-13.9154430236054
44124120.6864665283173.31353347168286
45105116.608811846146-11.6088118461458
4695111.142687541814-16.1426875418138
47135122.53001331223212.4699866877679
48164181.603317031655-17.6033170316554
498879.3728360414038.62716395859707
508593.2271108848331-8.2271108848331
5111294.311688731848717.6883112681513
528779.99557986020767.00442013979236
539194.7471269494024-3.7471269494024
5487101.318032018014-14.3180320180141
5587107.204925963829-20.2049259638287
56142111.26750676987330.7324932301269
5795104.005922320230-9.0059223202303
5810897.006735981853310.9932640181467
59139123.36189589444015.6381041055598
60159167.705575370262-8.7055753702617
616180.9401698420455-19.9401698420455
628283.6285428740918-1.62854287409179
6312496.200005604519627.7999943954804
649379.143761930694213.8562380693058
6510889.460852396579518.5391476034205
667593.7103883869437-18.7103883869437
678796.3479479513994-9.34794795139945
68103124.399034851706-21.3990348517055
699094.8592569025689-4.85925690256887
7010897.181570905567410.8184290944326
71123124.260709860798-1.26070986079783
72129153.690896006709-24.6908960067094
735766.3727638663265-9.37276386632645
746577.6218205080587-12.6218205080587
756799.7972165841832-32.7972165841832
767173.0566072532419-2.05660725324189
777681.3348544944935-5.33485449449346
786768.2282282047864-1.22822820478639
7911074.827201753835435.1727982461646
8011898.470934093853419.5290659061466
819982.769504404915116.2304955950849
828593.5620660782976-8.56206607829762
83107110.784022872340-3.78402287234039
84141126.89569338869214.1043066113076
855856.98154502103381.01845497896620
866567.117718661446-2.11771866144595
877080.1277986229931-10.1277986229931
888670.226305516674815.7736944833252
899379.256064635897313.7439353641027
907470.13003212672063.86996787327944
918794.5733573880377-7.57335738803773
9273106.505458314919-33.505458314919
9310184.582379912042416.4176200879576
9410084.253643489291715.7463565107083
9596105.793131473077-9.79313147307718
96157128.56212300790328.4378769920971
976356.19227082311736.80772917688268
9811565.593691676800149.4063083231999
997081.723808433297-11.7238084332969
1006683.9727498076714-17.9727498076714
1016788.9025328194664-21.9025328194664
1028371.637298699360411.3627013006396
1037992.0380082626993-13.0380082626993
1047791.2764619592525-14.2764619592525
10510294.30071818881197.6992818111881
10611692.770558145262523.2294418547375
107100103.971587758270-3.97158775826976
108135146.170874039924-11.1708740399241
1097159.502198154841411.4978018451586
1106087.5171761947385-27.5171761947385
1118968.885185748760120.1148142512399
1127471.43893463895152.56106536104855
1137376.3970394594134-3.39703945941342
1149176.209599298422614.7904007015774
1158685.90848130978350.091518690216489
1167486.0628792474626-12.0628792474626
1178799.7270875519514-12.7270875519514
11887102.838239976045-15.8382399760448
11910997.525966059025211.4740339409748
120137136.9058858282390.0941141717607934
1214363.2396644545201-20.2396644545201
1226968.86870874015730.131291259842712
1237374.2291547650164-1.22915476501640
1247766.917044774880210.0829552251198
1256969.7169310064325-0.716931006432461
1267677.2536129219603-1.25361292196033
1277878.2061454112974-0.206145411297371
1287073.0196354980326-3.01963549803261
1298385.8653897252149-2.86538972521487
1306588.12084853166-23.1208485316599
13111093.326330079133616.6736699208664
132132125.0298084907606.97019150924022
1335449.25465710253694.74534289746305
1345566.1521491231288-11.1521491231288
1356669.3534333911984-3.35343339119842
1366566.9423302065172-1.9423302065172
1376063.6858791137508-3.68587911375084
1386569.8710429102855-4.87104291028547
1399670.590563528403825.4094364715962
1405567.2565228295534-12.2565228295534
1417178.0677197600627-7.06771976006274
1426370.83685969607-7.83685969606996
1437493.7691243556734-19.7691243556734
144106114.023879247739-8.0238792477388
1453444.9249058521102-10.9249058521102
1464751.1003199004015-4.10031990040145
1475657.0629918616688-1.06299186166878
1485355.4626702062255-2.46267020622553
1495351.68683527156471.31316472843534
1505556.61167105174-1.61167105174005
1516768.3218912568018-1.32189125680181
1525249.1290032004852.87099679951496
1534660.922317768643-14.9223177686430
1545153.4414431683052-2.44144316830518
1555867.2538939852502-9.25389398525019
1569187.86022725531833.13977274468171
1573331.88669366734931.11330633265069
1584040.4317564609978-0.431756460997846
1594646.6239868350619-0.623986835061935
1604544.60693828322510.39306171677493
1614142.983478674085-1.98347867408499
1625545.36972820456829.63027179543177
1635756.23481810876360.765181891236367
1645441.884567445506812.1154325544932
1654645.8629802598510.137019740148986
1665245.67861806560556.32138193439446
1674856.1374797060579-8.13747970605792
1687779.5606153668407-2.56061536684074
1693028.66414187703121.33585812296876
1703535.6703079828056-0.670307982805568
1714241.06492257148640.935077428513608
1724839.86989970163638.13010029836374
1734438.32739211884245.67260788115765
1744546.3172147008443-1.31721470084428
1754651.5423765375909-5.54237653759093


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
17642.487589385171718.390676898651566.5845018716918
17740.04515186365615.505769557665264.5845341696468
17842.245424494083117.057818492445667.4330304957205
17944.881764976237018.885810054059870.8777198984143
18068.178316383782638.489052634470397.867580133095
18125.52582057454460.40573790041882150.6459032486705
18230.66182911909034.2714997716849857.0521584664957
18336.01284946426207.8729340012293964.1527649272945
18437.6081268388538.228003722234666.9882499554713
18534.49949597540935.0868669771578563.9121249736607
18637.86738963814986.4030050065344769.3317742697651
18740.5791551960481-0.29287096264088381.451181354737
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469839i0slf4lhsipwwow/1wm9t1275469801.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469839i0slf4lhsipwwow/1wm9t1275469801.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469839i0slf4lhsipwwow/27wre1275469801.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469839i0slf4lhsipwwow/27wre1275469801.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469839i0slf4lhsipwwow/3l6on1275469801.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469839i0slf4lhsipwwow/3l6on1275469801.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