Home » date » 2009 » Jun » 07 »

opdracht 10 oefening 2

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 07 Jun 2009 14:07: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/Jun/07/t12444052782fr3u51ebywvawp.htm/, Retrieved Sun, 07 Jun 2009 22:07:58 +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/Jun/07/t12444052782fr3u51ebywvawp.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:
thomas cammaert
 
Dataseries X:
» Textbox « » Textfile « » CSV «
8.9722 8.8284 8.7446 8.7519 8.6337 8.7272 8.6330 8.5865 8.5968 8.5114 8.3884 8.2671 8.2410 8.3177 8.4070 8.3917 8.4145 8.5245 8.6289 8.6622 8.9055 8.9770 9.1264 9.1120 9.0576 9.2106 9.2637 9.3107 9.6744 9.5780 9.4166 9.4359 9.2275 9.1828 9.0594 9.1358 9.2208 9.1137 9.2689 9.2489 9.1679 9.1051 9.0818 9.0961 9.1733 9.1455 9.2265 9.1541 9.1559 9.1182 9.1856 9.2378 9.0682 9.0105 8.9939 9.0228 9.1368 9.1763 9.2346 9.1653 9.1277 9.1430 9.1962 9.1861 9.0920 9.0620 8.9981 8.9819 9.0476 9.0852 9.0884 9.1670 9.1931 9.2628 9.4276 9.3398 9.3342 9.4223 9.5614 9.4316 9.3111 9.3414 9.4017 9.3346 9.3310 9.2349 9.2170 9.2098 9.2665 9.2533 9.1008 9.0377 9.0795 9.1896 9.2992 9.2372 9.2061 9.3290 9.1842 9.3231 9.2835 9.1735 9.2889 9.4319 9.4314 9.3642 9.4020 9.3699 9.3106 9.3739 9.4566 9.3984 9.5637 9.8506
 
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.992290585513234
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
138.2418.3819770181997-0.140977018199701
148.31778.315857442628180.00184255737182326
158.4078.39106707799660.0159329220033975
168.39178.359692876371220.0320071236287838
178.41458.364847998521580.0496520014784192
188.52458.458794431489340.0657055685106567
198.62898.6333521255316-0.00445212553160879
208.66228.634370832968790.0278291670312107
218.90558.70835732203790.197142677962091
228.9778.845717976519060.131282023480942
239.12648.87150011872770.254899881272301
249.1129.011202746638950.100797253361051
259.05769.09053184558146-0.0329318455814551
269.21069.140146861394650.0704531386053482
279.26379.29143080129675-0.0277308012967481
289.31079.21205559402780.098644405972209
299.67449.28057148559820.393828514401807
309.5789.72285221171003-0.144852211710033
319.41669.7013970074293-0.284797007429304
329.43599.425000694806780.0108993051932167
339.22759.48771479612216-0.260214796122158
349.18289.168582756460350.0142172435396475
359.05949.07672762191811-0.0173276219181133
369.13588.945943274606250.189856725393746
379.22089.112560110556280.108239889443716
389.11379.30454081328385-0.190840813283854
399.26899.194952402777940.0739475972220642
409.24899.2174125609460.0314874390540094
419.16799.2216235892913-0.0537235892913053
429.10519.21315757624781-0.108057576247809
439.08189.2210982165426-0.139298216542608
449.09619.091057836697030.00504216330296714
459.17339.144021831865210.0292781681347876
469.14559.114613337846430.0308866621535682
479.22659.039489821990620.187010178009382
489.15419.11098659881980.0431134011802037
499.15599.13130839230650.0245916076934929
509.11829.23736886492803-0.119168864928033
519.18569.20098535062063-0.0153853506206261
529.23789.134932992433160.102867007566836
539.06829.20934956930592-0.141149569305922
549.01059.1132251529313-0.102725152931301
558.99399.12501604266818-0.131116042668175
569.02289.00411857027580.0186814297242055
579.13689.070414062915540.0663859370844566
589.17639.078074688581070.0982253114189255
599.23469.070601699754210.163998300245789
609.16539.118067757906680.0472322420933189
619.12779.14230658597763-0.0146065859776243
629.1439.20810377195893-0.0651037719589294
639.19629.22639784314708-0.0301978431470857
649.18619.14649125300140.0396087469986046
659.0929.1564056091722-0.0644056091722032
669.0629.13683926387122-0.074839263871219
678.99819.17672348946052-0.178623489460515
688.98199.00984580539766-0.0279458053976569
699.04769.030020628422260.0175793715777353
709.08528.990055241722920.095144758277078
719.08848.981055602071070.107344397928927
729.1678.973252052350570.193747947649433
739.19319.142399595572670.0507004044273334
749.26289.27317649362574-0.0103764936257349
759.42769.347134696118210.0804653038817857
769.33989.37633515005932-0.0365351500593238
779.33429.309381121561260.0248188784387384
789.42239.37944426734170.0428557326583068
799.56149.539790271661880.0216097283381256
809.43169.57348466577655-0.141884665776550
819.31119.48337166335031-0.17227166335031
829.34149.253946123791340.0874538762086576
839.40179.234493136009970.167206863990032
849.33469.282822433726590.0517775662734099
859.3319.309547545104250.021452454895746
869.23499.4120295595693-0.177129559569302
879.2179.32097199836443-0.103971998364429
889.20989.16740107741330.0423989225866954
899.26659.179666884740670.0868331152593314
909.25339.31106993029959-0.0577699302995889
919.10089.36929712285692-0.268497122856916
929.03779.11331815031477-0.0756181503147708
939.07959.0865995592292-0.00709955922919292
949.18969.024473484301680.165126515698322
959.29929.084417503036240.214782496963759
969.23729.180376140003640.0568238599963564
979.20619.21213532599548-0.0060353259954784
989.3299.28471894023210.0442810597678989
999.18429.41478571155857-0.230585711558568
1009.32319.136869979358320.186230020641679
1019.28359.29183641964926-0.00833641964926457
1029.17359.32776731824655-0.154267318246552
1039.28899.287588548808380.00131145119162390
1049.43199.30106679744720.130833202552795
1059.43149.48186116181237-0.0504611618123718
1069.36429.37592629508195-0.0117262950819512
1079.4029.25875707708690.143242922913091
1089.36999.28121253394210.0886874660579018
1099.31069.34374615358706-0.0331461535870563
1109.37399.39071271615963-0.0168127161596257
1119.45669.45839864756825-0.00179864756824522
1129.39849.409328986761-0.0109289867609910
1139.56379.366903039935560.196796960064443
1149.85069.606533544416930.244066455583072


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1159.971215316516259.7367605693080310.2056700637245
1169.98534365763089.6541878417674710.3164994734941
11710.03782239353749.6346965020829410.4409482849918
1189.978685492016789.517109863878110.4402611201554
1199.867482321838999.355828591922210.3791360517558
1209.741425644708649.1806713906139310.3021798988033
1219.713968164634489.102428138051510.3255081912175
1229.7974161750669.1379753181244310.4568570320076
1239.885718006187749.189549174040610.5818868383349
1249.836213765785639.1043046510364510.5681228805348
1259.804804994020769.0335569523537810.5760530356877
1269.8506NANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12444052782fr3u51ebywvawp/1rp6p1244405238.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12444052782fr3u51ebywvawp/1rp6p1244405238.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12444052782fr3u51ebywvawp/25fvl1244405238.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12444052782fr3u51ebywvawp/25fvl1244405238.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12444052782fr3u51ebywvawp/33kha1244405238.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12444052782fr3u51ebywvawp/33kha1244405238.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=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