Home » date » 2008 » May » 05 » attachments

vraag 3: exponential smoothing (single)

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 05 May 2008 09:27:23 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/05/t121000134985b8nmv1h9o7x3t.htm/, Retrieved Mon, 05 May 2008 17:29:09 +0200
 
User-defined keywords:
vraag 3
 
Dataseries X:
» Textbox « » Textfile « » CSV «
56421 53152 53536 52408 41454 38271 35306 26414 31917 38030 27534 18387 50556 43901 48572 43899 37532 40357 35489 29027 34485 42598 30306 26451 47460 50104 61465 53726 39477 43895 31481 29896 33842 39120 33702 25094 51442 45594 52518 48564 41745 49585 32747 33379 35645 37034 35681 20972 58552 54955 65540 51570 51145 46641 35704 33253 35193 41668 34865 21210 56126 49231 59723 48103 47472 50497 40059 34149 36860 46356 36577
 
Text written by user:
 
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.587763292802047
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
25315256421-3269
35353654499.6017958301-963.60179583011
45240853933.232031363-1525.23203136304
54145453036.7566303219-11582.7566303219
63827146228.8374535592-7957.83745355917
73530641551.5127082718-6245.51270827177
82641437880.6295936209-11466.6295936209
93191731140.9656263329776.034373667113
103803031597.09014512706432.90985487296
112753435378.1184237259-7844.11842372591
121838730767.6335498676-12380.6335498676
135055623490.751607621927065.2483923781
144390139398.71112323144502.28887676863
154857242044.99125858696527.00874141307
164389945881.3274085876-1982.32740858763
173753244716.1881235044-7184.18812350441
184035740493.5860559241-136.586055924097
193548940413.3057859433-4924.3057859433
202902737518.9796024331-8491.9796024331
213448532527.70570889921957.2942911008
224259833678.13144641938919.86855358075
233030638920.9027588333-8614.9027588333
242645133857.379146132-7406.379146132
254746029504.181351461017955.8186485390
265010440057.952445282710046.0475547173
276146545962.650435689315502.3495643107
285372655074.3624617769-1348.36246177694
293947754281.8445013523-14804.8445013523
304389545580.1003478152-1685.10034781517
313148144589.6602186814-13108.6602186814
322989636884.8709243260-6988.87092432604
333384232777.06913687571064.93086312432
343912033402.99640759225717.00359240784
353370236763.2412640269-3061.24126402692
362509434963.9560186210-9869.95601862096
375144229162.758169304922279.2418306951
384559442257.67870884743336.32129115263
395251844218.64589678088299.35410321918
404856449096.7015926191-532.701592619109
414174548783.5991504604-7038.59915046041
424958544646.56893707214938.43106292789
433274747549.1974398945-14802.1974398945
443337938849.0091319161-5470.00913191609
453564535633.938552883811.0614471161825
463703435640.4400654641393.55993453602
473568136459.5234413039-778.523441303878
482097236001.9359399195-15029.9359399195
495855227167.891301268631384.1086987314
505495545614.31837169239340.68162830766
516554051104.42816256214435.5718374380
525157059589.1273992151-8019.12739921507
535114554875.7786736533-3730.77867365331
544664152682.9639157112-6041.96391571119
553570449131.7193096216-13427.7193096216
563325341239.3987933768-7986.39879337679
573519336545.2867409513-1352.28674095135
584166835750.46223327725917.53776672277
593486539228.5737163267-4363.57371632668
602121036663.8252604340-15453.8252604340
615612627580.634038973928545.3659610261
624923144358.55233046614872.44766953393
635972347222.39821671712500.601783283
644810354569.7930828666-6466.79308286656
654747250768.8494866114-3296.84948661141
665049748831.08237648791665.91762351205
674005949810.2476044204-9751.24760442035
683414944078.8222035182-9929.82220351817
693686038242.4372082394-1382.43720823945
704635637429.89136263268926.10863736744
713657742676.3303672404-6099.33036724044


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7239091.367866703718712.118358823859470.6173745835
7339091.367866703715452.618281794862730.1174516126
7439091.367866703712591.044220158565591.6915132489
7539091.367866703710009.692797938368173.0429354691
7639091.36786670377639.4919888031370543.2437446042
7739091.36786670375435.8011997691772746.9345336382
7839091.36786670373367.7924702503774814.943263157
7939091.36786670371413.1180328845176769.6177005229
8039091.3678667037-445.03538363391378627.7711170413
8139091.3678667037-2219.6942523815280402.4299857889
8239091.3678667037-3921.1945405806182103.930273988
8339091.3678667037-5557.9008425835683740.636575991
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/05/t121000134985b8nmv1h9o7x3t/15wd11210001237.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/05/t121000134985b8nmv1h9o7x3t/15wd11210001237.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/05/t121000134985b8nmv1h9o7x3t/23sst1210001237.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/05/t121000134985b8nmv1h9o7x3t/23sst1210001237.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/05/t121000134985b8nmv1h9o7x3t/3w6oy1210001237.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/05/t121000134985b8nmv1h9o7x3t/3w6oy1210001237.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=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