Home » date » 2010 » Aug » 19 »

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: Thu, 19 Aug 2010 21:21:24 +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/19/t1282252981a5a0bqcl4pihxje.htm/, Retrieved Thu, 19 Aug 2010 23:23:05 +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/19/t1282252981a5a0bqcl4pihxje.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 «
25 24 23 21 41 40 25 15 16 16 17 19 18 19 20 21 46 47 30 16 15 18 30 31 32 36 30 31 61 57 45 33 31 36 46 49 34 40 41 48 75 77 71 54 50 56 66 66 48 63 71 70 88 92 91 80 81 81 98 106 85 93 96 92 115 109 119 107 107 106 132 143 120 123 132 136 158 151 155 138 143 139 168 182 154 158 167 170 197 190 196 174 180 171 200 215 184 186 197 186 211 205 218 199 213 207 236 248 211 220 235 223 245 236 253 246 255 248 274 288
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.048882612475808
beta0.161657597483346
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131817.34031758050760.659682419492437
141918.32222221157750.677777788422503
152019.51430801941860.485691980581375
162120.68515600137070.314843998629325
174644.6267795926921.37322040730801
184744.24103390211092.75896609788911
193026.12332739733363.87667260266644
201616.3215848230105-0.321584823010500
211517.8509300262992-2.85093002629920
221817.98842939589870.0115706041013048
233019.122793853517610.8772061464824
243121.78658175535519.2134182446449
253221.718609088548610.2813909114514
263623.642707343457612.3572926565424
273025.8169384408024.183061559198
283127.66373173347643.33626826652364
296161.684300799127-0.684300799127037
305763.6008205672313-6.60082056723132
314540.54780473634964.45219526365036
323321.990627511937311.0093724880627
333121.57622001953419.42377998046586
343626.89669703261939.10330296738067
354645.16562864894390.83437135105607
364946.40752133387452.5924786661255
373447.4558834629241-13.4558834629241
384051.6045402604209-11.6045402604209
394142.1979419471531-1.19794194715305
404843.23540745164734.76459254835267
417585.4746137366246-10.4746137366246
427779.6416181372721-2.64161813727213
437162.35139141174818.6486085882519
445444.88404323963299.11595676036709
455041.56773190282558.43226809717455
465647.75130877461178.24869122538834
476661.1624548090984.837545190902
486664.9359055281441.06409447185604
494845.52336733272922.47663266727076
506354.18494835020868.81505164979138
517156.093094518257814.9069054817422
527066.33270293995493.66729706004509
5388104.762930085779-16.7629300857786
5492107.069985011176-15.069985011176
559197.4753145285674-6.4753145285674
568073.13120009384536.86879990615469
578167.274925009588213.7250749904118
588175.37545458035055.62454541964954
599888.66151351629639.33848648370375
6010688.914647417636317.0853525823637
618565.083079879775519.9169201202245
629386.13632171388936.86367828611071
639696.2787162212688-0.278716221268837
649294.5586586943847-2.55865869438473
65115119.473439411829-4.47343941182881
66109125.461671730956-16.4616717309559
67119123.638077994263-4.63807799426318
68107107.963704240528-0.963704240527619
69107108.078811227408-1.07881122740775
70106107.376115080397-1.3761150803967
71132128.7930223672783.20697763272221
72143137.7220703766835.27792962331702
73120108.55767421971211.4423257802884
74123118.2938008884144.70619911158637
75132121.71289233262310.2871076673769
76136116.74948976734619.2505102326544
77158146.93619178059211.0638082194077
78151140.38277425330110.6172257466991
79155154.0086419913840.99135800861609
80138138.535149672799-0.535149672799463
81143138.5359366469874.46406335301339
82139137.5443498344051.45565016559530
83168171.190314126318-3.19031412631762
84182184.915039224158-2.91503922415833
85154154.181022699430-0.181022699430315
86158157.5277111661540.472288833846278
87167168.14309287129-1.14309287129001
88170171.452391716854-1.45239171685412
89197197.758183304578-0.758183304578125
90190187.5998796805782.40012031942177
91196191.8909998642954.10900013570509
92174170.4415274011333.5584725988667
93180175.9373581279884.06264187201239
94171170.5658752460750.434124753924976
95200205.707759817235-5.70775981723472
96215222.018637118999-7.01863711899881
97184186.989891114585-2.98989111458459
98186191.062430557554-5.06243055755434
99197201.090801555265-4.09080155526541
100186203.9151303878-17.9151303877999
101211234.450066175983-23.4500661759826
102205223.899734702572-18.8997347025715
103218228.648686161373-10.6486861613727
104199201.250187125254-2.25018712525417
105213206.7285540766136.27144592338664
106207195.64474352063311.3552564793668
107236228.7234163631887.27658363681212
108248245.6360498529082.36395014709171
109211209.7079700361711.29202996382949
110220211.5984249221488.40157507785165
111235224.12638837221910.8736116277811
112223212.53841651835210.4615834816476
113245242.5673991348682.43260086513197
114236236.659599269668-0.659599269667865
115253252.2499750556330.750024944367482
116246230.54583657243715.4541634275628
117255247.4751326007467.52486739925425
118248240.4344390571907.5655609428103
119274274.344258319853-0.344258319852543
120288288.308135318980-0.308135318979623


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121245.327944621114229.590902578786261.064986663443
122255.407562552814239.643662019886271.171463085742
123272.213213886201256.409389540769288.017038231633
124257.636372890699241.802622022783273.470123758614
125282.753077942025266.843640701815298.662515182235
126272.231355707789256.278035701007288.184675714572
127291.624554208902275.563358892922307.685749524883
128282.458554241940266.339208433247298.577900050634
129292.042617319936275.802518156576308.282716483297
130283.228052341901266.91990000235299.536204681452
131312.479099132395295.918410124013329.039788140776
132327.991553968614316.097337726568339.885770210660
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282252981a5a0bqcl4pihxje/1yk9v1282252881.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282252981a5a0bqcl4pihxje/1yk9v1282252881.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282252981a5a0bqcl4pihxje/2yk9v1282252881.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282252981a5a0bqcl4pihxje/2yk9v1282252881.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282252981a5a0bqcl4pihxje/39bqy1282252881.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282252981a5a0bqcl4pihxje/39bqy1282252881.ps (open in new window)


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