Home » date » 2008 » May » 27 »

Exponential smoothing - Eigen reeks: Faxtoestellen - Kirsten Witvrouwen

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 27 May 2008 06:41:58 -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/May/27/t1211892205z5lbz2onfjquyhh.htm/, Retrieved Tue, 27 May 2008 14:43:28 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
77.5 77.7 76.6 77 76.5 77.6 77.8 76.9 76.9 77 77 76.3 76.5 77.1 76.4 75.4 75.4 75.5 75.5 75.8 75.7 75.9 76.1 76 76 75.89 74.87 74.9 74.79 74.64 74.09 74.33 73.93 73.78 72.85 71.51 71.5 71.5 71.31 70.85 70.62 70.07 68.83 68.82 68.4 68.21 67.75 67.7 67.42 66.27 64.8 62.69 62.75 62.31 62.4 61.75 61.69 60.39 59.9 59.62 58.97 58.54 58.32 56.03 53.63 53.61 53.48 53.48 52.81 52.8 52.57 52.36
 
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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0938618268174845
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
376.677.9-1.30000000000001
47776.67797962513730.322020374862731
576.577.1082050457943-0.608205045794335
677.676.55111780911651.04888219088352
777.877.74956780766910.0504321923308737
876.977.9543014653717-1.05430146537171
976.976.9553428038156-0.0553428038155772
107776.95014822714820.0498517728517527
117777.0548274056182-0.0548274056181981
1276.377.0496812051672-0.749681205167207
1376.576.27931475771950.220685242280524
1477.176.50002867771160.599971322288397
1576.477.1563430820597-0.756343082059672
1675.476.3853513386768-0.985351338676793
1775.475.29286446197150.107135538028459
1875.575.3029203992880.19707960071203
1975.575.42141865063930.0785813493607463
2075.875.4287944396440.371205560355961
2175.775.7636364716639-0.0636364716638553
2275.975.65766343618130.242336563818739
2376.175.8804095887660.219590411234023
247676.101020745916-0.101020745915989
257675.99153875415790.0084612458421418
2675.8975.9923329421497-0.102332942149744
2774.8775.872727785256-1.00272778525596
2874.974.75860992353120.141390076468809
2974.7974.8018810544024-0.0118810544024228
3074.6474.6907658769317-0.0507658769316919
3174.0974.5360008989829-0.446000898982888
3274.3373.94413843984210.385861560157878
3373.9374.2203561107772-0.290356110777168
3473.7873.793102755792-0.0131027557920191
3572.8573.641872907197-0.791872907197032
3671.5172.6375462695202-1.12754626952024
3771.571.19171271684180.308287283158165
3871.571.21064912442370.289350875576346
3971.3171.23780812619650.0721918738035043
4070.8571.054584187353-0.204584187353078
4170.6270.57538154179010.0446184582098681
4270.0770.3495695117875-0.279569511787514
4368.8369.7733286066886-0.943328606688638
4468.8268.44478606037570.375213939624331
4568.468.4700043261962-0.0700043261961696
4668.2168.04343359225430.166566407745705
4767.7567.8690678195717-0.119067819571711
4867.767.39789189651160.30210810348845
4967.4267.37624831500130.0437516849986537
5066.2767.1003549280817-0.830354928081661
5164.865.872416297625-1.07241629762501
5262.6964.3017573448211-1.61175734482109
5362.7562.04047485604970.709525143950323
5462.3162.16707218223380.142927817766207
5562.461.74048764831240.659512351687631
5661.7561.8923906824505-0.142390682450461
5761.6961.22902563287390.46097436712612
5860.3961.2122935290884-0.822293529088363
5959.959.83511155626790.064888443732059
6059.6259.3512021041360.268797895864026
6158.9759.0964319656865-0.126431965686464
6258.5458.4345648304190.105435169580993
6358.3258.01446116804670.305538831953314
6456.0357.8231396009775-1.79313960097751
6553.6355.364832242291-1.73483224229098
6653.6152.80199771880770.808002281192316
6753.4852.85783828899310.62216171100691
6853.4852.78623552376410.693764476235913
6952.8152.8513535248847-0.0413535248846557
7052.852.17747200749360.622527992506349
7152.5752.22590362211530.344096377884689
7252.3652.02820113674490.331798863255145


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7351.849344384185950.643708447719153.0549803206528
7451.338688768371949.551851016600153.1255265201436
7550.828033152557848.538206688526553.1178596165892
7650.317377536743847.555002095248953.0797529782386
7749.806721920929746.584821937976753.0286219038828
7849.296066305115745.619290365202652.9728422450287
7948.785410689301644.653769933851652.9170514447516
8048.274755073487643.685466089856552.8640440571186
8147.764099457673542.71259995181652.815598963531
8247.253443841859441.733997420785452.7728902629335
8346.742788226045440.748865486855952.7367109652349
8446.232132610231339.756661808947152.7076034115155
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211892205z5lbz2onfjquyhh/19uj21211892113.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211892205z5lbz2onfjquyhh/19uj21211892113.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211892205z5lbz2onfjquyhh/2jkm31211892113.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211892205z5lbz2onfjquyhh/2jkm31211892113.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211892205z5lbz2onfjquyhh/3yp2v1211892113.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211892205z5lbz2onfjquyhh/3yp2v1211892113.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=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