Home » date » 2010 » Jun » 06 »

OPGAVE 10 oef 2 stap 1

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 06 Jun 2010 16:48:19 +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/06/t12758429713lakcwzm7531rgn.htm/, Retrieved Sun, 06 Jun 2010 18:49:36 +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/06/t12758429713lakcwzm7531rgn.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 «
1954 2302 3054 2414 2226 2725 2589 3470 2400 3180 4009 3924 2072 2434 2956 2828 2687 2629 3150 4119 3030 3055 3821 4001 2529 2472 3134 2789 2758 2993 3282 3437 2804 3076 3782 3889 2271 2452 3084 2522 2769 3438 2839 3746 2632 2851 3871 3618 2389 2344 2678 2492 2858 2246 2800 3869 3007 3023 3907 4209 2353 2570 2903 2910 3782 2759 2931 3641 2794 3070 3576 4106 2452 2206 2488 2416 2534 2521 3093 3903 2907 3025 3812 4209 2138 2419 2622 2912 2708 2798 3254 2895 3263 3736 4077 4097 2175 3138 2823 2498 2822 2738 4137 3515 3785 3632 4504 4451 2550 2867 3458 2961 3163 2880 3331 3062 3534 3622 4464 5411 2564 2820 3508 3088 3299 2939 3320 3418 3604 3495 4163 4882 2211 3260 2992 2425 2707 3244 3965 3315 3333 3583 4021 4904 2252 2952 3573 3048 3059 2731 3563 3092 3478 3478 4308 5029 2075 3264 3308 3688 3136 2824 3644 4694 2914 3686 4358 5587 2265 3685 3754 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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.122923936061106
beta0.0628781616526975
gamma0.35503071893546


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1320721985.8426816239386.1573183760677
1424342331.83381956774102.166180432265
1529562837.70749586882118.292504131177
1628282728.7277934576899.2722065423186
1726872639.2606723636247.7393276363823
1826292618.4112485881510.5887514118508
1931502809.57697266319340.423027336813
2041193751.37676577387367.623234226128
2130302757.36156032045272.638439679548
2230553592.02773556861-537.027735568609
2338214348.72407950558-527.72407950558
2440014209.7351640861-208.735164086099
2525292364.00602923632164.993970763677
2624722726.60730668541-254.607306685407
2731343192.82320107236-58.8232010723636
2827893053.95672088088-264.956720880879
2927582898.6628602674-140.6628602674
3029932836.62229787113156.377702128866
3132823143.07883611707138.921163882932
3234374061.68473144673-624.684731446733
3328042901.54979309679-97.5497930967904
3430763421.16448977267-345.164489772670
3537824188.40004272526-406.400042725262
3638894148.64968698426-259.649686984263
3722712397.63883920792-126.638839207915
3824522576.07994645867-124.079946458666
3930843102.66234208457-18.6623420845667
4025222888.21186409838-366.211864098378
4127692742.0594032403926.9405967596081
4234382777.29625715575660.703742844251
4328393128.38860904603-289.388609046026
4437463741.333886149644.6661138503614
4526322812.33696108994-180.336961089944
4628513233.66251037908-382.662510379085
4738713965.92261036955-94.9226103695464
4836184001.26623179294-383.26623179294
4923892266.63210520868122.367894791320
5023442468.55758762906-124.557587629064
5126783019.9821309966-341.982130996601
5224922647.14080399939-155.140803999393
5328582640.56474709947217.43525290053
5422462889.24455719202-643.244557192023
5528002766.8034436802333.196556319765
5638693496.06213210009372.937867899915
5730072542.66774864412464.332251355881
5830232973.1604733593449.8395266406642
5939073844.4511961780162.5488038219873
6042093806.84868640701402.151313592991
6123532329.7646061805423.2353938194615
6225702445.40280050067124.597199499333
6329032964.46494134045-61.4649413404509
6429102691.16850706248218.831492937523
6537822856.35147252505925.648527474953
6627592939.32822162209-180.328221622091
6729313103.25163278733-172.251632787325
6836413930.28429496249-289.284294962492
6927942936.06447428926-142.064474289257
7030703170.3794106414-100.379410641397
7135764033.43241840469-457.432418404686
7241064039.9114420606366.0885579393744
7324522403.1806742485548.8193257514458
7422062553.37813390341-347.378133903406
7524882952.68895069317-464.688950693167
7624162710.19466911439-294.194669114394
7725343021.53097666638-487.530976666377
7825212564.60394020959-43.6039402095853
7930932727.10450740374365.895492596256
8039033567.26062737423335.739372625771
8129072683.95972539023223.040274609765
8230252967.2029461697157.7970538302902
8338123730.8077540043281.1922459956754
8442093962.96892683598246.031073164016
8521382340.82441112322-202.824411123217
8624192332.6167682298386.3832317701654
8726222747.97003496763-125.970034967634
8829122602.07257418404309.927425815963
8927082934.00668175509-226.006681755093
9027982656.02211769573141.977882304272
9132542978.844039266275.155960734003
9228953807.74977932082-912.74977932082
9332632735.53052504221527.469474957786
9437363006.73757444092729.262425559083
9540773867.35356930211209.646430697892
9640974174.81369316516-77.8136931651561
9721752378.76906557102-203.769065571024
9831382466.17086096644671.829139033559
9928232897.55952585991-74.55952585991
10024982904.30720429103-406.307204291029
10128222986.37093875851-164.370938758506
10227382836.08156851991-98.08156851991
10341373174.54150425071962.458495749285
10435153727.02166685362-212.021666853620
10537853203.81232021901581.187679780989
10636323559.2792123314572.7207876685475
10745044187.13378152134316.866218478655
10844514428.8365387602722.1634612397338
10925502617.20779232954-67.2077923295383
11028673006.45075866478-139.450758664777
11134583111.82887619607346.171123803929
11229613076.37613699992-115.376136999919
11331633281.17149012045-118.171490120448
11428803169.19294939455-289.192949394546
11533313824.91406458938-493.914064589375
11630623831.90729050255-769.907290502546
11735343482.0612924445851.9387075554214
11836223604.9933839948617.0066160051406
11944644292.44644409626171.553555903743
12054114413.81936884119997.180631158812
12125642691.05023608226-127.050236082257
12228203046.81482232811-226.814822328106
12335083288.36918390758219.630816092424
12430883088.36093058357-0.360930583570735
12532993302.03297606169-3.03297606168780
12629393147.45246753272-208.452467532723
12733203746.47363493709-426.473634937086
12834183673.45993355708-255.459933557082
12936043644.38614000392-40.3861400039191
13034953745.99878241764-250.998782417642
13141634447.4672487195-284.467248719498
13248824765.1862314213116.813768578697
13322112572.63210130036-361.632101300363
13432602855.18846143743404.81153856257
13529923304.97813353914-312.978133539136
13624252958.45491158245-533.454911582449
13727073089.10291247523-382.102912475235
13832442804.36836860031439.631631399694
13939653400.58248683110564.417513168898
14033153495.70091234209-180.700912342089
14133333536.44233408617-203.442334086170
14235833544.8226600405838.1773399594249
14340214266.04483352958-245.044833529581
14449044708.4977029165195.502297083496
14522522372.17517874422-120.175178744218
14629522920.4823846076731.5176153923312
14735733095.39618782337477.603812176634
14830482778.03362813544269.966371864562
14930593061.41375285475-2.41375285474896
15027313089.00893130404-358.008931304042
15135633629.64351109778-66.6435110977814
15230923413.90280922877-321.902809228772
15334783427.8493470361450.1506529638605
15434783542.2437317922-64.2437317922008
15543084161.49572906673146.504270933275
15650294791.09931454002237.900685459981
15720752363.85625030521-288.856250305212
15832642939.52635862239324.473641377605
15933083292.4844894124515.5155105875529
16036882853.21933533991834.780664660094
16131363125.1331985090210.8668014909777
16228243047.65581804721-223.655818047206
16336443700.59537930672-56.5953793067156
16446943411.744370992811282.25562900719
16529143756.2720860273-842.272086027302
16636863735.98583927871-49.985839278705
16743584433.36590475871-75.3659047587116
16855875073.19211581412513.807884185875
16922652527.00686188418-262.006861884177
17036853308.33757430996376.662425690035
17137543583.28421186176170.715788138243
17237083431.18598058334276.814019416664
17332103386.62104665384-176.62104665384
17435173220.28636201448296.713637985523
17539054000.45180595504-95.451805955035
17636704134.66673322833-464.666733228330
17742213600.33798063106620.662019368937
17844044015.3344371608388.665562839199
17950864770.86653169258315.133468307419
18057255657.3092714746967.690728525311
18123672826.40986638851-459.409866388513
18238193792.5282683476826.4717316523179
18340673967.7705641301399.2294358698682
18440223846.84221389780175.157786102205
18539373654.72035250663282.279647493373
18643653701.86740927603663.132590723971
18742904417.47133932666-127.471339326661


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1884445.046176529933762.815197109195127.27715595067
1894321.652304035393633.623037738625009.68157033217
1904599.173010476533904.69674372475293.64927722836
1915292.08723713244590.493506906795993.680967358
1926068.361371671325358.960698905716777.76204443693
1933070.104434958282352.191102183863788.0177677327
1944252.640927071153525.495762427094979.78609171521
1954455.728014708763718.621144981825192.8348844357
1964353.921129825613606.114667039975101.72759261125
1974179.946801650213420.697430738624939.1961725618
1984315.128579094153543.690018128925086.56714005939
1994702.047061400153917.672370492895486.4217523074
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758429713lakcwzm7531rgn/1sfx71275842896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758429713lakcwzm7531rgn/1sfx71275842896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t12758429713lakcwzm7531rgn/23oes1275842896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758429713lakcwzm7531rgn/23oes1275842896.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t12758429713lakcwzm7531rgn/33oes1275842896.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758429713lakcwzm7531rgn/33oes1275842896.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=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