Home » date » 2011 » Jan » 16 »

opgave 10.2

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 16 Jan 2011 16:27:04 +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/Jan/16/t1295195093gkw6i6850hzpe50.htm/, Retrieved Sun, 16 Jan 2011 17:24:57 +0100
 
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/2011/Jan/16/t1295195093gkw6i6850hzpe50.htm/},
    year = {2011},
}
@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 = {2011},
    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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
101,02 101,15 101,51 101,75 101,8 101,8 101,8 101,82 101,99 102,25 102,34 102,35 102,35 102,39 102,49 102,67 102,68 102,7 102,71 102,72 102,83 102,92 103,04 103,08 103,09 103,11 103,18 103,18 103,22 103,25 103,25 103,25 103,47 103,57 103,66 103,7 103,7 103,75 103,85 104,02 104,13 104,17 104,18 104,2 104,5 104,78 104,88 104,89 104,9 104,95 105,24 105,35 105,44 105,46 105,47 105,48 105,75 106,1 106,19 106,23 106,24 106,25 106,35 106,48 106,52 106,55 106,55 106,56 106,89 107,09 107,24 107,28 107,3 107,31 107,47 107,35 107,31 107,32 107,32 107,34 107,53 107,72 107,75 107,79 107,81 107,9 107,8 107,86 107,8 107,74 107,75 107,83 107,8 107,81 107,86 107,83
 
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.935037349291743
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13102.35101.8738034188030.476196581196518
14102.39102.3582345882470.0317654117531703
15102.49102.490022681738-2.2681737931407e-05
16102.67102.681671053885-0.0116710538853795
17102.68102.69826109635-0.0182610963498888
18102.7102.716189202977-0.0161892029766335
19102.71102.7064712739580.00352872604219101
20102.72102.6972736783560.0227263216444413
21102.83102.870609884991-0.040609884991369
22102.92103.088057706194-0.168057706193594
23103.04103.0205037211530.0194962788474555
24103.08103.0491530504670.0308469495332986
25103.09103.108100672984-0.0181006729843602
26103.11103.1014740212920.00852597870817817
27103.18103.209467338095-0.0294673380953299
28103.18103.37282714768-0.192827147680418
29103.22103.2196013697680.000398630231984498
30103.25103.255111613362-0.00511161336189048
31103.25103.257032573309-0.00703257330850704
32103.25103.2392068950540.0107931049461598
33103.47103.3972706105110.0727293894893108
34103.57103.712415538202-0.142415538201703
35103.66103.681021941969-0.0210219419690532
36103.7103.6725225911480.0274774088520218
37103.7103.725139799974-0.0251397999740846
38103.75103.7136610395130.0363389604868019
39103.85103.8451923865060.0048076134938384
40104.02104.029988269722-0.0099882697224274
41104.13104.0602761303220.0697238696783131
42104.17104.1602501020170.00974989798343984
43104.18104.1759423394880.00405766051206058
44104.2104.1696444473780.0303555526220123
45104.5104.3500233272740.149976672725728
46104.78104.7234209651330.0565790348666155
47104.88104.885980776816-0.00598077681627274
48104.89104.894696123577-0.00469612357687765
49104.9104.913811724565-0.0138117245650875
50104.95104.9169189609490.0330810390509981
51105.24105.0433556698370.196644330162627
52105.35105.406564868311-0.0565648683111561
53105.44105.3984801814960.0415198185039145
54105.46105.468186243767-0.00818624376678656
55105.47105.4667377359650.00326226403508656
56105.48105.4614044992210.0185955007790284
57105.75105.6385581964570.111441803542903
58106.1105.9698569342550.130143065745031
59106.19106.197137811179-0.00713781117889312
60106.23106.2048547420760.0251452579243079
61106.24106.251280975719-0.0112809757189893
62106.25106.259800835019-0.00980083501922024
63106.35106.356766894993-0.00676689499348981
64106.48106.513329859965-0.0333298599645389
65106.52106.533342615014-0.0133426150140679
66106.55106.5485212153110.00147878468895613
67106.55106.556853595511-0.00685359551073361
68106.56106.5430577399740.0169422600259281
69106.89106.7246971372950.165302862705317
70107.09107.107572860646-0.0175728606460552
71107.24107.1878156996530.0521843003474345
72107.28107.2530982142070.0269017857927309
73107.3107.298800522320.00119947768017425
74107.31107.319086225548-0.00908622554764804
75107.47107.4169175648540.0530824351458534
76107.35107.62771628822-0.27771628822039
77107.31107.420517029603-0.110517029603017
78107.32107.345796760276-0.0257967602756963
79107.32107.328084193707-0.00808419370669355
80107.34107.3146835247460.0253164752536321
81107.53107.5137910240870.0162089759133721
82107.72107.745378302997-0.0253783029973675
83107.75107.822854371962-0.0728543719616681
84107.79107.7695786386390.0204213613605475
85107.81107.8075518178040.00244818219566412
86107.9107.8283369198460.071663080153698
87107.8108.005710516903-0.205710516902585
88107.86107.953038602449-0.0930386024492833
89107.8107.929381584645-0.129381584644904
90107.74107.84252590504-0.10252590503984
91107.75107.754219377612-0.0042193776123014
92107.83107.7466022520390.0833977479605323
93107.8107.999426263357-0.199426263356628
94107.81108.026684919853-0.216684919852668
95107.86107.922197985605-0.0621979856054935
96107.83107.884945810418-0.0549458104181753


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
97107.851280283699107.664899889459108.03766067794
98107.87427262719107.619108756606108.129436497774
99107.966619643636107.657621989364108.275617297908
100108.113614211852107.758860071862108.468368351842
101108.174590825806107.779342233988108.569839417624
102108.210456376288107.778492953267108.642419799309
103108.224401651946107.758608405621108.690194898272
104108.226421642756107.729094489047108.723748796466
105108.382892647424107.855915183664108.909870111184
106108.595501140515108.040455019183109.150547261847
107108.703658580107108.121896475549109.285420684664
108108.725034965035108.11773100836109.33233892171
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295195093gkw6i6850hzpe50/1p6r11295195222.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295195093gkw6i6850hzpe50/1p6r11295195222.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295195093gkw6i6850hzpe50/21t0v1295195222.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295195093gkw6i6850hzpe50/21t0v1295195222.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295195093gkw6i6850hzpe50/3t46l1295195222.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295195093gkw6i6850hzpe50/3t46l1295195222.ps (open in new window)


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