Home » date » 2010 » Jun » 03 »

Jeroen De Laet opdracht 10 eigen reeks

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 03 Jun 2010 14:36:17 +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/03/t127557584429418ylkqys8ohc.htm/, Retrieved Thu, 03 Jun 2010 16:37:24 +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/03/t127557584429418ylkqys8ohc.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 «
15136 16733 20016 17708 18019 19227 22893 23739 21133 22591 26786 29740 15028 17977 20008 21354 19498 22125 25817 28779 20960 22254 27392 29945 16933 17892 20533 23569 22417 22084 26580 27454 24081 23451 28991 31386 16896 20045 23471 21747 25621 23859 25500 30998 24475 23145 29701 34365 17556 22077 25702 22214 26886 23191 27831 35406 23195 25110 30009 36242 18450 21845 26488 22394 28057 25451 24872 33424 24052 28449 33533 37351 19969 21701 26249 24493 24603 26485 30723 34569 26689 26157 32064 38870 21337 19419 23166 28286 24570 24001 33151 24878 26804 28967 33311 40226 20504 23060 23562 27562 23940 24584 34303 25517 23494 29095 32903 34379 16991 21109 23740 25552 21752 20294 29009 25500 24166 26960 31222 38641 14672 17543 25453 32683 22449 22316 27595 25451 25421 25288 32568 35110 16052 22146 21198 19543 22084 23816 29961 26773 26635 26972 30207 38687 16974 21697 24 etc...
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.0694442869754801
beta0.095535532556981
gamma0.274990418870521


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131502814321.6838979972706.316102002796
141797717069.4177170777907.582282922289
152000819050.8472294842957.152770515797
162135420594.1469296704759.853070329562
171949819004.1326734229493.867326577136
182212521757.4677963716367.532203628394
192581724290.91398071891526.08601928110
202877925468.28637819143310.71362180858
212096023042.1560743632-2082.15607436320
222225424523.2253877757-2269.22538777566
232739228844.4884130028-1452.48841300276
242994531899.8472081405-1954.84720814051
251693316195.4055778487737.594422151315
261789219314.1959907242-1422.19599072425
272053321332.7820221934-799.782022193409
282356922812.3942319425756.60576805746
292241720958.63512177141458.36487822863
302208423985.7996975873-1901.79969758735
312658026864.8500198210-284.850019821031
322745428432.5724659408-978.572465940793
332408123975.6939369364105.306063063606
342345125609.0510861706-2158.05108617062
352899130404.3276855657-1413.32768556568
363138633461.1562610029-2075.15626100286
371689617419.7937823049-523.793782304892
382004519987.122828907957.8771710920773
392347122355.33418635311115.66581364689
402174724450.3158901976-2703.31589019757
412562122387.29066525703233.70933474305
422385924738.7662104173-879.766210417307
432550028245.7602996728-2745.76029967275
443099829465.55622944831532.44377055173
452447525204.5757707592-729.575770759151
462314526197.9615570337-3052.96155703366
472970131277.9213466602-1576.92134666025
483436534202.1819789929162.818021007057
491755618008.2929235411-452.292923541081
502207720811.9988862381265.00111376199
512570223622.38909238312079.61090761694
522221424825.295149348-2611.29514934800
532688624240.36888833812645.63111166187
542319125513.8403421907-2322.84034219074
552783128509.5516194940-678.551619493963
563540631036.42468151164369.57531848839
572319526154.5448188867-2959.54481888669
582511026383.8234382992-1273.82343829916
593000932191.5934576834-2182.59345768342
603624235640.0809205167601.919079483254
611845018627.0347185142-177.034718514227
622184522015.8591144154-170.859114415376
632648825017.01825781411470.98174218589
642239424940.7459548851-2546.74595488509
652805725704.23187220622352.76812779382
662545125647.1201444505-196.120144450495
672487229319.6525240786-4447.65252407861
683342432916.9056485469507.094351453132
692405225720.7714886625-1668.77148866251
702844926433.85219018942015.14780981059
713353332331.3230587461201.67694125399
723735136839.9276251758511.072374824173
731996919112.5594963099856.440503690137
742170122683.4127434211-982.412743421144
752624926141.2090244468107.790975553195
762449324890.2582868928-397.25828689276
772460327118.6027141374-2515.60271413739
782648526022.1738900225462.826109977508
793072328656.214370622066.78562938001
803456934157.3975312452411.602468754798
812668926144.2559703611544.744029638925
822615728046.0543017333-1889.05430173325
833206433630.5321022938-1566.53210229376
843887037851.12460303511018.87539696486
852133719799.21540360431537.78459639566
861941923019.9361331425-3600.9361331425
872316626616.3705380594-3450.37053805939
882828624930.67319841363355.32680158635
892457026876.3198706050-2306.31987060505
902400126530.5278871889-2529.52788718886
913315129337.85798924993813.14201075008
922487834540.1322844895-9662.1322844895
932680425877.6112577099926.388742290103
942896727079.90012626971887.09987373032
953331132890.1509824285420.849017571491
964022637812.61760145252413.38239854750
972050420053.1465526189450.853447381141
982306021813.6247031471246.37529685299
992356225774.3546544131-2212.35465441307
1002756225905.03428658011656.96571341987
1012394026263.7162865795-2323.71628657951
1022458425838.5724347560-1254.57243475605
1033430330346.0850946413956.91490535902
1042551732052.206096688-6535.20609668801
1052349426286.2819356077-2792.28193560765
1062909527447.76175379161647.23824620836
1073290332813.097975117289.902024882802
1083437938150.9633006975-3771.96330069753
1091699119758.4482116896-2767.44821168961
1102110921370.7489611716-261.748961171554
1112374024135.6278026146-395.627802614552
1122555225253.8253045917298.174695408266
1132175224445.4966791872-2693.49667918718
1142029424178.5442988199-3884.54429881989
1152900929342.9118730520-333.911873051951
1162550027983.9735771297-2483.97357712966
1172416623648.7828814765517.217118523466
1182696025908.41073991931051.58926008070
1193122230365.3107838664856.689216133629
1203864134310.56011648174330.43988351834
1211467217809.4104846895-3137.41048468947
1221754319821.1911947822-2278.19119478216
1232545322127.78608874353325.21391125649
1243268323538.74876861839144.25123138172
1252244922655.6270874520-206.627087451965
1262231622283.851540677032.1484593230489
1272759528516.3079870321-921.307987032145
1282545126667.2264563353-1216.22645633532
1292542123316.93670938952104.06329061055
1302528825861.0196273971-573.019627397141
1313256830156.98825051982411.01174948024
1323511035137.565415337-27.5654153369687
1331605216751.0817364431-699.081736443146
1342214619190.16851277352955.83148722647
1352119823460.9607131809-2262.96071318091
1361954326002.1155805422-6459.11558054222
1372208421756.9543994932327.045600506794
1382381621470.47683168772345.52316831228
1392996127431.68310557872529.31689442132
1402677325798.4071066050974.592893394962
1412663523508.61244249213126.38755750789
1422697225452.67944518331519.32055481666
1433020730688.9002941465-481.900294146508
1443868734849.25693747383837.74306252616
1451697416598.5140631523375.485936847686
1462169720108.95484638081588.04515361924
1472417922998.36840244611180.63159755394
1482375724772.5065126522-1015.50651265220
1492501322670.94844822632342.05155177366
1502401923159.0838924448859.916107555211
1513034529448.8769675645896.123032435542
1522448827314.5303480323-2826.53034803232
1532515625311.9440749653-155.944074965279
1542565026713.8051059842-1063.80510598416
1553092331428.1408246841-505.140824684077
1563724036888.4072085374351.592791462594
1571746617085.1710804427380.828919557305
1581946321009.6016535166-1546.60165351658
1592435223607.114860479744.885139521
1602680524793.45424181152011.54575818852
1612523623744.55094642391491.44905357606
1622473523797.6777859469937.322214053132
1632935630221.0387410972-865.038741097182
1643123426957.45950804914276.54049195087
1652272426134.8563180714-3410.85631807141
1662849627126.781692631369.21830736998
1673285732354.7011662801502.29883371988
1683719838367.4788094046-1169.47880940462
1691365217800.4807464634-4148.48074646339
1702278420965.77567454081818.22432545915
1712356524491.7794077116-926.77940771158
1722632325922.4817383618400.518261638212
1732377924594.0012185227-815.001218522746
1742754924320.09513478513228.90486521490
1752966030540.0813835425-880.081383542452
1762335628536.6528561344-5180.6528561344


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
17725038.034165733823551.120136616926524.9481948507
17827444.588807620525909.641103523028979.5365117179
17932268.847281007230651.767928416833885.9266335975
18037697.584011415535959.139498196539436.0285246345
18116563.061023164815008.586370048318117.5356762813
18221567.308833343519888.655490560123245.9621761269
18324243.452159244922440.645627179726046.2586913101
18426065.166968155124133.309447477927997.0244888323
18524378.284603824822419.171952602626337.3972550471
18625176.524297255223099.742864834127253.3057296764
18730040.666836056627638.719607283832442.6140648294
18826970.036255244025139.68672539628800.3857850921
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/03/t127557584429418ylkqys8ohc/1gk131275575772.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t127557584429418ylkqys8ohc/1gk131275575772.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t127557584429418ylkqys8ohc/2gk131275575772.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t127557584429418ylkqys8ohc/2gk131275575772.ps (open in new window)


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