Home » date » 2008 » May » 31 »

Exponentional Smoothing Lederen Laarzen - Christine Van Bergen

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 31 May 2008 14:19:36 -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/31/t1212265545d3ku7xfnhilngm9.htm/, Retrieved Sat, 31 May 2008 20:25:46 +0000
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
101,22 101,25 101,25 101,26 101,26 101,26 101,29 101,31 101,31 101,31 101,32 101,34 101,34 101,34 101,34 101,34 101,34 101,34 101,34 101,39 102,16 102,19 102,31 102,32 102,32 102,32 102,36 102,36 102,37 102,37 102,37 102,37 103,45 103,8 103,81 103,81 103,81 103,84 103,9 103,91 103,92 103,92 103,93 104 104,51 105 105,01 105,01 105,01 105,01 105,13 105,14 105,15 105,22 105,23 105,23 105,57 106,05 106,09 106,09 106,19 106,2 106,2 106,22 106,22 106,23 106,23 106,61 106,95 107,74 107,8 107,8
 
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 time5 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.564996882250498
beta0.0602692712103975
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13101.34101.0553222222220.284677777777773
14101.34101.2854028590380.0545971409617465
15101.34101.354014459186-0.0140144591858444
16101.34101.350050166162-0.0100501661623724
17101.34101.342150125245-0.00215012524522251
18101.34101.3344737001910.00552629980882102
19101.34101.3317392793130.00826072068720407
20101.39101.3808310913560.00916890864405673
21102.16102.1490815793180.0109184206817048
22102.19102.1770256629790.0129743370205802
23102.31102.2961564677750.0138435322246977
24102.32102.3058330977570.014166902243403
25102.32102.3150105623290.00498943767085791
26102.32102.2906678395460.0293321604544445
27102.36102.3179836975480.0420163024515574
28102.36102.3521341997470.00786580025264527
29102.37102.3631363497870.006863650212793
30102.37102.3695420685910.000457931409172829
31102.37102.370611049142-0.000611049141767239
32102.37102.420260834585-0.0502608345845914
33103.45103.1588464785370.291153521463443
34103.8103.3587111346220.441288865378027
35103.81103.7474956443990.0625043556006943
36103.81103.813742379996-0.00374237999585603
37103.81103.837135309402-0.027135309402297
38103.84103.8324638338580.00753616614248642
39103.9103.8794729371000.020527062899518
40103.91103.912385033261-0.00238503326063721
41103.92103.942569017299-0.0225690172989061
42103.92103.953966084705-0.0339660847046162
43103.93103.958355610351-0.0283556103509142
44104103.9930222540740.00697774592559597
45104.51104.936703172511-0.426703172511296
46105104.7960853024260.203914697574348
47105.01104.8776935765270.132306423472713
48105.01104.9486494946380.0613505053624408
49105.01104.9949490121190.0150509878813381
50105.01105.026936696687-0.0169366966870825
51105.13105.0626782743290.0673217256708938
52105.14105.1105643103350.0294356896646093
53105.15105.1495322998470.000467700153194528
54105.22105.1693572183090.0506427816913231
55105.23105.2272420978040.00275790219559724
56105.23105.299168409326-0.0691684093262381
57105.57106.012892020798-0.442892020798439
58106.05106.138614564618-0.0886145646178278
59106.09106.0150000263360.07499997366439
60106.09106.0119656682010.0780343317992163
61106.19106.0373729128070.152627087192570
62106.2106.1276825082020.0723174917983727
63106.2106.248050965841-0.0480509658406874
64106.22106.2078884472560.0121115527439457
65106.22106.2174944672090.00250553279082055
66106.23106.253393743378-0.0233937433779658
67106.23106.239193728807-0.0091937288066788
68106.61106.2632478436120.346752156387566
69106.95107.053725855553-0.103725855552668
70107.74107.5410688064430.19893119355703
71107.8107.6767618363260.123238163674145
72107.8107.7296167418810.0703832581187811


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
73107.810203582369107.551132399128108.069274765611
74107.801201522479107.499201909271108.103201135686
75107.847744714236107.504079577628108.191409850844
76107.881932499667107.497251582135108.266613417200
77107.901135234431107.475717246965108.326553221896
78107.944885661203107.478769211744108.411002110663
79107.971409726603107.464470577782108.478348875424
80108.177138541015107.629138191005108.725138891025
81108.585578440489107.996196183743109.174960697236
82109.276550118507108.645405020626109.907695216387
83109.273514127294108.600180551164109.946847703424
84109.236144493104108.520163343796109.952125642412
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265545d3ku7xfnhilngm9/1s2ag1212265167.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265545d3ku7xfnhilngm9/1s2ag1212265167.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265545d3ku7xfnhilngm9/2xyjn1212265167.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t1212265545d3ku7xfnhilngm9/2xyjn1212265167.ps (open in new window)


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