Home » date » 2010 » Jun » 02 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 02 Jun 2010 17:32:32 +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/02/t1275499992ay55j5k2caom6i5.htm/, Retrieved Wed, 02 Jun 2010 19:33: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/02/t1275499992ay55j5k2caom6i5.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 «
562674 599000 668516 597798 579889 668233 499232 215187 555813 586935 546136 571111 634712 639283 712182 621557 621000 675989 501322 220286 560727 602530 626379 605508 646783 658442 712906 687714 723916 707183 629000 237530 613296 730444 734925 651812 676155 748183 810681 729363 701108 790079 594621 230716 617189 691389 701067 705777 747636 773392 813788 766713 728875 749197 680954 241424 680234 708326 694238 772071 795337 788421 889968 797393 751000 821255 691605 290655 727147 868355 812390 799556 843038 847000 941952 804309 840307 871528 656330 370508 742000 847152 731675 898527 778139 856075 938833 813023 783417 828110 657311 310032 780000 860000 780000 807993 895217 856075 893268 875000 835088 934595 832500 300000 791443 900000 781729 880000 875024 992968 976804 968697 871675 1006852 832037 345587 849528 913871 868746 993733
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.175227912761956
beta0
gamma0.28039163452554


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13634712619554.40676292115157.5932370792
14639283628499.91973341110783.0802665888
15712182704141.4406566748040.55934332637
16621557616925.9233113474631.07668865321
17621000614982.4062419766017.59375802369
18675989667318.1108558198670.88914418127
19501322519139.232379148-17817.2323791476
20220286221303.387136167-1017.38713616732
21560727569501.226683812-8774.22668381152
22602530598780.3168981443749.68310185627
23626379556961.89879649769417.1012035034
24605508594947.33379770310560.6662022970
25646783668652.31125539-21869.3112553904
26658442670285.927135215-11843.9271352155
27712906745272.76983353-32366.7698335300
28687714646023.5428825241690.4571174798
29723916650641.24870413773274.7512958628
30707183719075.658912477-11892.6589124774
31629000550304.49802957478695.5019704263
32237530243535.140489665-6005.14048966489
33613296622755.681361663-9459.68136166257
34730444657902.74280984772541.2571901528
35734925639524.44739917695400.5526008242
36651812669693.193506365-17881.1935063653
37676155737874.078085287-61719.0780852865
38748183735410.17125237312772.8287476272
39810681817488.285284563-6807.28528456332
40729363730691.404920605-1328.40492060478
41701108734968.695528562-33860.6955285618
42790079767331.82167004722747.1783299531
43594621613312.747193763-18691.7471937635
44230716253642.775494520-22926.7754945197
45617189642454.913711632-25265.9137116324
46691389695127.772412943-3738.77241294342
47701067667815.76293469533251.2370653052
48705777660978.150150744798.8498492998
49747636730361.35630919217274.6436908082
50773392759634.40421290213757.5957870976
51813788839466.974308982-25678.9743089821
52766713748482.06920527118230.9307947287
53728875748447.241538165-19572.2415381655
54749197798000.115042067-48803.1150420669
55680954619030.34311081461923.6568891864
56241424258131.639720939-16707.6397209391
57680234664837.82199144915396.1780085505
58708326732971.165874855-24645.165874855
59694238709465.977862678-15227.9778626784
60772071696231.92433437275839.0756656277
61795337767042.40260039228294.5973996082
62788421798515.457734531-10094.4577345313
63889968867732.145024722235.8549752998
64797393791247.9448676126145.05513238837
65751000779654.019083943-28654.0190839426
66821255822757.408468614-1502.40846861433
67691605669070.25051826722534.7494817328
68290655265564.4209158625090.5790841401
69727147717763.7817659359383.21823406534
70868355779446.42736307188908.5726369286
71812390776111.0921282836278.9078717206
72799556793555.4457556486000.55424435192
73843038845214.216072039-2176.21607203863
74847000863783.437214284-16783.4372142840
75941952945644.270329026-3692.27032902581
76804309854184.040582017-49875.040582017
77840307823196.8715784317110.1284215699
78871528884553.590219084-13025.5902190842
79656330723428.13446402-67098.1344640201
80370508284612.11693595385895.8830640467
81742000782162.077508625-40162.0775086255
82847152858787.930539864-11635.930539864
83731675823922.787155937-92247.7871559366
84898527811886.48689002386640.5131099772
85778139877604.094570184-99465.094570184
86856075875986.169298653-19911.1692986527
87938833961875.459262197-23042.4592621974
88813023854720.928859736-41697.9288597363
89783417840500.032015401-57083.0320154008
90828110881899.559526141-53789.5595261412
91657311702207.740221743-44896.7402217428
92310032302690.2271032697341.7728967308
93780000735269.14835494744730.8516450532
94860000830743.59159113529256.4084088654
95780000785121.037605322-5121.03760532173
96807993829232.905936562-21239.9059365618
97895217832415.10072453962801.8992754614
98856075877849.309781133-21774.3097811330
99893268963276.153969898-70008.1539698981
100875000843667.12416250431332.8758374964
101835088838354.149920531-3266.1499205312
102934595891061.09207404943533.9079259512
103832500722718.484718449109781.515281551
1043e+05330126.176007452-30126.1760074521
105791443792146.906842533-703.906842533033
1069e+05880234.62584880719765.3741511930
107781729822043.126160688-40314.1261606885
108880000857838.81832930322161.1816706973
109875024889078.137458024-14054.1374580237
110992968901889.62079442691078.3792055736
111976804999976.874470696-23172.8744706957
112968697906340.6262092262356.37379078
113871675896980.881478231-25305.8814782314
1141006852960664.61867395446187.3813260460
115832037796680.26300526335356.7369947374
116345587337970.0547336467616.94526635355
117849528845236.0426947024291.95730529772
118913871945124.313741886-31253.3137418862
119868746859533.4650107639212.5349892372
120993733922237.97267841471495.0273215859


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121955061.71633301922437.751567954987685.681098066
122997290.304336678961526.5277764441033054.08089691
1231056294.784697961017242.441983191095347.12741273
124981542.757045696941163.239233551021922.27485784
125938674.58725364896722.14997822980627.02452906
1261028064.58716711981896.8565111241074232.3178231
127844658.726667276800903.499963127888413.953371425
128353769.924801058318451.748058775389088.101543340
129877677.315879882819381.982782185935972.648977579
130971769.667736124907311.4417410261036227.89373122
131897942.62113054835813.258045257960071.984215824
132976153.976366589916801.5962854731035506.35644770
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275499992ay55j5k2caom6i5/11xpy1275499947.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275499992ay55j5k2caom6i5/11xpy1275499947.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t1275499992ay55j5k2caom6i5/2c7pk1275499947.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275499992ay55j5k2caom6i5/2c7pk1275499947.ps (open in new window)


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