Home » date » 2010 » Jul » 19 »

Tijdreeks 1 - Stap 32

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 19 Jul 2010 16:41:23 +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/Jul/19/t12795580381izkmdjei1zgozk.htm/, Retrieved Mon, 19 Jul 2010 18:47: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/2010/Jul/19/t12795580381izkmdjei1zgozk.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:
Van Puyenbroeck Cassandra
 
Dataseries X:
» Textbox « » Textfile « » CSV «
349 348 347 345 365 364 349 339 340 340 341 343 341 343 341 335 355 357 337 325 336 338 337 328 326 327 319 310 320 322 303 292 303 315 311 307 308 312 309 310 309 304 287 275 290 298 294 286 294 292 287 281 280 271 264 259 271 279 279 273 286 286 280 277 269 255 252 245 257 267 261 258 271 262 258 253 236 228 235 226 231 235 227 222 233 221 218 220 204 196 208 190 191 194 179 162 179 176 168 170 153 142 155 136 136 144 135 114 135 132 123 123 103 97 113 108 111 121 111 97
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.702888259538534
beta0.015960640491968
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
33473470
4345346-1
5365344.28589319364520.7141068063551
6364358.0667593048125.93324069518786
7349361.524890499142-12.5248904991415
8339351.868506913518-12.8685069135184
9340341.826233437177-1.82623343717711
10340339.5249566606570.475043339343074
11341338.8465496082442.15345039175622
12343339.3720337517353.62796624826456
13341340.9746382884750.0253617115248517
14343340.0452989141282.95470108587165
15341341.208105246675-0.208105246674506
16335340.145477502427-5.1454775024273
17355335.55470398638619.4452960136142
18357348.4666444314318.53335556856916
19337353.804441897818-16.8044418978180
20325341.14407758436-16.1440775843603
21336328.7667625036617.23323749633943
22338332.9022341462055.09776585379456
23337335.5938973675191.40610263248146
24328335.706508280612-7.70650828061179
25326329.327516145211-3.32751614521112
26327325.9891362747371.01086372526260
27319325.711493102665-6.71149310266492
28310319.930602780694-9.93060278069396
29320311.7756311276588.22436887234193
30322316.4738413690275.52615863097333
31303319.337506779288-16.3375067792877
32292306.650175377529-14.6501753775289
33303294.9844957296748.01550427032595
34315299.34017851067315.6598214893275
35311309.2446425576121.75535744238823
36307309.395514630429-2.39551463042892
37308306.6019132633851.39808673661457
38312306.4904742601145.50952573988565
39309309.330726334501-0.330726334501094
40310308.0622235241891.93777647581129
41309308.4099637420890.590036257911038
42304307.817012533302-3.81701253330203
43287304.083577136154-17.0835771361538
44275290.833576325356-15.8335763253561
45290278.28455669160311.7154433083973
46298285.23084976944312.7691502305572
47294293.0610323815320.938967618467814
48286292.586452379574-6.58645237957404
49294286.7484525885217.25154741147924
50292290.7183722102231.28162778977662
51287290.506483420803-3.50648342080348
52281286.889749827684-5.88974982768434
53280281.531771823637-1.53177182363663
54271279.219781140045-8.21978114004548
55264272.114653228725-8.1146532287251
56259264.992383874875-5.99238387487532
57271259.29460689438211.7053931056179
58279266.1677070739712.8322929260299
59279273.9768515859565.02314841404433
60273276.353392529076-3.35339252907619
61286272.80454099665213.1954590033482
62286281.0357167898094.96428321019067
63280283.536987799363-3.53698779936263
64277280.023135361929-3.02313536192901
65269276.836548584312-7.83654858431225
66255270.178755477202-15.1787554772017
67252258.189927767039-6.1899277670388
68245252.449799526919-7.44979952691864
69257245.74054629348811.2594537065116
70267252.30812221110514.6918777888955
71261261.453130236783-0.453130236782897
72258259.94780646782-1.94780646781976
73271257.37004076620113.6299592337992
74262265.894612021863-3.89461202186340
75258262.057676001175-4.05767600117491
76253258.060602995689-5.06060299568924
77236253.301811768958-17.3018117689582
78228239.744717427596-11.7447174275957
79235229.9618807936175.03811920638339
80226232.032023367599-6.03202336759867
81231226.2534221583634.74657784163674
82235228.1042228990826.89577710091805
83227231.543031164801-4.54303116480131
84222226.890669189623-4.890669189623
85233221.93909032696011.0609096730396
86221228.323776300967-7.32377630096673
87218221.703920221235-3.70392022123511
88220217.5868658787592.41313412124055
89204217.796489074683-13.7964890746828
90196206.45778187606-10.4577818760602
91208197.34849165381310.6515083461873
92190203.196168141023-13.1961681410228
93191192.133550978011-1.13355097801104
94194189.5368890034734.46311099652746
95179190.924124643105-11.9241246431048
96162180.659193394793-18.6591933947934
97179165.45093235907713.5490676409227
98176173.0334807151682.96651928483172
99168173.210960111243-5.21096011124308
100170167.5821258472322.41787415276835
101153167.342634655738-14.3426346557384
102142155.161475080496-13.161475080496
103155143.66288607896811.3371139210320
104136149.511253605161-13.5112536051612
105136137.742418697375-1.74241869737526
106144134.2262122689899.77378773101117
107135138.914259828772-3.91425982877249
108114133.937227155638-19.9372271556380
109135117.47417214924317.5258278507569
110132127.5400729935324.45992700646849
111123128.472139433995-5.4721394339953
112123122.3616835280740.638316471926402
113103120.553356322076-17.5533563220762
11497105.761392738122-8.76139273812159
11511397.050907041008515.9490929589915
116108105.8880572739322.11194272606754
117111105.0229299910105.9770700089905
118121106.94160933659714.0583906634034
119111114.698268805559-3.69826880555915
12097109.932491603429-12.9324916034289


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12198.531003848205780.0423829634544117.019624732957
12296.219612607613373.5008021037576118.938423111469
12393.908221367020967.5267966374233120.289646096618
12491.596830126428561.9080981776696121.285562075187
12589.28543888583656.5355672076013122.035310564071
12686.974047645243751.3444885158435122.603606774644
12784.662656404651346.2928634222252123.032449387077
12882.351265164058941.3516709396948123.350859388423
12980.039873923466536.4999076252998123.579840221633
13077.728482682874131.7218215139909123.735143851757
13175.417091442281727.0052603583769123.828922526186
13273.105700201689322.3406309261031123.870769477275
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/19/t12795580381izkmdjei1zgozk/142ey1279557678.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/19/t12795580381izkmdjei1zgozk/142ey1279557678.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/19/t12795580381izkmdjei1zgozk/242ey1279557678.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/19/t12795580381izkmdjei1zgozk/242ey1279557678.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/19/t12795580381izkmdjei1zgozk/3wcdj1279557678.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/19/t12795580381izkmdjei1zgozk/3wcdj1279557678.ps (open in new window)


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