Home » date » 2010 » Aug » 13 »

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: Fri, 13 Aug 2010 15:29:15 +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/13/t12817133790zip2ss6juwhsvo.htm/, Retrieved Fri, 13 Aug 2010 17:29:39 +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/13/t12817133790zip2ss6juwhsvo.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:
Reuben Vermoet
 
Dataseries X:
» Textbox « » Textfile « » CSV «
210 209 208 206 226 225 210 200 201 201 202 204 197 196 187 196 221 218 200 191 194 192 199 196 182 178 169 177 207 213 191 182 188 189 194 195 171 165 156 170 201 208 189 175 184 187 193 199 179 188 171 182 212 216 192 182 183 183 187 190 167 167 158 171 201 208 181 169 173 180 181 192 169 168 156 161 195 208 176 164 170 175 170 175 148 151 143 139 166 186 149 142 138 137 130 138 118 113 99 93 125 146 109 97 97 94 92 103 78 72 57 40 70 89 53 46 43 38 29 34
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.113784222520231
beta0.171310491544316
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
32082080
4206207-1
5226205.8667233463920.1332766536102
6225207.53052665390117.4694733460994
7210209.2317536784960.768246321504307
8200209.047619559445-9.04761955944534
9201207.570234671978-6.57023467197789
10201206.246667251226-5.24666725122609
11202204.971430620551-2.97143062055133
12204203.8971596143380.102840385662120
13197203.174696753514-6.17469675351367
14196201.617589358997-5.61758935899741
15187200.014371522755-13.0143715227546
16196197.315834838771-1.31583483877122
17221195.92275823607925.0772417639212
18218198.02161374154919.9783862584507
19200199.9297272550180.0702727449822191
20191199.573981337151-8.57398133715074
21194198.0675279489-4.06752794890016
22192196.994551847505-4.99455184750499
23199195.7187390948373.28126090516312
24196195.4485430140360.551456985963938
25182194.878487553954-12.8784875539545
26178192.529283264720-14.5292832647204
27169189.709033416174-20.7090334161736
28177185.781956094471-8.78195609447053
29207183.0408103187523.9591896812501
30213184.49211321337428.5078867866265
31191187.0166740903203.98332590967979
32182186.828371581037-4.82837158103661
33188185.5433202233682.45667977663160
34189185.1350794317083.86492056829152
35194184.9624109214949.03758907850568
36195185.5544750584029.44552494159836
37171186.377072104361-15.3770721043614
38165184.075512726154-19.0755127261544
39156180.98130103994-24.9813010399400
40170176.728157533014-6.72815753301447
41201174.42078562150026.5792143784997
42208176.42136063182731.5786393681727
43189179.6063357794509.39366422054977
44175180.450116130771-5.45011613077128
45184179.4986724624454.501327537555
46187179.7672878917127.23271210828793
47193180.48767493312812.5123250668722
48199182.05269426438516.9473057356153
49179184.452688612138-5.4526886121381
50188184.1976308615483.80236913845209
51171185.069770079898-14.0697700798982
52182183.634087808782-1.63408780878163
53212183.58153763238528.4184623676149
54216187.50243843194328.4975615680574
55192191.9878262276210.0121737723792421
56182193.232263616200-11.2322636161996
57183192.978317314319-9.97831731431887
58183192.672548654837-9.67254865483696
59187192.213030156427-5.21303015642684
60190192.159319872079-2.15931987207907
61167192.410983244430-25.4109832444302
62167189.521652337837-22.5216523378369
63158186.522079945827-28.5220799458273
64171182.283788885768-11.2837888857681
65201179.78699489426621.2130051057339
66208181.40131638172126.5986836182789
67181184.146916118982-3.14691611898203
68169183.446594871146-14.4465948711457
69173181.178949206756-8.17894920675616
70180179.4650351275210.534964872479264
71181178.7530547528122.24694524718845
72192178.27966915940213.7203308405978
73169179.379216428855-10.3792164288551
74168177.534299288157-9.53429928815686
75156175.599673715542-19.5996737155419
76161172.137722050047-11.1377220500465
77195169.42150569625425.578494303746
78208171.38160251176236.6183974882377
79176175.3116477174800.688352282520299
80164175.166838323780-11.1668383237804
81170173.455426457595-3.45542645759534
82175172.5540969330262.44590306697356
83170172.371922197232-2.37192219723195
84175171.5953204295313.40467957046872
85148171.542370284688-23.5423702846881
86151167.964372992394-16.9643729923941
87143164.804171136206-21.8041711362058
88139160.668260307724-21.6682603077236
89166156.1254469163059.87455308369456
90186155.36418706825830.6358129317418
91149157.562397503018-8.5623975030175
92142155.133568095981-13.1335680959811
93138151.928606425941-13.9286064259412
94137148.361679536717-11.3616795367167
95130144.865361672413-14.8653616724135
96138140.680618022316-2.68061802231563
97118137.830054192974-19.8300541929741
98113132.641619137428-19.6416191374277
9999127.091762110641-28.0917621106413
10093120.032835398327-27.0328353983267
101125112.56746215751112.4325378424886
102146109.83496611454136.1650338854593
103109110.507798113161-1.50779811316109
10497106.864665561865-9.86466556186487
10597102.078367031523-5.0783670315234
1069497.7376840387952-3.73768403879524
1079293.4766930694786-1.4766930694786
10810389.444182861833113.5558171381669
1097887.3863709721254-9.38637097212543
1107282.5351368560166-10.5351368560166
1115777.3478358777625-20.3478358777625
1124070.6473757818176-30.6473757818176
1137062.17759868505957.82240131494055
1148958.237552884371830.7624471156282
1155357.5073572402528-4.50735724025282
1164652.6761549786559-6.67615497865594
1174347.4680432617241-4.46804326172409
1183842.4240867943552-4.42408679435516
1192937.2988956724757-8.29889567247572
1203431.57104678296662.42895321703341


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12127.1112040418685-2.8384884307794457.0608965145164
12222.3749847474322-7.8395301116386252.589499606503
12317.6387654529959-12.920211547873048.1977424538649
12412.9025461585596-18.088875358629743.893967675749
1258.16632686412337-23.352713921669439.6853676499161
1263.43010756968709-28.717643136680635.5778582760548
127-1.30611172474919-34.188229431202531.5760059817041
128-6.04233101918546-39.767676490230927.68301445186
129-10.7785503136217-45.457871086349723.9007704591063
130-15.5147696080580-51.259480799341820.2299415832257
131-20.2509889024943-57.172091550586816.6701137455982
132-24.9872081969306-63.194370405133113.2199540112720
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/13/t12817133790zip2ss6juwhsvo/1rdfg1281713351.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t12817133790zip2ss6juwhsvo/1rdfg1281713351.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/13/t12817133790zip2ss6juwhsvo/2j4e11281713351.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t12817133790zip2ss6juwhsvo/2j4e11281713351.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/13/t12817133790zip2ss6juwhsvo/3j4e11281713351.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t12817133790zip2ss6juwhsvo/3j4e11281713351.ps (open in new window)


 
Parameters (Session):
par1 = 0.01 ; par2 = 0.99 ; par3 = 0.01 ;
 
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