Home » date » 2010 » Jan » 15 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 15 Jan 2010 08:25:06 -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/15/t1263569168phq6ou4ia1q08gh.htm/, Retrieved Fri, 15 Jan 2010 16:26:12 +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/15/t1263569168phq6ou4ia1q08gh.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 «
-9 -13 -18 -11 -9 -10 -13 -11 -5 -15 -6 -6 -3 -1 -3 -4 -6 0 -4 -2 -2 -6 -7 -6 -6 -3 -2 -5 -11 -11 -11 -10 -14 -8 -9 -5 -1 -2 -5 -4 -6 -2 -2 -2 -2 2 1 -8 -1 1 -1 2 2 1 -1 -2 -2 -1 -8 -4 -6 -3 -3 -7 -9 -11 -13 -11 -9 -17 -22 -25 -20 -24 -24 -22 -19 -18 -17 -11 -11
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.70504327667519
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
2-13-9-4
3-18-11.8201731067008-6.17982689329924
4-11-16.17721850883795.17721850883791
5-9-12.52705540730343.52705540730339
6-10-10.04032870592330.0403287059232618
7-13-10.0118952229551-2.98810477704495
8-11-12.11863840601161.11863840601161
9-5-11.32994991882256.32994991882247
10-15-6.86706128686603-8.13293871313397
11-6-12.60113504617256.6011350461725
12-6-7.947049163443611.94704916344361
13-3-6.574295241401643.57429524140164
14-1-4.054262412599293.05426241259929
15-3-1.90087523339442-1.09912476660558
16-4-2.67580576031687-1.32419423968313
17-6-3.60942000601748-2.39057999398252
180-5.294882358129075.29488235812907
19-4-1.56176115074409-2.43823884925590
20-2-3.280825058340221.28082505834022
21-2-2.377787962360340.377787962360341
22-6-2.11143109948936-3.88856890051064
23-7-4.85304045868262-2.14695954131738
24-6-6.366739848582090.366739848582089
25-6-6.108172384050410.108172384050410
26-3-6.031906171953743.03190617195374
27-2-3.894281109907741.89428110990774
28-5-2.55873094923447-2.44126905076553
29-11-4.27993128003193-6.72006871996807
30-11-9.01787054984067-1.98212945015933
31-11-10.4153575921754-0.584642407824605
32-10-10.82755579107130.827555791071328
33-14-10.2440931445029-3.75590685549713
34-8-12.89217002078944.89217002078938
35-9-9.44297843927990.442978439279903
36-5-9.130659468953544.13065946895354
37-1-6.218365782133145.21836578213314
38-2-2.53919207220830.539192072208301
39-5-2.15903832686127-2.84096167313873
40-4-4.162039253799630.162039253799631
41-6-4.04779456735074-1.95220543264926
42-2-5.424183882328883.42418388232888
43-2-3.009986057993351.00998605799335
44-2-2.297902178269460.297902178269462
45-2-2.087868250373680.0878682503736838
462-2.025917331214514.02591733121451
4710.8125286156084050.187471384391595
48-80.94470405474269-8.94470405474269
49-1-5.361699400902954.36169940090295
501-2.286512563418123.28651256341812
51-10.0306210231283678-1.03062102312837
522-0.6960114000283932.69601140002839
5321.204793311401290.795206688598709
5411.76544844076495-0.765448440764952
55-11.22577416396212-2.22577416396212
56-2-0.343492945736715-1.65650705426328
57-2-1.51140210711007-0.488597892889932
58-1-1.855884766489780.855884766489779
59-8-1.25244896626745-6.74755103373255
60-4-6.009764456623312.00976445662331
61-6-4.59279353878028-1.40720646121972
62-3-5.584934993157132.58493499315713
63-3-3.762443955589270.762443955589267
64-7-3.22488797085942-3.77511202914058
65-9-5.88650532570062-3.11349467429938
66-11-8.0816538127794-2.91834618722059
67-13-10.1392141710900-2.86078582891004
68-11-12.15619198577061.15619198577064
69-9-11.34102659965732.34102659965732
70-17-9.69050153505114-7.30949846494886
71-22-14.8440142836310-7.15598571636905
72-25-19.8892939009406-5.11070609905936
73-20-23.49256287514533.49256287514533
74-24-21.0301549016587-2.96984509834125
75-24-23.124024221011-0.875975778988984
76-22-23.74162505451751.74162505451751
77-19-22.51370401934093.51370401934088
78-18-20.0363906242782.03639062427800
79-17-18.60064710594641.60064710594640
80-11-17.47212162556936.47212162556929
81-11-12.90899578763761.90899578763756


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
82-11.5630711423624-18.5034914750874-4.62265080963752
83-11.5630711423624-20.0550548281408-3.07108745658413
84-11.5630711423624-21.3639965805111-1.76214570421382
85-11.5630711423624-22.5176360341677-0.608506250557186
86-11.5630711423624-23.56085612515810.434713840433171
87-11.5630711423624-24.52035469324681.39421240852196
88-11.5630711423624-25.4135422369732.28739995224814
89-11.5630711423624-26.25251980687223.12637752214729
90-11.5630711423624-27.04610232465653.91996003993162
91-11.5630711423624-27.80094683829374.67480455356879
92-11.5630711423624-28.52222677114125.3960844864163
93-11.5630711423624-29.21405729514616.08791501042124
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263569168phq6ou4ia1q08gh/1nws01263569104.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263569168phq6ou4ia1q08gh/1nws01263569104.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/15/t1263569168phq6ou4ia1q08gh/2e6mu1263569104.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263569168phq6ou4ia1q08gh/2e6mu1263569104.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/15/t1263569168phq6ou4ia1q08gh/355ou1263569104.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/15/t1263569168phq6ou4ia1q08gh/355ou1263569104.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=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