Home » date » 2010 » Jul » 08 »

Kelly Janbroers - 2de zit - Stap 32/A

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 08 Jul 2010 13:17:47 +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/Jul/08/t12785950763g99033jsflyk1j.htm/, Retrieved Thu, 08 Jul 2010 15:17:57 +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/Jul/08/t12785950763g99033jsflyk1j.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
33 32 31 29 49 48 33 23 24 24 25 27 24 21 15 21 49 48 35 36 51 50 61 63 61 62 58 65 93 94 86 88 102 107 121 127 125 128 117 127 160 162 153 160 177 178 196 212 212 211 204 216 248 250 240 249 275 277 286 302 290 290 277 285 311 300 291 299 332 337 343 360 353 351 341 348 381 358 353 358 399 409 407 419 418 421 414 424 463 437 430 436 474 489 482 492 502 500 493 504 538 516 502 501 541 571 559 569 576 573 562 570 597 573 562 556 600 630 624 634
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.999947806481961
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
23233-1
33132.000052193518-1.00005219351804
42931.0000521962422-2.0000521962422
54929.000104389760419.9998956102396
64848.9989561350877-0.998956135087695
73348.000052139035-15.0000521390351
82333.0007829054919-10.0007829054919
92423.0005219760430.999478023957021
102423.99994783372575.21662742727358e-05
112523.99999999727731.00000000272274
122724.99994780648182.00005219351818
132426.9998956102398-2.99989561023976
142124.0001565751056-3.00015657510565
151521.0001565887263-6.00015658872632
162115.00031316928115.99968683071885
174920.999686855237228.0003131447628
184848.9985385651508-0.998538565150788
193548.0000521172406-13.0000521172406
203635.00067851845470.999321481545316
215135.999947841896215.0000521581038
225050.9992170945071-0.999217094507102
236150.000052152655410.9999478473446
246360.99942587402362.00057412597639
256162.9998955829983-1.99989558299827
266261.00010438158620.999895618413817
275861.99994781193-3.99994781193001
286558.00020877134836.99979122865172
299364.999634656270228.0003653437298
309492.99853856242631.00146143757365
318693.9999477302044-7.9999477302044
328886.00041754541621.99958245458383
3310287.999895634757114.0001043652429
34107101.99926928535.00073071469973
35121106.99973899427114.0002610057288
36127120.9992692771256.00073072287535
37125126.999686800753-1.99968680075277
38128125.0001043706892.9998956293109
39117127.999843424893-10.9998434248934
40127117.0005741205269.99942587947378
41160126.99947809478533.000521905215
42162159.9982775866652.00172241333536
43153161.999895523065-8.9998955230651
44160153.0004697362096.99953026379066
45177159.99963466989117.0003653301091
46178176.9991126911251.00088730887452
47196177.9999477601718.0000522398298
48212195.99906051394916.0009394860513
49212211.9991648546760.000835145323691222
50211211.999999956411-0.999999956410818
51204211.000052193516-7.00005219351576
52216204.0003653573511.9996346426496
53248215.99937369685332.0006263031472
54250247.9983297747342.0016702252662
55240249.999895525789-9.99989552578899
56249240.0005219297288.99947807027249
57275248.99953028557926.000469714421
58277274.9986429440152.00135705598507
59286276.9998955421349.00010445786558
60302285.99953025288616.0004697471144
61290301.999164879194-11.9991648791936
62290290.000626278629-0.000626278628544696
63277290.000000032688-13.0000000326877
64285277.0006785157367.99932148426382
65311284.9995824872726.0004175127302
66300310.99864294674-10.9986429467396
67291300.000574057869-9.00057405786902
68299291.0004697716247.99953022837553
69332298.99958247637533.0004175236253
70337331.9982775921135.00172240788731
71343336.9997389425116.00026105748873
72360342.99968682526617.0003131747337
73353359.999112693848-6.99911269384768
74351353.000365308315-2.00036530831466
75341351.000104406103-10.0001044061028
76348341.000521940636.99947805937029
77381347.99963467261633.0003653273844
78358380.998277594837-22.998277594837
79353358.001200361017-5.00120036101652
80358353.0002610302414.99973896975877
81399357.99973904603441.0002609539661
82409398.9978600521410.0021399478597
83407408.999477953128-1.99947795312823
84419407.00010435978911.9998956402114
85418418.99937368323-0.99937368323043
86421418.0000521608282.99994783917163
87414420.999843422168-6.99984342216834
88424414.0003653464549.99963465354608
89463423.99947808388839.0005219161117
90437462.997964425556-25.9979644255558
91430437.001356925225-7.0013569252252
92436430.0003654254495.99963457455101
93474435.99968685796538.0003131420354
94489473.99801662997115.0019833700294
95482488.99921699371-6.99921699371038
96492482.0003653137589.99963468624156
97502491.99947808388710.0005219161134
98500501.999478037579-1.99947803757897
99493500.000104359793-7.000104359793
100504493.00036536007310.9996346399268
101538503.99942589037134.000574109629
102516537.998225390422-21.9982253904219
103502516.001148164774-14.0011481647738
104501502.00073076918-1.00073076917931
105541501.0000522316639.9999477683405
106571540.99791226200530.0020877379953
107559570.998434085492-11.9984340854925
108569559.0006262404869.99937375951413
109576568.9994780975057.00052190249471
110573575.999634618134-2.99963461813377
111562573.000156561484-11.0001565614835
112570562.000574136877.99942586313011
113597569.99958248182227.0004175181781
114573596.998590753221-23.9985907532213
115562573.001252570879-11.0012525708794
116556562.000574194074-6.00057419407449
117600556.00031319107743.9996868089225
118630599.99770350155330.0022964984472
119624629.998434074597-5.9984340745965
120634624.0003130793779.99968692062293


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121633.99947808116605.147847133371662.85110902895
122633.99947808116593.198175093878674.800781068442
123633.99947808116584.028726209965683.970229952355
124633.99947808116576.298474973024691.700481189296
125633.99947808116569.487963784892698.510992377429
126633.99947808116563.330777839043704.668178323278
127633.99947808116557.668652649866710.330303512455
128633.99947808116552.398469336566715.600486825754
129633.99947808116547.448600874468720.550355287852
130633.99947808116542.766895840163725.232060322158
131633.99947808116538.313983989982729.684972172339
132633.99947808116534.05927847867733.93967768365
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/08/t12785950763g99033jsflyk1j/1msau1278595063.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/08/t12785950763g99033jsflyk1j/1msau1278595063.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/08/t12785950763g99033jsflyk1j/2msau1278595063.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/08/t12785950763g99033jsflyk1j/2msau1278595063.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/08/t12785950763g99033jsflyk1j/3ejrf1278595063.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/08/t12785950763g99033jsflyk1j/3ejrf1278595063.ps (open in new window)


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