Home » date » 2010 » Aug » 20 »

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: Fri, 20 Aug 2010 08:10:35 +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/20/t1282291823lddyygnrbxo2or9.htm/, Retrieved Fri, 20 Aug 2010 10:11:35 +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/20/t1282291823lddyygnrbxo2or9.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:
Aerts Ellen
 
Dataseries X:
» Textbox « » Textfile « » CSV «
112 118 132 129 121 135 148 148 136 119 104 118 115 126 141 135 125 149 170 170 158 133 114 140 145 150 178 163 172 178 199 199 184 162 146 166 171 180 193 181 183 218 230 242 209 191 172 194 196 196 236 235 229 243 264 272 237 211 180 201 204 188 235 227 234 264 302 293 259 229 203 229 242 233 267 269 270 315 364 347 312 274 237 278 284 277 317 313 318 374 413 405 355 306 271 306 315 301 356 348 355 422 465 467 404 347 305 336 340 318 362 348 363 435 491 505 404 359 310 337 360 342 406 396 420 472 548 559 463 407 362 405 417 391 419 461 472 535 622 606 508 461 390 432
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.999933893038648
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
21181126
3132117.99960335823214.0003966417681
4129131.99907447632-2.99907447632029
5121129.000198259701-8.00019825970051
6135121.00052886879713.9994711312028
7148134.99907453750313.000925462497
8148147.9991405483230.000859451677087009
9136147.999999943184-11.9999999431843
10119136.000793283532-17.0007932835325
11104119.001123870785-15.0011238707845
12118104.00099167871613.999008321284
13115117.999074568098-2.99907456809794
14126115.00019825970710.9998017402934
15141125.99927283653115.0007271634685
16135140.999008347509-5.99900834750915
17125135.000396576213-10.000396576213
18149125.0006610958323.99933890417
19170148.99841347663121.0015865233694
20170169.9986116489310.00138835106864121
21158169.99999990822-11.9999999082203
22133158.00079328353-25.0007932835302
23114133.001652726475-19.0016527264754
24140114.00125614152225.9987438584776
25145139.9982813020455.00171869795545
26150144.9996693515755.00033064842467
27178149.99966944333528.0003305566649
28163177.99814898323-14.99814898323
29172163.0009914820558.99900851794482
30178171.9994051028926.0005948971083
31199177.99960331890521.0003966810949
32199198.9986117275880.00138827241175932
33184198.999999908226-14.9999999082255
34162184.000991604414-22.0009916044142
35146162.001454418702-16.0014544187017
36166146.00105780752919.9989421924712
37171165.9986779307015.0013220692986
38180170.9996693777959.00033062220476
39193179.99940501549113.0005949845086
40181192.99914057017-11.9991405701698
41183181.0007932267221.99920677327808
42218182.99986783851535.0001321614849
43230217.99768624761612.0023137523841
44242229.99920656350912.0007934364914
45209241.999206664012-32.9992066640121
46191209.00218147728-18.0021814772796
47172191.001190069515-19.0011900695152
48194172.00125611093821.9987438890624
49196193.9985457298882.00145427011208
50196195.999867689940.000132310060081409
51236195.99999999125340.0000000087466
52235235.997355721545-0.997355721545347
53229235.000065932156-6.00006593215613
54243229.00039664612713.9996033538733
55264242.99907452876221.0009254712378
56272263.9986116926328.00138830736847
57237271.999471052532-34.9994710525324
58211237.00231370868-26.0023137086802
59180211.001718933947-31.0017189339474
60201180.00204942943520.9979505705646
61204200.9986118892933.00138811070684
62188203.999801587352-15.9998015873522
63235188.00105769826546.9989423017348
64227234.996893042738-7.99689304273767
65234227.0005286502996.99947134970068
66264233.99953728621830.000462713782
67302263.99801676057138.0019832394291
68293301.997487804363-8.99748780436272
69259293.000594796579-34.0005947965785
70229259.002247676006-30.0022476760062
71203229.001983357428-26.0019833574276
72229203.00171891210925.9982810878911
73242228.99828133263713.0017186673631
74233241.999140495887-8.99914049588654
75267233.00059490583333.999405094167
76269266.9977524026412.00224759735858
77270268.9998676374951.00013236250453
78315269.99993388428945.0000661157114
79364314.99702518236849.0029748176315
80347363.996760562238-16.9967605622376
81312347.001123604194-35.0011236041936
82274312.002313817925-38.0023138179254
83237274.002512217491-37.0025122174908
84278237.00244612364540.9975538763549
85284277.997289776296.00271022370964
86277283.999603179067-6.99960317906721
87317277.00046272249739.9995372775032
88313316.997355752135-3.99735575213509
89318313.0002642530424.99973574695781
90374317.99966948266256.0003305173378
91413373.99629798831539.0037020116852
92405412.997421583779-7.99742158377853
93355405.00052868524-50.0005286852395
94306355.003305383017-49.0033053830174
95271306.003239459615-35.0032394596151
96306271.00231395779834.9976860422018
97315305.9976864093219.00231359067863
98301314.999404884403-13.9994048844034
99356301.00092545811854.9990745418824
100348355.996364178305-7.99636417830487
101355348.0005286153386.99947138466229
102422354.99953728621667.0004627137843
103465421.99557080300143.0044291969992
104467464.9971571078612.00284289213886
105404466.999867598142-62.9998675981423
106347404.004164729812-57.0041647298125
107305347.003768372115-42.0037683721147
108336305.00277674149230.9972232585076
109340335.997950867764.00204913223996
110318339.999735436693-21.9997354366927
111362318.0014543356643.9985456643398
112348361.997091389842-13.9970913898422
113363348.0009253051814.9990746948205
114435362.99900845674972.0009915432512
115491434.99524023323556.0047597667652
116505490.99629769551114.0037023044894
117404504.999074257793-100.999074257793
118359404.006676741899-45.0066767418986
119310359.00297525464-49.00297525464
120337310.00323943779126.9967605622087
121360336.99821532619323.0017846738071
122342359.99847942191-17.9984794219096
123406342.00118982478463.9988101752165
124396405.995769233129-9.99576923312918
125420396.0006607899323.9993392100696
126472419.9984134766152.0015865233896
127548471.99656233312976.0034376668705
128559547.99497564368411.0050243563164
129463558.99927249128-95.9992724912802
130407463.006346220196-56.0063462201964
131362407.003702409365-45.003702409365
132405362.00297505801642.9970249419841
133417404.99715759733412.0028424026661
134391416.999206528561-25.9992065285612
135419391.00171872854127.9982812714588
136461418.99814911870242.0018508812979
137472460.99722338526711.0027766147329
138535471.99927263987263.0007273601285
139622534.99583521335187.0041647866487
140606621.994248419041-15.994248419041
141508606.001057331162-98.001057331162
142461508.006478552109-47.0064785521095
143390461.003107455461-71.0031074554609
144432390.0046937996841.9953062003196


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
145431.997223817916365.838723296861498.155724338972
146431.997223817916338.43806762164525.556380014192
147431.997223817916317.412389633265546.582058002567
148431.997223817916299.686783027748564.307664608084
149431.997223817916284.070142933268579.924304702565
150431.997223817916269.951582790402594.04286484543
151431.997223817916256.968202530066607.026245105766
152431.997223817916244.883550319832619.110897316
153431.997223817916233.533384978413630.461062657419
154431.997223817916222.798122854559641.196324781273
155431.997223817916212.587487568948651.406960066884
156431.997223817916202.831343116171661.163104519661
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282291823lddyygnrbxo2or9/116r21282291830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282291823lddyygnrbxo2or9/116r21282291830.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/20/t1282291823lddyygnrbxo2or9/216r21282291830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282291823lddyygnrbxo2or9/216r21282291830.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/20/t1282291823lddyygnrbxo2or9/316r21282291830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282291823lddyygnrbxo2or9/316r21282291830.ps (open in new window)


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