Home » date » 2010 » Jun » 03 »

*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 14:36:56 +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/t1275575882gqg4g0rk59wlscx.htm/, Retrieved Thu, 03 Jun 2010 16:38:03 +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/t1275575882gqg4g0rk59wlscx.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 «
1772,2 1769,5 1768 1794,8 1823,4 1856,9 1866,9 1869,8 1843,8 1837,1 1857,7 1840,3 1914,6 1972,9 2050,1 2086,2 2112,5 2147,6 2190,4 2194,1 2216,2 2218,6 2233,5 2307,2 2350,4 2368,2 2353,8 2316,5 2305,5 2308,4 2334,4 2381,2 2449,7 2490,3 2523,5 2537,6 2526,1 2545,9 2542,7 2584,3 2600,2 2593,9 2618,9 2591,3 2521,2 2536,6 2596,1 2656,6 2710,3 2778,8 2775,5 2785,2 2847,7 2834,4 2839 2802,6 2819,3 2872 2918,4 2977,8 3031,2 3064,7 3093 3100,6 3141,1 3180,4 3240,3 3265 3338,2 3376,6 3422,5 3432 3516,3 3564 3636,3 3724 3815,4 3828,1 3853,3 3884,5 3918,7 3919,6 3950,8 3981 4063 4132 4160,3 4178,3 4244,1 4256,5 4283,4 4263,3 4256,6 4264,3 4302,3 4256,6 4374 4398,8 4433,9 4446,3 4525,8 4633,1 4677,5 4754,5 4876,2 4932,6 4906,3 4953,1 4909,6 4922,2 4873,5 4854,3 4795,3 4831,9 4913,3 4977,5 5090,7 5128,9 5154,1 5191,5 5251,8 5356,1 5451,9 5450,8 5469,4 5684,6 5740,3 5816,2 5825,9 5831,4 5873,3 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
alpha1
beta0.349598912015212
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
317681766.81.20000000000005
41794.81765.7195186944229.0804813055818
51823.41802.6860233197320.7139766802718
61856.91838.5276070306618.3723929693401
71866.91878.45057562386-11.550575623857
81869.81884.41250695261-14.6125069526074
91843.81882.20399042016-38.4039904201609
101837.11842.77799715223-5.67799715223009
111857.71834.0929755253823.6070244746152
121840.31862.94596559763-22.6459655976271
131914.61837.6289606631676.9710393368373
141972.91938.83795227234.0620477279992
152050.12009.0460070987241.05399290128
162086.22100.59843835089-14.3984383508878
172112.52131.6647599687-19.1647599686989
182147.62151.26478073461-3.66478073460939
192190.42185.083577377025.31642262298465
202194.12229.74219294182-35.6421929418243
212216.22220.98172106753-4.78172106752618
222218.62241.41003658476-22.8100365847586
232233.52235.8356726117-2.33567261169992
242307.22249.9191240078357.2808759921741
252350.42343.644455933976.75554406603214
262368.22389.20618678952-21.0061867895242
272353.82399.66244674232-45.8624467423174
282316.52369.22898525885-52.7289852588483
292305.52313.49498938069-7.99498938068837
302308.42299.699949791638.70005020837334
312334.42305.6414778789528.7585221210484
322381.22341.6954259236439.504574076364
332449.72402.3061820403647.393817959643
342490.32487.375009235292.9249907647054
352523.52528.99758282429-5.49758282429093
362537.62560.2756338502-22.675633850205
372526.12566.44825692692-40.3482569269181
382545.92540.842550203565.05744979644305
392542.72562.41062914997-19.7106291499654
402584.32552.31981464431.9801853559984
412600.22605.1000526505-4.90005265050422
422593.92619.28699957507-25.3869995750701
432618.92604.111732144314.7882678557048
442591.32634.28169449724-42.981694497239
452521.22591.65534086443-70.4553408644347
462536.62496.9242303525739.6757696474333
472596.12526.1948362546869.9051637453244
482656.62610.1336054442946.4663945557136
492710.32686.8782064262323.421793573767
502778.82748.7664399770730.0335600229328
512775.52827.76613988503-52.2661398850282
522785.22806.19395424599-20.9939542459874
532847.72808.5544906826939.1455093173072
542834.42884.7397181503-50.3397181503046
5528392853.84100745381-14.841007453806
562802.62853.25260739475-50.6526073947457
572819.32799.1445109588120.1554890411912
5828722822.8908479987449.109152001256
592918.42892.7593541083725.6406458916276
602977.82948.1232960154529.6767039845472
613031.23017.8982394406513.3017605593514
623064.73075.94852046008-11.2485204600844
6330933105.51604994546-12.5160499454578
643100.63129.4404525018-28.8404525017982
653141.13126.9578616851414.1421383148572
663180.43172.401937853597.99806214641467
673240.33214.498051678225.8019483217977
6832653283.41838473938-18.4183847393756
693338.23301.6793374734136.5206625265878
703376.63387.64692135878-11.0469213587817
713422.53422.184929670630.315070329365881
7234323468.19507791499-36.1950779149888
733516.33465.041318055651.2586819443973
7435643567.2612974947-3.26129749469828
753636.33613.8211514387922.4788485612066
7637243693.9797324391530.0202675608539
773815.43792.1747853168323.2252146831738
783828.13891.69429510138-63.5942951013835
793853.33882.16179872357-28.8617987235652
803884.53897.27174529101-12.7717452910051
813918.73924.00675703273-5.30675703273437
823919.63956.35152054776-36.7515205477612
833950.83944.403228949366.39677105064129
8439813977.839533149073.16046685092624
8540634009.1444289216253.8555710783826
8641324109.9722779765822.027722023422
874160.34186.67314563014-26.3731456301393
884178.34205.75312261142-27.4531226114241
894244.14214.1555408150529.9444591849497
904256.54290.42409116699-33.9240911669931
914283.44290.96426580391-7.5642658039078
924263.34315.21980670867-51.9198067086663
934256.64276.96869877128-20.3686987712772
944264.34263.147823841671.15217615832626
954302.34271.2506233730731.0493766269256
964256.64320.1054516606-63.5054516605978
9743744252.20401485302121.795985146981
984398.84412.18375874822-13.383758748224
994433.94432.304811251171.59518874882906
1004446.34467.96248750222-21.6624875022198
1014525.84472.789305439953.0106945600992
1024633.14570.8217865832862.2782134167182
1034677.54699.89418223602-22.3941822360184
1044754.54736.4652004908418.0347995091643
1054876.24819.7701467776556.4298532223474
1064932.64961.19796206936-28.5979620693624
1074906.35007.60014564406-101.300145644062
1084953.14945.885724939927.21427506008513
1094909.64995.2078276519-85.6078276518992
1104922.24921.779424244810.42057575518993
1114873.54934.52645707124-61.0264570712434
1124854.34864.49167407499-10.1916740749939
1134795.34841.72867590676-46.4286759067627
1144831.94766.4972613234565.4027386765483
1154913.34825.9619876075987.3380123924126
1164977.54937.8952617175539.6047382824536
1175090.75015.9410351317474.7589648682606
1185128.95155.27668791307-26.3766879130671
1195154.15184.25542651609-30.155426516093
1205191.55198.91312221471-7.41312221471344
1215251.85233.7215027538118.078497246187
1225356.15300.3417257219555.7582742780496
1235451.95424.134757745427.7652422545971
1245450.85529.64145622945-78.8414562294474
1255469.45500.97856890994-31.5785689099384
1265684.65508.53873557603176.061264423975
1275740.35785.28956206667-44.9895620666703
1285816.25825.26126011612-9.06126011612196
1295825.95897.99345343804-72.0934534380385
1305831.45882.48966055268-51.0896605526805
1315873.35870.128770808243.17122919176381
1325889.55913.13742908343-23.6374290834283
1335908.55921.07380959303-12.5738095930255
1345787.45935.67801943942-148.278019439417
1355776.65762.7401851676313.8598148323745
1365883.55756.78556135376126.714438646243
1376005.75907.984791241197.7152087588984
1385957.86064.34592191055-106.545921910551
1396030.25979.1975835309751.002416469034
1405955.16069.42797283869-114.327972838686
1415857.35954.35903792138-97.0590379213772
1425889.15822.6273038628266.4726961371798
1435866.45877.6660861111-11.2660861110971
14458715851.0274746639919.9725253360129
14559445862.6098477916581.390152208346
1466077.65964.06375645244113.536243547556
1476197.56137.3559036709660.144096329036
1486325.66278.2822143117347.3177856882676
1496448.36422.9244607073225.3755392926796
1506559.66554.495721635845.10427836415965
1516623.36667.58017179857-44.2801717985731
1526677.36715.79987191395-38.4998719139458
1536740.36756.3403585801-16.040358580105
1546797.36813.73266667217-16.4326666721663
1556903.56864.9878242820738.5121757179313
1566955.96984.6516390124-28.7516390123965
1577022.87027.00009729501-4.20009729500725
15870517092.43174785032-41.4317478503153
15971197106.1472538789612.8527461210433
1607153.47178.64055993928-25.2405599392814
16171937204.21648764585-11.2164876458528
1627269.57239.8952157682329.6047842317685
1637332.67326.74501612615.85498387389725
16474587391.8919121182866.1080878817156
1657496.67540.40322771714-43.8032277171378
1667592.97563.6896669644729.2103330355276
1677632.17670.20156761329-38.1015676132938
16877347696.0813010296137.9186989703867
1697806.67811.23763693469-4.63763693469173
17078657882.216324108-17.2163241080025
1717927.47934.59751593094-7.19751593094406
1727944.77994.48127219227-49.7812721922728
1738027.77994.3777935951233.3222064048787
1748059.68089.02720070021-29.4272007002128
1758059.58110.63948335177-51.1394833517661
1767988.98092.66117561097-103.761175610968
1777950.27985.78638150795-35.5863815079538
1788003.87934.6454212502169.1545787497853
1798037.58012.4217867420125.0782132579898
18080698054.8891028122914.1108971877111
1818157.68091.3222571166766.2777428833288
1828244.38203.0928839195141.2071160804917
1838329.48304.1988468685325.2011531314693
18484178398.1091425848218.8908574151792
1858432.58492.3133657842-59.8133657842027
1868486.48486.90267818208-0.502678182077943
1878531.18540.62694243653-9.52694243652877
1888643.88581.9963337258961.8036662741124
1898727.98716.3028282138711.5971717861321
1908847.38804.4571868527542.8428131472465
1918904.38938.8349877167-34.5349877167009
1929003.28983.7615935844819.4384064155165
1939025.39089.45723931866-64.1572393186598
1949044.79089.12793825495-44.4279382549539
1959120.79092.9959793779527.7040206220554
1969184.39178.681274845865.61872515413597
1979247.29244.245575046662.954424953341
1989407.19308.1784387959898.9215612040207
1999488.99502.66130896775-13.7613089677525
2009592.59579.6503703247212.8496296752801
2019666.29687.742586879-21.5425868789953
2029809.69753.911321944155.6886780558925
2039932.79916.7800232040115.919976795989
20410008.910045.4456297712-36.5456297711971
20510103.410108.8693173643-5.46931736427541
20610194.310201.4572499643-7.15724996425888
20710328.810289.855083163738.9449168362662
20810507.610437.970183718269.6298162817857
20910601.210641.1126917341-39.9126917341455
2101068410720.7592581283-36.7592581282915
21110819.910790.708261480229.1917385198467
21211014.310936.813661506577.486338493476
2131104311158.3028011399-115.302801139886
21411258.511146.6930673091111.806932690924
21511267.911401.2806493336-133.380649333581
21611334.511364.0509194427-29.5509194426777
21711297.211420.3199501565-123.119950156468
21811371.311339.977349534431.3226504655977
21911340.111425.0277140586-84.9277140586055
22011380.111364.137077623815.9629223762204
22111477.911409.717697919168.1823020809097
22211538.811531.35415654537.44584345473231
22311596.411594.85721531611.54278468392295
22411598.811652.9965711631-54.196571163051
22511645.811636.44950884959.35049115050606
22611738.711686.718430382551.9815696174828
22711935.511797.7911305656137.708869434366
22812042.812042.73400149470.0659985052661796
22912127.612150.0570745004-22.4570745003675
23012213.812227.006105688-13.2061056879957
23112303.512308.5892655075-5.08926550751312
23212410.312396.510063823113.7899361768687
23312534.112508.131010507325.9689894926778
23412587.512641.0097409801-53.5097409800983
23512683.212675.70279375127.49720624876136
23612748.712774.023808899-25.3238088989601
23712915.912830.670632859885.2293671401967
23812962.513027.6667268838-65.1667268837591
23912965.913051.4845100656-85.5845100656061
24013060.713024.964258461335.7357415386869
24113099.913132.2574348233-32.3574348232978
2421320413160.145310813543.8546891865317
24313321.113279.576862439841.5231375601543
24413391.213411.1933061543-19.9933061543325
24513366.913474.3036680752-107.403668075192
24613415.313412.45546256972.84453743033919
24713324.613461.8499097605-137.249909760492
24813141.913323.167490634-181.26749063404
24912925.413077.0965731247-151.696573124651
25012901.512807.563616203893.9363837961628
2511297312816.5036737776156.496326222381
2521315512942.7146191593212.285380840658


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
25313198.92935733813092.815890442213305.0428242337
25413242.858714675913064.619130446213421.0982989057
25513286.788072013913033.252587223513540.3235568043
25613330.717429351912996.733682292613664.7011764112
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275575882gqg4g0rk59wlscx/1hpud1275575812.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275575882gqg4g0rk59wlscx/1hpud1275575812.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t1275575882gqg4g0rk59wlscx/2hpud1275575812.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275575882gqg4g0rk59wlscx/2hpud1275575812.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t1275575882gqg4g0rk59wlscx/3sgtg1275575812.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275575882gqg4g0rk59wlscx/3sgtg1275575812.ps (open in new window)


 
Parameters (Session):
par1 = 4 ; par2 = Double ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 4 ; par2 = Double ; 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