Home » date » 2010 » Jan » 23 »

Exponental smoothing Nicolas Van hoeij

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 23 Jan 2010 08:31:48 -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/23/t1264260782an71zfrgjvifte3.htm/, Retrieved Sat, 23 Jan 2010 16:33:06 +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/23/t1264260782an71zfrgjvifte3.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:
KDGP2W61
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1 4 -3 -3 0 6 -1 0 -1 1 -4 -1 -1 0 3 0 8 8 8 8 11 13 5 12 13 9 11 7 12 11 10 13 14 10 13 12 13 17 15 6 9 6 11 12 13 11 16 16 19 14 15 12 14 16 13 13 15 12 13 12 15 10 8 11 8 13 9 8 8 6 8 6 12 16
 
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.6087902561648
beta0.147224753220598
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3-37-10
4-33.01580748608233-6.01580748608233
500.91796177286605-0.91796177286605
661.841358865928594.15864113407141
7-16.2280771695089-7.2280771695089
803.03482702605008-3.03482702605008
9-12.12237821455813-3.12237821455813
1010.8767734704974090.123226529502591
11-41.61810594000773-5.61810594000773
12-1-1.639374045803970.63937404580397
13-1-1.030054734807650.0300547348076465
140-0.7889893075563120.788989307556312
153-0.01517558846790163.0151755884679
1602.38416580527450-2.38416580527450
1781.282750383218016.71724961678199
1886.324248321258451.67575167874155
1988.44672737736045-0.446727377360446
2089.2370221392205-1.23702213922049
21119.435320099150211.56467990084979
221311.47950764911681.52049235088324
23513.6330744508798-8.63307445087983
24128.83147492965923.16852507034080
251311.49856592252291.50143407747705
26913.2853201905549-4.28532019055495
271111.1650659024837-0.16506590248372
28711.5383875869256-4.53838758692564
29128.84250252343843.15749747656159
301111.1148006254223-0.114800625422323
311011.3846660629438-1.38466606294383
321310.75734356751532.24265643248474
331412.53930670595391.46069329404611
341013.9761387773112-3.97613877731116
351311.74670313572851.25329686427155
361212.8132286966480-0.813228696647988
371312.54878476099390.451215239006084
381713.09456394133593.90543605866408
391516.0932794091885-1.09327940918854
40615.9508360719243-9.9508360719243
4199.5241151061641-0.524115106164102
4268.78931410159438-2.78931410159438
43116.42547860003414.57452139996591
44128.954684156547353.04531584345265
451310.82587286977972.17412713022031
461112.3615552132928-1.36155521329276
471611.62271377146774.37728622853231
481614.76995484758471.23004515241534
491916.11143393385482.88856606614521
501418.7215036662045-4.72150366620451
511516.2754534672027-1.27545346720271
521215.8130074388838-3.81300743888383
531413.46396725257310.536032747426901
541613.81062443191812.18937556808189
551315.3600521429195-2.36005214291955
561313.9283034900841-0.928303490084055
571513.28498655729001.71501344271003
581214.4046101488072-2.40461014880719
591312.80072424719190.19927575280807
601212.7999195961422-0.799919596142221
611512.11911856298182.8808814370182
621013.9373638422587-3.93736384225873
63811.2518258663456-3.25182586634558
64118.692178845345682.30782115465432
6589.72403844970138-1.72403844970138
66138.146817378721484.85318262127852
67911.0087302903941-2.00873029039412
6889.51313700517903-1.51313700517903
6988.18363513360865-0.183635133608647
7067.64706201448947-1.64706201448947
7186.07194435624521.92805564375480
7266.84613318307419-0.846133183074189
73125.85558481634136.1444151836587
74169.67153193969286.3284680603072


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7514.16674289453837.2388681077667621.0946176813098
7614.80924415781866.358970624048123.2595176915891
7715.45174542109895.391265390638825.5122254515591
7816.09424668437934.3390357063837227.8494576623748
7916.73674794765963.2055457834020130.2679501119171
8017.37924921093991.9938753710060532.7646230508737
8118.02175047422020.70687239715914935.3366285512813
8218.6642517375005-0.65284910682090937.981352581822
8319.3067530007808-2.0828941198677540.6964001214294
8419.9492542640612-3.5810663607160943.4795748888384
8520.5917555273415-5.1453474261630646.328858480846
8621.2342567906218-6.7738772472262549.2423908284699
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264260782an71zfrgjvifte3/17hzn1264260706.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264260782an71zfrgjvifte3/17hzn1264260706.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/23/t1264260782an71zfrgjvifte3/249al1264260706.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/23/t1264260782an71zfrgjvifte3/249al1264260706.ps (open in new window)


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