Home » date » 2011 » May » 20 »

Pieter De Bock Oef 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: Fri, 20 May 2011 09:19: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/20/t13058829096iu06y1ut1hv4u8.htm/, Retrieved Fri, 20 May 2011 11:15:09 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
193.230 199.068 195.076 191.563 191.067 186.665 185.508 184.371 183.046 175.714 175.768 171.029 170.465 170.102 156.389 124.291 99.360 86.675 85.056 128.236 164.257 162.401 152.779 156.005 153.387 153.190 148.840 144.211 145.953 145.542 150.271 147.489 143.824 134.754 131.736 126.304 125.511 125.495 130.133 126.257 110.323 98.417 105.749 120.665 124.075 127.245 146.731 144.979 148.210 144.670 142.970 142.524 146.142 146.522 148.128 148.798 150.181 152.388 155.694 160.662 155.520 158.262 154.338 158.196 160.371 154.856 150.636 145.899 141.242 140.834 141.119 139.104 134.437 129.425 123.155 119.273 120.472 121.523 121.983 123.658 124.794 124.827 120.382 117.395 115.790 114.283 117.271 117.448 118.764 120.550 123.554 125.412 124.182 119.828 115.361 114.226 115.214 115.864 114.276 113.469
 
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.55298969290894
beta0.0295901195827954
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13170.465207.245518963675-36.7805189636753
14170.102187.558447053807-17.4564470538071
15156.389161.519122348371-5.13012234837052
16124.291122.0429338047452.24806619525545
1799.3694.0255926552435.33440734475697
1886.67580.11954509038556.55545490961448
1985.056130.497241356277-45.4412413562767
20128.23699.996077407737828.2399225922622
21164.257111.17734508374453.0796549162556
22162.401132.5523560892329.8486439107699
23152.779151.164438409331.61456159066989
24156.005150.760033339265.24496666074015
25153.387140.54713232990612.8398676700938
26153.19158.197271180858-5.00727118085806
27148.84146.0155019382552.82449806174472
28144.211115.82971984857628.3812801514235
29145.953105.6644785877240.28852141228
30145.542114.2265475541831.3154524458197
31150.271158.051387579523-7.78038757952336
32147.489184.926952533313-37.4379525333133
33143.824173.432384685125-29.6083846851251
34134.754139.883969831799-5.12996983179946
35131.736127.1466664569234.5893335430769
36126.304130.673137371871-4.36913737187055
37125.511119.0444483461116.46655165388938
38125.495125.593780731207-0.0987807312074693
39130.133120.10898209050810.024017909492
40126.257105.92815564946620.3288443505337
41110.32397.100448071529813.2225519284702
4298.41786.709167380077811.7078326199222
43105.749101.9190189991643.82998100083643
44120.665121.851808429494-1.18680842949372
45124.075134.390873293253-10.3158732932535
46127.245123.2560322335163.98896776648361
47146.731120.85815970984825.8728402901515
48144.979133.45004789658911.5289521034105
49148.21137.01703034618311.1929696538173
50144.67144.883117628552-0.213117628551714
51142.97145.49608199744-2.5260819974396
52142.524130.41218042555312.1118195744474
53146.142115.16013858063330.9818614193666
54146.522115.49925568023831.0227443197616
55148.128139.7714018516338.35659814836694
56148.798161.941704836096-13.1437048360956
57150.181165.569189583034-15.3881895830336
58152.388159.722069264881-7.33406926488053
59155.694162.357959314036-6.66395931403557
60160.662151.526034917479.13596508252957
61155.52154.5609441714260.959055828573582
62158.262152.4430977410445.81890225895626
63154.338156.230443881107-1.89244388110743
64158.196148.9232546324239.2727453675765
65160.371141.37290545297918.9980945470205
66154.856135.74387555665219.1121244433477
67150.636143.7431543844776.89284561552287
68145.899155.914792482284-10.0157924822835
69141.242160.741487049076-19.4994870490761
70140.834156.626677459881-15.792677459881
71141.119155.151723001848-14.0327230018476
72139.104147.454234569359-8.35023456935872
73134.437137.024722977954-2.58772297795429
74129.425134.920339864681-5.4953398646806
75123.155128.621234219819-5.46623421981917
76119.273123.887511080067-4.6145110800671
77120.472112.3365265919188.13547340808204
78121.52399.9053493451421.6176506548601
79121.983103.02281040379318.9601895962067
80123.658113.7014838022679.95651619773327
81124.794125.052411468092-0.258411468092035
82124.827133.268604243427-8.44160424342707
83120.382136.799624923596-16.4176249235956
84117.395130.438606619547-13.0436066195474
85115.79120.027978352994-4.23797835299443
86114.283115.722650746628-1.43965074662773
87117.271111.7570377096885.51396229031165
88117.448113.7333761905913.71462380940913
89118.764112.881378924385.88262107561951
90120.55105.58789325232714.9621067476732
91123.554104.0849132763619.4690867236396
92125.412111.27651246046814.1354875395316
93124.182120.6968166208733.48518337912689
94119.828127.711090173141-7.88309017314117
95115.361128.380621834522-13.0196218345223
96114.226125.857508714399-11.631508714399
97115.214120.637692373301-5.42369237330057
98115.864117.381886285159-1.51788628515904
99114.276116.934394197803-2.65839419780274
100113.469113.906504100355-0.43750410035463


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
101111.9789217951279.9180345773316144.039809012908
102105.64615524257468.7529674352973142.539343049851
10397.794249798521656.3968842244173139.191615372626
10491.42719645703845.7505652645845137.103827649492
10587.630352119797637.8358139991389137.424890240456
10686.939017718965333.1457422714561140.732293166474
10789.104123634169331.401728142495146.806519125844
10894.046657778878832.5032068585061155.590108699252
10997.869660210802432.5369988634763163.202321558128
11099.283540180687430.2009971882181168.366083173157
11199.114946491498426.311992484433171.917900498564
11298.542722856381422.0409308872353175.044514825528
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/20/t13058829096iu06y1ut1hv4u8/1gyu21305883136.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t13058829096iu06y1ut1hv4u8/1gyu21305883136.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/20/t13058829096iu06y1ut1hv4u8/2h12m1305883136.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t13058829096iu06y1ut1hv4u8/2h12m1305883136.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/20/t13058829096iu06y1ut1hv4u8/3dyhv1305883136.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t13058829096iu06y1ut1hv4u8/3dyhv1305883136.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