Home » date » 2010 » Jul » 29 »

Tijdreeks 2 - Stap 27

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 29 Jul 2010 12:58:25 +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/29/t1280408287beok07dnsz0w69u.htm/, Retrieved Thu, 29 Jul 2010 14:58:07 +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/29/t1280408287beok07dnsz0w69u.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:
Habimana Christelle
 
Dataseries X:
» Textbox « » Textfile « » CSV «
376 375 374 372 370 369 370 372 373 373 374 376 371 374 369 363 357 366 362 366 361 362 358 363 360 360 348 345 332 333 323 327 332 337 336 337 343 337 326 321 309 302 293 287 292 292 289 302 310 295 276 264 257 243 227 226 226 229 224 240 244 226 208 199 193 180 167 164 166 173 169 191 193 166 143 147 139 129 115 108 106 116 108 135
 
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.17405321302253
beta0.155374088159449
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13371374.488782051282-3.48878205128227
14374376.675603202716-2.67560320271582
15369371.098270113510-2.09827011351041
16363364.773012764285-1.77301276428483
17357358.623085947253-1.62308594725272
18366367.538694011388-1.53869401138763
19362362.469045974832-0.469045974831545
20366363.5728890370322.42711096296767
21361364.246454753421-3.24645475342118
22362363.178056418678-1.17805641867830
23358363.771144190277-5.77114419027686
24363364.158719151829-1.15871915182885
25360355.2278841937844.77211580621605
26360359.1365749412260.86342505877434
27348354.360166038926-6.36016603892637
28345347.15459982716-2.15459982716004
29332340.644611286876-8.64461128687589
30333347.80044107954-14.8004410795398
31323340.340011049965-17.3400110499645
32327339.477227717233-12.4772277172326
33332331.0452664044970.954733595502944
34337330.7047839853236.29521601467667
35336327.2953737659368.70462623406428
36337332.8939951991724.10600480082832
37343328.80230673740514.1976932625948
38337330.4023285379646.59767146203558
39326320.0919046508065.90809534919407
40321318.2612405141182.73875948588221
41309307.1408835083031.85911649169736
42302311.222919851203-9.22291985120336
43293302.968947385222-9.96894738522155
44287307.938081689494-20.9380816894941
45292309.431316986699-17.4313169866991
46292310.108167252241-18.1081672522406
47289303.587894503197-14.5878945031967
48302299.8508333662932.14916663370724
49310302.2175012176537.78249878234749
50295294.7139884338530.28601156614684
51276280.855022415635-4.85502241563495
52264272.361805144265-8.36180514426519
53257256.1111292037230.88887079627699
54243248.373188462661-5.37318846266055
55227237.779274345754-10.7792743457542
56226231.131712717639-5.13171271763855
57226236.284220987578-10.2842209875784
58229235.851008086266-6.85100808626552
59224232.707073538354-8.70707353835397
60240242.485982721617-2.48598272161672
61244247.241843180283-3.2418431802825
62226229.872796143532-3.8727961435317
63208209.176275068043-1.17627506804314
64199196.6589446371812.34105536281902
65193188.4331483008434.56685169915735
66180174.7841554614585.21584453854172
67167160.4754315525426.5245684474582
68164160.8794730351303.1205269648697
69166162.8110090623923.18899093760788
70173167.5212606381625.47873936183774
71169165.286542229583.71345777042015
72191182.9976629334048.00233706659606
73193189.8704762005353.12952379946466
74166174.177283218823-8.17728321882322
75143155.930358198954-12.9303581989537
76147144.9260726513672.07392734863311
77139139.138700169714-0.138700169714326
78129125.7259995406203.27400045938026
79115112.6269888327282.37301116727181
80108109.851370345917-1.85137034591713
81106111.194111504069-5.1941115040689
82116116.329792502009-0.329792502009028
83108111.462294570306-3.46229457030607
84135131.1090249185073.89097508149294


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85132.772559242198118.798813406849146.746305077547
86106.64221010528792.3887165158134120.895703694760
8785.560290148299570.9546327335236100.165947563075
8889.216506404841474.1818586857312104.251154123951
8981.20175162779665.65846039350896.745042862084
9070.596756259692354.463850386442186.7296621329425
9156.060041002123539.256574308300772.8635076959463
9249.194418726422831.640586160040766.7482512928049
9347.960678562997529.578679249578366.3426778764167
9458.020754271562138.735405215109677.3061033280146
9550.634970727028130.374096646439170.895844807617
9677.06295904932255.757595829506998.3683222691372
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280408287beok07dnsz0w69u/1wb6s1280408300.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280408287beok07dnsz0w69u/1wb6s1280408300.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280408287beok07dnsz0w69u/2plnv1280408300.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280408287beok07dnsz0w69u/2plnv1280408300.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280408287beok07dnsz0w69u/3plnv1280408300.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280408287beok07dnsz0w69u/3plnv1280408300.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