Home » date » 2011 » Jan » 16 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 16 Jan 2011 21:38:38 +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/Jan/16/t1295213807fyclr29bqj7ussn.htm/, Retrieved Sun, 16 Jan 2011 22:36:48 +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/2011/Jan/16/t1295213807fyclr29bqj7ussn.htm/},
    year = {2011},
}
@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 = {2011},
    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 «
98,1 98,0 98,3 98,5 98,7 99,3 99,5 99,8 100,3 99,3 99,6 99,3 99,4 99,7 100,0 99,3 100,3 100,8 101,4 101,1 100,6 99,5 99,1 98,8 99,1 98,8 98,5 99,0 99,0 100,6 101,0 101,8 101,8 101,8 101,8 102,4 103,0 103,3 103,6 104,1 104,5 105,6 105,9 106,0 106,3 107,3 107,1 107,3 107,7 108,0 108,9 108,5 109,0 108,9 109,0 108,9 110,3 109,4 108,6 108,0 108,4 108,0 108,0 107,6 107,5 107,9 108,0 107,5 106,8 106,7 107,2 107,8
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk
R Framework
error message
Warning: there are blank lines in the 'Data' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.100572298014721
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
398.397.90.399999999999991
498.598.2402289192060.25977108079411
598.798.46635469375910.233645306240874
699.398.68985293912810.610147060871867
799.599.3512168311670.148783168833063
899.899.56618029636240.233819703637607
9100.399.88969608127830.410303918721652
1099.3100.430961289269-1.13096128926863
1199.699.31721791344120.282782086558811
1299.399.6456579577238-0.345657957723802
1399.499.31089434258840.0891056574115652
1499.799.41985590332050.28014409667955
1510099.74803063889880.251969361101231
1699.3100.073371776574-0.773371776574024
17100.399.29559199978421.00440800021576
18100.8100.396607620510.403392379489688
19101.4100.9371777191170.46282228088279
20101.1101.583724819478-0.483724819478027
21100.6101.235075502776-0.635075502776346
2299.5100.671204500049-1.17120450004927
2399.199.4534137720341-0.353413772034145
2498.899.0178701368306-0.217870136830612
2599.198.69595843650080.40404156349922
2698.899.0365938250354-0.236593825035357
2798.598.7127990403554-0.212799040355449
289998.39139735185160.60860264814842
299998.95260591875370.0473940812462814
30100.698.9573724504171.64262754958304
31101100.7225752778610.277424722139202
32101.8101.1504765196920.64952348030755
33101.8102.015800588721-0.215800588721493
34101.8101.994097027601-0.194097027600847
35101.8101.974576243497-0.174576243497199
36102.4101.957018709510.442981290490096
37103102.6015703558720.398429644127972
38103.3103.2416413407790.0583586592208434
39103.6103.5475106052460.052489394753934
40104.1103.8527895842980.247210415702142
41104.5104.3776521038980.1223478961018
42105.6104.7899569129660.810043087033563
43105.9105.97142480772-0.0714248077203194
44106106.264241450673-0.264241450672642
45106.3106.337666080748-0.0376660807477549
46107.3106.633877916450.666122083550263
47107.1107.700871345151-0.60087134515075
48107.3107.440440333158-0.140440333157727
49107.7107.6263159261180.0736840738818927
50108108.033726502755-0.0337265027554992
51108.9108.3303345508690.569665449130625
52108.5109.287627114188-0.78762711418804
53109108.8084136453350.191586354664565
54108.9109.327681925292-0.427681925292305
55109109.184668971246-0.18466897124631
56108.9109.266096388436-0.366096388436048
57110.3109.1292772333561.17072276664385
58109.4110.647019512336-1.24701951233567
59108.6109.621603894311-1.02160389431089
60108108.718858842999-0.718858842999239
61108.4108.0465615572110.353438442789397
62108108.482107673609-0.482107673608681
63108108.033620996983-0.0336209969833305
64107.6108.030239656055-0.430239656055178
65107.5107.586969465149-0.086969465148627
66107.9107.4782227461820.421777253818476
67108107.9206418538480.0793581461516055
68107.5108.028623084973-0.528623084973049
69106.8107.475458246534-0.67545824653368
70106.7106.707525858467-0.00752585846677789
71107.2106.6067689655860.593231034413748
72107.8107.1664315739710.6335684260291


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
73107.830151006526106.757616873859108.902685139194
74107.860302013052106.265411162607109.455192863497
75107.890453019579105.840254796812109.940651242345
76107.920604026105105.440179077737110.401028974473
77107.950755032631105.04997358348110.851536481782
78107.980906039157104.662373426431111.299438651884
79108.011057045683104.273389904563111.748724186804
80108.04120805221103.880643840552112.201772263868
81108.071359058736103.482639620633112.660078496839
82108.101510065262103.078405358007113.124614772517
83108.131661071788102.667297459258113.596024684319
84108.161812078314102.248886987747114.074737168882
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295213807fyclr29bqj7ussn/1nrep1295213914.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295213807fyclr29bqj7ussn/1nrep1295213914.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295213807fyclr29bqj7ussn/232151295213914.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295213807fyclr29bqj7ussn/232151295213914.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295213807fyclr29bqj7ussn/3qltj1295213914.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295213807fyclr29bqj7ussn/3qltj1295213914.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Double ; 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