Home » date » 2010 » Aug » 20 »

Tijdreeks A - 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: Thu, 19 Aug 2010 22:18:46 +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/t12822564946yjtsq0mnku42ff.htm/, Retrieved Fri, 20 Aug 2010 00:21:37 +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/t12822564946yjtsq0mnku42ff.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 Boxel Dieter
 
Dataseries X:
» Textbox « » Textfile « » CSV «
356 355 354 352 372 371 356 346 347 347 348 350 353 350 343 346 373 363 349 350 353 356 355 346 349 348 342 342 379 375 363 361 363 373 367 360 358 367 357 346 386 383 367 354 363 370 361 354 363 366 353 351 389 385 364 348 347 352 342 338 343 354 329 320 353 345 324 310 314 313 310 301 294 296 274 269 292 287 271 256 260 265 263 256 246 245 220 224 240 238 222 203 209 214 216 214 206 196 169 177 193 183 164 142 141 137 140 146 136 124 105 114 135 123 100 74 64 57 62 64
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.604067171997709
beta0.0703089588431605
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13353355.767282849865-2.76728284986484
14350350.972607223685-0.972607223685145
15343342.6967265586560.303273441344231
16346345.0025982606930.997401739307008
17373371.6335488269251.36645117307523
18363362.1707761809860.829223819013862
19349354.412772362754-5.4127723627538
20350341.2447946699718.75520533002879
21353348.2065916057174.79340839428289
22356352.0272200409093.97277995909059
23355356.048526761376-1.04852676137563
24346358.101527882073-12.1015278820725
25349353.163049124451-4.16304912445094
26348348.14586671249-0.145866712490204
27342340.8454724961731.15452750382741
28342343.896945517829-1.89694551782912
29379368.51022025702710.4897797429729
30375364.50931922199110.4906807780089
31363360.4737424036072.52625759639295
32361358.4419025449332.55809745506747
33363360.7433636632732.25663633672707
34373363.2626101278599.7373898721409
35367369.548773316264-2.54877331626426
36360366.872520210674-6.8725202106736
37358369.459801567944-11.4598015679443
38367362.2533221920324.74667780796767
39357358.951708187976-1.95170818797573
40346359.695540552882-13.695540552882
41386383.1009638304522.89903616954751
42383374.1891649435078.81083505649275
43367365.6491816747831.35081832521655
44354362.664797879166-8.6647978791657
45363357.376387061775.62361293823028
46370364.2594890993635.74051090063733
47361362.628920802497-1.62892080249725
48354358.155358793036-4.1553587930357
49363359.871590989483.1284090105197
50366367.994159890913-1.99415989091261
51353357.74376080876-4.74376080876027
52351351.699854617891-0.699854617890765
53389390.328664004253-1.3286640042528
54385381.1199987826893.88000121731147
55364366.461864237559-2.46186423755927
56348356.884978325654-8.88497832565406
57347356.723802955268-9.7238029552684
58352353.252208419052-1.25220841905212
59342343.611797838406-1.61179783840635
60338337.1357889034840.864211096516442
61343343.386242183586-0.386242183586432
62354345.9247021186198.07529788138129
63329340.31550124668-11.3155012466801
64320330.948138572574-10.9481385725744
65353358.547533529034-5.54753352903435
66345347.600449935565-2.60044993556534
67324326.538974496149-2.53897449614863
68310313.558180460462-3.55818046046221
69314313.9647750780030.035224921996587
70313317.794813879693-4.79481387969338
71310305.2954295120834.70457048791684
72301302.816092223163-1.81609222316257
73294305.002581965368-11.0025819653684
74296301.745160956462-5.74516095646209
75274280.558513439322-6.55851343932233
76269272.311739771828-3.31173977182817
77292298.815311980841-6.81531198084105
78287287.062628017994-0.0626280179935748
79271268.7565717868572.24342821314326
80256258.400939301071-2.40093930107082
81260258.4039496791111.59605032088905
82265259.1137990233465.88620097665410
83263256.4091400396366.59085996036379
84256252.5428274251693.45717257483091
85246253.26125691526-7.26125691525982
86245252.552456822219-7.55245682221889
87220231.830451932749-11.8304519327494
88224220.8757508672493.12424913275075
89240243.998508396941-3.99850839694082
90238236.3578859959891.64211400401120
91222221.9945229130740.00547708692633364
92203209.830381508620-6.83038150861972
93209206.7833320188902.21666798110974
94214207.8981497504576.10185024954319
95216205.48555644549810.5144435545020
96214203.48308445411610.5169155458839
97206204.5431326710381.45686732896226
98196208.052531955809-12.0525319558091
99169185.455340566486-16.4553405664857
100177176.2267482669720.773251733028019
101193190.0277253696282.97227463037163
102183188.548670045437-5.54867004543664
103164171.547067692069-7.54706769206913
104142154.219947267134-12.2199472671343
105141148.160059889812-7.16005988981192
106137142.079166652793-5.07916665279262
107140132.9296809157407.07031908426043
108146128.67024956170117.3297504382987
109136130.7842861957675.21571380423288
110124129.657060689831-5.6570606898311
111105112.851974654600-7.85197465459972
112114110.7061915241763.29380847582370
113135119.39669685770215.6033031422985
114123122.7561413786090.243858621390601
115100111.812161686028-11.8121616860280
1167493.5276024625379-19.5276024625379
1176480.9839341426352-16.9839341426352
1185766.5668433464246-9.56684334642462
1196255.74687047346176.25312952653834
1206452.973876867528211.0261231324718


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12150.131002250578536.365989432547163.89601506861
12242.713432293229226.479247831865258.9476167545932
12333.859797452271215.786261151769251.9333337527731
12431.79572819471649.8940895729900953.6973668164428
12529.66830220815742.7962481456111856.5403562707036
12621.623822752465-6.5099954432288849.7576409481589
12713.7602879246225-14.522701047689142.0432768969341
1287.12817126818914-20.906598233129135.1629407695074
1292.17906971793759-29.743800889283534.1019403251587
130-3.40015302711963-39.88754180677933.0872357525397
131-10.4762434400666-54.699434964018533.7469480838852
132-17.6446353131815-64.294776088185129.0055054618220
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/20/t12822564946yjtsq0mnku42ff/1kp8w1282256323.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t12822564946yjtsq0mnku42ff/1kp8w1282256323.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/20/t12822564946yjtsq0mnku42ff/2kp8w1282256323.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t12822564946yjtsq0mnku42ff/2kp8w1282256323.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/20/t12822564946yjtsq0mnku42ff/3i1e51282256323.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t12822564946yjtsq0mnku42ff/3i1e51282256323.ps (open in new window)


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