Home » date » 2010 » Jun » 03 »

Exponential smoothing - Verkoop witte wijn - Innes De Jonghe

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 03 Jun 2010 12:36:19 +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/03/t12755686999wwjcya5cs75h4f.htm/, Retrieved Thu, 03 Jun 2010 14:38:24 +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/03/t12755686999wwjcya5cs75h4f.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 «
1954 2302 3054 2414 2226 2725 2589 3470 2400 3180 4009 3924 2072 2434 2956 2828 2687 2629 3150 4119 3030 3055 3821 4001 2529 2472 3134 2789 2758 2993 3282 3437 2804 3076 3782 3889 2271 2452 3084 2522 2769 3438 2839 3746 2632 2851 3871 3618 2389 2344 2678 2492 2858 2246 2800 3869 3007 3023 3907 4209 2353 2570 2903 2910 3782 2759 2931 3641 2794 3070 3576 4106 2452 2206 2488 2416 2534 2521 3093 3903 2907 3025 3812 4209 2138 2419 2622 2912 2708 2798 3254 2895 3263 3736 4077 4097 2175 3138 2823 2498 2822 2738 4137 3515 3785 3632 4504 4451 2550 2867 3458 2961 3163 2880 3331 3062 3534 3622 4464 5411 2564 2820 3508 3088 3299 2939 3320 3418 3604 3495 4163 4882 2211 3260 2992 2425 2707 3244 3965 3315 3333 3583 4021 4904 2252 2952 3573 3048 3059 2731 3563 3092 3478 3478 4308 5029 2075 3264 3308 3688 3136 2824 3644 4694 2914 3686 4358 5587 2265 3685 3754 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.125193707172277
beta0.0321269389080147
gamma0.396056119292007


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1320722006.6844025824865.3155974175247
1424342346.3928783654987.607121634514
1529562836.39858085195119.601419148053
1628282731.9136265194496.0863734805648
1726872640.2023347590046.797665241003
1826292614.5784151565614.4215848434351
1931502782.61972645414367.380273545858
2041193810.03975875582308.960241244179
2130302684.05701703421345.942982965794
2230553630.00274378242-575.002743782422
2338214467.44341770354-646.443417703535
2440014305.61930252181-304.61930252181
2525292281.31173021894247.688269781060
2624722696.56519508368-224.565195083681
2731343214.07376951865-80.073769518654
2827893060.17379420265-271.173794202645
2927582891.23054258321-133.230542583205
3029932824.7088875317168.291112468299
3132823153.18331542525128.816684574754
3234374192.97405227788-755.974052277884
3328042896.73829938057-92.7382993805713
3430763463.36294829674-387.362948296744
3537824299.54189011614-517.54189011614
3638894261.80826900495-372.808269004947
3722712390.40331232745-119.403312327445
3824522585.69124967042-133.691249670419
3930843150.80546676277-66.8054667627653
4025222925.53219914797-403.532199147966
4127692781.15196243472-12.1519624347188
4234382825.12146833713612.878531662873
4328393188.20831564264-349.208315642635
4437463830.04672401753-84.0467240175308
4526322845.84390966825-213.843909668252
4628513280.28633671994-429.286336719936
4738714040.14534565316-169.145345653155
4836184085.64321439013-467.643214390134
4923892309.9330464718179.0669535281886
5023442518.89393328109-174.893933281093
5126783089.89421314685-411.894213146855
5224922704.73420274229-212.734202742291
5328582713.21286269809144.787137301912
5422462978.05763015226-732.057630152264
5528002831.22238017626-31.2223801762616
5638693542.86747186579326.132528134206
5730072612.72235820797394.277641792029
5830233028.77128534522-5.7712853452158
5939073911.20909719863-4.20909719862857
6042093867.06883554976341.931164450237
6123532363.01615714814-10.0161571481431
6225702471.3043248828398.6956751171679
6329033001.04715244328-98.0471524432819
6429102715.17584035319194.824159646811
6537822908.34781678921873.652183210786
6627592951.50445293781-192.504452937806
6729313142.95957301546-211.959573015459
6836414051.84652003429-410.846520034286
6927942976.25565874145-182.255658741448
7030703195.6641803373-125.664180337298
7135764109.96752865424-533.967528654239
7241064120.10908941213-14.1090894121326
7324522411.0934346382540.9065653617513
7422062565.83325039367-359.833250393674
7524882967.17985017809-479.179850178092
7624162732.91512682599-316.915126825987
7725343063.25844701153-529.258447011527
7825212592.80590968855-71.8059096885477
7930932761.03069836954331.969301630463
8039033587.54827993655315.451720063454
8129072731.51055778802175.489442211976
8230252996.8188250263728.1811749736344
8338123745.1247570911166.8752429088913
8442093998.77225601464210.227743985358
8521382370.78136571911-232.781365719107
8624192346.4911156105572.5088843894537
8726222748.24707257249-126.247072572492
8829122612.28682428414299.713175715859
8927082951.40556406562-243.405564065621
9027982668.29987289974129.700127100261
9132543019.19011307488234.809886925117
9228953865.68067176837-970.680671768369
9332632796.88139101464466.11860898536
9437363050.67837743679685.32162256321
9540773930.09579268135146.904207318653
9640974260.61214200891-163.612142008913
9721752370.09476451141-195.094764511410
9831382462.10353020859675.896469791409
9928232897.51364926012-74.5136492601241
10024982921.0046531891-423.004653189102
10128222987.33156401831-165.331564018306
10227382839.60962813127-101.609628131268
10341373211.91206070021925.087939299788
10435153745.42172085299-230.421720852994
10537853229.25825010295555.741749897047
10636323595.6000644755436.3999355244632
10745044252.58830194226251.411698057742
10844514508.37179926193-57.371799261935
10925502479.8838968395070.1161031604966
11028672942.10319674560-75.1031967456047
11134583030.20757497546427.792425024544
11229612989.72167044481-28.721670444806
11331633220.0325901477-57.0325901477031
11428803102.55515167413-222.555151674134
11533313884.91532425601-553.915324256011
11630623833.51846524582-771.518465245816
11735343510.4568725639523.5431274360490
11836223627.27895277377-5.27895277376638
11944644351.11716344243112.882836557567
12054114477.1798134772933.820186522797
12125642566.22711446184-2.22711446184394
12228202976.15993397383-156.159933973829
12335083228.6427094204279.357290579596
12430883006.7294578592381.2705421407677
12532993242.1041844751356.8958155248692
12629393076.46546889192-137.465468891921
12733203764.05441973576-444.054419735764
12834183641.60513083321-223.605130833205
12936043665.57747841546-61.5774784154555
13034953766.41245680783-271.412456807835
13141634520.02156947913-357.021569479127
13248824867.2744251769814.7255748230182
13322112536.96871678841-325.968716788407
13432602838.13414611879421.865853881208
13529923307.93248574866-315.932485748664
13624252946.79597039393-521.795970393925
13727073078.9868118905-371.986811890501
13832442801.0461047987442.953895201298
13939653414.55101211349550.448987886507
14033153488.27560299426-173.275602994259
14133333568.63999532627-235.639995326266
14235833568.6246357687914.3753642312063
14340214308.7316226438-287.731622643799
14449044779.49838278938124.501617210616
14522522380.83043525035-128.830435250346
14629522956.79252418115-4.79252418114993
14735733108.42207819868464.577921801324
14830482768.10331782691279.896682173094
14930593062.74851001720-3.74851001720481
15027313117.22529966795-386.225299667947
15135633672.98295548228-109.982955482281
15230923412.31752853798-320.317528537983
15334783448.9626831543029.0373168456954
15434783567.29143929519-89.2914392951898
15543084183.54837152876124.451628471235
15650294852.26900531843176.730994681573
15720752353.25703410054-278.257034100538
15832642952.15085465155311.849145348455
15933083307.369685730340.630314269658811
16036882845.26743863561842.73256136439
16131363115.7993938880620.2006061119350
16228243038.10125461901-214.101254619015
16336443731.10337236326-87.1033723632554
16446943392.186426996101301.81357300390
16529143779.56839876408-865.568398764083
16636863754.58016790621-68.5801679062129
16743584497.78163549096-139.781635490962
16855875195.1997465914391.800253408599
16922652399.6679296203-134.667929620299
17036853285.41328892342399.586711076584
17137543565.51555948623188.484440513767
17237083399.09318361850308.906816381505
17332103314.01229927252-104.012299272516
17435173132.59718815175384.40281184825
17539054014.20649785714-109.206497857137


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1764150.792357352693825.371899711894476.21281499348
1773596.69044430163262.278260218483931.10262838472
1783984.292959237123633.163603647154335.4223148271
1794767.632692054724388.793099474955146.47228463448
1805740.432687253715322.214883952016158.65049055542
1812512.611254425702164.261154690422860.96135416099
1823684.409279696763287.087959516624081.73059987691
1833852.980200942083435.381011692494270.57939019167
1843697.094233115853273.38963303044120.79883320131
1853419.12031846232996.208036439223842.03260048538
1863418.728568267152982.36543349573855.0917030386
1874101.19798523773727.298191225414475.09777925
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/03/t12755686999wwjcya5cs75h4f/1wi9l1275568577.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t12755686999wwjcya5cs75h4f/1wi9l1275568577.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t12755686999wwjcya5cs75h4f/269q61275568577.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t12755686999wwjcya5cs75h4f/269q61275568577.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t12755686999wwjcya5cs75h4f/369q61275568577.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t12755686999wwjcya5cs75h4f/369q61275568577.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