Home » date » 2008 » May » 26 »

triple exponential smoothing2 - Katrien Devillé

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 26 May 2008 10:20:06 -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/26/t1211818882gw511xraai4axdh.htm/, Retrieved Mon, 26 May 2008 18:21:22 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
20.18 20.19 20.3 20.47 20.47 20.46 20.46 20.46 20.52 20.64 20.65 20.66 20.66 20.66 20.67 20.71 20.73 20.73 20.74 20.74 20.75 20.75 20.77 20.78 20.78 20.8 20.84 20.85 20.86 20.86 20.86 20.86 20.9 20.92 20.95 20.95 20.95 20.96 21.1 21.18 21.19 21.19 21.19 21.19 21.19 21.21 21.22 21.22 21.22 21.23 21.41 21.42 21.43 21.44 21.44 21.44 21.48 21.53 21.54 21.54 21.54 21.54 21.54 21.54 21.54 21.54 21.54 21.54 21.57 21.6 21.61 21.6 21.6 21.71 21.75 21.84 21.85 21.92 21.92 21.93 22 22 21.99 22.01 22.01 22.06 22.03 22.05 22.05 22.06 22.06 22.13 22.06 22.25 22.28 22.18
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.793474145780884
beta0.00479652073271958
gamma0.737741601640285


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1320.6620.55183013384750.108169866152533
1420.6620.62977881181780.0302211881822245
1520.6720.65805643417930.0119435658206584
1620.7120.70895004201840.00104995798160701
1720.7320.7357954823498-0.00579548234976812
1820.7320.7367669411756-0.00676694117561283
1920.7420.7469423940709-0.00694239407087593
2020.7420.7461152430691-0.00611524306907185
2120.7520.7538380170145-0.00383801701451247
2220.7520.7533511954977-0.00335119549767526
2320.7720.7749058575943-0.00490585759431639
2420.7820.7856242723208-0.00562427232076601
2520.7820.8404518388369-0.0604518388369435
2620.820.77225595880800.0277440411920438
2720.8420.79545077647700.0445492235230347
2820.8520.8706296669005-0.0206296669004580
2920.8620.8790969409233-0.0190969409233368
3020.8620.8690517876523-0.00905178765234993
3120.8620.8771298462342-0.0171298462342016
3220.8620.8679856040254-0.00798560402539295
3320.920.87425323599580.0257467640042393
3420.9220.89703572848290.0229642715171323
3520.9520.93921169576620.0107883042338450
3620.9520.9622350050685-0.0122350050685149
3720.9521.0036805635178-0.0536805635177693
3820.9620.95407272219450.00592727780550817
3921.120.96230343508060.137696564919395
4021.1821.10186268055310.0781373194469275
4121.1921.18969325483650.000306745163527467
4221.1921.1971289285829-0.0071289285829117
4321.1921.2061789227885-0.0161789227885443
4421.1921.1997346735471-0.00973467354705448
4521.1921.2104861590069-0.0204861590069179
4621.2121.19648728836070.0135127116393505
4721.2221.2298839320915-0.00988393209154026
4821.2221.2333421756721-0.0133421756720722
4921.2221.268361062396-0.0483610623959976
5021.2321.2323034501463-0.00230345014628952
5121.4121.25446805103180.155531948968161
5221.4221.39960073809580.0203992619042452
5321.4321.42997308822712.69117729345680e-05
5421.4421.43617670580970.00382329419034022
5521.4421.4527830080177-0.0127830080177311
5621.4421.4502035593178-0.0102035593177519
5721.4821.45924243178150.0207575682184924
5821.5321.48348162354470.046518376455321
5921.5421.540120982806-0.000120982805999148
6021.5421.5513302409796-0.0113302409796461
6121.5421.5835841447035-0.0435841447034768
6221.5421.5588725350669-0.0188725350668868
6321.5421.592851032018-0.0528510320180118
6421.5421.551719275084-0.0117192750840189
6521.5421.5531290332296-0.0131290332296388
6621.5421.5490287564667-0.00902875646671575
6721.5421.5524391071715-0.0124391071714847
6821.5421.5500450030218-0.0100450030217978
6921.5721.56351119794050.0064888020595184
7021.621.57982775520760.0201722447924197
7121.6121.60784927288660.00215072711336362
7221.621.6185445899320-0.0185445899319525
7321.621.6395937379819-0.0395937379818747
7421.7121.62120494978240.088795050217648
7521.7521.73542594076910.0145740592308918
7621.8421.75404350857630.0859564914237474
7721.8521.83310879713210.0168912028678925
7821.9221.85387948901150.0661205109884762
7921.9221.91713922014920.00286077985083111
8021.9321.92800670572430.00199329427568173
812221.95463521774560.0453647822543672
822222.004923190723-0.00492319072300873
8321.9922.0111590373927-0.0211590373927102
8422.0122.00093141135100.00906858864895455
8522.0122.0420028126096-0.0320028126095586
8622.0622.05052069249410.00947930750593784
8722.0322.0915045060217-0.0615045060216524
8822.0522.0610659523722-0.0110659523721566
8922.0522.0525434402411-0.00254344024108377
9022.0622.0653620495792-0.00536204957916908
9122.0622.0618961530736-0.00189615307357016
9222.1322.06852112748550.0614788725145097
9322.0622.1490177600930-0.0890177600929754
9422.2522.08440883662120.165591163378789
9522.2822.22345832105710.0565416789429101
9622.1822.2797955253477-0.0997955253476555


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
9722.228278816968922.145118090854522.3114395430833
9822.268825599506122.160013264657222.377637934355
9922.291555741123722.161916071727922.4211954105196
10022.31799769750122.170255702198022.4657396928041
10122.319697632100522.155817556769522.4835777074314
10222.334413630057722.155652727134722.5131745329807
10322.335896767885822.143372869652622.5284206661189
10422.354039760035722.148445825500922.5596336945705
10522.362826904760422.144910903876922.5807429056439
10622.408344099441822.178341624183622.6383465747000
10722.399009346513322.157913138125422.6401055549011
10822.386066775666717.422240424249127.3498931270843
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211818882gw511xraai4axdh/1darl1211818800.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211818882gw511xraai4axdh/1darl1211818800.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211818882gw511xraai4axdh/2qc3o1211818800.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211818882gw511xraai4axdh/2qc3o1211818800.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211818882gw511xraai4axdh/39zsu1211818800.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211818882gw511xraai4axdh/39zsu1211818800.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