Home » date » 2010 » Jan » 15 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 15 Jan 2010 07:54:39 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/15/t1263567353jh7egi6gh97tdez.htm/, Retrieved Fri, 15 Jan 2010 15:55:58 +0100
 
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/2010/Jan/15/t1263567353jh7egi6gh97tdez.htm/},
    year = {2010},
}
@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 = {2010},
    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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
6550 8728 12026 14395 14587 13791 9498 8251 7049 9545 9364 8456 7237 9374 11837 13784 15926 13821 11143 7975 7610 1015 12759 8816 10677 10947 15200 17010 20900 16205 12143 8997 5568 11474 12256 10583 10862 10965 14405 20379 20128 17816 12268 8642 7962 13932 15936 12628 12267 12470 18944 21259 22015 18581 15175 10306 10792 14752 13754 11738 12181 12965 19990 23125 23541 21247 15189 14767 10895 17130 17697 16611 12674 12760 20249 22135 20677 19933 15388 15113 13401 16135 17562 14720 12225 11608 20985 19692 24081 22114 14220 13434 13598 17187 16119 13713 13210 14251 20139 21725 26099 21084 18024 16722 14385 21342 17180 14577
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.142162268610765
beta0.0318938520417184
gamma0.336498485279104


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1372377082.00026709402154.999732905980
1493749172.19518755744201.804812442559
151183711641.1256946535195.874305346493
161378413938.0178882238-154.017888223778
171592616261.3869475829-335.386947582942
181382113940.0348245903-119.034824590261
19111439465.150094141761677.84990585824
2079758395.98878329206-420.988783292065
2176107108.04299670844501.957003291564
2210159703.95620138403-8688.95620138403
23127598213.205050784434545.79494921557
2488167870.83891453146945.161085468536
25106776741.876349851263935.12365014874
26109479393.334312504381553.66568749562
271520012069.22724221383130.77275778624
281701014712.14884387522297.85115612476
292090017372.64185291813527.3581470819
301620515721.3077341927483.692265807316
311214311911.9605558089231.039444191105
32899710085.8661054921-1088.86610549210
3355689020.96547985179-3452.96547985179
34114748435.220391373083038.77960862692
351225612518.8848619014-262.884861901397
361058310518.556230408764.4437695912638
371086210188.4947637839673.505236216133
381096511735.0708682120-770.07086821202
391440514571.5610188039-166.561018803932
402037916526.03908205673852.96091794326
412012819790.3168617586337.683138241431
421781616820.2770636948995.72293630516
431226813026.4455747268-758.445574726766
44864210689.8471672001-2047.84716720013
4579628813.01284266297-851.01284266297
461393210489.69976741173442.30023258830
471593613698.11542369072237.88457630928
481262812179.5755024990448.424497500981
491226712113.4415781884153.558421811591
501247013200.5667293058-730.566729305845
511894416248.23193664952695.76806335050
522125919814.23214480111444.76785519889
532201521754.8401371267260.159862873283
541858118996.7867886545-415.786788654485
551517514522.5885824860652.41141751396
561030612047.4146118136-1741.41461181356
571079210594.0662250223197.933774977661
581475213698.38555614161053.61444385844
591375416247.9210434732-2493.9210434732
601173813547.0636665582-1809.06366655816
611218113071.5623317288-890.562331728797
621296513746.9848144270-781.98481442695
631999017768.10117881462221.89882118542
642312520895.18270406292229.81729593707
652354122598.5670938337942.432906166276
662124719738.60345355471508.3965464453
671518915851.2389526231-662.238952623136
681476712497.14626620362269.85373379635
691089512191.0302334449-1296.03023344493
701713015340.35909969791789.64090030212
711769716984.2246379397712.77536206026
721661114965.20001472161645.79998527843
731267415289.9200790113-2615.92007901128
741276015787.5154883498-3027.51548834982
752024920382.4365910482-133.436591048157
762213523192.2148414611-1057.21484146108
772067724057.0365499997-3380.03654999974
781993320726.7010671808-793.701067180846
791538815855.7977118205-467.797711820498
801511313346.92053155961766.07946844040
811340111908.76286993281492.23713006716
821613516326.7416969967-191.741696996733
831756217350.6467426419211.353257358052
841472015499.9597680745-779.959768074492
851222514208.9299309708-1983.92993097075
861160814639.7188171264-3031.71881712642
872098520031.5912028116953.40879718843
881969222696.2877319095-3004.28773190954
892408122572.04136637421508.95863362576
902211420663.7186611951450.28133880498
911422016196.4826943046-1976.48269430459
921343414101.7024788636-667.702478863637
931359812211.21181459131386.78818540866
941718716100.32907837181086.67092162816
951611917400.3589214253-1281.35892142525
961371315022.5679092203-1309.56790922028
971321013277.563949221-67.5639492210103
981425113655.8764009879595.123599012064
992013920707.6892366457-568.689236645660
1002172522000.6554797930-275.655479792968
1012609923566.57585746522532.42414253480
1022108421790.9135200600-706.913520059981
1031802416022.15147164512001.84852835487
1041672214883.09104129631838.90895870367
1051438513965.7199679191419.280032080871
1062134217649.99761107293692.00238892715
1071718018667.9977448033-1487.99774480328
1081457716282.8992813049-1705.89928130489


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
10914868.484803162811028.178665821918708.7909405037
11015476.415378860811595.007829810719357.822927911
11122133.699216996618209.082053243526058.3163807497
11223620.700166674519650.757652184927590.642681164
11326066.242656491422048.855196954130083.6301160287
11423013.863082537718946.910715425327080.8154496501
11518149.085595745514030.451281250122267.7199102409
11616690.900842969612518.473544642220863.3281412969
11715106.474175924210878.151723050719334.7966287976
11819678.112105684715391.803832505423964.4203788639
11918661.502825799514315.131985566623007.8736660325
12016417.307078817012008.813033337420825.8011242965
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263567353jh7egi6gh97tdez/1o4ko1263567277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263567353jh7egi6gh97tdez/1o4ko1263567277.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/15/t1263567353jh7egi6gh97tdez/270e91263567277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263567353jh7egi6gh97tdez/270e91263567277.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/15/t1263567353jh7egi6gh97tdez/39kan1263567277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263567353jh7egi6gh97tdez/39kan1263567277.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