Home » date » 2010 » Jun » 06 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 06 Jun 2010 11:51:41 +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/06/t1275825198pehuua0hci336q7.htm/, Retrieved Sun, 06 Jun 2010 13:53:19 +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/06/t1275825198pehuua0hci336q7.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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.124155812050704
beta0.0536097781034414
gamma0.356465314077196


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1320722006.6844025824765.3155974175252
1424342346.5132786772687.4867213227371
1529562836.92741456618119.072585433819
1628282733.0177509360594.9822490639458
1726872642.0105324220544.9894675779456
1826292617.1525680335511.8474319664538
1931502786.13241341801363.867586581986
2041193816.43640110982302.563598890181
2130302690.17525022614339.824749773859
2230553640.99875004146-585.998750041461
2338214483.67975777213-662.679757772129
2440014321.76779125718-320.76779125718
2525292286.85990746329242.140092536712
2624722702.55848685276-230.558486852761
2731343220.58021592353-86.580215923529
2827893066.4813098099-277.481309809904
2927582897.77276404329-139.772764043287
3029932830.57717652293162.422823477075
3132823145.0765775793136.923422420702
3234374189.4568929726-752.456892972604
3328042888.78923666848-84.7892366684832
3430763487.56067145411-411.560671454114
3537824319.73779541977-537.73779541977
3638894262.51394493951-373.513944939512
3722712371.24121826183-100.241218261831
3824522580.17404194888-128.174041948881
3930843132.66698735364-48.6669873536439
4025222913.08527278898-391.085272788984
4127692762.200479181356.79952081864849
4234382793.52873253637644.471267463632
4328393146.42547274745-307.425472747449
4437463814.28307101164-68.2830710116427
4526322812.27343210227-180.273432102267
4628513273.20390376262-422.203903762625
4738714025.83722224876-154.837222248764
4836184053.04567994648-435.045679946483
4923892275.37685166451113.623148335492
5023442492.20793929224-148.207939292241
5126783047.34185997103-369.341859971025
5224922681.60552468653-189.60552468653
5328582671.59250627004186.407493729958
5422462905.95801327411-659.958013274107
5528002785.5246452404214.4753547595806
5638693493.0534495958375.946550404201
5730072567.30721656218439.692783437817
5830233003.9005854410919.099414558912
5939073865.108124093541.8918759065036
6042093823.99797686431385.002023135691
6123532316.278371657936.7216283420994
6225702441.24990062065128.750099379351
6329032968.28129281068-65.281292810675
6429102692.85915208029217.140847919707
6537822863.13365363441918.866346365593
6627592924.79122102555-165.791221025547
6729313110.89015621442-179.890156214422
6836414011.18604398834-370.186043988338
6927942939.23060426681-145.230604266809
7030703192.69618549742-122.696185497422
7135764097.51371871536-521.513718715363
7241064097.28662560228.71337439780109
7324522389.9030743126762.0969256873268
7422062551.00115020026-345.001150200264
7524882957.24765734082-469.247657340819
7624162716.1453476335-300.1453476335
7725343006.6231439636-472.623143963604
7825212577.90875343057-56.9087534305713
7930932735.82123433235357.17876566765
8039033552.85181776422350.14818223578
8129072693.33987981612213.660120183878
8230252974.7843463684450.215653631556
8338123724.9226037971187.0773962028907
8442093952.10928369196256.890716308043
8521382338.05063021236-200.050630212359
8624192332.4870384469286.5129615530768
8726222739.15511764967-117.155117649666
8829122595.00556722172316.994432778283
8927082915.50992618349-207.509926183486
9027982648.01182325873149.988176741274
9132542980.73482507422273.26517492578
9228953826.48267808477-931.482678084767
9332632764.04124349259498.958756507412
9437363035.59455896144700.405441038556
9540773918.67572839792158.32427160208
9640974229.81376411947-132.813764119465
9721752362.58427851089-187.584278510886
9831382456.68665562647681.31334437353
9928232907.03370140944-84.0337014094366
10024982911.35163174407-413.351631744071
10128222987.31679939038-165.316799390376
10227382834.91846173159-96.9184617315932
10341373192.55079473644944.449205263558
10435153774.56389739263-259.563897392635
10537853202.96659666942582.033403330578
10636323580.6436868980751.3563131019318
10745044268.98814790624235.011852093761
10844514524.27661165067-73.2766116506718
10925502498.7877791349251.2122208650844
11028672932.91430405926-65.9143040592608
11134583062.53179323574395.468206764261
11229613019.71213819939-58.7121381993943
11331633246.88031500576-83.8803150057574
11428803122.87638257488-242.876382574884
11533313860.99203964259-529.992039642589
11630623887.90037925996-825.900379259963
11735343491.8792939578842.1207060421179
11836223631.18281892709-9.18281892708637
11944644365.2584286550998.741571344909
12054114497.29671399659913.70328600341
12125642578.74666514878-14.7466651487766
12228202973.61356528424-153.613565284244
12335083235.34530925175272.654690748249
12430883028.5239945348159.4760054651888
12532993261.619310428737.380689571296
12629393096.40155017272-157.401550172723
12733203763.0008003276-443.000800327601
12834183698.63033380649-280.63033380649
12936043641.11081164881-37.1108116488108
13034953758.97660881577-263.976608815771
13141634514.24377669472-351.243776694721
13248824837.9637185938644.0362814061373
13322112540.77422478325-329.774224783253
13432602834.20922019999425.790779800008
13529923291.53208341414-299.532083414142
13624252947.75341414884-522.753414148842
13727073076.47183036255-369.471830362551
13832442802.82297760127441.177022398728
13939653406.54928212812558.450717871879
14033153508.84602973994-193.84602973994
14133333530.68986793644-197.689867936445
14235833548.2205293696134.7794706303889
14340214286.81707791326-265.817077913255
14449044725.84302036935178.156979630648
14522522378.47203106419-126.472031064187
14629522920.4679202587131.5320797412887
14735733090.73098727129482.269012728707
14830482771.92875568447276.071244315528
14930593059.25805954162-0.258059541619787
15027313091.30730850174-360.307308501737
15135633641.73775166279-78.7377516627898
15230923429.39323341164-337.393233411637
15334783429.0466596514348.9533403485739
15434783548.78189383512-70.7818938351211
15543084173.95287106012134.047128939877
15650294805.03432873576223.965671264239
15720752353.67458243103-278.674582431029
15832642924.5783086329339.421691367099
15933083276.1280067107131.871993289285
16036882837.66307234422850.336927655776
16131363115.6419104918120.3580895081859
16228243037.35125485931-213.351254859309
16336443716.26649725859-72.266497258589
16446943418.999136780261275.00086321974
16529143769.78903114743-855.789031147428
16636863754.3729589265-68.3729589265013
16743584500.77949409156-142.779494091558
16855875174.72277018426412.277229815739
16922652420.543607665-155.543607665001
17036853267.76220937619417.237790623808
17137543560.15730416595193.842695834053
17237083380.71195611707327.288043882932
17332103334.76665479184-124.76665479184
17435173159.97382358561357.026176414389
17539054030.43434869364-125.434348693638
17636704150.38515686925-480.385156869245
17742213594.50268454086626.497315459143
17844044044.38453469562359.615465304384
17950864905.08847376223180.911526237766
18057255904.43843243454-179.438432434537
18123672611.3595157129-244.359515712898
18238193733.6999859386485.3000140613608
18340673935.14530520931131.854694790689
18440223779.80711914581242.192880854191
18539373567.46347861794369.536521382058
18643653608.92975057157756.070249428426
18742904467.98885562927-177.988855629271


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1884481.80877013234178.075532958874785.54200730573
1894319.094580138444003.094340315884635.09481996101
1904649.48971679094315.801315734564983.17811784725
1915498.511331141155134.150698604575862.87196367773
1926459.687548185316054.435734536626864.939361834
1932813.618063066282484.092176195283143.14394993728
1944232.154535540273843.993282959384620.31578812116
1954470.401532308874055.909186739774884.89387787797
1964322.758684224563898.382696658624747.1346717905
1974100.384156137383670.688681234544530.07963104021
1984223.866566292153769.785576064424677.94755651987
1994728.114080534214323.905603683865132.32255738456
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275825198pehuua0hci336q7/1ugwh1275825097.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275825198pehuua0hci336q7/1ugwh1275825097.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275825198pehuua0hci336q7/2ugwh1275825097.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275825198pehuua0hci336q7/2ugwh1275825097.ps (open in new window)


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