Home » date » 2010 » Jul » 10 »

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: Sat, 10 Jul 2010 07:31:40 +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/10/t1278747263zum1hf3yu1chdrk.htm/, Retrieved Sat, 10 Jul 2010 09:34:23 +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/10/t1278747263zum1hf3yu1chdrk.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 time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.312591008980173
beta0.140711984725360
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
132426.3878205128205-2.38782051282053
142122.4469280703411-1.44692807034106
151514.69483991202560.305160087974350
162118.96219465068212.03780534931794
174945.48579220202823.51420779797183
184843.20880670655064.79119329344939
193537.4167374760649-2.41673747606485
203628.22356630100927.77643369899084
215133.850404234079517.1495957659205
225042.03653849159587.96346150840424
236148.034778359947112.9652216400529
246356.83346932120536.16653067879469
256157.05344470211643.94655529788356
266258.49958670992733.50041329007271
275856.47619203241541.52380796758464
286565.3469215664832-0.346921566483189
299395.066474805018-2.06647480501803
309494.6038689715942-0.603868971594153
318684.6142914841251.38570851587494
328886.22759610114971.77240389885026
3310298.76772297061173.23227702938829
3410798.02353857346728.97646142653278
35121109.55598643316211.4440135668382
36127114.91806777801912.0819322219815
37125117.4336918222387.56630817776154
38128121.8364482916546.16355170834557
39117121.535723698735-4.5357236987348
40127129.208744717578-2.20874471757821
41160159.0647824736130.935217526386936
42162162.578427468024-0.578427468023733
43153155.998115664341-2.99811566434119
44160158.3477297586931.65227024130724
45177173.6893853454593.31061465454076
46178178.757289793167-0.757289793167416
47196190.3541272918905.64587270810952
48212195.49809520895316.5019047910471
49212197.64151844960314.3584815503967
50211204.8521717090636.14782829093696
51204198.8400542773665.15994572263395
52216213.2182078699132.78179213008718
53248249.089707968217-1.08970796821694
54250253.135096802614-3.13509680261444
55240246.185032381257-6.18503238125749
56249252.687739205703-3.68773920570348
57275269.2178119458765.78218805412376
58277274.088402059532.91159794047019
59286293.221477618580-7.22147761857957
60302303.227572561421-1.22757256142074
61290298.997486764376-8.9974867643757
62290292.877852730668-2.87785273066805
63277282.582967183926-5.58296718392558
64285290.713346351007-5.71334635100698
65311319.639505059182-8.63950505918217
66300317.958262924178-17.9582629241781
67291301.665441877772-10.6654418777717
68299305.674587565542-6.67458756554169
69332324.8396468873587.16035311264159
70337325.28732394025811.7126760597415
71343337.7126426021455.28735739785526
72360353.8060284678156.19397153218483
73353344.9380579338098.06194206619085
74351347.491419733383.50858026662013
75341336.7479452096184.25205479038237
76348347.7102258974210.289774102578519
77381376.6126732319634.38732676803681
78358373.281927734667-15.2819277346667
79353363.640799246914-10.6407992469138
80358371.204024533344-13.2040245333438
81399398.3541313232480.645868676752343
82409400.1240334221238.87596657787685
83407407.350313450249-0.350313450248791
84419422.161167217467-3.16116721746681
85418411.0979739790966.90202602090386
86421409.55276517113711.4472348288627
87414401.54512843163512.4548715683648
88424412.45184656261411.5481534373855
89463448.28947784310214.7105221568984
90437435.7181381226371.28186187736293
91430436.226908175786-6.22690817578598
92436445.383891728934-9.3838917289342
93474485.392708207393-11.3927082073935
94489490.671411677834-1.6714116778345
95482489.40902761187-7.40902761187016
96492500.921284338081-8.92128433808057
97502495.56179899356.43820100650044
98500497.5623577798922.43764222010827
99493487.601110028365.39888997163956
100504495.538594158388.46140584162049
101538532.3090936624365.690906337564
102516507.0145078779218.985492122079
103502504.435800492344-2.43580049234362
104501512.440497412423-11.4404974124232
105541550.167884585948-9.1678845859476
106571562.6647397424378.33526025756282
107559560.866594239744-1.86659423974424
108569573.595944203855-4.59594420385486
109576580.861138276491-4.86113827649149
110573576.796968931272-3.79696893127243
111562566.865558683047-4.86555868304686
112570573.191317093755-3.19131709375461
113597603.393913078432-6.39391307843232
114573575.033994035413-2.03399403541266
115562559.1224444487252.87755555127546
116556560.794697965195-4.79469796519504
117600600.65059316829-0.650593168289788
118630626.7052081933133.29479180668727
119624614.9604165558529.03958344414764
120634628.3442769031175.65572309688298


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121638.204192887778624.201608526867652.206777248689
122636.177349545383621.311202883193651.043496207573
123626.651548574078610.762494145502642.540603002654
124635.816407799673618.751524090595652.881291508752
125665.122740779326646.737811686329683.507669872324
126642.347440459369622.507913727433662.186967191304
127631.126299738903609.707323324408652.545276153399
128627.176866338428604.062769083514650.29096359334
129672.142919272718647.22641209767697.059426447765
130701.904296873383675.085576743761728.723017003005
131693.724981849439664.910845809426722.539117889452
132702.20582234445671.308847186826733.102797502074
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/10/t1278747263zum1hf3yu1chdrk/1t2nk1278747095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/10/t1278747263zum1hf3yu1chdrk/1t2nk1278747095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/10/t1278747263zum1hf3yu1chdrk/24t451278747095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/10/t1278747263zum1hf3yu1chdrk/24t451278747095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/10/t1278747263zum1hf3yu1chdrk/3e23q1278747095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/10/t1278747263zum1hf3yu1chdrk/3e23q1278747095.ps (open in new window)


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