Home » date » 2010 » May » 31 »

Opgave 10 oefening 2 Exponential Smoothing

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 31 May 2010 15:05:24 +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/31/t127531836597j092n6j3org1k.htm/, Retrieved Mon, 31 May 2010 17:06: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/May/31/t127531836597j092n6j3org1k.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 «
41086 39690 43129 37863 35953 29133 24693 22205 21725 27192 21790 13253 37702 30364 32609 30212 29965 28352 25814 22414 20506 28806 22228 13971 36845 35338 35022 34777 26887 23970 22780 17351 21382 24561 17409 11514 31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698 31956 29506 34506 27165 26736 23691 18157 17328 18205 20995 17382 9367 31124 26551 30651 25859 25100 25778 20418 18688 20424 24776 19814 12738 31566 30111 30019 31934 25826 26835 20205 17789 20520 22518 15572 11509 25447 24090 27786 26195 20516 22759 19028 16971 20036 22485 18730 14538
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta1
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133770241487.9961256583-3785.99612565827
143036426985.96613032113378.03386967886
153260932727.9358210002-118.935821000206
163021230145.877718237966.1222817621128
172996529887.902049961877.0979500382091
182835228391.3748481016-39.3748481016046
192581422414.01962249313399.9803775069
202241426784.6171673481-4370.61716734807
212050621340.5520439118-834.552043911786
222880623717.11592731045088.88407268965
232222825561.4177256393-3333.41772563932
241397112837.6719600381133.32803996199
253684540601.5340145322-3756.53401453224
263533827298.93724802818039.06275197186
273502244169.1342060279-9147.13420602795
283477729660.53847484215116.4615251579
292688736705.4820559147-9818.4820559147
302397018314.53078484545655.46921515461
312278017792.05318680264987.94681319737
321735124394.9811555839-7043.98115558389
332138213941.3020668187440.69793318201
342456132526.7733061008-7965.77330610083
351740917693.0108338551-284.01083385514
36115149048.620097668362465.37990233164
373151435051.2864794491-3537.28647944907
382707124344.4845598372726.51544016304
392946230993.2773260638-1531.27732606379
402610527597.7751894846-1492.7751894846
412239724647.8615532109-2250.86155321087
422384317930.78679426095912.21320573911
432170520938.1454020331766.854597966936
441808922518.2329109566-4429.23291095655
452076416418.67877605184345.3212239482
462531629981.5307429842-4665.5307429842
471770419578.8057375386-1874.80573753865
48155489031.56311555276516.4368844473
492802957475.3424653159-29446.3424653159
50293839524.3922222938719858.6077777061
513643838979.699162503-2541.69916250305
523203438213.6173641055-6179.61736410549
532267929985.4261796034-7306.42617960342
542431912927.155397327811391.8446026722
551800421479.2311892206-3475.23118922059
561753715397.13943321972139.8605667803
572036618719.1618236321646.83817636797
582278229672.6780384295-6890.67803842952
591916915850.89612447033318.10387552967
601380712106.81668321061700.18331678943
612974345014.8164697156-15271.8164697156
622559116257.92614304529333.07385695475
632909629340.4209292218-244.420929221818
642648228394.0018115126-1912.00181151256
652240525728.3604886563-3323.36048865629
662704417593.86754746049450.13245253962
671797025984.3096810551-8014.30968105509
681873013365.97693473335364.02306526672
691968421153.1133629432-1469.11336294321
701978526373.6035376064-6588.60353760635
711847911664.16063211776814.83936788228
721069812765.8235286875-2067.82352868753
733195628541.12943222833414.87056777168
742950626919.63865511792586.36134488209
753450635849.4789327642-1343.47893276417
762716534513.3508750869-7348.35087508686
772673622126.41816001864609.58183998139
782369125137.1476304567-1446.14763045668
791815717464.253448161692.746551839035
801732816131.05953140591196.94046859407
811820518157.19326476947.8067352310027
822099524385.0774564696-3390.07745646963
831738215200.51980515262181.48019484744
84936710808.7908846448-1441.79088464483
853112422889.42066342658234.5793365735
862655128623.8134118605-2072.81341186048
873065130211.7736790038439.22632099616
882585930317.5117468502-4458.51174685019
892510023072.99658975362027.00341024635
902577823266.32686679862511.67313320136
912041821977.5195299962-1559.51952999621
921868818763.4129777217-75.4129777216986
932042418811.57586318511612.42413681493
942477628331.3280990513-3555.32809905126
951981419052.9011431531761.098856846937
961273811896.906659231841.093340768961
973156637808.6848699408-6242.68486994076
983011121631.04651343418479.95348656592
993001937488.1358370153-7469.1358370153
1003193425601.5732487666332.426751234
1012582635663.8163727304-9837.81637273038
1022683518965.05919923827869.94080076176
1032020523104.6686210557-2899.6686210557
1041778917609.655864695179.344135304989
1052052017197.44001122263322.55998877743
1062251829742.4407326765-7224.44073267652
1071557215256.8323835081315.167616491928
108115097817.874273777463691.12572622254
1092544738233.1770809934-12786.1770809934
1102409014603.79671776179486.2032822383
1112778629825.2075899902-2039.20758999023
1122619527463.0014345558-1268.00143455579
1132051626360.0760125685-5844.07601256846
1142275914293.63189102838465.3681089717
1151902820629.239528044-1601.23952804403
1161697118399.4112133541-1428.41121335415
1172003616635.1989777213400.80102227902
1182248529556.8562177491-7071.85621774909
1191873015712.12079180913017.87920819086
1201453811716.52702127532821.47297872474


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12149938.886170718137811.372079811462066.4002616249
12247050.408501113624092.078789834670008.7382123925
12358046.056746841515420.1830365067100671.930457176
12460632.58662136851707.4597081531119557.713534584
12566753.6356380269-13344.3217216522146851.592997706
12669477.4872993832-29128.3404435172168083.315042284
12759902.5221855174-38063.2768795174157868.321250552
12859492.040879766-50808.9184176144169793.000177146
12964584.5287470717-69499.3606420824198668.418136226
13089074.7858480441-115565.007657598293714.579353686
13177805.1252187176-117880.470648379273490.721085814
13250847.8472650804-87718.127610297189413.822140458
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/31/t127531836597j092n6j3org1k/1ypmw1275318319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t127531836597j092n6j3org1k/1ypmw1275318319.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t127531836597j092n6j3org1k/29g3z1275318319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t127531836597j092n6j3org1k/29g3z1275318319.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t127531836597j092n6j3org1k/39g3z1275318319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t127531836597j092n6j3org1k/39g3z1275318319.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=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