Home » date » 2009 » Jun » 02 »

opgave10oef2-MerelBoels-MAR204A

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 02 Jun 2009 13:05:26 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/02/t1243969573b314re07dxo1nu2.htm/, Retrieved Tue, 02 Jun 2009 21:06:17 +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/2009/Jun/02/t1243969573b314re07dxo1nu2.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
672.1 674.4 676.6 678.7 680.8 682.9 684 684.1 684.1 684.2 685.9 689.2 692.4 695.7 697.2 696.8 696.4 695.9 696.2 697.2 705.2 706.2 707.4 708.7 710 711.3 711.5 710.7 710 709.2 707.9 706.1 704.4 702.7 701.5 700.8 700 699.3 698.8 698.4 696.8 695.1 694.3 693.4 692.4 691 689.7 688.3 686 683.6 682.6 681.9 681 679.9 678.5 677.5 678 679 679.8 681.3 684.2 687 688.4 689.5 691.1 693.3 695.9 698 699.6 701.6 703.5 705.5 708.1 709.6 710.3
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.90268835297018
beta0.176277296760850
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13692.4684.0051451236528.39485487634829
14695.7696.594880733925-0.894880733925334
15697.2698.486464448622-1.28646444862147
16696.8697.544674972548-0.744674972548069
17696.4696.955381403424-0.555381403424462
18695.9696.451132961243-0.551132961242729
19696.2702.754426404273-6.55442640427282
20697.2696.2530129881380.946987011861552
21705.2696.5600814596238.63991854037715
22706.2705.4056564459390.794343554061243
23707.4709.157720691802-1.75772069180198
24708.7712.198845026445-3.49884502644522
25710713.99324936466-3.99324936466064
26711.3713.02706703545-1.72706703544986
27711.5712.493418892771-0.993418892770933
28710.7710.2395793643260.460420635674041
29710709.3241377416630.67586225833702
30709.2708.6998413141630.500158685837505
31707.9714.412560412607-6.51256041260751
32706.1707.641520449921-1.54152044992099
33704.4705.013467569147-0.613467569147474
34702.7701.8657908119070.834209188093041
35701.5702.531651568538-1.03165156853834
36700.8703.275296545231-2.47529654523146
37700703.297219569422-3.29721956942183
38699.3700.648722065727-1.34872206572754
39698.8698.0768571280410.723142871959453
40698.4695.3808600797033.01913992029665
41696.8695.0780227810151.72197721898533
42695.1693.8377133105251.26228668947465
43694.3698.009258771678-3.70925877167838
44693.4693.2350551356970.164944864302583
45692.4691.5016138783110.898386121688645
46691689.3854936474551.61450635254516
47689.7690.189028164016-0.489028164015735
48688.3690.948805642573-2.64880564257339
49686690.351764831617-4.35176483161717
50683.6686.406798071727-2.80679807172692
51682.6681.9814128099020.618587190098424
52681.9678.7080195382643.19198046173631
53681677.772730799733.2272692002698
54679.9677.4223595591032.47764044089661
55678.5681.856404706074-3.35640470607404
56677.5677.551304835978-0.0513048359782715
57678675.4515836915932.54841630840667
58679674.9381546780454.06184532195516
59679.8678.1413212729751.65867872702495
60681.3681.338164067972-0.0381640679718203
61684.2684.0550264798380.144973520162011
62687686.1863625892320.813637410768251
63688.4687.8163706829440.583629317056079
64689.5687.187912744862.31208725513989
65691.1687.7283570040583.37164299594247
66693.3689.7089479504413.59105204955858
67695.9697.115371278848-1.21537127884847
68698697.9048086265930.0951913734072605
69699.6699.0261304018350.573869598164947
70701.6699.3492915243352.25070847566496
71703.5702.9082447566690.591755243331249
72705.5707.103683877399-1.60368387739868
73708.1710.35574720215-2.25574720215036
74709.6711.910659925909-2.31065992590914
75710.3711.67951757201-1.37951757200995


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
76710.051098077342704.612480579747715.489715574936
77708.820264466602700.900829447093716.739699486111
78707.460950791398697.154156568736717.767745014059
79710.364874086449697.59574101564723.134007157258
80711.748664191939696.475068322154727.022260061723
81712.16666262262694.330986273687730.002338971553
82711.360379630604690.913822607338731.806936653871
83711.616771213069688.44968128461734.783861141527
84713.883003828457687.841054684109739.924952972805
85717.606573058886688.535385202097746.677760915676
86720.63167034423688.454354912587752.808985775873
87722.368428596778687.041333199465757.695523994091
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243969573b314re07dxo1nu2/1pmg61243969523.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243969573b314re07dxo1nu2/1pmg61243969523.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243969573b314re07dxo1nu2/2qsdp1243969523.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243969573b314re07dxo1nu2/2qsdp1243969523.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243969573b314re07dxo1nu2/3rjdh1243969523.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243969573b314re07dxo1nu2/3rjdh1243969523.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