Home » date » 2008 » Jun » 01 »

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 01 Jun 2008 13:15:45 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Jun/01/t1212347820cglus0onknj8e1j.htm/, Retrieved Sun, 01 Jun 2008 19:17:00 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
12.23 12.25 12.33 12.37 12.38 12.41 12.41 12.41 12.43 12.44 12.46 12.46 12.46 12.47 12.55 12.58 12.6 12.62 12.62 12.66 12.7 12.76 12.79 12.81 12.86 13.03 13.09 13.15 13.17 13.18 13.18 13.19 13.19 13.19 13.25 13.24 13.3 13.35 13.35 13.35 13.36 13.37 13.38 13.39 13.4 13.4 13.44 13.44 13.44 13.47 13.52 13.58 13.65 13.66 13.68 13.68 13.77 13.78 13.79 13.79 13.82 13.86 13.94 14 14.02 14.03 14.07 14.1 14.1 14.16 14.17 14.17
 
Text written by user:
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.851663547967142
beta0.000749903072261239
gamma0.086671636330431


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1312.4612.30156527777780.158434722222218
1412.4712.46040062911270.0095993708872566
1512.5512.5599844678501-0.00998446785011176
1612.5812.5899664216077-0.00996642160766292
1712.612.6074573794863-0.00745737948631842
1812.6212.6258304343119-0.00583043431194064
1912.6212.6226687086755-0.00266870867547553
2012.6612.65344800510110.00655199489886016
2112.712.68625108984490.0137489101551065
2212.7612.74477563925280.0152243607472329
2312.7912.77331649941480.0166835005851702
2412.8112.79352737762470.0164726223753302
2512.8612.8714394383643-0.0114394383642846
2613.0312.88370540472010.146294595279945
2713.0913.0995628612762-0.00956286127619954
2813.1513.13001144214170.0199885578582677
2913.1713.1731726811148-0.00317268111482605
3013.1813.1953449701131-0.0153449701130537
3113.1813.1842438293142-0.00424382931419842
3213.1913.2139223127206-0.0239223127205879
3313.1913.2209667184886-0.0309667184885694
3413.1913.2415016582464-0.0515016582464494
3513.2513.21326463634030.0367353636596892
3613.2413.2505945271423-0.0105945271423096
3713.313.30512262619-0.00512262619001014
3813.3513.32482733915400.0251726608460299
3913.3513.4354795421219-0.0854795421218633
4013.3513.4015577716172-0.051557771617194
4113.3613.3833473304182-0.0233473304182468
4213.3713.3880277219281-0.0180277219280764
4313.3813.37462939805350.0053706019465185
4413.3913.4120941811757-0.0220941811757420
4513.413.4204571773973-0.0204571773973008
4613.413.4495376178412-0.0495376178411657
4713.4413.42396789313220.0160321068677813
4813.4413.4429040233725-0.00290402337246576
4913.4413.5039040539385-0.0639040539385398
5013.4713.4737505791643-0.00375057916429888
5113.5213.5581431519462-0.0381431519462136
5213.5813.56479825496910.0152017450309465
5313.6513.60367586501070.0463241349892645
5413.6613.6676745076739-0.00767450767387956
5513.6813.66331428509660.0166857149033515
5613.6813.7099896854053-0.0299896854052601
5713.7713.71157142279590.0584285772040527
5813.7813.8074345000235-0.0274345000235154
5913.7913.8015187024960-0.0115187024959535
6013.7913.7967162695329-0.00671626953291415
6113.8213.8536517739228-0.0336517739228146
6213.8613.85002222694830.00997777305167347
6313.9413.9456591311541-0.00565913115410943
641413.98068083356520.0193191664347605
6514.0214.0234831689078-0.00348316890775102
6614.0314.0443546398909-0.0143546398909251
6714.0714.03460024500260.0353997549973695
6814.114.09660744193010.00339255806985683
6914.114.1277715103394-0.0277715103394236
7014.1614.14907729425790.0109227057421055
7114.1714.1760181336931-0.00601813369305049
7214.1714.1759501710322-0.0059501710322305


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7314.233180418437514.157865424514814.3084954123602
7414.258781861729914.159823030641814.3577406928181
7514.345723726109714.227742669036814.4637047831826
7614.385893556201214.251534367196114.5202527452063
7714.411944280481114.262976363116514.5609121978458
7814.435639672709514.273353873401514.5979254720176
7914.438756642688814.264148174804814.6133651105727
8014.470187418359714.284053718480914.6563211182385
8114.498043101434514.301041586704714.6950446161644
8214.543497675221214.336182337124814.7508130133177
8314.560910599622114.343756468483514.7780647307608
8414.565965135654014.339385341288214.7925449300199
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347820cglus0onknj8e1j/1ldsg1212347739.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347820cglus0onknj8e1j/1ldsg1212347739.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347820cglus0onknj8e1j/22t8q1212347739.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347820cglus0onknj8e1j/22t8q1212347739.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347820cglus0onknj8e1j/3svaa1212347739.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347820cglus0onknj8e1j/3svaa1212347739.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; par3 = multiplicative ;
 
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=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