Home » date » 2010 » Aug » 16 »

Exponential Smoothing

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 16 Aug 2010 16:54:09 +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/Aug/16/t1281977686e8xjhxghrjs0o31.htm/, Retrieved Mon, 16 Aug 2010 18:54:47 +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/Aug/16/t1281977686e8xjhxghrjs0o31.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
257 256 255 253 251 250 251 253 254 254 255 257 260 251 255 252 245 239 240 247 251 255 259 260 259 266 261 243 232 225 229 238 240 241 239 246 242 251 246 219 203 192 197 203 208 207 208 212 208 215 200 170 162 150 148 152 155 150 146 147 142 146 130 102 98 90 86 104 108 94 88 92 93 95 81 50 49 34 27 45 47 42 32
 
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.0285328075927933
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
32552550
4253254-1
5251251.971467192407-0.971467192407204
6250249.9437485059240.0562514940764629
7251248.9453535189812.05464648101918
8253250.0039783516952.99602164830503
9254252.089463260931.9105367390701
10254253.1439762381050.856023761895244
11255253.1684009993981.83159900060224
12257254.2206616612692.77933833873089
13260256.2999639873233.70003601267661
14251259.40553640296-8.40553640295951
15255250.165702850064.83429714994037
16252254.303638920485-2.30363892048527
17245251.237909634404-6.23790963440379
18239244.059924559024-5.0599245590241
19240237.9155507051472.08444929485256
20247238.9750258958148.02497410418562
21251246.2040009378664.79599906213375
22255250.3408442563214.65915574367867
23259254.4737830507014.52621694929942
24260258.6029287280381.39707127196181
25259259.642791093834-0.64279109383449
26266258.6244504592327.37554954076825
27261265.83489559517-4.8348955951696
28243260.696942449421-17.6969424494214
29232242.191998995531-10.1919989955313
30225230.901192649206-5.90119264920588
31229223.7328150547785.26718494522191
32238227.88310262937610.1168973706243
33240237.1717661154882.8282338845122
34241239.2524635687421.747536431258
35239240.302325689496-1.30232568949648
36246238.2651666811757.73483331882505
37242245.485863192023-3.48586319202329
38251241.386401728279.6135982717295
39246250.660704678032-4.66070467803218
40219245.527721688207-26.527721688207
41203217.770811309402-14.7708113094023
42192201.349358592322-9.34935859232164
43197190.0825951424916.9174048575091
44203195.2799681243327.72003187566835
45208201.500242308456.49975769154966
46207206.6856986440630.314301355936919
47208205.6946665441782.3053334558218
48212206.760444180115.2395558198896
49208210.909943418191-2.90994341819101
50215206.8269145625348.17308543746617
51200214.060115636761-14.0601156367605
52170198.658941062564-28.6589410625644
53162167.841221011413-5.84122101141307
54150159.674554576187-9.67455457618743
55148147.3985123719190.601487628080918
56152145.4156745026816.58432549731944
57155149.6035437952245.39645620477609
58150152.757519841798-2.75751984179772
59146147.678840058718-1.67884005871841
60147143.6309380383443.36906196165609
61142144.727066835064-2.72706683506405
62146139.6492559617666.35074403823353
63130143.83046051948-13.8304605194805
64102127.435838650558-25.4358386505584
659898.7100827603807-0.710082760380686
669094.6898221056038-4.68982210560378
678686.5560083138202-0.556008313820172
6810482.54014383558221.4598561644181
69108101.152453782496.8475462175097
7094105.347833501197-11.3478335011973
718891.0240479513126-3.02404795131255
729284.93776337296647.06223662703363
739389.13926881182033.8607311881797
749590.24942631198014.75057368801987
758192.3849735169758-11.3849735169758
765078.0601282581669-28.0601282581669
774946.25949401754752.74050598245251
783445.3376883474517-11.3376883474517
792730.0141922672868-3.01419226728681
804522.928188899276622.0718111007234
814741.5579596386385.44204036136195
824243.713236329181-1.713236329181
833238.6643528866395-6.6643528866395


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8428.474200187994510.294819733754246.6535806422349
8524.9484003759891-1.1304879081740851.0272886601522
8621.4226005639836-10.9717467651253.8169478930872
8717.8968007519781-20.035823273882555.8294247778388
8814.3710009399727-28.630361963184557.3723638431299
8910.8452011279672-36.910757605669758.6011598616041
907.31940131596176-44.967932065764559.606734697688
913.7936015039563-52.860226627097360.4474296350099
920.267801691950837-60.627540833790961.1631442176926
93-3.25799812005462-68.298468967137361.782472727028
94-6.78379793206009-75.894250683553562.3266548194333
95-10.3095977440655-83.431115462252162.811919974121
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/16/t1281977686e8xjhxghrjs0o31/16a6d1281977645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t1281977686e8xjhxghrjs0o31/16a6d1281977645.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/16/t1281977686e8xjhxghrjs0o31/2h1ng1281977645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t1281977686e8xjhxghrjs0o31/2h1ng1281977645.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/16/t1281977686e8xjhxghrjs0o31/3h1ng1281977645.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t1281977686e8xjhxghrjs0o31/3h1ng1281977645.ps (open in new window)


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