Home » date » 2010 » Jan » 20 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 20 Jan 2010 09:18:29 -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/20/t1264004344wv5t925aazpiqkb.htm/, Retrieved Wed, 20 Jan 2010 17:19:08 +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/20/t1264004344wv5t925aazpiqkb.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 «
103,6 103,7 103,8 104 104 104,1 104,2 104,3 104,4 104,5 104,7 104,7 104,9 105 105,2 105,3 105,4 105,5 105,7 105,8 105,9 106 106,1 106,2 106,6 106,8 107 107,1 107,3 107,4 107,6 107,7 107,9 108,2 108,3 108,5 108,92 109,23 109,41 109,65 109,91 110,01 110,2 110,49 110,57 110,72 110,94 111,09 111,28 111,41 111,62 111,76 111,89 112,04 112,12 112,3 112,47 112,59 112,78 112,73 112,99 113,1 113,33 113,38 113,68 113,65 113,81 113,88 114,02 114,25 114,28 114,38 114,73 114,97 115,05 115,29 115,37 115,54 115,76 115,92 116,02 116,21 116,26 116,51
 
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.72568966705914
beta0.184950675591331
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3103.8103.8-1.4210854715202e-14
4104103.90.09999999999998
5104104.085990646125-0.085990646125154
6104.1104.125468413334-0.0254684133341812
7104.2104.205448250716-0.00544825071608557
8104.3104.2992252664980.000774733502282743
9104.4104.3976222198720.00237778012808576
10104.5104.4975016256440.00249837435563904
11104.7104.5978038691980.102196130801644
12104.7104.784172181489-0.0841721814892509
13104.9104.8239976149240.0760023850762792
14105104.9902608727160.00973912728359494
15105.2105.1097447234650.0902552765345206
16105.3105.2997720856330.000227914367258109
17105.4105.424498111258-0.0244981112583389
18105.5105.527992657623-0.0279926576231446
19105.7105.6251941630330.0748058369671298
20105.8105.807035673381-0.00703567338057098
21105.9105.928541339806-0.0285413398062957
22106106.030609839193-0.0306098391929055
23106.1106.127068895461-0.0270688954611416
24106.2106.222464477636-0.022464477636035
25106.6106.3181863280780.28181367192208
26106.8106.6725438151710.127456184829086
27107106.9319924293750.0680075706249568
28107.1107.157427556640-0.0574275566403486
29107.3107.2841279656120.0158720343876126
30107.4107.466151423966-0.0661514239658914
31107.6107.5797726740800.0202273259201178
32107.7107.758792937280-0.0587929372796907
33107.9107.8725780124240.0274219875757069
34108.2108.0526088589460.14739114105447
35108.3108.339482446957-0.0394824469567965
36108.5108.4854445956450.0145554043553915
37108.92108.6725750343710.247424965629492
38109.23109.0619050931760.168094906824464
39109.41109.416227307533-0.00622730753259759
40109.65109.6432098829380.00679011706162669
41109.91109.8805504166080.029449583391866
42110.01110.138287319528-0.128287319527942
43110.2110.264337869122-0.0643378691223973
44110.49110.4281606515510.0618393484485011
45110.57110.691848816094-0.121848816093760
46110.72110.805882220194-0.0858822201944065
47110.94110.9344893750260.00551062497409305
48111.09111.130158991657-0.0401589916573357
49111.28111.287296628283-0.00729662828256039
50111.41111.467302812387-0.0573028123874906
51111.62111.6033290256220.0166709743784281
52111.76111.795274776282-0.0352747762820513
53111.89111.944789565052-0.0547895650521752
54112.04112.072788993480-0.0327889934804801
55112.12112.212353175778-0.0923531757780154
56112.3112.2962968992690.00370310073097357
57112.47112.4504446883870.0195553116125495
58112.59112.618720914377-0.0287209143767484
59112.78112.7481087529470.0318912470529256
60112.73112.925762551707-0.195762551707276
61112.99112.9119357189270.0780642810725851
62113.1113.107299726806-0.00729972680589697
63113.33113.2397362102980.0902637897021634
64113.38113.455088446087-0.0750884460871077
65113.68113.5403681424240.139631857575708
66113.65113.800209084728-0.150209084728303
67113.81113.829554868301-0.0195548683008155
68113.88113.951090474958-0.0710904749582966
69114.02114.025685688732-0.00568568873229935
70114.25114.1469813651320.103018634867709
71114.28114.360989476847-0.0809894768474777
72114.38114.43059465529-0.0505946552901122
73114.73114.5154663892330.214533610767276
74114.97114.8215329797820.148467020217836
75115.05115.099582495729-0.0495824957289557
76115.29115.2272547207620.0627452792376886
77115.37115.444863521643-0.0748635216426834
78115.54115.552563095751-0.0125630957509486
79115.76115.7037872667450.056212733254597
80115.92115.9124660390430.00753396095716141
81116.02116.086830313366-0.0668303133661396
82116.21116.1982594518000.0117405482001942
83116.26116.368282431346-0.108282431345572
84116.51116.4366726540230.0733273459772192


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85116.646696976844116.480435032221116.812958921466
86116.803508402376116.584229184955117.022787619797
87116.960319827909116.685724740546117.234914915271
88117.117131253441116.784571144477117.449691362405
89117.273942678973116.880673561429117.667211796517
90117.430754104506116.974035907327117.887472301685
91117.587565530038117.064703314969118.110427745108
92117.744376955571117.152737975142118.336015935999
93117.901188381103117.238208136533118.564168625674
94118.057999806636117.321182874186118.794816739085
95118.214811232168117.401729578008119.027892886328
96118.371622657700117.479912789376119.263332526024
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004344wv5t925aazpiqkb/1ilch1264004307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004344wv5t925aazpiqkb/1ilch1264004307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004344wv5t925aazpiqkb/25ngu1264004307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004344wv5t925aazpiqkb/25ngu1264004307.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004344wv5t925aazpiqkb/3ifmr1264004307.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264004344wv5t925aazpiqkb/3ifmr1264004307.ps (open in new window)


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