Home » date » 2009 » Jun » 05 »

opgave 10 - oef 2/blog - Van Mechelen Wout

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 05 Jun 2009 04:32:45 -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/05/t12441979984u7p0xgp0kch1ub.htm/, Retrieved Fri, 05 Jun 2009 12:33:22 +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/05/t12441979984u7p0xgp0kch1ub.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 «
266433 267722 266003 262971 265521 264676 270223 269508 268457 265814 266680 263018 269285 269829 270911 266844 271244 269907 271296 270157 271322 267179 264101 265518 269419 268714 272482 268351 268175 270674 272764 272599 270333 270846 270491 269160 274027 273784 276663 274525 271344 271115 270798 273911 273985 271917 273338 270601 273547 275363 281229 277793 279913 282500 280041 282166 290304 283519 287816 285226 287595 289741 289148 288301 290155 289648 288225 289351 294735 305333 309030 310215 321935
 
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.909335006287375
beta0.0820112173986116
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13269285267036.9635879382248.03641206183
14269829269956.087441595-127.087441595097
15270911271170.191826702-259.19182670163
16266844267062.253623455-218.253623455414
17271244271674.78701356-430.787013560126
18269907270275.071238274-368.071238273929
19271296272914.495646938-1618.49564693752
20270157270694.894581584-537.894581584318
21271322268996.7168201312325.28317986906
22267179268383.934385677-1204.93438567704
23264101267978.393974333-3877.39397433336
24265518260308.991110185209.00888982008
25269419271628.582124246-2209.58212424570
26268714270038.900248436-1324.90024843649
27272482269817.6277956192664.37220438116
28268351268240.110135488110.889864511730
29268175273069.616157436-4894.61615743616
30270674267210.5801639123463.41983608826
31272764273090.010729606-326.010729606496
32272599272101.221012437497.77898756275
33270333271632.364748922-1299.36474892183
34270846267185.5176994823660.48230051773
35270491271094.687152619-603.687152618659
36269160267511.7079263361648.29207366367
37274027275102.447981403-1075.44798140280
38273784274824.034737523-1040.03473752266
39276663275462.5516643841200.44833561569
40274525272360.7309149482164.2690850519
41271344278947.796646886-7603.79664688563
42271115271430.998603056-315.99860305601
43270798273309.685809758-2511.68580975791
44273911270026.6847240453884.31527595507
45273985272336.4313109921648.56868900813
46271917271064.142755852852.857244147512
47273338271909.1678552471428.83214475308
48270601270373.748501195227.251498804777
49273547276373.387849601-2826.38784960087
50275363274294.3755592871068.62444071274
51281229277007.1457612784221.85423872236
52277793276839.591703434953.408296566282
53279913281538.258895376-1625.25889537612
54282500280645.1351850971854.86481490283
55280041285071.065866953-5030.06586695346
56282166280569.1565703171596.84342968272
57290304280881.2157349229422.78426507779
58283519287335.198788099-3816.19878809917
59287816284532.0505138423283.94948615762
60285226285085.409702811140.590297188726
61287595291692.649041344-4097.64904134435
62289741289440.89696119300.103038810194
63289148292368.828148631-3220.82814863132
64288301284980.2023948833320.79760511749
65290155291869.663409974-1714.66340997408
66289648291381.338234087-1733.33823408716
67288225291839.019646254-3614.01964625437
68289351289230.559528781120.440471219423
69294735288746.4719367575988.5280632429
70305333290445.08946497114887.9105350295
71309030306356.0421431612673.95785683906
72310215306766.5523916783448.44760832243
73321935317666.334086384268.66591362015


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
74325422.61644011318581.935284816332263.297595403
75329803.748539347320181.520720576339425.976358117
76327380.366946838315458.450049121339302.283844554
77332982.676776855318675.494227277347289.859326433
78336076.143786297319534.599115959352617.688456635
79340252.288218566321450.873076376359053.703360755
80343784.157516855322754.771464654364813.543569056
81346015.722146355322825.365145904369206.079146805
82344266.049813088319171.722529072369360.377097103
83346237.360765989318977.958341959373496.763190018
84344379.765529816315241.895051493373517.63600814
85353143.58931973321962.433955165384324.744684294
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t12441979984u7p0xgp0kch1ub/1t0hw1244197963.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t12441979984u7p0xgp0kch1ub/1t0hw1244197963.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t12441979984u7p0xgp0kch1ub/2ero71244197963.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t12441979984u7p0xgp0kch1ub/2ero71244197963.ps (open in new window)


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