Home » date » 2009 » Jun » 03 »

exponential smoothing 10b - Kelly Michielsen - MAR 201b

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 03 Jun 2009 02:19:01 -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/03/t1244017172r1wocut1zhjyxwq.htm/, Retrieved Wed, 03 Jun 2009 10:19:35 +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/03/t1244017172r1wocut1zhjyxwq.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 «
104.9 110.9 104.8 94.1 95.8 99.3 101.1 104.0 99.0 105.4 107.1 110.7 117.1 118.7 126.5 127.5 134.6 131.8 135.9 142.7 141.7 153.4 145.0 137.7 148.3 152.2 169.4 168.6 161.1 174.1 179.0 190.6 190.0 181.6 174.8 180.5 196.8 193.8 197.0 216.3 221.4 217.9 229.7 227.4 204.2 196.6 198.8 207.5 190.7 201.6 210.5 223.5 223.8 231.2 244.0 234.7 250.2 265.7 287.6 283.3 295.4 312.3 333.8 347.7 383.2 407.1 413.6 362.7 321.9 239.4 191.0 159.7 166.7
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.957353257069885
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13117.1102.17663081878414.9233691812163
14118.7117.895799141110.804200858889956
15126.5125.9445123739480.555487626051615
16127.5126.5792750466080.920724953391655
17134.6133.8443185730420.755681426957523
18131.8131.948238356519-0.148238356518533
19135.9132.8645553902993.03544460970102
20142.7141.4239187848841.27608121511639
21141.7136.9113804550694.78861954493138
22153.4150.2563509334963.14364906650397
23145154.300635295941-9.3006352959407
24137.7149.168704141094-11.4687041410942
25148.3146.3567136653651.94328633463502
26152.2148.5076530622943.69234693770568
27169.4160.5198599438988.8801400561016
28168.6168.2051485187050.394851481295092
29161.1176.055387922463-14.9553879224631
30174.1157.96845338679816.1315466132021
31179174.0895605192954.91043948070464
32190.6185.2216774321765.37832256782394
33190182.0074720519377.99252794806296
34181.6200.333118707867-18.7331187078675
35174.8182.444294692526-7.64429469252596
36180.5178.9427934068001.55720659320033
37196.8190.9804630555515.81953694444854
38193.8196.099520064709-2.29952006470918
39197204.141850797993-7.14185079799313
40216.3195.45502684454520.8449731554553
41221.4223.226498741323-1.82649874132269
42217.9216.9605283085130.93947169148717
43229.7217.39280782850212.3071921714979
44227.4236.619824888423-9.21982488842281
45204.2217.385637574193-13.1856375741935
46196.6214.734558725146-18.1345587251464
47198.8197.6811115749021.11888842509794
48207.5203.1547248830234.34527511697695
49190.7219.195992521388-28.4959925213879
50201.6191.20646277283010.3935372271696
51210.5211.451524222904-0.951524222904283
52223.5209.55142907948413.948570920516
53223.8229.871774609051-6.07177460905118
54231.2219.57211932768111.6278806723193
55244230.52806214368713.4719378563130
56234.7250.154272103299-15.4542721032990
57250.2224.28165499541325.9183450045866
58265.7260.3041910315355.39580896846536
59287.6266.02252462144521.5774753785553
60283.3291.985011157394-8.68501115739411
61295.4296.698905157106-1.29890515710639
62312.3295.31773744016216.9822625598378
63333.8325.1211475139178.67885248608269
64347.7331.10898771121316.5910122887865
65383.2354.83733862684628.3626613731541
66407.1373.54992552086633.5500744791339
67413.6403.3056698866410.2943301133598
68362.7420.409578669385-57.7095786693847
69321.9348.989932621302-27.0899326213023
70239.4335.578167141133-96.1781671411326
71191244.812215446257-53.812215446257
72159.7196.901756882860-37.2017568828596
73166.7170.130429651811-3.43042965181058


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
74168.438280600603127.694761980994209.181799220213
75176.915212761224119.620827371940234.209598150508
76177.221119879369108.579007853279245.86323190546
77182.887199178161103.05313031362262.721268042702
78180.41676182409093.6103414532014267.223182194979
79180.50529299976786.5206998067393274.489886192794
80183.84424879888781.853255678764285.83524191901
81177.59720128009872.9635156010914282.230886959105
82183.25836761434470.0029317216867296.513803507002
83185.8209810982766.1442313889135305.497730807626
84189.75335281850163.1727874231555316.333918213847
85201.42483570885868.7698022934731334.079869124243
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t1244017172r1wocut1zhjyxwq/1nt4f1244017139.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t1244017172r1wocut1zhjyxwq/1nt4f1244017139.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t1244017172r1wocut1zhjyxwq/2ufuo1244017139.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t1244017172r1wocut1zhjyxwq/2ufuo1244017139.ps (open in new window)


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