Home » date » 2011 » May » 10 »

Alexander De Raeymaeker - Opdracht 10.1

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 10 May 2011 19:33:00 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/10/t1305055746xhts7t0dq5c7ecf.htm/, Retrieved Tue, 10 May 2011 21:29:10 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W101
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2435 1379 1511 2021 1614 1680 1630 870 1877 2428 1711 127 3192 1934 2075 1700 1198 1582 1705 911 1817 1168 920 84 2254 1485 1886 1358 1167 1781 1218 779 1418 1641 1196 132 2926 1777 2094 1648 1646 1537 1917 977 1475 2124 1209 135 2917 1981 1398 1171 903 1390 1280 781 1828 1631 1063 186 2275 1342 1070 950 1121 1305 1586 548 1225 1419 880 124 2044 1143 897 1264 1326 1529 1373 587 1137 1426 1016 176 2614
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.122697358324306
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
213792435-1056
315112305.43158960953-794.431589609533
420212207.95693219506-186.956932195064
516142185.01781049431-571.017810494313
616802114.95543359053-434.955433590532
716302061.58755090017-431.587550900171
88702008.63289851906-1138.63289851906
918771868.925649769638.07435023037397
1024281869.91635121308558.083648786922
1117111938.39174064322-227.391740643224
121271910.49137476153-1783.49137476153
1331921691.661694484111500.33830551589
1419341875.7492411636758.2507588363251
1520751882.89645539328192.103544606721
1617001906.46705284126-206.467052841259
1711981881.13409087663-683.134090876632
1815821797.31534254479-215.315342544793
1917051770.89671880785-65.8967188078536
209111762.81136548789-851.81136548789
2118171658.29636115191158.703638848094
2211681677.76887839502-509.768878395022
239201615.22158366001-695.221583660008
24841529.91973189488-1445.91973189488
2522541352.50920044239901.490799557607
2614851463.1197401017821.8802598982215
2718861465.80439019074420.19560980926
2813581517.36128149381-159.361281493807
2911671497.80807323534-330.808073235341
3017811457.21879653701323.781203462989
3112181496.94589487698-278.945894876984
327791462.71997046017-683.719970460169
3314181378.8293362511339.1706637488664
3416411383.63547321693257.364526783071
3511961415.2134207796-219.213420779597
361321388.31651314071-1256.31651314071
3729261234.169795759141691.83020424086
3817771441.75289255276335.247107447236
3920941482.8868270224611.113172977596
4016481557.8687989839490.1312010160595
4116461568.9276592512177.072340748792
4215371578.38423186096-41.3842318609559
4319171573.30649593534343.693504064664
449771615.47678095729-638.476780957295
4514751537.13736658243-62.1373665824278
4621241529.51327584953594.486724150465
4712091602.45522646167-393.455226461668
481351554.17930955593-1419.17930955593
4929171380.04975728491536.9502427151
5019811568.62949194195412.370508058052
5113981619.22626393152-221.226263931523
5211711592.08238575517-421.082385755169
539031540.41668938611-637.416689386113
5413901462.20734544661-72.2073454466124
5512801453.3476949087-173.347694908703
567811432.0783906718-651.078390671797
5718281352.19279207433475.807207925673
5816311410.57307955847220.426920441529
5910631437.61888040021-374.618880400209
601861391.65413339669-1205.65413339669
6122751243.723556176141031.27644382386
6213421370.25845153541-28.2584515354115
6310701366.79121418168-296.791214181681
649501330.37571622773-380.375716227725
6511211283.70462067587-162.704620675868
6613051263.7411935317841.2588064682195
6715861268.80354009304317.196459906955
685481307.72270779345-759.72270779345
6912251214.506738488210.493261511795
7014191215.79423395591203.205766044091
718801240.72704464579-360.727044645786
721241196.46678919161-1072.46678919161
7320441064.87794726725979.122052732748
7411431185.01363661463-42.0136366146328
758971179.85867438842-282.85867438842
7612641145.15266226185118.847337738154
7713261159.73491664619166.265083353806
7815291180.13520315528348.864796844723
7913731222.93999214047150.06000785953
805871241.35195869496-654.351958694959
8111371161.06470194875-24.0647019487521
8214261158.11202659078267.887973409221
8310161190.98117325494-174.981173254942
841761169.51144554007-993.511445540073
8526141047.610215707341566.38978429266


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
861239.80210434623-60.4729311545122540.07713984698
871239.80210434623-70.22395611358912549.82816480605
881239.80210434623-79.90293475201162559.50714344448
891239.80210434623-89.51144081860752569.11564951107
901239.80210434623-99.05099158928972578.65520028175
911239.80210434623-108.5230506640682588.12725935653
921239.80210434623-117.929030588432597.5332392809
931239.80210434623-127.270295312392606.87450400485
941239.80210434623-136.5481624993132616.15237119178
951239.80210434623-145.7639056955922625.36811438806
961239.80210434623-154.9187563712942634.52296506376
971239.80210434623-164.013905841022643.61811453348
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/10/t1305055746xhts7t0dq5c7ecf/1do141305055978.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/10/t1305055746xhts7t0dq5c7ecf/1do141305055978.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/10/t1305055746xhts7t0dq5c7ecf/20o5w1305055978.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/10/t1305055746xhts7t0dq5c7ecf/20o5w1305055978.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/10/t1305055746xhts7t0dq5c7ecf/333jy1305055978.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/10/t1305055746xhts7t0dq5c7ecf/333jy1305055978.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=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