Home » date » 2008 » Aug » 17 »

Opgave 10

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 17 Aug 2008 11:01:50 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Aug/17/t121899257118cf8xghfeybnhx.htm/, Retrieved Sun, 17 Aug 2008 17:02:52 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
Alain Piscaer 2MAR04
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2005/12 2005/11 2005/10 2005/09 2005/08 2005/07 2005/06 2005/05 2005/04 2005/03 2005/02 2005/01 2004/12 2004/11 2004/10 2004/09 2004/08 2004/07 2004/06 2004/05 2004/04 2004/03 2004/02 2004/01 2003/12 2003/11 2003/10 2003/09 2003/08 2003/07 2003/06 2003/05 2003/04 2003/03 2003/02 2003/01 2002/12 2002/11 2002/10 2002/09 2002/08 2002/07 2002/06 2002/05 2002/04 2002/03 2002/02 2002/01 2001/12 2001/11 2001/10 2001/09 2001/08 2001/07 2001/06 2001/05 2001/04 2001/03 2001/02 2001/01 2000/12 2000/11 2000/10 2000/09 2000/08 2000/07 2000/06 2000/05 2000/04 2000/03 2000/02 2000/01 1999/12 1999/11 1999/10 1999/09 1999/08 1999/07 1999/06 1999/05 1999/04 1999/03 1999/02 1999/01 1998/12 1998/11 1998/10 1998/09 1998/08 1998/07 1998/06 1998/05 1998/04 1998/03 1998/02 1998/01
 
Text written by user:
 
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'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.0587893134639656
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
2182.272727272727167.08333333333315.1893939393939
3200.5167.97630737496432.523692625036
4222.777777777778169.88835293570352.8894248420748
5250.625172.99768591167377.6273140883275
6286.428571428571177.561342412977108.867229015595
7334.166666666667183.961572065528150.205094601139
8401192.792026455919208.207973544081
9501.25205.032430278299296.217569721701
10668.333333333333222.446857838202445.886475495131
111002.5248.660217615428753.839782384572
122005292.9779408836421712.02205911636
13167393.626542374258-226.626542374258
14182.181818181818380.303323535363-198.121505353545
15200.4368.655896253181-168.255896253181
16222.666666666667358.764247626192-136.097580959525
17250.5350.763164277475-100.263164277475
18286.285714285714344.868761683877-58.5830473981632
19334341.424704546712-7.42470454671246
20400.8340.98821126373859.8117887362616
21501344.504505260595156.495494739405
22668353.704767956528314.295232043472
231002372.181968873362629.818031126638
242004409.2085385305231594.79146146948
25166.916666666667502.965233668508-336.048567001842
26182.090909090909483.20916912392-301.118260033011
27200.3465.506633345116-265.206633345116
28222.555555555556449.915317444667-227.359761889111
29250.375436.548993133875-186.173993133875
30286.142857142857425.60395189269-139.461094749833
31333.833333333333417.405129877414-83.5717965440808
32400.6412.492001333637-11.8920013336373
33500.75411.7928787395288.9571212604798
34667.666666666667417.022606826155250.644059840512
351001.5431.757799027999569.742200972
362003465.2525518745921537.74744812541
37166.833333333333555.65566863085-388.822335297516
38182532.797070479253-350.797070479253
39200.2512.173951540607-311.973951540607
40222.444444444444493.833217110895-271.38877266645
41250.25477.878457484006-227.628457484006
42286464.496336743659-178.496336743659
43333.666666666667454.002659650667-120.335992984000
44400.4446.928189238133-46.5281892381329
45500.5444.19282893610256.3071710638984
46667.333333333333447.503088866046219.830244467287
471001460.426758016894540.573241983106
482002492.2066877900711509.79331220993
49166.75580.966400087379-414.216400087379
50181.909090909091556.614902300727-374.705811391636
51200.1534.586204898054-334.486204898054
52222.333333333333514.92199054893-292.588657215597
53250.125497.720904263882-247.595904263882
54285.857142857143483.164911035718-197.307768178576
55333.5471.565322803393-138.065322803393
56400.2463.448557262601-63.2485572626005
57500.25459.73021800354640.5197819964541
58667462.112348168827204.887651831173
591000.5474.157552557226526.342447442774
602001505.100863689331495.89913631067
61166.666666666667593.043746924373-426.377080257707
62181.818181818182567.977331099252-386.159149281071
63200545.275299825189-345.275299825189
64222.222222222222524.976801992401-302.754579770179
65250507.178068099641-257.178068099641
66285.714285714286492.058746038074-206.344460323789
67333.333333333333479.927896878546-146.594563545213
68400471.309703130174-71.3097031301735
69500467.11745463983132.8825453601685
70666.666666666667469.050596906503197.616069760163
711000480.668309977151519.331690022849
722000511.1994634936751488.80053650632
73166.583333333333598.725024919665-432.141691586332
74181.727272727273573.319711552148-391.592438824875
75199.9550.298260915954-350.398260915954
76222.111111111111529.698587717737-307.587476606626
77249.875511.61573113792-261.74073113792
78285.571428571429496.228173248766-210.656744677337
79333.166666666667483.843807852631-150.677141185964
80399.8474.985602167595-75.1856021675952
81499.75470.56549223378729.1845077662126
82666.333333333333472.281229409147194.052103924186
83999.5483.689419375088515.810580624912
841999514.0135692874761484.98643071252
85166.5601.31490205237-434.81490205237
86181.636363636364575.75243247681-394.116068840446
87199.8552.582619364563-352.782619364563
88222531.842771370101-309.842771370101
89249.75513.62732755948-263.87732755948
90285.428571428571498.114160633552-212.685589204981
91333485.610520860512-152.610520860512
92399.6476.638653111745-77.0386531117446
93499.5472.10960358511727.3903964148834
94666473.719866185853192.280133814147
95999485.023883245547513.976116754453
961998515.2401862864161482.75981371358


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
97602.410617766595-421.2695465711621626.09078210435
98602.410617766595-423.0370338823451627.85826941554
99602.410617766595-424.8014799454971629.62271547869
100602.410617766595-426.5629004056791631.38413593887
101602.410617766595-428.3213107742731633.14254630746
102602.410617766595-430.0767264305761634.89796196377
103602.410617766595-431.8291626233681636.65039815656
104602.410617766595-433.5786344724561638.39987000565
105602.410617766595-435.3251569702011640.14639250339
106602.410617766595-437.0687449830121641.88998051620
107602.410617766595-438.8094132528241643.63064878601
108602.410617766595-440.5471763985531645.36841193174
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t121899257118cf8xghfeybnhx/1r9ip1218992501.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t121899257118cf8xghfeybnhx/1r9ip1218992501.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t121899257118cf8xghfeybnhx/2gc3k1218992501.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t121899257118cf8xghfeybnhx/2gc3k1218992501.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t121899257118cf8xghfeybnhx/3mf3b1218992501.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t121899257118cf8xghfeybnhx/3mf3b1218992501.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Single ; 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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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