Home » date » 2009 » Aug » 18 »

GuyVanHasseltOpgave 10

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 18 Aug 2009 11:57:23 -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/18/t12506182876a6s2sc989p87fe.htm/, Retrieved Tue, 18 Aug 2009 19:58:07 +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/18/t12506182876a6s2sc989p87fe.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 «
0.8800 1.0300 0.6900 0.7100 1.1100 1.0500 1.0300 0.6500 0.5900 0.7700 0.9000 1.2600 0.9600 0.8300 0.8700 0.7900 1.1200 0.8800 0.6400 0.6400 0.5800 0.5000 0.9900 1.0700 0.8900 0.8900 0.8300 0.8600 0.9000 1.1200 0.8800 0.8800 0.8900 0.8200 0.8800 0.8100 0.8800 0.7600 1.1300 0.8500 1.4500 1.5500 0.7100 0.8100 0.8300 0.7300 0.9000 0.9400 1.7800 0.8800 1.0400 0.8300 1.4100 0.9600 1.3000 0.8300 1.4000 0.9100 0.8700 0.9700 1.1900 1.2300 1.3300 1.1700 1.0900 0.6300 0.8900 0.6300 1.5100 0.9700 0.8400 0.9200 0.9500 0.7300 1.0200 0.7900 1.2700 0.9500 0.7500 0.5200 0.9500 0.8200 0.7600 1.2400 0.9400 1.0400 1.8100 0.9500 1.3900 0.8600 1.1500 1.5100 0.6000 0.7200 1.1000 1.6200 1.8400 1.7300 1.3600 1.0700 1.0000 1.4900 0.9000 1.4300 1.5400 0.8100 1.6100 1.3000 1.4000 1.0300 0.7900 1.1100 1.1500 1.0300 1.5900 1.1100 1.3300 0.9300 1.0700 1.1400 1.1200 0.8600 0.8200 1.0200 1.0700 1.3100 0.9800 0.8900 etc...
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.123215267387331
beta0
gamma0.172216746810459


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
130.960.984482323232324-0.0244823232323237
140.830.868132393895657-0.0381323938956566
150.870.904267234119018-0.0342672341190178
160.790.831711654371085-0.0417116543710853
171.121.16407214172458-0.0440721417245842
180.880.922808447664324-0.0428084476643238
190.641.00545046000559-0.365450460005594
200.640.5854213838591820.0545786161408183
210.580.5329796359739360.0470203640260635
220.50.707939929366724-0.207939929366724
230.990.80856855536930.181431444630699
241.071.19759034599861-0.127590345998609
250.890.901505843022384-0.0115058430223839
260.890.7846936942493340.105306305750666
270.830.839085999789387-0.00908599978938707
280.860.768509047331240.0914909526687607
290.91.11692570298516-0.216925702985162
301.120.854554625185420.26544537481458
310.880.926460234134148-0.046460234134148
320.880.6091587603812520.270841239618748
330.890.5822225959710430.307777404028957
340.820.7508138947026280.0691861052973722
350.880.944382594095245-0.0643825940952453
360.811.25645497447559-0.446454974475589
370.880.938609894397542-0.0586098943975419
380.760.833632093038398-0.0736320930383976
391.130.8487035593299380.281296440670062
400.850.8290929764465260.0209070235534741
411.451.122242620236010.327757379763993
421.550.9998214066527440.550178593347256
430.711.05971367956122-0.349713679561217
440.810.7529583266147250.0570416733852755
450.830.7052560420295330.124743957970467
460.730.8152682520169-0.0852682520169006
470.90.969637341661197-0.069637341661197
480.941.22337046822984-0.283370468229835
491.780.9841833382997280.795816661700272
500.880.982215626369967-0.102215626369967
511.041.04735831384033-0.00735831384032704
520.830.952863033656425-0.122863033656425
531.411.274631499030290.135368500969709
540.961.16208997747290-0.202089977472904
551.30.9934102308765970.306589769123403
560.830.8289403266939480.00105967330605183
571.40.7845630478340160.615436952165984
580.910.923324909630874-0.0133249096308743
590.871.08891873823856-0.218918738238562
600.971.29198505364232-0.321985053642322
611.191.21099405173992-0.0209940517399161
621.230.972782595101920.257217404898080
631.331.096536090604650.233463909395346
641.171.014272917219340.155727082780661
651.091.40936012900906-0.319360129009059
660.631.18983387502388-0.559833875023882
670.891.05388374140742-0.163883741407416
680.630.785310185577734-0.155310185577734
691.510.8144348875079560.695565112492044
700.970.8681285981653270.101871401834673
710.841.01687231681326-0.176872316813263
720.921.20955668737438-0.289556687374377
730.951.17801009791213-0.228010097912132
740.730.95630020308896-0.226300203088961
751.021.01689024033690.00310975966309934
760.790.894505890078289-0.104505890078289
771.271.185791676020110.0842083239798916
780.950.979680399212409-0.0296803992124086
790.750.968840555863587-0.218840555863587
800.520.694790062778179-0.174790062778179
810.950.8499941759837260.100005824016274
820.820.7406599119464380.079340088053562
830.760.844537959470516-0.0845379594705165
841.241.031584329047240.208415670952758
850.941.07068888811715-0.130688888117146
861.040.8612286411943940.178771358805606
871.811.006369898679250.803630101320755
880.950.966372234563684-0.0163722345636839
891.391.2970127153150.0929872846849997
900.861.07478628333307-0.214786283333073
911.151.012575950097820.137424049902180
921.510.7890741886069820.720925811393018
930.61.09613753120049-0.496137531200491
940.720.910228839820232-0.190228839820232
951.10.956146783930980.143853216069019
961.621.215569556794040.404430443205959
971.841.227622352482680.612377647517316
981.731.156446820765710.573553179234289
991.361.44458303029565-0.084583030295649
1001.071.17132604323048-0.101326043230479
10111.50801187862358-0.508011878623576
1021.491.165260284182720.324739715817284
1030.91.22271049992060-0.322710499920601
1041.431.030620160665230.399379839334773
1051.541.114291199384240.425708800615758
1060.811.08815934931670-0.278159349316703
1071.611.173688305160040.436311694839965
1081.31.50849281097775-0.208492810977747
1091.41.47642351099803-0.0764235109980345
1101.031.31451478156523-0.284514781565226
1110.791.39754731522462-0.60754731522462
1121.111.057324998994300.052675001005704
1131.151.35157776732695-0.201577767326946
1141.031.17232653826326-0.142326538263258
1151.591.074464011130350.515535988869652
1161.111.094691922412810.0153080775871859
1171.331.135015050855320.194984949144678
1180.930.974172510632916-0.0441725106329157
1191.071.19641521184384-0.126415211843843
1201.141.36451961620046-0.22451961620046
1211.121.35041763910797-0.230417639107973
1220.861.13811332144572-0.278113321445724
1230.821.17315766461991-0.353157664619906
1241.020.963971635736820.0560283642631807
1251.071.22024618072322-0.150246180723223
1261.311.056266545510770.253733454489234
1270.981.10653993370559-0.126539933705590
1280.890.972121367429986-0.0821213674299863
1290.81.02757037189790-0.227570371897902
1300.80.7785505024324370.0214494975675626
1310.780.996460434599164-0.216460434599164
1320.971.13865642060915-0.168656420609148


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1331.130547058249230.5825997006633131.67849441583514
1340.9394318059722490.3873406479655271.49152296397897
1350.9974124846526660.4412083972773381.55361657202799
1360.8935267405017120.3332399149589011.45381356604452
1371.111750895184370.5474108674168341.67609092295190
1381.027283602060200.4589192761173421.59564792800305
1390.9888730085784750.4165126788312991.56123333832565
1400.8767531649568450.3004245372346801.45308179267901
1410.9203584102627680.3400886219781021.50062819854744
1420.7369799418117030.1527955811345701.32116430248884
1430.9163232789699640.3282504031088431.50439615483108
1441.092408758692080.5004729113341211.68434460605004
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t12506182876a6s2sc989p87fe/180441250618238.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t12506182876a6s2sc989p87fe/180441250618238.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t12506182876a6s2sc989p87fe/218ss1250618238.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t12506182876a6s2sc989p87fe/218ss1250618238.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t12506182876a6s2sc989p87fe/3twon1250618238.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t12506182876a6s2sc989p87fe/3twon1250618238.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