Home » date » 2008 » Jun » 01 »

Opgave 10 oef 1 willem dierickx

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 01 Jun 2008 13:30:07 -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/Jun/01/t1212348671ngajh0z1j5c3y7w.htm/, Retrieved Sun, 01 Jun 2008 19:31:15 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
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 time7 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.274854973274752
beta0.0174528263411903
gamma0.87662614165094


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13115107.3710849890807.62891501092015
14126120.1781008443225.82189915567754
15141136.5427254544134.45727454558738
16135132.4815836295792.51841637042088
17125124.2856610060300.714338993970415
18149149.172962641139-0.172962641138525
19170170.015932902319-0.0159329023193209
20170169.7893416367740.210658363226145
21158157.3423952026480.657604797352178
22133132.0310020846690.968997915330988
23114112.6179698856741.38203011432574
24140137.8117996926172.18820030738303
25145141.8692702960473.13072970395265
26150154.230670503883-4.23067050388335
27178169.5787368905648.42126310943615
28163163.535279134548-0.53527913454775
29172150.88028004562921.1197199543707
30178186.563274816568-8.56327481656808
31199209.729942557624-10.7299425576245
32199206.262536204416-7.26253620441608
33184189.192943072255-5.19294307225505
34162157.3731264624384.62687353756198
35146135.20215911860310.7978408813968
36166168.589898544461-2.58989854446054
37171172.425057807298-1.4250578072984
38180179.7981101951030.201889804897291
39193208.778128013111-15.7781280131105
40181187.887029385977-6.88702938597666
41183186.514735444686-3.51473544468621
42218197.08357156043520.9164284395648
43230229.7187916738410.281208326158975
44242231.30786852375710.6921314762426
45209217.760016067638-8.760016067638
46191186.8598417157944.14015828420614
47172164.8817908293737.11820917062684
48194191.7605206334022.23947936659772
49196198.225633501461-2.22563350146129
50196207.499397891270-11.4993978912703
51236225.08580303630310.9141969636969
52235214.99358547569520.0064145243045
53229223.5146820648135.48531793518654
54243257.580294276997-14.580294276997
55264269.438427422852-5.43842742285165
56272277.013533669516-5.01353366951633
57237242.283067701004-5.28306770100352
58211217.26966644941-6.2696664494101
59180191.255685703346-11.2556857033463
60201211.817969221856-10.8179692218559
61204211.761924088343-7.76192408834271
62188213.438092509385-25.438092509385
63235242.602402461502-7.60240246150227
64227232.273607722294-5.27360772229409
65234224.1929959038389.80700409616168
66264245.92177605952318.0782239404773
67302272.68729581374229.3127041862583
68293290.2644898893452.73551011065513
69259254.8770266754484.12297332455199
70229229.645523391416-0.645523391416248
71203199.3508463414093.64915365859133
72229226.5492854935682.45071450643229
73242232.4776402707379.52235972926283
74233225.8292127073557.17078729264486
75267284.583524923987-17.5835249239866
76269271.656501420331-2.65650142033064
77270274.320820653381-4.32082065338085
78315301.24096612443413.7590338755660
79364337.92534612548426.0746538745155
80347336.45047330856410.5495266914356
81312298.36579357378913.6342064262112
82274267.7050699402846.29493005971631
83237237.161751900662-0.161751900661926
84278266.80556411888111.1944358811188
85284281.2623727120952.73762728790541
86277269.3240123721397.67598762786082
87317319.086032989223-2.08603298922259
88313320.134667969163-7.1346679691627
89318320.883864334419-2.8838643344194
90374366.8082359971347.1917640028663
91413416.186680240357-3.18668024035730
92405393.84100233643711.1589976635631
93355351.8953684848453.10463151515455
94306308.227400182515-2.22740018251483
95271266.5483211972814.45167880271862
96306309.229239358864-3.22923935886399
97315314.8295796156570.170420384342776
98301304.046984776360-3.04698477636032
99356348.4407522274577.55924777254279
100348348.516511754091-0.5165117540908
101355354.1833144430220.81668555697837
102422413.3211771205668.67882287943371
103465460.9013714789584.09862852104231
104467447.95627861335819.0437213866424
105404396.7880429355457.21195706445536
106347344.7787899643792.22121003562074
107305303.7409768961751.25902310382537
108336345.057657654639-9.05765765463929
109340352.101440452606-12.1014404526057
110318334.349057334057-16.3490573340572
111362386.496757849826-24.4967578498258
112348371.824983369092-23.8249833690921
113363371.88300074848-8.88300074847996
114435435.460725333532-0.460725333531684
115491478.48539730247112.5146026975285
116505476.53277246475528.4672275352454
117404417.38054896059-13.3805489605897
118359354.6728320995374.3271679004626
119310312.158635349119-2.15863534911881
120337346.306881338648-9.30688133864777
121360351.0434157992188.95658420078223
122342335.30444725836.69555274170017
123406390.8940042128815.1059957871199
124396386.4590190260989.5409809739022
125420406.89634079588713.1036592041131
126472491.070479548327-19.0704795483272
127548543.1420149335894.85798506641106
128559549.3777111992749.62228880072553
129463449.02975219735513.9702478026455
130407399.455417885037.5445821149699
131362347.97506066183214.0249393381676
132405386.0853246755418.9146753244597
133417413.286872743853.7131272561499
134391391.752860004379-0.752860004379386
135419459.317214052471-40.3172140524709
136461434.69335819941526.3066418005853
137472464.2798745525527.72012544744837
138535533.1585030241461.84149697585428
139622615.3871343920816.61286560791859
140606626.140064584157-20.1400645841572
141508509.020761738341-1.02076173834143
142461445.27071573458415.7292842654155
143390394.727036901138-4.72703690113809
144432433.867514911904-1.86751491190398


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
145446.397513472092426.688822667634466.10620427655
146418.986547994825398.484502103232439.488593886419
147463.749707173368442.006591734538485.492822612197
148494.965042338409471.988876595052517.941208081766
149506.122949107584482.136276962898530.109621252269
150573.550385932582547.468799011193599.631972853971
151664.139122101699635.212683081081693.065561122317
152655.087901982859625.606479534423684.569324431296
153547.726606144639520.214971584962575.238240704316
154490.510674033967463.69427880187517.327069266064
155417.874494194049392.190619526104443.558368861994
156462.91197975764442.309981214744483.513978300535
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212348671ngajh0z1j5c3y7w/1ssw21212348599.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212348671ngajh0z1j5c3y7w/1ssw21212348599.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212348671ngajh0z1j5c3y7w/24e1r1212348600.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212348671ngajh0z1j5c3y7w/24e1r1212348600.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212348671ngajh0z1j5c3y7w/3vcdt1212348600.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212348671ngajh0z1j5c3y7w/3vcdt1212348600.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=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