Home » date » 2010 » May » 31 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 31 May 2010 21:25:26 +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/May/31/t1275341215y6d8om1cdw2vle4.htm/, Retrieved Mon, 31 May 2010 23:27:00 +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/May/31/t1275341215y6d8om1cdw2vle4.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 «
464 675 703 887 1139 1077 1318 1260 1120 963 996 960 530 883 894 1045 1199 1287 1565 1577 1076 918 1008 1063 544 635 804 980 1018 1064 1404 1286 1104 999 996 1015 615 722 832 977 1270 1437 1520 1708 1151 934 1159 1209 699 830 996 1124 1458 1270 1753 2258 1208 1241 1265 1828 809 997 1164 1205 1538 1513 1378 2083 1357 1536 1526 1376 779 1005 1193 1522 1539 1546 2116 2326 1596 1356 1553 1613 814 1150 1225 1691 1759 1754 2100 2062 2012 1897 1964 2186 966 1549 1538 1612 2078 2137 2907 2249 1883 1739 1828 1868 1138 1430 1809 1763 2200 2067 2503 2141 2103 1972 2181 2344 970 1199 1718 1683 2025 2051 2439 2353 2230 1852 2147 2286 1007 1665 1642 1518 1831 2207 2822 2393 2306 1785 2047 2171 1212 1335 2011 1860 1954 2152 2835 2224 2182 1992 2389 2724 891 1247 2017 2257 2255 2255 3057 3330 1896 2096 2374 2535 1041 1728 2201 2455 2204 2660 3670 2665 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.114137022903750
beta0
gamma0.419871625251202


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13530452.67601495726577.3239850427346
14883802.65262249767580.3473775023251
15894823.09931105249270.9006889475078
161045997.55111603269747.4488839673032
1711991169.9928684774129.0071315225916
1812871268.1630675342918.8369324657142
1915651429.50580368181135.494196318194
2015771387.20511929221189.794880707788
2110761263.89382002715-187.893820027150
229181082.55759020915-164.557590209149
2310081099.34322152171-91.343221521706
2410631053.318656243369.6813437566409
25544645.793625295511-101.793625295511
26635976.450829021697-341.450829021697
27804945.241042226482-141.241042226482
289801086.75675254648-106.756752546479
2910181234.73854636167-216.738546361674
3010641301.07727275124-237.077272751242
3114041476.60124429179-72.6012442917925
3212861430.74623631629-144.746236316289
3311041128.77057811830-24.7705781182970
34999974.73263049397824.2673695060219
359961040.30217185881-44.3021718588093
3610151037.22269048956-22.2226904895558
37615584.59325511776430.4067448822359
38722841.199223454416-119.199223454416
39832909.824348774502-77.824348774502
409771071.40463936801-94.404639368012
4112701179.8886783014990.111321698513
4214371273.68537170127163.314628298733
4315201556.08553238509-36.0855323850876
4417081487.56408104484220.435918955162
4511511271.89402031800-120.894020318003
469341125.12443140956-191.124431409564
4711591140.6054401737118.3945598262899
4812091152.8944121137356.1055878862699
49699728.780584783842-29.7805847838417
50830922.871200880342-92.871200880342
519961009.89066032198-13.8906603219818
5211241172.60113378353-48.6011337835325
5314581354.9435254869103.056474513101
5412701477.44561686116-207.445616861164
5517531643.36167083334109.638329166662
5622581686.88553473281571.114465267189
5712081384.28364255664-176.283642556638
5812411205.0699349976835.9300650023215
5912651324.39659028932-59.3965902893208
6018281341.83328086323486.166719136771
61809934.860098048327-125.860098048327
629971094.51801013653-97.5180101365274
6311641210.38380819662-46.3838081966187
6412051356.47509404465-151.475094044655
6515381583.48461267835-45.4846126783498
6615131573.54180867131-60.5418086713128
6713781874.16399633978-496.163996339783
6820832020.1888481365562.8111518634519
6913571381.57695356408-24.5769535640814
7015361298.61121442000237.388785580003
7115261405.47514014156120.524859858439
7213761646.36910834542-270.369108345416
73779925.404582342507-146.404582342507
7410051093.25941170233-88.2594117023268
7511931229.20125998990-36.2012599899022
7615221337.36618148673184.633818513273
7715391642.16119548949-103.161195489493
7815461620.03485313316-74.0348531331554
7921161757.08786630969358.912133690309
8023262208.61865727024117.381342729755
8115961543.7313471714052.2686528285965
8213561566.97436020357-210.974360203574
8315531579.19606277105-26.1960627710478
8416131657.95122743416-44.9512274341603
858141008.82367502461-194.823675024606
8611501192.77911554965-42.77911554965
8712251353.27491274939-128.274912749387
8816911533.07014816688157.929851833121
8917591727.7722615463131.2277384536931
9017541731.8181780105322.1818219894669
9121002040.8871570551259.1128429448781
9220622368.36267904443-306.362679044426
9320121630.89190564532381.108094354682
9418971593.75476970934303.245230290662
9519641733.39601813616230.603981863839
9621861834.48561573664351.514384263362
979661174.86460169494-208.864601694942
9815491413.77023313843135.229766861571
9915381562.78338121407-24.7833812140684
10016121860.84433005452-248.844330054518
10120781961.99175941998116.008240580019
10221371972.34965287524164.650347124759
10329072311.41601150227595.583988497729
10422492564.18459742042-315.184597420418
10518832081.41079618555-198.410796185548
10617391949.16810612419-210.168106124190
10718282003.19106486497-175.191064864973
10818682102.93689429035-234.936894290347
10911381167.94782624310-29.9478262431021
11014301555.25994846124-125.259948461239
11118091615.02488905196193.975110948045
11217631854.71509601973-91.7150960197341
11322002109.5032379034290.4967620965781
11420672135.04169680851-68.041696808506
11525032607.83449802424-104.834498024243
11621412441.90018612108-300.900186121075
11721032004.1906318922698.8093681077444
11819721901.4986500545870.5013499454151
11921812000.56605093475180.433949065248
12023442118.67947546554225.320524534457
1219701312.46824207477-342.468242074775
12211991628.65899181663-429.658991816633
12317181772.41980608619-54.4198060861927
12416831877.49684765174-194.496847651745
12520252188.32725523786-163.327255237864
12620512125.92681834309-74.9268183430931
12724392584.24873667488-145.248736674878
12823532340.7752806082712.2247193917328
12922302087.47633113388142.523668866122
13018521979.24463809701-127.244638097015
13121472096.6311910129850.368808987022
13222862216.5948723191869.4051276808173
13310071181.3996102259-174.399610225901
13416651484.34272479559180.657275204408
13516421837.33295861957-195.332958619569
13615181874.22511504262-356.225115042616
13718312178.18982991821-347.189829918213
13822072127.6842961786579.3157038213512
13928222577.45484872541244.545151274589
14023932437.04335824424-44.0433582442365
14123062225.7866664133080.2133335866952
14217852010.10307859716-225.103078597165
14320472182.38345615696-135.383456156964
14421712288.22646144489-117.226461444886
14512121141.0467632580570.9532367419451
14613351604.05667822492-269.056678224918
14720111765.86881105628245.131188943724
14818601793.1906010604366.8093989395675
14919542148.79987875612-194.799878756117
15021522274.32587109784-122.325871097839
15128352762.5385373887072.4614626112966
15222242495.14579797863-271.145797978633
15321822304.18542824719-122.185428247193
15419921951.8385971839440.161402816062
15523892187.76657237253201.233427627467
15627242338.78349772118385.216502278822
1578911318.94434295805-427.944342958047
15812471598.54531808404-351.545318084043
15920171942.1939662557474.8060337442596
16022571883.7487871632373.251212836802
16122552177.0291831332777.9708168667294
16222552360.64502556622-105.645025566216
16330572923.21249489815133.787505101849
16433302535.01504391593794.984956084075
16518962521.1452845149-625.1452845149
16620962171.77681011675-75.7768101167508
16723742454.38247757626-80.3824775762628
16825352641.68887248227-106.688872482273
16910411263.25096069443-222.250960694430
17017281594.74568622099133.254313779010
17122012152.308764047848.6912359521993
17224552201.88922440581253.110775594188
17322042371.62798087100-167.627980871004
17426602458.91622867826201.083771321742
17536703145.54943493606524.450565063941
17626653047.87265338855-382.872653388547
17726392371.35009653323267.64990346677
17822262328.21951217863-102.219512178628
17925862606.09401619437-20.0940161943713
18026842790.49692647589-106.496926475895
18111851369.09775112480-184.097751124797
18217491837.17690502338-88.1769050233779
18324592338.01335352949120.986646470514
18426182471.87898455025146.121015449751
18525852472.91300304771112.086996952294
18633102729.26895289113580.731047108874
18739233579.50983655229343.490163447706


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1883123.701056564042707.139394865973540.26271826211
1892732.839482038492313.573271518283152.1056925587
1902521.587675867292099.634251220332943.54110051425
1912841.675684448832417.052051264553266.29931763311
1922996.234613347152568.957458392733423.51176830156
1931558.12715211691128.212853176681988.04145105712
1942082.896311942801650.36094723772515.43167664791
1952671.59512678742236.454483997163106.73576957763
1962801.000398738392363.269983647993238.73081382880
1972772.697689661812332.392734451753213.00264487188
1983190.57192168082747.707392880113633.43645048149
1993886.288447623273440.879053742574331.69784150398
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/31/t1275341215y6d8om1cdw2vle4/1njwi1275341123.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275341215y6d8om1cdw2vle4/1njwi1275341123.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275341215y6d8om1cdw2vle4/2gbv31275341123.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275341215y6d8om1cdw2vle4/2gbv31275341123.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275341215y6d8om1cdw2vle4/3gbv31275341123.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275341215y6d8om1cdw2vle4/3gbv31275341123.ps (open in new window)


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