Home » date » 2010 » Jan » 16 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 16 Jan 2010 07:56:57 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/16/t1263653911oomg26k81ahrc82.htm/, Retrieved Sat, 16 Jan 2010 15:58:36 +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/2010/Jan/16/t1263653911oomg26k81ahrc82.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
100,7 105,9 115,4 113,9 121,5 119,5 115,8 116,3 113,5 110,7 116,9 141,1 101,8 102,9 119 112,8 120,9 123,1 121,9 119,4 110,9 116,8 120,6 143,3 106,4 106,9 125,6 110,9 127 124,3 121,3 124,4 113,2 120,2 122,6 143,3 106,5 105,9 114 121,6 119,7 122,5 126,5 118,2 115,5 120,1 115,3 146,5 107,7 106,3 121,8 115,8 115,4 124,3 121,7 118,7 113,5 113,4 115,1 144,2 100,9 103,2 121,3 111,9 117,3 124,2 122 119,6 114,9 112,2 115,3 143 104 105,3 124,3 114,1 124,8 131,9 125,8 125,2 119,8 116,2 120,2 148,6 109,4 109,6 135,2 115,2 129,1 138,8 126 130,7 120,5 126,5 128 151,7 114,8 118,9 131,5 124,8 137 137,1 137 131,3 126 129,7 125,1 157,8
 
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.0963474453290963
beta0.343443065425805
gamma0.235170688807855


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13101.8101.2772874254620.522712574538346
14102.9102.2521390674730.647860932527124
15119118.5180612805290.481938719470818
16112.8112.4669152372440.333084762755533
17120.9120.4046756820500.49532431794988
18123.1122.6551941661150.444805833884828
19121.9117.3951960725774.50480392742267
20119.4118.8390099559280.560990044072028
21110.9116.433708685718-5.5337086857179
22116.8113.1785782549013.62142174509883
23120.6120.3379645766420.262035423357545
24143.3145.590981100622-2.29098110062182
25106.4104.9133202223041.48667977769622
26106.9106.2033226964050.696677303595152
27125.6123.2288541210502.37114587895019
28110.9117.316165731205-6.41616573120494
29127124.9427195346392.05728046536133
30124.3127.481482263572-3.18148226357204
31121.3122.520167586333-1.22016758633264
32124.4122.3335516087852.06644839121475
33113.2118.472074619633-5.27207461963347
34120.2116.9880412268513.21195877314879
35122.6123.352083403192-0.75208340319216
36143.3148.268458737549-4.96845873754907
37106.5107.073400127399-0.573400127398642
38105.9107.676024966410-1.77602496641025
39114124.512357215434-10.5123572154341
40121.6114.6721428101396.92785718986075
41119.7124.946482739439-5.24648273943873
42122.5124.973556227158-2.47355622715817
43126.5119.9204654934956.57953450650491
44118.2120.795164474322-2.59516447432230
45115.5114.5249738045090.97502619549131
46120.1115.1216958116834.97830418831667
47115.3120.451306748820-5.15130674882023
48146.5142.9448581828453.55514181715455
49107.7104.2909506791793.40904932082121
50106.3104.9953507366431.30464926335661
51121.8120.0654424174011.73455758259944
52115.8115.6193595516480.180640448352392
53115.4122.844863691546-7.44486369154588
54124.3123.4273684862990.872631513700611
55121.7120.9246687640430.77533123595687
56118.7119.402754965216-0.702754965215661
57113.5114.257885189853-0.757885189853411
58113.4115.626155831230-2.22615583122963
59115.1117.932674009311-2.83267400931095
60144.2142.1630250974622.03697490253779
61100.9103.687844119812-2.78784411981181
62103.2103.0466441079370.153355892062962
63121.3117.3753431435293.92465685647123
64111.9112.625617659283-0.725617659282904
65117.3117.637213121795-0.337213121795472
66124.2120.4733897316573.72661026834345
67122118.2573379412303.74266205876971
68119.6116.8172282241792.78277177582108
69114.9112.2634651885832.63653481141705
70112.2113.92404484476-1.72404484475999
71115.3116.440135139821-1.14013513982114
72143142.1632901907170.836709809283263
73104102.9985848036981.00141519630225
74105.3103.7776313620561.52236863794367
75124.3119.7066605161964.59333948380412
76114.1114.493415203007-0.393415203007493
77124.8120.2940081434404.50599185656037
78131.9125.3276669938416.57233300615901
79125.8124.1372662066811.66273379331872
80125.2122.964850631822.23514936818000
81119.8118.8009870898100.999012910189592
82116.2120.045641988447-3.84564198844703
83120.2123.226948746746-3.02694874674629
84148.6151.385830782402-2.7858307824018
85109.4109.894663681849-0.494663681848593
86109.6111.022121009392-1.42212100939206
87135.2128.6299411408056.5700588591946
88115.2122.398097210631-7.19809721063108
89129.1129.104716185616-0.00471618561613241
90138.8134.3642855812554.43571441874542
91126131.598390430252-5.59839043025167
92130.7129.394229360141.30577063985996
93120.5124.253997514669-3.75399751466911
94126.5123.4597166536183.04028334638184
95128127.2998607574280.700139242571694
96151.7156.800869115537-5.10086911553734
97114.8113.7749582245131.02504177548667
98118.9114.7052928454924.19470715450844
99131.5135.345341936157-3.84534193615750
100124.8124.5327329148970.267267085102603
101137133.7396012692513.2603987307493
102137.1140.527534084171-3.42753408417053
103137134.4731501540572.52684984594291
104131.3134.56431364795-3.26431364794996
105126127.594985554761-1.59498555476145
106129.7128.4676047060451.23239529395485
107125.1131.654687024155-6.55468702415473
108157.8159.60355805447-1.80355805446990


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
109116.875154931201114.788675712536118.961634149867
110118.172143695526115.906233084753120.438054306299
111136.601904778109133.952754809723139.251054746495
112126.569537428808123.665702292737129.473372564879
113136.218444136065132.757197211304139.679691060827
114140.881517332329136.82945040822144.933584256437
115136.059447407979131.574283642735140.544611173223
116134.271964059335129.261572316064139.282355802606
117127.665606808959122.282097997682133.049115620235
118129.078457649881123.020688463827135.136226835936
119130.224076872719123.456852988829136.991300756609
120159.889159926174116.120048171011203.658271681337
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/16/t1263653911oomg26k81ahrc82/1hpg01263653815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t1263653911oomg26k81ahrc82/1hpg01263653815.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/16/t1263653911oomg26k81ahrc82/20zfc1263653815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t1263653911oomg26k81ahrc82/20zfc1263653815.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/16/t1263653911oomg26k81ahrc82/3rt5a1263653815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t1263653911oomg26k81ahrc82/3rt5a1263653815.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