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 17:14:54 +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/t12753261494376g9jtjb67jns.htm/, Retrieved Mon, 31 May 2010 19:15:57 +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/t12753261494376g9jtjb67jns.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 «
15136 16733 20016 17708 18019 19227 22893 23739 21133 22591 26786 29740 15028 17977 20008 21354 19498 22125 25817 28779 20960 22254 27392 29945 16933 17892 20533 23569 22417 22084 26580 27454 24081 23451 28991 31386 16896 20045 23471 21747 25621 23859 25500 30998 24475 23145 29701 34365 17556 22077 25702 22214 26886 23191 27831 35406 23195 25110 30009 36242 18450 21845 26488 22394 28057 25451 24872 33424 24052 28449 33533 37351 19969 21701 26249 24493 24603 26485 30723 34569 26689 26157 32064 38870 21337 19419 23166 28286 24570 24001 33151 24878 26804 28967 33311 40226 20504 23060 23562 27562 23940 24584 34303 25517 23494 29095 32903 34379 16991 21109 23740 25552 21752 20294 29009 25500 24166 26960 31222 38641 14672 17543 25453 32683 22449 22316 27595 25451 25421 25288 32568 35110 16052 22146 21198 19543 22084 23816 29961 26773 26635 26972 30207 38687 16974 21697 24 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.0165590081393153
beta0.812571984122757
gamma0.275925381237208


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131502814043.3258547009984.674145299134
141797716849.90181446561127.09818553442
152000818885.04338299611122.95661700386
162135420474.2678527804879.732147219562
171949818836.843568961661.156431039013
182212521665.1126697963459.88733020371
192581724118.32024887591698.67975112414
202877925198.27239364613580.72760635391
212096022901.4027899613-1941.40278996134
222225424450.8865266520-2196.88652665198
232739228641.6214163024-1249.62141630243
242994531621.3946046582-1676.39460465818
251693317112.5335452297-179.533545229693
261789219969.2434291384-2077.24342913844
272053321937.8491681524-1404.84916815238
282356923372.8513091111196.148690888909
292241721609.2339050159807.766094984083
302208424331.7260094808-2247.72600948080
312658026986.2313177364-406.231317736401
322745428423.6903866504-969.690386650425
332408124373.4342655675-292.434265567535
342345125723.5125969617-2272.51259696168
352899130011.6404411801-1020.64044118013
363138632724.0776112328-1338.07761123275
371689618476.2335461904-1580.23354619036
382004520625.1787534420-580.17875344204
392347122651.5615379194819.43846208063
402174724438.2939289779-2691.29392897788
412562122634.43528705152986.56471294846
422385924434.8012800507-575.80128005071
432550027510.1119087904-2010.11190879042
443099828639.95195085152358.04804914852
452447524745.1914492925-270.191449292539
462314525475.2444308131-2330.24443081305
472970130018.2560450529-317.256045052887
483436532581.80260335971783.19739664027
491755618287.5317969618-731.531796961805
502207720700.92005839601376.07994160396
512570223144.83195047872557.16804952134
522221424036.4021951834-1822.40219518340
532688623828.06793369593057.93206630407
542319124704.3189188362-1513.31891883618
552783127403.6550380826427.344961917439
563540629820.74085115335585.25914884671
572319525371.2097547596-2176.20975475962
582511025590.0257500626-480.025750062643
593000930814.1409034512-805.14090345117
603624234037.24384286382204.75615713616
611845019170.9021127666-720.902112766584
622184522259.8593732385-414.859373238534
632648825073.99223604931414.00776395072
642239424822.2085203781-2428.20852037808
652805725984.00069765032072.99930234966
662545125646.1000222340-195.100022233961
672487228954.2088554446-4082.20885544463
683342432695.9086966455728.091303354526
692405225994.1240270446-1942.12402704457
702844926614.53626166341834.46373833664
713353331757.34710427211775.65289572786
723735135843.25772206651507.74227793349
731996920165.417320889-196.417320889002
742170123347.1023896216-1646.10238962161
752624926621.5511401614-372.551140161388
762449325257.964604262-764.964604261986
772460327651.4998137125-3048.49981371247
782648526527.1874591475-42.1874591475134
793072328698.95265723732024.04734276273
803456933845.1493536221723.85064637789
812668926416.7354781968272.264521803158
822615728126.4330911603-1969.43309116025
833206433166.929882362-1102.92988236200
843887037070.37574123691799.6242587631
852133720876.7624643109460.237535689106
861941923626.6037536597-4207.60375365971
872316627120.4206745899-3954.4206745899
882828625459.04051511412826.9594848859
892457027208.7358759055-2638.73587590551
902400126828.8374132503-2827.83741325027
913315129399.52562776533751.47437223467
922487834129.1181181138-9251.11811811375
932680426186.3787642776617.621235722359
942896727071.53407549501895.46592450503
953331132241.20237283271069.79762716727
964022636827.52925354673398.47074645328
972050420177.7296872069326.270312793069
982306021537.69121241111522.30878758886
992356225151.1777029187-1589.17770291867
1002756225357.04438482812204.95561517187
1012394025592.829966219-1652.82996621901
1022458425170.749997975-586.749997974981
1033430329586.84776741314716.15223258694
1042551730840.0201590292-5323.02015902921
1052349425729.0667639215-2235.06676392154
1062909526964.14727262122130.85272737878
1073290331967.2418782559935.758121744082
1083437937235.0246930085-2856.02469300845
1091699119615.6145007068-2624.61450070684
1102110921179.1782690323-70.1782690322507
1112374023828.4590254018-88.4590254017858
1122555225015.4167931369536.583206863092
1132175224080.97122572-2328.97122572002
1142029423832.1148185671-3538.11481856714
1152900929493.7374929715-484.737492971457
1162550027722.0358357092-2222.03583570921
1172416623327.5328178823838.4671821177
1182696025666.74892927231293.25107072767
1193122230188.92797785281033.07202214723
1203864134287.95812182514353.04187817489
1211467216806.2784949350-2134.27849493498
1221754319033.2827967697-1490.28279676972
1232545321597.13799002623855.86200997376
1243268323015.14188922829667.85811077176
1252244921573.3025914227875.6974085773
1262231621211.51135366011104.48864633989
1272759528003.1400296920-408.140029691971
1282545125986.8863214846-535.886321484551
1292542122699.08540312612721.91459687386
1302528825466.5348022003-178.534802200349
1313256830147.57463681632420.42536318365
1323511035442.9735209674-332.97352096736
1331605216332.7712356516-280.771235651608
1342214618999.60830527423146.39169472577
1352119823387.7289287219-2189.72892872186
1361954326498.1764753956-6955.17647539564
1372208422387.029099501-303.029099500978
1382381622043.70440352621772.29559647384
1392996128420.81666641631540.18333358365
1402677326413.2626719779359.737328022147
1412663524047.47043429452587.52956570546
1422697226046.9841803606925.015819639371
1433020731487.7356481160-1280.73564811604
1443868735961.08784419112725.91215580889
1451697416943.25466522630.7453347739938
1462169720576.97564611181120.02435388822
1472417923488.0291179545690.970882045498
1482375725396.2823582033-1639.28235820331
1492501323293.02914853701719.97085146305
1502401923688.3419946624330.658005337562
1513034530101.1854217337243.814578266276
1522448827856.988592583-3368.98859258301
1532515626088.9516746804-932.951674680444
1542565027586.6404748639-1936.64047486386
1553092332350.5607992501-1427.56079925007
1563724037875.8350444651-635.835044465086
1571746617992.8745627008-526.87456270081
1581946321827.3321531516-2364.33215315158
1592435224431.7658837295-79.7658837294657
1602680525552.06108043311252.93891956686
1612523624304.3043264481931.695673551876
1622473524195.0082500898539.99174991015
1632935630476.0121575791-1120.01215757914
1643123427098.78351841694135.21648158312
1652272426086.9236289532-3362.92362895325
1662849627210.20177930801285.79822069205
1673285732147.1682272963709.831772703721
1683719837932.978553725-734.978553724992
1691365218086.9126406551-4434.91264065506
1702278421314.43625651091469.56374348911
1712356524610.2585790204-1045.25857902037
1722632326071.1845412166251.815458783389
1732377924701.188766221-922.188766221017
1742754924411.46811100773137.53188899227
1752966030276.5482912322-616.548291232175
1762335628331.986528598-4975.986528598


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
17725010.282067519020467.644298853229552.9198361848
17827371.652136516922826.968679368331916.3355936655
17932034.679123705327485.707687678236583.6505597325
18037310.770075146532754.454663931841867.0854863612
18116376.856724552611809.338059395720944.3753897095
18221243.691186479816660.323096867625827.0592760919
18323776.648531699619172.021400187328381.2756632119
18425564.799046642820932.771120178930196.8269731066
18523826.618560591619160.355586052728492.8815351305
18624620.766324629619912.789545043329328.7431042160
18729339.948950997824582.191036907534097.7068650881
18826155.681632987421339.549656776930971.8136091979
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/31/t12753261494376g9jtjb67jns/1ncom1275326091.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t12753261494376g9jtjb67jns/1ncom1275326091.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/May/31/t12753261494376g9jtjb67jns/3g3np1275326091.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t12753261494376g9jtjb67jns/3g3np1275326091.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