Home » date » 2010 » Jan » 20 »

KDGP2W62

*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 15:23:55 -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/t1264026272gmwaccntdouyzrr.htm/, Retrieved Wed, 20 Jan 2010 23:24:36 +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/t1264026272gmwaccntdouyzrr.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 «
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.472554940548756
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
2413
3-32.41766482164627-5.41766482164627
4-3-0.142479456059871-2.85752054394013
50-1.492814906818351.49281490681835
66-0.7873778472765076.78737784727651
7-12.42003108782519-3.42003108782519
800.803878500443058-0.803878500443058
9-10.424001743457766-1.42400174345777
101-0.2489173157632441.24891731576324
11-40.341264732137568-4.34126473213757
12-1-1.710221365264110.710221365264111
13-1-1.374602750225270.374602750225273
140-1.197582369863171.19758236986317
153-0.6316589042702413.63165890427024
1601.08449945333054-1.08449945333054
1780.572013878636777.42798612136323
1884.082145418614563.91785458138544
1985.933546957399822.06645304260018
2086.910059552092551.08994044790745
21117.425116295655143.57488370434486
22139.114445252030543.88555474796946
23510.9505833449562-5.95058334495619
24128.138605786153.86139421385
25139.96332669931123.03667330068880
26911.3983216703842-2.39832167038419
271110.2649829160190.735017083981003
28710.6123188704420-3.61231887044196
29128.905299741377113.09470025862289
301110.36771563810690.632284361893129
311010.6665047371512-0.666504737151188
321310.35154463071122.64845536928875
331411.60308530029152.39691469970847
341012.7357591837127-2.73575918371271
351311.44296266529761.55703733470236
361212.1787483504301-0.178748350430105
371312.09427993431940.90572006568058
381712.52228242611094.47771757388908
391514.63824998803420.361750011965803
40614.8091967434322-8.80919674343221
41910.6463673000573-1.64636730005731
4269.86836829845731-3.86836829845731
43118.040351747159132.95964825284087
44129.438948151325582.56105184867442
451310.64918585541822.3508141445818
461111.7600746937522-0.760074693752227
471611.40089764203354.59910235796647
481613.57422618338002.42577381661998
491914.72053758507764.27946241492240
501416.7428186921419-2.74281869214190
511515.4466861681408-0.446686168140765
521215.2356024125111-3.23560241251106
531413.70660250682750.293397493172517
541613.84524894177082.15475105822922
551314.8634871999897-1.86348719998966
561313.9828871169852-0.982887116985179
571513.51841895385211.48158104614789
581214.2185473970327-2.21854739703269
591313.1701618637233-0.170161863723312
601213.0897510343279-1.08975103432788
611512.57478379908812.42521620091188
621013.7208316967279-3.72083169672792
63811.9625342954887-3.96253429548873
641110.09001913706160.909980862938353
65810.520035089648-2.52003508964799
66139.32918005767863.67081994232140
67911.0638441572875-2.06384415728748
68810.0885644042386-2.0885644042386
6989.10160297636138-1.10160297636138
7068.5810350473586-2.58103504735860
7187.36135418399980.6386458160002
7267.66314941961149-1.66314941961149
73126.877219944503285.12278005549672
74169.298014969072896.70198503092711


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7512.46507110692136.2693174069455618.6608248068970
7612.46507110692135.6123653663164519.3177768475262
7712.46507110692135.0131057269779519.9170364868647
7812.46507110692134.4585737403801820.4715684734624
7912.46507110692133.9400366708040220.9901055430386
8012.46507110692133.4512803287003521.4788618851423
8112.46507110692132.987696140713821.9424460731288
8212.46507110692132.5457541794987222.3843880343439
8312.46507110692132.1226796831156922.8074625307269
8412.46507110692131.7162445467909623.2138976670516
8512.46507110692131.3246274678053523.6055147460373
8612.46507110692130.94631698449666123.9838252293459
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264026272gmwaccntdouyzrr/1ud9t1264026232.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264026272gmwaccntdouyzrr/1ud9t1264026232.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/20/t1264026272gmwaccntdouyzrr/2zodk1264026232.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264026272gmwaccntdouyzrr/2zodk1264026232.ps (open in new window)


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