Home » date » 2010 » Jun » 02 »

Katleen van den Akker - Opgave 10 - Oefening 2

*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 09:13:49 +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/t1275470219l9rfujrunn35wec.htm/, Retrieved Wed, 02 Jun 2010 11:16:59 +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/t1275470219l9rfujrunn35wec.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 «
285708 905858 225733 405481 845758 805651 395747 695853 175625 405534 965639 575634 576023 566089 336141 26271 586226 376484 176583 287042 997142 207694 418003 838258 848182 658215 208304 398599 438399 578393 988390 958304 318251 78307 408520 748640 258520 518618 388588 238842 328957 499266 109011 168896 798921 878732 897576 518317 228370 758167 658491 518170 398212 498286 78136 647990 357927 698061 407932 637934 397784 217980 47737 467672 67651 167524 687406 367345 157553 887453 227566 817279 697059 997185 847075 547122 996977 346998 967154 547097 586853 46728 236883 36784 277085 446998 586725 496845 86765 146966 197113 657096 337200 17273 457284 507696 547628 157435 67793 267631 518397 918560 918895 429509 289569 9010172 1810617 7111400 1611919 9712714 2913310 1013816 6714518 2414721 9114534 8214993 6215159 515612 9415340 3715267
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.173659852690062
beta0.000673607157187447
gamma0.0799120898660841


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13576023739236.348343582-163213.348343582
14566089722597.22335502-156508.223355020
15336141387184.554260695-51043.5542606952
162627127219.7972199181-948.79721991812
17586226627443.268855386-41217.2688553861
18376484397321.350841869-20837.3508418691
19176583309024.876298841-132441.876298841
20287042487831.212121884-200789.212121884
21997142111930.940482397885211.059517603
22207694615987.623242758-408293.623242758
234180031339190.23642928-921187.236429283
24838258728062.325250325110195.674749675
25848182762595.51126038885586.4887396124
26658215792626.93376749-134411.933767490
27208304432249.652555293-223945.652555293
2839859928533.8767881063370065.123211894
294383992192383.68639341-1753984.68639341
305783931235199.51962694-656806.519626942
31988390873787.559488568114602.440511432
329583041563666.53137693-605362.53137693
33318251465543.10628409-147292.10628409
3478307798431.473768609-720124.473768609
354085201658292.15935405-1249772.15935405
36748640952307.363652946-203667.363652946
37258520937394.005680403-678874.005680403
38518618820844.364617842-302226.364617842
39388588420527.621090478-31939.6210904782
4023884239614.7499949613199227.250005039
413289571296548.27519747-967591.275197469
42499266752144.103420064-252878.103420064
43109011575868.96336755-466857.963367551
44168896827763.85529732-658867.85529732
45798921226363.709418321572557.290581679
46878732559760.11243461318971.88756539
478975761536469.43460782-638893.434607823
48518317985389.101518985-467072.101518985
49228370887028.133628562-658658.133628562
50758167797520.147968473-39353.1479684729
51658491442654.497684608215836.502315392
5251817054427.5431997364463742.456800264
533982121898231.69665058-1500019.69665058
544982861135850.29550629-637564.295506293
5578136804813.882360483-726677.882360483
566479901143970.69913980-495980.699139798
57357927402378.270111733-44451.2701117332
58698061629247.63993729268813.3600627081
594079321503017.21771447-1095085.21771447
60637934902609.559980435-264675.559980435
61397784820829.792641808-423045.792641808
62217980815303.86657468-597323.86657468
6347737410651.930193338-362914.930193338
6446767246558.0856360961421113.914363904
65676511285103.20654577-1217452.20654577
66167524756911.43381467-589387.43381467
67687406495339.173641111192066.826358889
68367345927128.056999731-559783.056999731
69157553322300.243151604-164747.243151604
70887453472840.802374417414612.197625583
712275661195209.45119596-967643.451195957
72817279729633.96798509687645.0320149038
73697059699827.566442166-2768.56644216599
74997185748295.097241629248889.902758371
75847075451961.163959089395113.836040911
7654712293313.8912772429453808.108722757
779969771389751.15843093-392774.158430927
78346998950519.584159758-603521.584159758
79967154699936.111890899267217.888109101
805470971226515.11523930-679418.115239301
81586853436094.680233765150758.319766235
8246728818005.68409107-771277.68409107
832368831343887.29824682-1107004.29824682
8436784882171.265927443-845387.265927443
85277085685219.690924196-408134.690924196
86446998669347.168823079-222349.168823079
87586725368482.338266265218242.661733735
8849684580959.0361636194415885.963836381
89867651029634.82821167-942869.828211673
90146966602295.422765024-455329.422765024
91197113462310.402054415-265197.402054415
92657096635365.15890527521730.8410947252
93337200265518.25098588771681.7490141131
9417273442027.094132448-424754.094132448
95457284724639.179859548-267355.179859548
96507696507573.661244126122.338755873789
97547628486041.8429851761586.1570148298
98157435550592.895460722-393157.895460722
9967793296661.622649114-228868.622649114
10026763157419.8798939864210211.120106014
101518397491087.36803446227309.6319655378
102918560346967.885466356571592.114533644
103918895400023.419307796518871.580692204
104429509785818.286904767-356309.286904767
105289569305955.351629511-16386.3516295106
1069010172438500.6799902978571671.3200097
10718106174079254.52753124-2268637.52753124
10871114002894967.209065534216432.79093447
10916119193585486.10766381-1973567.10766381
11097127143453102.027657836259611.97234217
11129133102860115.6435629453194.3564370624
1121013816810355.40686907203460.593130930
11367145183949731.223256452764786.77674355
11424147213424420.25408295-1009699.25408295
11591145342921745.612647096192788.38735291
11682149935877982.544774472337010.45522553
11762151592779197.896474473435961.10352553
1185156126448467.49319585-5932855.49319585
11994153408524589.71609453890750.283905465
12037152677673911.81918202-3958644.81918202


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1216166347.075289425401927.39740076930766.75317815
1227479700.457461276461110.622974758498290.29194779
1234328727.018417423412254.212285295245199.82454954
1241241755.33515733447523.100835252035987.56947942
1255949794.521313282995648.537091428903940.50553514
1264329376.403570582076173.482294496582579.32484667
1274384821.064950082033626.901874256736015.2280259
1285993230.635819332762968.995306999223492.27633166
1292760643.422066541102778.639073674418508.2050594
1304581658.655887381857889.688933167305427.6228416
1317821611.383709553186432.9389047412456789.8285144
1326610628.313287642710255.7679836310511000.8585916
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275470219l9rfujrunn35wec/1i4hy1275470025.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275470219l9rfujrunn35wec/1i4hy1275470025.ps (open in new window)


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


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