Home » date » 2010 » Aug » 15 »

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: Sun, 15 Aug 2010 10:38:03 +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/Aug/15/t1281868780b1f8qy0nn8359cv.htm/, Retrieved Sun, 15 Aug 2010 12:39:44 +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/Aug/15/t1281868780b1f8qy0nn8359cv.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:
Vanhille Olivier
 
Dataseries X:
» Textbox « » Textfile « » CSV «
568 567 566 564 584 583 568 558 559 559 560 562 563 552 552 555 575 567 548 541 544 546 551 550 546 532 523 528 555 543 525 517 519 521 520 516 509 494 484 482 508 500 480 467 471 482 481 477 471 455 441 434 459 448 432 414 415 423 425 427 415 399 386 377 397 379 361 350 348 363 367 365 354 327 312 307 335 317 298 286 288 303 310 301 293 264 255 251 279 253 233 226 232 245 250 242 230 196 188 181 212 186 166 155 157 173 182 182 168 131 114 106 134 103 83 74 83 96 95 100
 
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.211128878579708
beta0.136550211331593
gamma0.948390526889117


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13563569.188568376069-6.18856837606882
14552557.092262987191-5.09226298719102
15552555.872277613779-3.87227761377858
16555557.631563142701-2.63156314270122
17575576.326932169056-1.32693216905648
18567567.217824756121-0.217824756121104
19548554.336602126659-6.33660212665893
20541541.939179932109-0.939179932109255
21544542.0292331636131.97076683638738
22546541.540476795924.45952320408014
23551542.497402120718.50259787928951
24550545.8447312208214.15526877917864
25546543.222315748822.77768425118052
26532533.881034697877-1.88103469787677
27523534.386132710743-11.3861327107431
28528535.405013300468-7.40501330046845
29555553.848758542991.15124145700997
30543545.944217032109-2.94421703210912
31525527.682525999883-2.68252599988284
32517519.973018099372-2.97301809937187
33519521.630443341301-2.6304433413012
34521521.719244208649-0.719244208648774
35520524.145361001102-4.14536100110195
36516520.742935922923-4.74293592292281
37509514.127753015663-5.12775301566285
38494498.32058844229-4.32058844229005
39484489.817620430112-5.81762043011224
40482493.769527579601-11.7695275796007
41508516.346246663387-8.34624666338732
42500501.751671121325-1.75167112132533
43480482.351137516685-2.35113751668501
44467472.917405498617-5.9174054986172
45471472.547743919449-1.54774391944875
46482472.664484897729.33551510228
47481473.3095233019217.69047669807918
48477470.9594764271176.04052357288293
49471465.644544570225.35545542977979
50455452.2682575590282.73174244097163
51441443.951223454065-2.95122345406514
52434443.954980284937-9.9549802849374
53459469.427907049058-10.4279070490578
54448459.219552722014-11.2195527220143
55432436.990560312967-4.99056031296652
56414423.87432455116-9.87432455115953
57415425.367249342679-10.3672493426792
58423430.938880024783-7.93888002478303
59425425.382576569201-0.382576569201262
60427418.5374361883948.46256381160583
61415411.7349411449823.26505885501803
62399394.4077072780244.59229272197604
63386380.7387201643935.26127983560656
64377375.9802084797141.01979152028554
65397402.476552782214-5.47655278221436
66379391.9241925578-12.9241925577999
67361373.14932327104-12.1493232710396
68350353.815206135173-3.81520613517296
69348355.340649761086-7.34064976108641
70363362.5773921753180.422607824681734
71367363.8901129848873.10988701511332
72365363.9509454147341.04905458526565
73354351.0320121527962.9679878472038
74327333.963796108350-6.9637961083497
75312317.351092009673-5.35109200967321
76307305.8683468490031.13165315099701
77335326.2208896826278.7791103173734
78317312.2101601008314.78983989916918
79298297.3695083185570.63049168144289
80286286.951802005276-0.95180200527642
81288286.5097427626691.49025723733058
82303301.7392178097341.26078219026607
83310305.5837055551654.4162944448347
84301304.760488556107-3.76048855610691
85293292.5050875640140.494912435986237
86264267.656193907221-3.65619390722094
87255253.2157372557211.78426274427881
88251248.5626584196132.43734158038725
89279275.4230877472943.57691225270594
90253257.690154454076-4.69015445407632
91233237.823582251376-4.82358225137577
92226225.0007480064820.99925199351847
93232226.7840969063835.2159030936169
94245242.7223274310762.27767256892363
95250249.2654957712270.734504228772607
96242241.5644411170980.435558882901546
97230233.516648909001-3.51664890900088
98196204.737453854207-8.7374538542073
99188193.170363987551-5.17036398755104
100181187.212915828660-6.21291582865956
101212212.525567674632-0.525567674631645
102186187.049100769234-1.04910076923352
103166167.264095175631-1.26409517563087
104155159.064449885067-4.06444988506726
105157162.302719948844-5.30271994884427
106173172.8879503760110.112049623989037
107182176.8229707096245.17702929037648
108182168.96789082133913.0321091786608
109168160.1175611061627.88243889383835
110131129.6625308524711.33746914752939
111114123.005226209033-9.00522620903251
112106115.461508164519-9.46150816451933
113134144.253040546098-10.2530405460978
114103115.960415475181-12.9604154751810
1158392.7856157490616-9.7856157490616
1167479.7319292067056-5.73192920670564
1178380.68385711077542.31614288922464
1189696.1405340141688-0.140534014168779
11995103.016131166620-8.01613116662014
12010097.07657937831332.92342062168669


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12180.771961908846969.817078426046791.726845391647
12242.061516889503230.795655561763153.3273782172433
12325.650772366770514.006461673171337.2950830603697
12418.1934722957476.101326730367530.2856178611265
12547.189709069729134.579825564135359.7995925753229
12618.13114301225684.9342874582610131.3279985662527
127-0.46355244000037-14.315013730148813.3879088501480
128-8.66776420319101-23.23919529749325.90366689111118
129-0.568530952970889-15.922597558811314.7855356528695
13012.4102862363036-3.7861560738842328.6067285464914
13113.2765426811373-3.819019394470930.3721047567455
13217.2982210719631-0.75025118722776135.3466933311539
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/15/t1281868780b1f8qy0nn8359cv/1xky41281868681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/15/t1281868780b1f8qy0nn8359cv/1xky41281868681.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/15/t1281868780b1f8qy0nn8359cv/2qbg71281868681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/15/t1281868780b1f8qy0nn8359cv/2qbg71281868681.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/15/t1281868780b1f8qy0nn8359cv/3qbg71281868681.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/15/t1281868780b1f8qy0nn8359cv/3qbg71281868681.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