Home » date » 2011 » May » 19 »

iko Guy Hendrickx opgave 10 oef 2

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 19 May 2011 15:04:32 +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/19/t13058172465u8jba1bl6ns1hg.htm/, Retrieved Thu, 19 May 2011 17:00:49 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
12,94 12,79 12,82 12,85 12,85 12,72 12,62 12,67 12,6 12,54 12,64 12,67 12,51 12,59 12,52 12,5 12,58 12,51 12,47 12,44 12,51 12,27 12,51 12,41 12,35 12,39 12,31 12,31 12,21 12,1 12,01 11,85 12,12 11,96 11,99 11,93 11,91 11,83 11,92 11,86 11,94 11,87 11,86 11,92 11,82 11,85 11,77 11,82 11,61 11,56 11,45 11,4 11,38 11,33 11,19 11,15 10,98 10,92 10,99 11 10,9 10,99 11,04 11,03 10,99 11 10,87 10,88 10,91 10,92 10,83 10,9 10,82 10,79 10,77 10,72 10,71 10,63 10,61 10,57 10,65 10,57 10,57 10,57 10,52 10,43 10,35 10,2 10,2 10,17 10,14 10,05 10,12 10,12
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.629581570005306
beta0.0178081048922574
gamma0.529826221021731


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1312.5112.6435229700855-0.133522970085474
1412.5912.6349101993434-0.0449101993434446
1512.5212.529082878283-0.00908287828298882
1612.512.49737661083710.00262338916289373
1712.5812.57473647282860.00526352717135481
1812.5112.50340086323470.00659913676526713
1912.4712.38464678273480.085353217265153
2012.4412.4947651040079-0.054765104007867
2112.5112.39063683848830.11936316151165
2212.2712.4137247783001-0.14372477830015
2312.5112.42831600733870.0816839926612918
2412.4112.5099029236739-0.099902923673886
2512.3512.25484111650940.095158883490571
2612.3912.4080826322851-0.0180826322850898
2712.3112.3269671055889-0.0169671055889111
2812.3112.29329639608580.016703603914241
2912.2112.3808987914758-0.170898791475841
3012.112.197801427994-0.0978014279940229
3112.0112.026488915786-0.0164889157860362
3211.8512.0415624001407-0.191562400140707
3312.1211.88052166433840.239478335661648
3411.9611.92398426574370.036015734256301
3511.9912.0943754519732-0.104375451973196
3611.9312.0194994657449-0.0894994657448507
3711.9111.80570091668060.104299083319377
3811.8311.9390060356676-0.109006035667621
3911.9211.79637992545510.123620074544874
4011.8611.8549188394240.00508116057597441
4111.9411.89534569416620.0446543058338378
4211.8711.86167928653180.0083207134681853
4311.8611.77370410568570.0862958943142864
4411.9211.8208485385740.0991514614260236
4511.8211.9324092011001-0.112409201100084
4611.8511.71543198873010.134568011269923
4711.7711.9224551321924-0.152455132192408
4811.8211.8218276036797-0.00182760367968093
4911.6111.7038420045317-0.0938420045317052
5011.5611.6708989120675-0.110898912067508
5111.4511.5730749274698-0.123074927469792
5211.411.4506084677555-0.050608467755497
5311.3811.4606897001496-0.0806897001496143
5411.3311.3365219852837-0.0065219852836993
5511.1911.2498826147686-0.0598826147685667
5611.1511.2012571434799-0.0512571434799316
5710.9811.1686550370624-0.188655037062434
5810.9210.9433431760111-0.0233431760110587
5910.9910.98404470518690.00595529481313584
601111.0039140455952-0.00391404559521291
6110.910.85773577873520.0422642212648281
6210.9910.89984051377880.0901594862211894
6311.0410.92116915593020.118830844069764
6411.0310.96289595215080.0671040478491758
6510.9911.0401746643781-0.0501746643781242
661110.9491082541590.0508917458410192
6710.8710.888120433166-0.018120433165965
6810.8810.86792603822090.0120739617791248
6910.9110.84938628596070.0606137140392669
7010.9210.81740343768770.102596562312346
7110.8310.9485066650829-0.11850666508292
7210.910.89204701222680.00795298777321207
7310.8210.7665027803070.0534972196929662
7410.7910.8293052876537-0.039305287653697
7510.7710.7775266294246-0.00752662942463544
7610.7210.7309070155251-0.010907015525083
7710.7110.7365376449181-0.0265376449181165
7810.6310.6809357669128-0.0509357669128097
7910.6110.54190148485660.0680985151433671
8010.5710.5824878960753-0.0124878960753136
8110.6510.55830842911340.0916915708866348
8210.5710.55477719836430.0152228016357085
8310.5710.5871448951368-0.0171448951367736
8410.5710.6201223426595-0.0501223426595274
8510.5210.46710518071030.0528948192896781
8610.4310.5114603307166-0.081460330716551
8710.3510.4390508846258-0.0890508846258005
8810.210.3392001081631-0.139200108163061
8910.210.2583121981844-0.058312198184419
9010.1710.1748811437663-0.00488114376633675
9110.1410.08568351916360.0543164808364267
9210.0510.0991029740418-0.0491029740417837
9310.1210.06923244195450.0507675580455391
9410.1210.02138494159350.09861505840645


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
9510.09729372782379.9314561860603710.2631312695871
9610.1321767014069.9352125235410610.3291408792709
9710.02907896115369.8043873704698310.2537705518373
9810.01131671579829.7611502211680210.2614832104284
999.987169195376479.713138733952610.2611996568003
1009.933005171474379.63632102752110.2296893154277
1019.956654711212699.6382578651502410.2750515572751
1029.922100734378889.582741310158510.2614601585993
1039.84932743798489.4896147789931610.2090400969764
1049.809377705289169.4298140079089310.1889414026694
1059.831696657655969.4327004886405310.2306928266714
1069.762382902244179.344306188362110.1804596161262
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t13058172465u8jba1bl6ns1hg/1ry541305817469.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t13058172465u8jba1bl6ns1hg/1ry541305817469.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t13058172465u8jba1bl6ns1hg/2m6mg1305817469.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t13058172465u8jba1bl6ns1hg/2m6mg1305817469.ps (open in new window)


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