Home » date » 2009 » Jun » 06 »

Opgave 10: oefening 2 Jan Vanstraelen

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 06 Jun 2009 12:55:18 -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/06/t12443145740hg4alsf7wazivu.htm/, Retrieved Sat, 06 Jun 2009 20:56:14 +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/06/t12443145740hg4alsf7wazivu.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 «
11310 64305 15310 37299 21302 61308 72300 26303 18301 54305 66309 50301 31298 52291 87286 81288 14293 90302 50306 15310 44310 26314 98313 76310 25313 48309 95307 10320 87327 63328 34333 90333 81332 7342 30424 13344 88347 40339 23330 1339 10341 46342 81342 2342 76350 35368 93367 88377 39376 41366 77375 56382 79397 26385 73397 28404 98413 73414 47423 52431 24441 92439 90441 441 13448 18458 18459 69477 41491 10492 73508 82515 13525 55533 19550 85558 57563 60570 49568 51570 26561 61558 78548 77537 539 18540 47542 86542 81544 16543 22538 25538 99527 63518 95508 65496 5488 96475 81465 5463 81458 74445 21434 67427 27418 81407 82395 97359
 
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
beta0
gamma0.282949687340327


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133129818421.276515151512876.7234848485
145229140788.734848484911502.2651515151
158728675158.068181818212127.9318181818
168128869242.651515151512045.3484848485
17142932080.4431818181912212.5568181818
189030275672.234848484914629.7651515151
195030669834.3598484848-19528.3598484848
201531023505.1098484849-8195.10984848486
214431013004.693181818231305.3068181818
222631444176.8181818182-17862.8181818182
239831354639.984848484943673.0151515151
247631037715.943181818238594.0568181818
252531322064.74139915733248.25860084275
264830944043.29717681164265.70282318839
279530778589.662697857616717.3373021424
281032072650.8791028447-62330.8791028447
29873275535.9823151487281791.0176848513
306332879811.7223239685-16483.7223239685
313433364308.8165350867-29975.8165350867
329033321186.306079136469146.6939208636
338133221862.519958115859469.4800418842
34734239122.5393622556-31780.5393622556
353042466997.2508308155-36573.2508308155
361334448636.1194917176-35292.1194917176
378834722983.835154666265363.1648453338
384033945250.2764569195-4911.27645691952
392333083319.8280606616-59989.8280606616
40133955014.376349047-53675.376349047
411034128678.7251963246-18337.7251963246
424634275147.6582461968-28805.6582461968
438134255827.168618712925514.8313812871
44234240751.3415046621-38409.3415046621
457635038689.390742258837660.6092577412
463536830130.24568619845237.75431380158
479336756648.860943216836718.1390567832
488837738650.225315958649726.7746840414
493937641478.3222112277-2102.32221122771
504136643860.6323189922-2494.63231899223
517737566345.724967297411029.2750327026
525638239826.945393209816555.0546067902
537939723490.071585491755906.9284145083
542638566997.1062518031-40612.1062518031
557339763046.582180589210350.4178194108
562840429883.4303349701-1479.43033497009
579841349345.448356782949067.5516432171
587341431612.26663165441801.733368346
594742367038.2469090523-19615.2469090523
605243152720.400665251-289.400665251029
612444140883.4707988722-16442.4707988722
629243943154.776884304349284.2231156957
639044169466.45488939120974.5451106089
6444144511.1929181031-44070.1929181031
651344839308.9195005349-25860.9195005349
661845855505.9234856233-37047.9234856233
671845965975.2296664333-47516.2296664333
686947729464.825984248540012.1740157515
694149163229.0967527865-21738.0967527865
701049243440.0540185113-32948.0540185113
717350861488.118929032612019.8810709674
728251552638.514837502229876.4851624978
731352536231.0788272288-22706.0788272288
745553357099.7324057013-1566.73240570134
751955075401.1958705435-55851.1958705435
768555832041.545610897953516.4543891021
775756331991.580413525225571.4195864748
786057045023.225118757815546.7748812422
794956852530.5273387248-2962.52733872478
805157040786.258111812210783.7418881878
812656157078.3090732118-30517.3090732118
826155834117.412435501327440.5875644987
837854864889.140519930813658.8594800692
847753761092.056973058916444.9430269411
8553929806.4009223396-29267.4009223396
861854056656.4259613622-38116.4259613622
874754259598.1174613898-12056.1174613898
888654247184.009647857339357.9903521427
898154439227.005590366542316.9944096335
901654349422.1802105557-32879.1802105557
912253851692.2811544954-29154.2811544954
922553843837.5145074337-18299.5145074337
939952748443.446012478451083.5539875216
946351841881.718107311121636.2818926889
959550868753.910539241826754.0894607582
966549665745.1484608614-249.148460861354
97548821525.1989820996-16037.1989820996
989647545871.39515306450603.604846936
998146556186.842795151325278.1572048487
100546358320.3407123397-52857.3407123397
1018145851200.585927754730257.4140722453
1027444540119.026449972734325.9735500273
1032143443443.0864171989-22009.0864171989
1046742738659.672599075628767.3274009244
1052741862897.5216414804-35479.5216414804
1068140748003.697304054633403.3026959454
1078239576323.97178723856071.02821276151
1089735965674.651981759331684.3480182407


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
10916987.4785442999-48369.50594842382344.4630370228
11060189.669322798-5167.31516992491125546.653815521
11163339.2894728029-2017.69501992006128696.273965526
11243364.372684142-21992.6118085809108721.357176865
11359761.9117792233-5595.07271349959125118.896271946
11449831.5499336053-15525.4345591177115188.534426328
11537215.6222968063-28141.3621959167102572.606789529
11646799.378892784-18557.6055999390112156.363385507
11752858.6020860391-12498.3824066838118215.586578762
11857455.1513580067-7901.83313471627122812.135850730
11978041.767321873712684.7828291507143398.751814597
12074639.72834710269282.74385437971139996.712839826
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443145740hg4alsf7wazivu/1bo911244314513.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443145740hg4alsf7wazivu/1bo911244314513.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443145740hg4alsf7wazivu/2h34j1244314513.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443145740hg4alsf7wazivu/2h34j1244314513.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443145740hg4alsf7wazivu/3p29b1244314513.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12443145740hg4alsf7wazivu/3p29b1244314513.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