Home » date » 2009 » Dec » 09 »

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 09 Dec 2009 09:18:05 -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/Dec/09/t126037558721tbq7xqzbh7b9k.htm/, Retrieved Wed, 09 Dec 2009 17:19:52 +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/Dec/09/t126037558721tbq7xqzbh7b9k.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 «
153.4 145 137.7 148.3 152.2 169.4 168.6 161.1 174.1 179 190.6 190 181.6 174.8 180.5 196.8 193.8 197 216.3 221.4 217.9 229.7 227.4 204.2 196.6 198.8 207.5 190.7 201.6 210.5 223.5 223.8 231.2 244 234.7 250.2 265.7 287.6 283.3 295.4 312.3 333.8 347.7 383.2 407.1 413.6 362.7 321.9 239.4 191 159.7 163.4 157.6 166.2 176.7 198.3 226.2 216.2 235.9 226.9
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13181.6162.66820553729918.9317944627013
14174.8173.9654618992690.834538100731436
15180.5179.8094581037090.690541896291109
16196.8196.4615572074860.33844279251403
17193.8193.7543621775560.0456378224440641
18197198.431007856160-1.43100785615954
19216.3210.5891566559355.71084334406476
20221.4207.15666109584214.2433389041580
21217.9238.696205080358-20.7962050803579
22229.7222.8403591274716.85964087252867
23227.4243.282502753135-15.8825027531354
24204.2226.850408634663-22.6504086346629
25196.6195.3954519845391.20454801546083
26198.8188.05967684399510.7403231560053
27207.5204.0355326796753.46446732032513
28190.7225.311654618064-34.6116546180635
29201.6187.8564527653713.7435472346299
30210.5206.2767440192444.22325598075636
31223.5224.768855491123-1.26885549112251
32223.8213.9372401281369.86275987186434
33231.2241.243919798407-10.0439197984070
34244236.2166427656297.78335723437115
35234.7258.18858828975-23.4885882897499
36250.2234.01161748214016.1883825178604
37265.7238.61334150998027.0866584900195
38287.6252.987027022734.6129729773003
39283.3293.672008610749-10.3720086107489
40295.4306.305631792944-10.9056317929442
41312.3289.08778316796923.2122168320309
42333.8317.62584571839916.1741542816010
43347.7354.276771519166-6.57677151916602
44383.2330.90222843520252.2977715647977
45407.1410.454638988832-3.35463898883216
46413.6413.1255368973520.474463102648144
47362.7434.976847521205-72.276847521205
48321.9359.57801919132-37.6780191913198
49239.4305.976878009418-66.5768780094183
50191228.275170152947-37.2751701529466
51159.7196.162058442486-36.4620584424860
52163.4174.236296980078-10.8362969800780
53157.6161.46089096985-3.86089096985009
54166.2162.0187451505644.18125484943599
55176.7178.238436350471-1.53843635047102
56198.3169.86347641822628.4365235817735
57226.2214.17445091913612.0255490808643
58216.2231.187964706171-14.9879647061711
59235.9229.2103240996886.68967590031178
60226.9235.188802498163-8.28880249816314


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
61216.722540946007171.448391740376261.996690151638
62206.967104665800144.842869855374269.091339476225
63212.279569625649134.934748658532289.624390592766
64230.418730517346136.185577206183324.651883828508
65226.259317447063124.519414894416327.999219999709
66231.080654102755119.176673815234342.984634390277
67246.38570563988120.429521550080372.34188972968
68235.489786767166108.524497015116362.455076519216
69253.653187214058111.472588806964395.833785621153
70258.798612747275108.806510731671408.79071476288
71273.614419578849110.842018183598436.3868209741
72272.186177178369111.950389069417432.421965287321
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/09/t126037558721tbq7xqzbh7b9k/19slr1260375482.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t126037558721tbq7xqzbh7b9k/19slr1260375482.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t126037558721tbq7xqzbh7b9k/2km9i1260375482.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t126037558721tbq7xqzbh7b9k/2km9i1260375482.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t126037558721tbq7xqzbh7b9k/3l1521260375482.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t126037558721tbq7xqzbh7b9k/3l1521260375482.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=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