Home » date » 2008 » May » 27 »

Exponential smoothing - Joachim Van Der Aa - Eigen reeks

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 13:48:37 -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/t1211917793otsox47usmh8a0k.htm/, Retrieved Tue, 27 May 2008 21:49:53 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
66.2 66.2 66.08 66.31 66.39 66.37 66.23 66.27 66.27 66.27 66.28 66.28 66.28 66.26 66.13 65.86 65.9 65.94 65.94 65.91 65.95 65.91 66.08 66.47 66.47 66.56 66.78 67.08 67.28 67.27 67.27 67.26 67.37 67.5 67.63 67.64 67.64 67.71 67.87 67.93 68.33 68.39 68.39 68.58 68.44 68.49 68.52 68.54 68.54 68.54 68.62 68.75 68.71 68.72 68.72 68.72 68.92 68.9 69.12 69.09 69.09 69.1 69.16 68.83 68.52 68.53 68.53 68.51 68.38 68.44 68.41 68.42 68.42 68.45 68.63 68.84 68.72 68.37 68.37 68.47 68.69 68.46 68.17 68.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 time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.831008185222246
beta0.0653557661833785
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1366.2866.19850555555560.0814944444444166
1466.2666.3090027158319-0.0490027158318611
1566.1366.1996442726144-0.0696442726144255
1665.8665.9293500643624-0.0693500643623537
1765.965.9605338619797-0.0605338619796498
1865.9465.9728396640016-0.0328396640016138
1965.9465.9501260104337-0.0101260104337371
2065.9165.9111543000223-0.00115430002233552
2165.9565.93040879633920.0195912036608235
2265.9165.84963366401270.0603663359872826
2366.0865.98560490047390.0943950995260678
2466.4766.37039769356080.0996023064392375
2566.4766.579115797402-0.109115797401998
2666.5666.5022197285330.0577802714669673
2766.7866.4769684713040.303031528695982
2867.0866.53551898808080.544481011919189
2967.2867.13072755340830.149272446591723
3067.2767.3858952883628-0.115895288362850
3167.2767.3573203843956-0.0873203843956532
3267.2667.3108433774492-0.0508433774492119
3367.3767.34474070621870.0252592937812892
3467.567.3283033496250.171696650374969
3567.6367.62132493432050.00867506567951182
3667.6467.9898914602985-0.349891460298451
3767.6467.8195201855698-0.179520185569828
3867.7167.7382130901932-0.0282130901932334
3967.8767.70416722670760.165832773292436
4067.9367.703277141370.226722858630012
4168.3367.96415094880870.365849051191333
4268.3968.36275884947930.0272411505206662
4368.3968.4740087424403-0.084008742440318
4468.5868.4526762315720.127323768428028
4568.4468.6733972916619-0.233397291661888
4668.4968.47861761277970.0113823872202801
4768.5268.6140172656088-0.0940172656088407
4868.5468.8342233209066-0.294223320906596
4968.5468.7394999838469-0.199499983846906
5068.5468.6666699541216-0.126669954121581
5168.6268.57776126623370.0422387337663253
5268.7568.47190438350780.278095616492209
5368.7168.7892216109981-0.0792216109980899
5468.7268.7268189234054-0.00681892340541879
5568.7268.7551831907983-0.0351831907983353
5668.7268.777009246645-0.057009246644995
5768.9268.74044848200470.179551517995307
5868.968.9094854681044-0.0094854681044012
5969.1268.98788578788930.132114212110736
6069.0969.3526109382738-0.262610938273767
6169.0969.292317295045-0.202317295044978
6269.169.2214528005383-0.121452800538307
6369.1669.15770621042040.00229378957959625
6468.8369.0486255925776-0.218625592577609
6568.5268.8559151873218-0.335915187321788
6668.5368.541627612602-0.0116276126019415
6768.5368.51013543964310.0198645603568934
6868.5168.5259408593804-0.0159408593803505
6968.3868.5176382229576-0.137638222957591
7068.4468.32806841598830.111931584011657
7168.4168.474816971077-0.0648169710770219
7268.4268.5420102967654-0.12201029676541
7368.4268.5492071759047-0.129207175904739
7468.4568.4971950293378-0.0471950293378285
7568.6368.46453424550370.165465754496338
7668.8468.41104418996920.428955810030772
7768.7268.7291560485346-0.0091560485346207
7868.3768.7514544109398-0.38145441093981
7968.3768.4081138047678-0.038113804767832
8068.4768.35669777629080.113302223709240
8168.6968.4292605560210.260739443978949
8268.4668.6285866800685-0.168586680068472
8368.1768.5127834999137-0.342783499913665
8468.1768.3246527691646-0.154652769164557


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8568.287068029947967.940755411110468.6333806487854
8668.346865636444567.884335298061468.8093959748276
8768.382503608474567.816974367994768.9480328489543
8868.220192547808867.558144978505968.8822401171116
8968.068658932880267.31361401316668.8237038525945
9067.997005580224767.150903699567368.843107460882
9168.010750611417467.074587591782568.9469136310522
9268.000737689155466.97490203870269.0265733396087
9367.982049652956166.866518985518269.097580320394
9467.855974073968566.650437515249969.0615106326871
9567.82381361907466.527752090714369.1198751474336
9667.943931962251566.556672983916969.3311909405861
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211917793otsox47usmh8a0k/11gm71211917710.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211917793otsox47usmh8a0k/11gm71211917710.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211917793otsox47usmh8a0k/26y6r1211917711.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211917793otsox47usmh8a0k/26y6r1211917711.ps (open in new window)


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