Home » date » 2009 » Jan » 27 »

Robbe Leys_2MAR03A_opgave 10.2

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 27 Jan 2009 10:56:21 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jan/27/t123307902345o7lp3v4bdpryn.htm/, Retrieved Tue, 27 Jan 2009 18:57:07 +0100
 
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/2009/Jan/27/t123307902345o7lp3v4bdpryn.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
284.4 212.8 226.9 308.4 262 227.9 236.1 320.4 271.9 232.8 237 313.4 261.4 226.8 249.9 314.3 286.1 226.5 260.4 311.4 294.7 232.6 257.2 339.2 279.1 249.8 269.8 345.7 293.8 254.7 277.5 363.4 313.4 272.8 300.1 369.5 330.8 287.8 305.9 386.1 335.2 288 308.3 402.3 352.8 316.1 324.9 404.8 393 318.9 327 442.3 383.1 331.6 361.4 445.9 386.6 357.2 373.6 466.2 409.6 369.8 378.6 487 419.2 376.7 392.8 506.1 458.4 387.4 426.9 565 464.8 444.5 449.5 556.1 499.6 451.9 434.9 553.8 510 432.9 453.2 547.6 485.8 452.6 456.6 565.7 514.8 464.3 430.9 588.3 503.1 442.6 448 554.5 504.5 427.3 473.1 526.2 547.5 440.2 468.7 574.5 492.6 432.6 479.8 575.7 474.6 405.3 434.6 535.1 452.6 429.5 417.2 551.8 464 416.6 422.9 553.6 458.6 427.6 429.2 534.2 481.7 416 440.2 538.7 473.8 439.9 446.8 597.5 467.2 439.4 447.4 568.5 485.9 442.1 430.5 600 464.5 423.6 437 574 443 410 420 532 432 420 411 512
 
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
alpha0.229158941249302
beta0.612253088934732
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3226.9141.285.7
4308.4101.262911472947207.137088527052
5262118.216228364565143.783771635435
6227.9140.82489951384587.0751004861552
7236.1162.65519292507073.4448070749303
8320.4191.666529299725128.733470700275
9271.9251.40948414480720.4905158551927
10232.8289.222484430925-56.4224844309248
11237301.493923956473-64.4939239564725
12313.4302.86701254318110.5329874568185
13261.4322.911001293801-61.5110012938015
14226.8317.815271258793-91.0152712587929
15249.9293.188633811775-43.2886338117754
16314.3273.42544520959940.8745547904006
17286.1278.6838374817097.41616251829095
18226.5277.315451854313-50.8154518543131
19260.4255.4731970868174.92680291318294
20311.4247.09602496226564.3039750377346
21294.7261.34772068459733.3522793154027
22232.6273.185992423123-40.5859924231231
23257.2262.386300653823-5.18630065382257
24339.2258.97110983187580.2288901681247
25279.1286.38594931522-7.28594931522008
26249.8292.723738327625-42.9237383276248
27269.8284.872468509077-15.0724685090765
28345.7281.28884958127364.4111504187272
29293.8304.956707618449-11.1567076184491
30254.7309.742192758097-55.0421927580972
31277.5296.748326974986-19.2483269749861
32363.4289.25634236832274.1436576316783
33313.4313.568563663855-0.168563663854911
34272.8320.827824972239-48.027824972239
35300.1310.381247753066-10.2812477530664
36369.5307.14214352952262.3578564704778
37330.8329.2979506735001.50204932650047
38287.8337.718847915155-49.9188479151552
39305.9327.352409207821-21.4524092078206
40386.1320.49946630235165.6005336976491
41335.2342.79945299344-7.59945299344042
42288347.258780132505-59.2587801325051
43308.3331.565709951446-23.265709951446
44402.3320.85651844877981.4434815512215
45352.8345.5691611621827.23083883781845
46316.1354.289823575232-38.1898235752318
47324.9347.243777964404-22.3437779644042
48404.8340.69409028429564.1059097157049
49393362.94939024045430.0506097595460
50318.9381.616812518579-62.7168125185789
51327370.226376667461-43.2263766674607
52442.3357.23754647947185.0624535205287
53383.1385.58178914374-2.48178914374
54331.6393.516282715177-61.9162827151768
55361.4379.143773757393-17.7437737573928
56445.9372.4042807108473.4957192891596
57386.6396.884823011544-10.2848230115436
58357.2400.723310645169-43.523310645169
59373.6390.838438855005-17.2384388550051
60466.2384.55837112035681.641628879644
61409.6412.392142488735-2.7921424887345
62369.8420.485413484188-50.6854134841882
63378.6410.492183970628-31.892183970628
64487400.3310133481186.66898665189
65419.2429.499137262103-10.2991372621029
66376.7435.001145932722-58.3011459327217
67392.8421.323223720603-28.523223720603
68506.1410.46727708663295.6327229133678
69458.4441.48035944213216.9196405578679
70387.4456.829516073926-69.4295160739264
71426.9442.649803279729-15.7498032797291
72565438.561527739733126.438472260267
73464.8484.796697946556-19.9966979465557
74444.5494.669337483279-50.1693374832786
75449.5490.588724804648-41.0887248046483
76556.1482.82413327804573.275866721955
77499.6511.548054148655-11.948054148655
78451.9519.065800480587-67.1658004805867
79434.9504.506325109714-69.6063251097144
80553.8479.62158669843774.1784133015634
81510498.09388063198211.9061193680185
82432.9503.96638909457-71.0663890945702
83453.2480.854158613817-27.654158613817
84547.6463.81026003472883.789739965272
85485.8484.0607017418711.73929825812917
86452.6485.752580330857-33.1525803308565
87456.6474.797257546872-18.197257546872
88565.7464.715945965856100.984054034144
89514.8496.11449052562918.6855094743713
90464.3511.275225821811-46.9752258218107
91430.9504.798438761137-73.8984387611374
92588.3481.783764149009106.516235850991
93503.1515.057301516142-11.9573015161418
94442.6519.503919995414-76.9039199954141
95448498.277568723003-50.277568723003
96554.5476.09877663627978.4012233637215
97504.5494.4078282868510.0921717131503
98427.3498.479214672524-71.1792146725242
99473.1473.939859651453-0.839859651452684
100526.2465.40156170003460.7984382999663
101547.5479.51845052987467.9815494701264
102440.2504.819447175985-64.6194471759846
103468.7490.667420101151-21.9674201011511
104574.5483.20738552724491.2926144727558
105492.6514.510552866382-21.9105528663816
106432.6516.798080025309-84.1980800253092
107479.8492.99859748276-13.1985974827598
108575.7483.61747480745792.0825251925433
109474.6511.2819420989-36.6819420989
110405.3504.292283982199-98.9922839821986
111434.6469.134712779112-34.5347127791117
112535.1443.90283722954591.1971627704548
113452.6460.278805280510-7.67880528050949
114429.5452.919099690154-23.4190996901544
115417.2438.666588639452-21.4665886394517
116551.8421.84968037984129.950319620160
117464457.9637652373126.03623476268757
118416.6466.528733076471-49.928733076471
119422.9455.2636636391-32.3636636391
120553.6443.483059090973110.116940909027
121458.6479.802925881605-21.2029258816047
122427.6483.054831206438-55.454831206438
123429.2470.677112035836-41.4771120358357
124534.2455.68313775772578.5168622422751
125481.7479.2030280757032.49697192429682
126416485.652614139696-69.6526141396959
127440.2465.795987947132-25.5959879471321
128538.7452.44413076930386.255869230697
129473.8476.826107237553-3.02610723755322
130439.9480.323747765993-40.4237477659934
131446.8469.579800603168-22.7798006031681
132597.5459.683041185333137.816958814667
133467.2505.92463505687-38.7246350568701
134439.4506.276951276367-66.8769512763666
135447.4490.794857589866-43.3948575898659
136568.5474.60545522559593.894544774405
137485.9503.050858584787-17.1508585847869
138442.1503.642893343059-61.542893343059
139430.5485.427427257277-54.9274272572773
140600461.021456738645138.978543261355
141464.5500.549917154922-36.0499171549222
142423.6494.911119646735-71.3111196467349
143437471.186719060442-34.1867190604417
144574451.173198344680122.826801655320
145443484.373731669252-41.3737316692524
146410474.141374794319-64.141374794319
147420449.692364323455-29.6923643234546
148532428.971716821349103.028283178651
149432453.120397377789-21.1203973777889
150420445.856036932283-25.8560369322827
151411433.878775818879-22.8787758188788
152512419.37381365736792.626186342633


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
153444.333603131696321.879193558692566.788012704699
154448.067273811786317.522469080267578.612078543306
155451.800944491877307.099248462092596.502640521662
156455.534615171968290.382129821402620.687100522533
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t123307902345o7lp3v4bdpryn/1pwx21233078978.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t123307902345o7lp3v4bdpryn/1pwx21233078978.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t123307902345o7lp3v4bdpryn/2pnb81233078979.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t123307902345o7lp3v4bdpryn/2pnb81233078979.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t123307902345o7lp3v4bdpryn/30uxf1233078979.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t123307902345o7lp3v4bdpryn/30uxf1233078979.ps (open in new window)


 
Parameters (Session):
par1 = 4 ; par2 = Double ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 4 ; 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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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