Home » date » 2010 » Jun » 02 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 02 Jun 2010 08:44:16 +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/Jun/02/t12754684248yswnn6xaoafvx4.htm/, Retrieved Wed, 02 Jun 2010 10:47:06 +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/Jun/02/t12754684248yswnn6xaoafvx4.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 «
40801 49081 52431 59650 75428 78705 68870 70641 80074 76464 69976 92917 92559 73981 71107 96942 86270 69610 57768 80077 71454 70382 69881 84530 79322 80181 82137 88439 91575 82909 73282 94089 108112 95653 85273 105093 102275 99308 79687 93263 114918 103374 65124 104045 101183 95492 85035 90692 107486 98179 82551 106804 110898 89950 65184 95357 98280 92146 77874 100039 104777 102341 71316 88838 85457 70784 70522 88629 88452 98886 79601 108135 113835 101617 68698 79182 86003 84165 68550 90385 100368 99081 81288 103491 111695 82504 62237 78249 92341 84412 75102 90461 106451 98379 72615 98367 116949 95832 68060 83923 87653 78054 57566 78784 88916 84662 63442 77773 88102 87972 61790 95276 104418 95420 82141 104064 96287 78426 59111 76837 76615 65860 57703 68656 77955 65856 60947 69885 80550 73694 67538 76326 84727
 
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 Server184.73.236.201 @ 184.73.236.201


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.548527818590737
beta0.000644959083758779
gamma0.777318754607708


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
139255985982.68563034196576.3143696581
147398171586.96046683222394.03953316779
157110770498.5715023652608.428497634843
169694297786.5237936756-844.523793675617
178627087414.9842268457-1144.98422684574
186961070986.2703504739-1376.27035047389
195776877316.5777070669-19548.5777070669
208007765669.078093877314407.9219061227
217145481693.1770129404-10239.1770129404
227038270634.7007984483-252.700798448277
236988162502.41186398367378.58813601641
248453089920.4992505915-5390.4992505915
257932290255.6905370996-10933.6905370996
268018164778.698539693515402.3014603065
278213770194.843018547811942.1569814522
2888439103189.552725928-14750.5527259283
299157585079.59480093866495.40519906138
308290972758.251308114510150.7486918855
317328279035.7491092813-5753.74910928126
329408986878.2453869857210.754613015
3310811290308.882706354717803.1172936453
349565398150.921087073-2497.92108707299
358527391478.2838988088-6205.28389880882
36105093106972.388389777-1879.388389777
37102275107297.752646559-5022.75264655927
389930894317.00691440064990.99308559937
397968792815.9178297424-13128.9178297424
4093263102690.049489015-9427.04948901468
4111491894957.158704239319960.8412957607
4210337491310.511377073112063.4886229269
436512493062.119251958-27938.1192519581
4410404593284.165741870810760.8342581292
45101183102379.196874525-1196.19687452525
469549292668.27571899512823.72428100491
478503587608.6324510824-2573.63245108243
4890692106609.180934283-15917.1809342834
4910748698122.59580888489363.4041911152
509817996543.64430288181635.35569711824
518255186838.131213733-4287.13121373301
52106804102859.6803484683944.3196515321
53110898112777.735604522-1879.73560452218
548995094374.7745724244-4424.77457242443
556518473033.5320266145-7849.5320266145
569535797852.2563509315-2495.25635093151
579828095471.69271771992808.30728228015
589214689361.42628384432784.57371615572
597787482379.4880579576-4505.48805795761
6010003995630.23776504234408.7622349577
61104777107164.734780101-2387.73478010108
6210234196423.55916834525917.44083165479
637131686985.646123207-15669.646123207
648883899645.4512239981-10807.4512239981
658545799415.8046599267-13958.8046599267
667078473477.6505399322-2693.65053993219
677052251868.375963906318653.6240360937
688862993097.4877013623-4468.48770136235
698845291488.725954073-3036.72595407293
709888682154.8525934416731.14740656
717960180260.4592153847-659.459215384675
7210813598746.39010546859388.60989453146
73113835110626.2662273343208.73377266599
74101617105870.431017513-4253.43101751289
756869883275.1106313527-14577.1106313527
767918298238.2397860906-19056.2397860906
778600392372.765956804-6369.76595680404
788416574548.25560340559616.74439659451
796855067184.97228596131365.02771403872
809038590812.1005252403-427.100525240254
8110036891919.75654228568448.24345771439
829908195824.21055804843256.78944195157
838128880432.1772399301855.822760069917
84103491103272.507087103218.492912897287
85111695107947.3001022783747.69989772202
8682504100862.271080889-18358.2710808893
876223766896.0181375353-4659.01813753534
887824985720.0439735783-7471.04397357826
899234190658.07680010311682.92319989686
908441282860.35133391371551.64866608626
917510268173.8363440986928.16365590201
929046194222.0789336987-3761.07893369869
9310645196612.974253549838.02574646
949837999455.7023418756-1076.70234187559
957261580840.3224286113-8225.32242861128
969836798468.7998254973-101.799825497321
97116949104199.39360499212749.6063950084
989583294290.48283762761541.51716237245
996806076050.5858463905-7990.58584639052
1008392392062.3122483282-8139.31224832825
1018765399848.022238282-12195.022238282
1027805484388.6465854162-6334.6465854162
1035756667257.1697219225-9691.16972192255
1047878480426.1750096974-1642.1750096974
1058891688740.7260864393175.273913560726
1068466282438.29514175692223.7048582431
1076344263111.2467866248330.753213375188
1087777388273.5351006883-10500.5351006883
1098810292796.2129153977-4694.21291539774
1108797269365.404112028218606.5958879718
1116179057126.90380368894663.09619631115
1129527680017.711168161515258.2888318385
11310441899213.00994912085204.99005087925
1149542095359.463751015660.5362489844265
1158214180565.06559573161575.9344042684
116104064102750.1472747051313.85272529542
11796287113336.078986117-17049.078986117
1187842698310.4952321351-19884.4952321351
1195911166190.3665165909-7079.36651659092
1207683783482.4587396106-6645.45873961064
1217661592154.3440649274-15539.3440649274
1226586070944.9097820315-5084.90978203154
1235770340802.373213580116900.6267864199
1246865674113.1041187262-5457.10411872623
1257795578399.0665012763-444.066501276335
1266585669621.1892586357-3765.18925863574
1276094753238.4481545697708.55184543097
1286988578675.9997528165-8790.99975281647
1298055077251.85017859463298.14982140542
1307369472376.38928054721317.6107194528
1316753856371.666497091211166.3335029088
1327632683822.4196999445-7496.41969994445
1338472788904.1400319154-4177.14003191541


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
13477597.877802282259479.76865782895715.9869467364
13557963.741290255437295.822408176678631.6601723341
13674155.486310694851216.711479630797094.2611417589
13783193.667893694558186.8784027714108200.457384618
13873493.604508595646574.8500283783100412.358988813
13963203.814407557634497.944985265991909.6838298492
14078621.038087817848230.8687499474109011.207425688
14186262.989420700854275.0888296753118250.890011726
14278883.64226897645372.1935242394112395.091013713
14365612.28295165230641.7709050069100582.794998297
14480384.396312777544011.5436078764116757.249017679
14590741.494293436653016.6963164359128466.292270437
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754684248yswnn6xaoafvx4/12hsa1275468252.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754684248yswnn6xaoafvx4/12hsa1275468252.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t12754684248yswnn6xaoafvx4/2d8rv1275468252.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754684248yswnn6xaoafvx4/2d8rv1275468252.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t12754684248yswnn6xaoafvx4/3d8rv1275468252.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t12754684248yswnn6xaoafvx4/3d8rv1275468252.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