Home » date » 2010 » Dec » 20 »

opdracht 10

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 20 Dec 2010 16:11:23 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/20/t1292861461djavx4pet6ay1v4.htm/, Retrieved Mon, 20 Dec 2010 17:11:02 +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/2010/Dec/20/t1292861461djavx4pet6ay1v4.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
108 106,6 122,2 115,8 115,6 124,5 121,7 118,7 113,7 113,4 115,1 143,9 101 103,4 121,5 111,9 117,4 124,3 122 119,7 115 112,2 115,3 142,6 104,1 105,3 124,4 113,9 124,8 131,8 125,6 125 119,7 116,1 120 148,1 109,2 109,4 135,1 114,9 129 138,5 125,6 130,4 120,3 126,2 127,6 150,9 114,6 118,6 131,4 124,5 136,8 136,8 136,6 131 125,8 129,4 124,8 157,1 116,6 114,2 128,4 127,3 133,5 137,2 137,7 131,2 127,7 133,9 124,3 160,6
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.127863990701472
beta0.243685602085768
gamma0.106601253861168


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13101101.507665598291-0.507665598290629
14103.4103.738925385997-0.338925385996987
15121.5121.639533858845-0.139533858844715
16111.9111.952956313147-0.0529563131466801
17117.4117.421632205983-0.0216322059831953
18124.3124.2978059612870.00219403871319912
19122120.9020945985251.09790540147485
20119.7118.4348611400591.26513885994113
21115113.7659307918071.23406920819349
22112.2113.860646306122-1.66064630612205
23115.3115.429321839654-0.129321839654168
24142.6144.135602474634-1.53560247463443
25104.1100.9295251386833.1704748613173
26105.3103.7368592164691.56314078353115
27124.4122.0485614546472.35143854535306
28113.9112.9155044169030.984495583096873
29124.8118.7790364917536.0209635082467
30131.8126.8776259142144.92237408578575
31125.6124.8137736694070.786226330592768
32125122.9134001293262.08659987067446
33119.7118.9633767012660.736623298733889
34116.1119.326623284516-3.22662328451649
35120121.389902011815-1.38990201181525
36148.1150.317445691267-2.21744569126702
37109.2107.9536564895241.24634351047625
38109.4110.79751865771-1.39751865770988
39135.1129.1436881145425.95631188545761
40114.9120.796541935946-5.89654193594566
41129126.4861410549382.51385894506188
42138.5134.1625443964784.33745560352173
43125.6131.749518991346-6.14951899134553
44130.4128.9772597099781.42274029002158
45120.3124.690208787274-4.39020878727382
46126.2123.7430716382052.45692836179498
47127.6126.5945446334931.00545536650689
48150.9155.716778131472-4.81677813147218
49114.6113.227014797981.37298520202017
50118.6115.729569559072.87043044092972
51131.4135.326432488089-3.92643248808852
52124.5124.3270223707510.172977629248834
53136.8131.4770863343445.32291366565605
54136.8139.672204318251-2.87220431825071
55136.6135.1276941512381.47230584876195
56131134.036829711193-3.03682971119269
57125.8128.503010829938-2.70301082993775
58129.4128.3246449974481.07535500255199
59124.8130.737927693135-5.93792769313471
60157.1158.088116452009-0.988116452008597
61116.6116.4397256579560.160274342043635
62114.2118.665008027763-4.46500802776306
63128.4136.202031686404-7.80203168640415
64127.3124.4774479936252.82255200637461
65133.5131.9168984061131.58310159388662
66137.2138.227202787029-1.02720278702856
67137.7133.7352824235443.96471757645551
68131.2132.03431787576-0.834317875759893
69127.7126.372211655421.32778834458045
70133.9126.7451669715637.15483302843691
71124.3129.157843063896-4.85784306389552
72160.6157.0140550878233.58594491217741


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
73116.107541707836109.77325483888122.441828576792
74117.927573541166111.513695389819124.341451692512
75135.909647617774129.383619391048142.4356758445
76126.597921690166119.922988544297133.272854836035
77133.900772741499127.036895911734140.764649571263
78140.056182207149132.961031028382147.151333385917
79136.481921934605129.111865233028143.851978636183
80134.026522598103126.337542842938141.715502353268
81128.896784457177120.845256660625136.94831225373
82129.825012511221121.368316095308138.281708927133
83130.166384504849121.2633422805139.069426729198
84159.540498457592150.151656807631168.929340107554
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292861461djavx4pet6ay1v4/152l01292861478.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292861461djavx4pet6ay1v4/152l01292861478.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292861461djavx4pet6ay1v4/284nf1292861479.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292861461djavx4pet6ay1v4/284nf1292861479.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292861461djavx4pet6ay1v4/384nf1292861479.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292861461djavx4pet6ay1v4/384nf1292861479.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