Home » date » 2010 » Aug » 13 »

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: Fri, 13 Aug 2010 14:29:10 +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/t1281709825bvw77wtm0kcscyd.htm/, Retrieved Fri, 13 Aug 2010 16:30:29 +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/t1281709825bvw77wtm0kcscyd.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:
Cols Julien
 
Dataseries X:
» Textbox « » Textfile « » CSV «
356 355 354 352 372 371 356 346 347 347 348 350 353 351 348 351 370 370 351 335 330 328 332 334 343 334 336 343 365 364 351 326 320 312 315 316 319 311 315 322 336 339 317 295 291 283 285 289 296 283 285 289 306 306 283 258 255 248 244 249 258 252 246 249 267 284 261 235 229 218 218 229 237 231 229 233 245 256 224 194 192 178 170 187 192 182 178 186 204 224 194 173 178 168 152 163 172 170 156 155 178 194 164 135 139 135 109 121 131 135 119 121 151 169 135 105 112 105 82 81
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0011609542690148
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
33543540
4352353-1
5372350.99883904573121.0011609542690
6371371.023220433195-0.0232204331950925
7356370.023193475334-14.0231934753340
8346355.006913189004-9.00691318900368
9347344.9964565746862.00354342531375
10347345.9987825969791.00121740302097
11348345.9999449645972.00005503540274
12350347.0022669370292.99773306297112
13353349.0057471680263.99425283197428
14351352.010384312902-1.01038431290249
15348350.009211302921-2.00921130292107
16351347.0068787004823.99312129951841
17370350.01151453170119.988485468299
18370369.0347202492370.965279750763443
19351369.035840894884-18.0358408948840
20335350.014902108402-15.0149021084018
21330333.9974704937-3.99747049370023
22328328.992829613265-0.992829613265314
23332326.9916769834875.00832301651263
24334330.9974914174743.00250858252599
25343333.0009771926319.99902280736939
26334342.012585600845-8.01258560084483
27336333.0032833553862.99671664461431
28343335.0067624063677.99323759363273
29365342.01604218967522.9839578103251
30364364.042725513614-0.0427255136136182
31351363.042675911246-12.0426759112462
32326350.028694915237-24.0286949152367
33320325.000798699296-5.00079869929596
34312318.994993000697-6.99499300069749
35315310.9868721337124.01312786628836
36316313.991531191642.00846880835991
37319314.9938629320774.00613706792268
38311317.998513874009-6.99851387400861
39315309.990388919455.0096110805502
40322313.996204848828.0037951511801
41336321.00549688896914.994503111031
42339335.0229048213673.97709517863251
43317338.027522046993-21.0275220469934
44295316.003110055506-21.0031100555061
45291293.978726405225-2.97872640522462
46283289.975268240088-6.97526824008821
47285281.9671702726473.03282972735263
48289283.9706912492675.02930875073343
49296287.9765300467318.02346995326911
50283294.985844928425-11.9858449284255
51285281.9719299105883.02807008941193
52289283.9754453614855.02455463851476
53306287.98127863964318.0187213603573
54306305.0021975511280.997802448871767
55283305.003355954141-22.0033559541409
56258281.977811064113-23.9778110641133
57255256.949973921997-1.94997392199673
58248253.947710091448-5.94771009144753
59244246.940805072026-2.94080507202600
60249242.9373909318236.06260906817673
61258247.94442934370210.0555706562976
62252256.956103401383-4.95610340138319
63246250.950349591982-4.95034959198165
64249244.9446024624904.05539753751029
65267247.94931059357319.0506894064266
66284265.97142757276818.0285724272325
67261282.992357920891-21.9923579208912
68235259.966825799077-24.9668257990772
69229233.937840456082-4.937840456082
70218227.932107849125-9.9321078491248
71218216.9205771261171.07942287388295
72229216.92183028671112.0781697132894
73237227.9358524894019.06414751059893
74231235.946375550149-4.9463755501485
75229229.940633034337-0.940633034337395
76233227.9395410024015.0604589975994
77245231.94541596387713.0545840361229
78256243.96057173894412.039428261056
79224254.97454896458-30.9745489645802
80194222.938588929729-28.9385889297289
81192192.904992551372-0.904992551371691
82178190.903941896406-12.9039418964057
83170176.888961009974-6.888961009974
84187168.88096324128018.1190367587196
85192185.9019986143566.09800138564412
86182190.909078115097-8.90907811509697
87178180.898735082826-2.89873508282628
88186176.8953697839579.10463021604286
89204184.90593984327419.0940601567258
90224202.92810717392621.071892826074
91194222.952570677859-28.9525706778587
92173192.918958067331-19.9189580673313
93178171.8958330679296.10416693207134
94168176.902919726587-8.90291972658724
95152166.892583843924-14.8925838439239
96163150.87529423513412.1247057648663
97172161.88937046405210.1106295359480
98170170.901108442574-0.901108442574156
99156168.900062296881-12.9000622968809
100155154.8850859144870.114914085513220
101178153.88521932448524.1147806755151
102194176.91321548205717.0867845179435
103164192.933052457486-28.9330524574864
104135162.899462506720-27.8994625067202
105139133.8670725066205.13292749338018
106135137.873031600706-2.87303160070579
107109133.869696142404-24.8696961424039
108121107.84082356249813.1591764375017
109131119.8561007645611.1438992354398
110135129.8690383219515.130961678049
111119133.874995133815-14.8749951338153
112121117.8577259447133.14227405528689
113151119.86137398119231.138626018808
114169149.89752450200019.1024754980002
115135167.919701602478-32.9197016024779
116105133.881483334368-28.8814833343679
117112103.8479532529958.15204674700465
118105110.857417406467-5.85741740646749
11982103.850617212724-21.8506172127241
1208180.82524964539030.174750354609671


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12179.825452522560553.0698731131734106.581031931948
12278.65090504512140.7908312503085116.510978839934
12377.476357567681631.080512879325123.872202256038
12476.301810090242122.6974202604850129.906199919999
12575.127262612802715.1609743212278135.093550904377
12673.95271513536328.22485421333582139.680576057391
12772.77816765792371.74282118542384143.813514130424
12871.6036201804842-4.38035117145721147.587591532426
12970.4290727030448-10.2107685227119151.068913928801
13069.2545252256053-15.7965338487652154.305584299976
13168.0799777481658-21.1739398262426157.333895322574
13266.9054302707264-26.3711658331901160.182026374643
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281709825bvw77wtm0kcscyd/1ehbg1281709748.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281709825bvw77wtm0kcscyd/1ehbg1281709748.ps (open in new window)


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


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


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