Home » date » 2010 » May » 28 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 28 May 2010 14:49:02 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/May/28/t1275058186ul19gd6fpj57mps.htm/, Retrieved Fri, 28 May 2010 16:49:50 +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/2010/May/28/t1275058186ul19gd6fpj57mps.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 10015 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.137145889450086
beta0.00517785985442284
gamma0.51043125305572


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1372377055.55795940171181.442040598286
1493749209.65373173377164.346268266230
151183711732.6882617630104.311738237036
161378413700.480043520883.519956479202
171592615742.3962939177183.603706082293
181382113555.7523335736265.247666426436
19111439946.74386504421196.25613495580
2079758858.93553571608-883.93553571608
2176107566.7097672439843.2902327560214
221001510152.0549428651-137.054942865141
23127599971.902526544162787.09747345584
2488169441.05644068983-625.05644068983
25106778197.965706392052479.03429360795
261094710663.6571207825283.342879217487
271520013180.67493942082019.32506057923
281701015407.40980615611602.59019384390
292090017708.28283331143191.71716668865
301620515978.8265410794226.173458920628
311214312783.1523910586-640.152391058584
32899710534.6613258750-1537.66132587503
3355689568.03863235537-4000.03863235537
341147411523.4405678943-49.4405678942767
351225612647.2557624707-391.255762470704
361058310179.5213810568403.478618943216
371086210447.1648486553414.835151344701
381096511663.7979604003-698.797960400292
391440514811.0778627426-406.07786274265
402037916520.29878986503858.70121013496
412012819830.747511393297.252488606988
421781616396.42805091771419.57194908227
431226812981.9255246590-713.925524658989
44864210327.0324213861-1685.03242138608
4579628254.59799501542-292.597995015418
461393212459.94454124961472.05545875042
471593613644.49375674192291.50624325811
481262811899.2292618824728.77073811762
491226712221.235000673145.7649993269042
501247012901.2627604665-431.262760466518
511894416218.83201699172725.16798300832
522125920242.71682711281016.2831728872
532201521599.6599758524415.340024147561
541858118680.8012396306-99.801239630564
551517514122.15750977771052.8424902223
561030611287.0075962935-981.007596293519
57107929930.0345236007861.965476399306
581475215077.387399979-325.387399978985
591375416381.5175654954-2627.51756549536
601173813275.0480767129-1537.04807671289
611218112985.5733340186-804.573334018613
621296513338.3625063755-373.362506375493
631999018053.57126989691936.42873010306
642312521215.60259488171909.39740511827
652354122429.95397390041111.04602609963
662124719379.71330417001867.28669582996
671518915599.9880366453-410.988036645305
681476711668.76056472623098.23943527378
691089511686.2773256260-791.277325625988
701713016086.11911149381043.88088850617
711769716567.25670330681129.74329669315
721661114462.16099989862148.83900010144
731267415009.2180471533-2335.21804715328
741276015349.3411978374-2589.34119783743
752024920783.6984438491-534.698443849062
762213523598.9294861054-1463.92948610542
772067724000.6414043071-3323.6414043071
781993320673.7362766254-740.736276625386
791538815529.5294040313-141.529404031309
801511313177.62276241091935.37723758906
811340111318.58572385432082.41427614568
821613516918.8166038724-783.81660387242
831756217183.8308753920378.169124608034
841472015420.6858304150-700.68583041495
851222513596.2037807742-1371.20378077415
861160813951.4636916296-2343.46369162962
872098520319.4872646026665.512735397373
881969222885.9391831898-3193.9391831898
892408122225.96615446741855.03384553261
902211420745.20294313051368.79705686955
911422016154.0401457494-1934.0401457494
921343414469.5752900437-1035.57529004371
931359812264.28381123511333.71618876487
941718716495.3749721818691.625027818169
951611917471.4670840425-1352.46708404247
961371314991.5421999882-1278.54219998819
971321012787.8119087772422.18809122283
981425112957.40853551351293.59146448652
992013921148.6492016738-1009.64920167382
1002172521783.5337733780-58.5337733780252
1012609923777.48660968512321.51339031487
1022108422147.0885534734-1063.08855347341
1031802415766.55625231422257.44374768581
1041672215054.43608326511667.56391673492
1051438514267.0812882495117.918711750523
1062134218051.48336655913290.51663344086
1071718018488.4207925968-1308.42079259681
1081457716051.8193322975-1474.81933229747


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
10914574.803886102111514.767477410817634.8402947933
11015074.574242279411985.5977883718163.5506961888
11122077.359451167818959.416812077125195.3020902585
11223273.694115139020126.758372240726420.6298580374
11326328.03816307323152.081648182329503.9946779637
11422891.057899418819686.05222264526096.0635761926
11518122.009443838314887.925520249721356.0933674269
11616842.118863196413578.926938359820105.3107880330
11715144.001815640911851.671490093218436.3321411887
11820309.892076721716988.392329427023631.3918240164
11918268.072776419714917.371987264321618.773565575
12015936.582020623112556.647991994819316.5160492515
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/28/t1275058186ul19gd6fpj57mps/1y9dn1275058140.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t1275058186ul19gd6fpj57mps/1y9dn1275058140.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/28/t1275058186ul19gd6fpj57mps/2qiuq1275058140.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t1275058186ul19gd6fpj57mps/2qiuq1275058140.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/28/t1275058186ul19gd6fpj57mps/3qiuq1275058140.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t1275058186ul19gd6fpj57mps/3qiuq1275058140.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=F, beta=F)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=F)
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