Home » date » 2009 » Aug » 20 »

Exponential smoothing (triple) Hotelkamers

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 20 Aug 2009 00:45:21 -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/Aug/20/t1250750822anzpnegcepi39di.htm/, Retrieved Thu, 20 Aug 2009 08:47:02 +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/Aug/20/t1250750822anzpnegcepi39di.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 «
613.20 614.70 618.40 628.20 629.00 629.70 630.40 630.40 639.30 639.40 640.90 640.80 642.10 645.30 647.60 648.40 648.80 648.90 648.90 648.90 650.30 650.30 650.00 650.00 650.50 658.40 666.00 675.50 680.70 690.60 690.60 691.10 692.90 693.80 692.80 697.50 699.00 702.10 704.80 715.50 721.80 726.40 727.70 727.40 731.30 734.40 733.40 733.40 738.10 742.60 747.20 751.10 752.60 758.90 759.10 764.30 765.60 767.60 767.60 765.60 768.20 770.90 775.10 777.60 778.60 778.90 779.40 779.90 781.70 789.10 788.70 788.80 790.80 794.10 795.10 797.30 803.80 805.60 804.60 804.50 805.80 806.80 805.20 814.90 816.60 819.50 823.00 824.00 831.40 831.70 831.10 832.10 833.30 838.80 838.00 837.30 994.20 994.20 994.20 994.20 994.20 1092.60 1100.00 1100.00 1092.60 1000.70 1000.70 1000.50 1000.50 1000.50 1000.50 1000.50 1000.50 1087.70 1113.20 1116.00 1085.20 1031.30 1028.70 1027.50 1027.50 1027.50 1027.50 1027.50 1027.50 etc...
 
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.85113803258568
beta0.000776052458181784
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13642.1631.01899038461611.0810096153845
14645.3643.6630377462131.63696225378703
15647.6647.682478475829-0.0824784758291344
16648.4649.055049993036-0.655049993035732
17648.8649.619018103533-0.819018103532812
18648.9649.813719068193-0.913719068192677
19648.9649.26054623663-0.360546236629602
20648.9648.0279616898040.872038310195649
21650.3656.732552734673-6.43255273467298
22650.3650.849012982438-0.549012982438171
23650651.76448170791-1.76448170790957
24650650.085919951226-0.0859199512262876
25650.5652.939696752137-2.43969675213668
26658.4652.662239413925.73776058608041
27666659.9111171170066.08888288299408
28675.5666.4502621112649.04973788873633
29680.7675.255473186685.44452681331995
30690.6680.7768928383649.82310716163613
31690.6689.4613542895011.13864571049919
32691.1689.7060309787731.39396902122724
33692.9697.785583048908-4.8855830489083
34693.8694.113686891617-0.313686891617522
35692.8695.067792533913-2.26779253391271
36697.5693.229664342434.27033565757051
37699699.462652099881-0.46265209988087
38702.1702.10837491168-0.0083749116799936
39704.8704.5381012926780.261898707322189
40715.5706.5739226408358.92607735916533
41721.8714.7526065412657.04739345873452
42726.4722.3065535975684.09344640243228
43727.7724.8341748015932.86582519840749
44727.4726.60074637890.799253621100434
45731.3733.252753058162-1.95275305816176
46734.4732.7730447019031.62695529809696
47733.4735.104657753112-1.70465775311197
48733.4734.736130627043-1.33613062704273
49738.1735.505993615512.5940063844904
50742.6740.836312103341.76368789665958
51747.2744.8310452873642.36895471263642
52751.1749.9679238756151.13207612438521
53752.6751.2459192203811.35408077961858
54758.9753.5233272654075.37667273459317
55759.1756.9702390158562.12976098414367
56764.3757.8120321627076.48796783729301
57765.6768.909356020471-3.30935602047089
58767.6767.820082923837-0.220082923837026
59767.6768.094650210511-0.49465021051094
60765.6768.82265462753-3.22265462753046
61768.2768.582415546898-0.382415546897619
62770.9771.264361604261-0.364361604260921
63775.1773.5451028161251.55489718387457
64777.6777.8116148775-0.211614877499755
65778.6777.9847371877260.615262812273954
66778.9780.237377535784-1.33737753578441
67779.4777.4871866823041.91281331769596
68779.9778.7937779708351.10622202916500
69781.7783.84916889733-2.14916889733036
70789.1784.2051413055674.89485869443308
71788.7788.79362672087-0.0936267208702475
72788.8789.458395673745-0.658395673745531
73790.8791.826726552271-1.02672655227127
74794.1793.9657650289850.134234971015076
75795.1796.95971720046-1.85971720046018
76797.3798.057830996494-0.757830996494249
77803.8797.8896542073315.91034579266875
78805.6804.3624803049371.23751969506338
79804.6804.2934261337580.306573866241706
80804.5804.1174681180630.38253188193687
81805.8808.076469869447-2.27646986944671
82806.8809.376770229757-2.57677022975668
83805.2806.862427975836-1.66242797583618
84814.9806.105977287668.79402271233937
85816.6816.4691534701030.130846529896871
86819.5819.771397022999-0.271397022998826
87823822.1281363867680.87186361323154
88824825.721895388378-1.72189538837767
89831.4825.7318317917995.66816820820134
90831.7831.3087924318080.391207568192272
91831.1830.386135563180.713864436820813
92832.1830.5737224976071.52627750239321
93833.3835.116718085362-1.81671808536248
94838.8836.770263722292.02973627771064
95838838.322484216557-0.3224842165572
96837.3840.273642590616-2.97364259061635
97994.2839.334085104341154.865914895659
98994.2974.3823496358419.8176503641607
99994.2994.1260967547540.0739032452460151
100994.2996.772309653661-2.57230965366114
101994.2997.275704199483-3.07570419948252
1021092.6994.73628682865297.8637131713479
10311001077.0000043328422.9999956671645
10411001096.467609558583.53239044142470
1051092.61102.41227135412-9.81227135412018
1061000.71098.01963907956-97.3196390795565
1071000.71014.78259930551-14.0825993055078
1081000.51004.73918258754-4.23918258753804
1091000.51026.32978586146-25.8297858614569
1101000.5987.4691651930213.0308348069794
1111000.5998.4844679439442.01553205605614
1121000.51002.37780252342-1.87780252342316
1131000.51003.38628895331-2.88628895331226
1141087.71016.0231622300571.6768377699486
1151113.21064.8256085598148.3743914401898
11611161102.9808362698813.0191637301211
1171085.21115.00830048850-29.8083004884954
1181031.31080.55132194164-49.251321941643
1191028.71050.63118855406-21.9311885540603
1201027.51035.38096919761-7.88096919761483
1211027.51050.66360399335-23.1636039933524
1221027.51019.864615942677.63538405732743
1231027.51024.651797253822.84820274617641
1241027.51028.67874161845-1.17874161845452
1251027.51030.13702338420-2.63702338420171
1261152.21054.0907577410598.109242258949
1271155.31121.9445280883033.3554719116967
12811541142.0661602811511.9338397188540
1291119.91146.80639334363-26.9063933436250
1301079.31111.93883866952-32.638838669523
1311074.31100.24995018375-25.9499501837502
1321069.81083.69289851987-13.8928985198734


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1331091.601722754521043.689745462141139.51370004690
1341085.136431410711022.198969397231148.07389342419
1351082.740648766561007.712155430541157.76914210258
1361083.77047030927998.3303647739941169.21057584455
1371086.04226951660991.3145724443781180.76996658881
1381127.266832221211024.071620648471230.46204379395
1391101.94098774343990.9105462700211212.97142921683
1401090.42587692981972.0668454940741208.78490836554
1411079.16128303771953.8913430660261204.43122300939
1421066.29356380199934.4646839949431198.12244360903
1431083.35423603938945.2682143083241221.44025777043
1441090.66983370732946.5891361708921234.75053124375
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/20/t1250750822anzpnegcepi39di/1qy421250750715.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/20/t1250750822anzpnegcepi39di/1qy421250750715.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/20/t1250750822anzpnegcepi39di/23g1z1250750715.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/20/t1250750822anzpnegcepi39di/23g1z1250750715.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/20/t1250750822anzpnegcepi39di/32po01250750715.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/20/t1250750822anzpnegcepi39di/32po01250750715.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