Home » date » 2011 » May » 19 »

Opgave 10 oef2-stien philipsen

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 19 May 2011 19:13:59 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/19/t13058322433iqt3t0k5uc877w.htm/, Retrieved Thu, 19 May 2011 21:10:43 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
112 118 129 99 116 168 118 129 205 147 150 267 126 129 124 97 102 127 222 214 118 141 154 226 89 77 82 97 127 121 117 117 106 112 134 169 75 108 115 85 101 108 109 124 105 95 135 164 88 85 112 87 91 87 87 142 95 108 139 159 61 82 124 93 108 75 87 103 90 108 123 129 57 65 67 71 76 67 110 118 99 85 107 141 58 65 70 86 93 74 87 73 101 100 96 157 63 115 70 66 67 83 79 77 102 116 100 135 71 60 89 74 73 91 86 74 87 87 109 137 43 69 73 77 69 76 78 70 83 65 110 132 54 55 66 65 60 65 96 55 71 63 74 106 34 47 56 53 53 55 67 52 46 51 58 91 33 40 46 45 41 55 57 54 46 52 48 77 77 35 42 48 44 45 0 0 46 51 63 84 30 39 45 52 28 40 62
 
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.159423424226509
beta0.127725156122087
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
31291245
499130.898929029877-31.8989290298768
5116131.265766273234-15.2657662732339
6168133.97347191842834.0265280815725
7118145.23238507203-27.2323850720304
8129146.170676305523-17.1706763055232
9205148.36340373832356.6365962616766
10147163.475995290642-16.4759952906417
11150166.597236637815-16.5972366378149
12267169.36119000586997.6388099941312
13126192.32520382069-66.3252038206905
14129187.798973983464-58.7989739834636
15124183.275314323711-59.2753143237111
1697177.468728277277-80.4687282772769
17102166.644880643289-64.6448806432889
18127157.027401245783-30.0274012457825
19222152.31732954482569.6826704551753
20214164.92228404139249.0777159586081
21118175.241665323796-57.2416653237957
22141167.445670139252-26.4456701392518
23154164.020781128511-10.0207811285115
24226163.01035719564362.9896428043567
2589174.922124203388-85.922124203388
2677161.344288313437-84.3442883134365
2782146.300545826955-64.3005458269554
2897133.142933141196-36.1429331411957
29127123.7383472856993.26165271430052
30121120.6821904552150.31780954478532
31117117.163187425534-0.163187425534304
32117113.5641793271483.43582067285233
33106110.608898915786-4.60889891578596
34112106.2772536014965.72274639850362
35134103.70924330792330.2907566920772
36169105.67474129300863.3252587069916
3775114.196165799066-39.1961657990656
38108105.5751464626962.42485353730424
39115103.63886834213911.3611316578606
4085103.358581979319-18.3585819793189
4110197.96645264679753.03354735320247
4210896.046500073222211.9534999267778
4310995.791998611608213.2080013883918
4412496.006440435111627.9935595648884
4510599.14806211858175.85193788141828
469598.8789500484571-3.87895004845711
4713596.97952184211638.020478157884
48164102.53403144408761.4659685559129
4988113.07789492428-25.07789492428
5085109.313993672763-24.3139936727632
51112105.176785353536.82321464646965
5287106.142514306789-19.1425143067895
5391102.578910653835-11.5789106538349
548799.9853483957574-12.9853483957574
558796.9031543957249-9.9031543957249
5614294.110682506984547.8893174930155
5795101.506824945746-6.50682494574593
58108100.0984536386897.90154636131112
59139101.14800852634537.8519914736549
60159107.7431226312651.25687736874
6161117.519001651171-56.5190016511712
6282108.962019501021-26.9620195010212
63124104.5681017212519.4318982787497
6493107.96614090807-14.9661409080702
65108105.5755806265722.42441937342751
6675106.00684996717-31.0068499671697
6787100.477018557389-13.4770185573894
6810397.46742870036785.53257129963218
699097.60106908035-7.60106908034997
7010895.486123668082412.5138763319176
7112396.832784058596126.1672159414039
72129100.88893344208528.1110665579149
7357105.827386415663-48.8273864156626
746597.5058058795078-32.5058058795078
756791.1243719728431-24.1243719728431
767185.5879052879448-14.5879052879448
777681.2747302805858-5.2747302805858
786778.3388874517252-11.3388874517252
7911074.205389166694635.7946108333054
8011878.314938104377139.6850618956229
819983.852798452245315.1472015477547
828585.7871821806066-0.787182180606607
8310785.16522298798621.834777012014
8414188.594342057484952.4056579425151
855897.9642796593702-39.9642796593702
866591.7945175944322-26.7945175944322
877087.1787238981009-17.1787238981009
888683.74611322552322.2538867744768
899383.4574103909499.54258960905096
907484.5250073729243-10.5250073729243
918782.17904510999854.82095489000153
927382.3777548229433-9.3777548229433
9310180.121904190200420.8780958097996
9410083.114672625283316.8853273747167
959685.814725726260110.1852742737399
9615787.654029862358369.3459701376417
9763100.33698382939-37.3369838293898
9811595.251906050313419.7480939496866
997099.6696450708296-29.6696450708296
1006695.604894279878-29.6048942798781
1016790.9476401227802-23.9476401227802
1028386.7046538049625-3.70465380496248
1037985.6134381074776-6.61343810747763
1047783.9238287047327-6.92382870473267
10510282.043750126876219.9562498731238
10611684.855342497571231.1446575024288
10710090.08480852967369.9151914703264
10813592.131697306269642.8683026937304
10971100.304984657393-29.3049846573926
1106096.3754401165778-36.3754401165778
1118990.5780087576825-1.57800875768251
1127490.2959710435823-16.2959710435823
1137387.3357206008697-14.3357206008697
1149184.39607058055616.6039294194439
1158684.92916300046681.07083699953323
1167484.6019556720088-10.6019556720088
1178782.19795069688974.80204930311027
1188782.3474861027934.65251389720696
11910982.567918326310926.4320816736891
12013786.798743960385350.2012560396147
1214395.8411499026628-52.8411499026628
1226987.3802109827183-18.3802109827183
1237384.0388880747974-11.0388880747974
1247781.643165950148-4.64316595014799
1256980.1725258294112-11.1725258294112
1267677.4334535626778-1.43345356267781
1277876.2178290168341.78217098316604
1287075.5511395930163-5.5511395930163
1298373.6023142626939.39768573730697
1306574.2280411192326-9.22804111923263
13111071.696485925531138.3035140744689
13213277.522524795527654.4774752044724
1335487.0363630790026-33.0363630790026
1345581.9257465595128-26.9257465595128
1356677.2410331193776-11.2410331193776
1366574.827936196252-9.82793619625205
1376072.4399998347437-12.4399998347437
1386569.3823313180988-4.38233131809885
1399667.520009204410628.4799907955894
1405571.4766314549045-16.4766314549045
1417167.93061158494723.06938841505283
1426367.5631851913006-4.56318519130062
1437465.88603045881248.11396954118763
14410666.395130888522939.6048691114771
1453472.7310678236632-38.7310678236632
1464765.7897646640455-18.7897646640455
1475661.6449679766126-5.64496797661265
1485359.4808147949518-6.48081479495183
1495357.0514432264841-4.05144322648414
1505554.92687335856860.073126641431358
1516753.461345575046613.5386544249534
1525254.4182175895574-2.4182175895574
1534652.7819497578604-6.78194975786042
1545150.31190415151410.688095848485872
1555849.04677006520648.95322993479357
1569149.281601042446641.7183989575534
1573355.58945342618-22.58945342618
1584051.185152704084-11.185152704084
1594648.3712083047337-2.3712083047337
1604546.9141296537628-1.91412965376283
1614145.4909438077439-4.49094380774388
1625543.56550711347611.434492886524
1635744.411791578570712.5882084214293
1645445.69833123023468.30166876976542
1654646.4705378011899-0.470537801189934
1665245.83466789224626.1653321077538
1674846.38225193289441.61774806710556
1687746.237785757540630.7622142424594
1697751.366022126960225.6339778730398
1703556.1986663373163-21.1986663373163
1714253.1334347055488-11.1334347055488
1724851.4461335185003-3.44613351850032
1734450.9141967234904-6.91419672349043
1744549.6885799037367-4.68857990373672
175048.7223078845444-48.7223078845444
176039.743925936363-39.743925936363
1774631.3876273902614.61237260974
1785131.994538795991119.0054612040089
1796333.688807884699929.3111921153001
1808437.622897567809446.3771024321906
1813045.2220413753098-15.2220413753098
1823942.6908817301164-3.6908817301164
1834541.92290389808383.07709610191616
1845242.29655727262819.70344272737187
1852843.9241907214072-15.9241907214072
1864041.1419246404493-1.14192464044927
1876240.693045730487821.3069542695122


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
18844.2569043031398-14.5330715665409103.04688017282
18944.4239352663084-15.3086167841225104.156487316739
19044.5909662294771-16.2895164481609105.471448907115
19144.7579971926457-17.4874329064248107.003427291716
19244.9250281558144-18.9108949719365108.760951283565
19345.0920591189831-20.565338230974110.74945646894
19445.2590900821517-22.4532863305747112.971466494878
19545.4261210453204-24.5746466310726115.426888721713
19645.593152008489-26.92708385636118.113387873338
19745.7601829716577-29.5064327283468121.026798671662
19845.9272139348264-32.3071140679577124.16154193761
19946.094244897995-35.3225263649633127.511016160953
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t13058322433iqt3t0k5uc877w/1pej21305832435.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t13058322433iqt3t0k5uc877w/1pej21305832435.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t13058322433iqt3t0k5uc877w/2h0jb1305832435.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t13058322433iqt3t0k5uc877w/2h0jb1305832435.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t13058322433iqt3t0k5uc877w/3dke61305832435.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t13058322433iqt3t0k5uc877w/3dke61305832435.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 12 ; par2 = Double ; 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