Home » date » 2010 » Jan » 20 »

KDGP2W61

*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:20:58 -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/t1264026122dibv7jhavo2fn9m.htm/, Retrieved Wed, 20 Jan 2010 23:22:07 +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/t1264026122dibv7jhavo2fn9m.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 «
39690 43129 37863 35953 29133 24693 22205 21725 27192 21790 13253 37702 30364 32609 30212 29965 28352 25814 22414 20506 28806 22228 13971 36845 35338 35022 34777 26887 23970 22780 17351 21382 24561 17409 11514 31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
R Framework
error message
Warning: there are blank lines in the 'Data' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.562791973128805
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
243129396903439
33786341625.44159559-3762.44159558996
43595339507.969666226-3554.96966622600
52913337507.2612733576-8374.26127335762
62469332794.2942478285-8101.29424782854
72220528234.9508731961-6029.95087319608
82172524841.3429234003-3116.3429234003
92719223087.49014059394104.50985940614
102179025397.4753430957-3607.47534309568
111325323367.2171767413-10114.2171767413
123770217675.016935189820026.9830648102
133036428946.04225005151417.95774994849
143260929744.05748995832864.9425100417
153021231356.4241380853-1144.42413808526
162996530712.351419316-747.351419316026
172835230291.7480394185-1939.74803941855
182581429200.0734129415-3386.07341294145
192241427294.4184757131-4880.41847571314
202050624547.7581320723-4041.75813207227
212880622273.08909801396532.91090198608
222222825949.7589148174-3721.75891481735
231397123855.1828716376-9884.18287163757
243684518292.444090542718552.5559094573
253533828733.67363740876604.32636259134
263502232450.5355021982571.46449780198
273477733897.7350807467879.264919253328
282688734392.5783195562-7505.57831955619
292397030168.4990876204-6198.49908762038
302278026680.0335556614-3900.03355566141
311735124485.1259756022-7134.12597560218
322138220470.0971412436911.902858756432
332456120983.30875042493577.6912495751
341740922996.8046680189-5587.80466801893
351151419852.0330534462-8338.03305344621
363151415159.454979284016354.5450207160
372707124363.66164111662707.33835888336
382946225887.32993803993574.67006196009
392610527899.1255554949-1794.12555549489
402239726889.4060940771-4492.40609407711
412384324361.1160042956-518.116004295585
422170524069.5244759285-2364.52447592846
431808922738.7890806093-4649.78908060933
442076420121.9251093004642.074890699565
452531620483.27970393374832.7202960663
461770423203.0958949365-5499.09589493648
471554820108.2488658007-4560.24886580067
482802917541.777408658310487.2225913417
492938323443.90210348055939.09789651952
503643826786.37872726789651.62127273216
513203432218.2337072407-184.233707240717
522267932114.5484556259-9435.54845562588
532431926804.2975227317-2485.29752273174
541800425405.5920261014-7401.59202610142
551753721240.0354454374-3703.03544543737
562036619155.99682053381210.00317946623
572278219836.97689739772945.0231026023
581916921494.4122602212-2325.41226022116
591380720185.6889059534-6378.68890595338
602974316595.813990597113147.1860094029
612559123994.94474592041596.05525407964
622909624893.19183158644202.80816841356
632648227258.4985333698-776.498533369762
642240526821.4913916430-4416.49139164297
652704424335.92548703382708.07451296616
661797025860.0080855659-7890.00808556589
671873021419.5748670880-2689.57486708804
681968419905.9037207619-221.903720761919
691978519781.01808790973.98191209030483
701847919783.2590760718-1304.25907607182
711069819049.2325371782-8351.2325371782


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7214349.22589952221752.8757771176826945.5760219267
7314349.2258995222-104.96816240810028803.4199614525
7414349.2258995222-1749.8242449329630448.2760439774
7514349.2258995222-3241.5417110007331939.9935100452
7614349.2258995222-4616.2900360162633314.7418350607
7714349.2258995222-5897.9093120306734596.3611110751
7814349.2258995222-7103.0973743948935801.5491734393
7914349.2258995222-8244.0886740941736942.5404731386
8014349.2258995222-9330.1649920553638028.6167910998
8114349.2258995222-10368.566125047239067.0179240916
8214349.2258995222-11365.068415967140063.5202150116
8314349.2258995222-12324.368191213841022.8199902583
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264026122dibv7jhavo2fn9m/17pvm1264026052.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264026122dibv7jhavo2fn9m/17pvm1264026052.ps (open in new window)


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


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