Home » date » 2010 » Jan » 25 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 25 Jan 2010 10:33:30 -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/25/t1264440888bk6c38b14te71yg.htm/, Retrieved Mon, 25 Jan 2010 18:34:53 +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/25/t1264440888bk6c38b14te71yg.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 «
0.96 1 1.05 1.03 1.07 1.12 1.1 1.06 1.11 1.08 1.07 1.02 1 1.04 1.02 1.07 1.12 1.08 1.02 1.01 1.04 0.98 0.95 0.94 0.94 0.96 0.97 1.03 1.01 0.99 1 1 1.02 1.01 0.99 0.98 1.01 1.03 1.03 1 0.96 0.97 0.98 1.02 1.04 1.01 1.01 1 1.01 1.02 1.03 1.06 1.12 1.12 1.13 1.13 1.13 1.17 1.14 1.08 1.07 1.12 1.14 1.21 1.2 1.23 1.29 1.31 1.37 1.35 1.26 1.26 1.28 1.28 1.27 1.35 1.37 1.37 1.4 1.4 1.28 1.23 1.23 1.25 1.21 1.22 1.29 1.32 1.36 1.36 1.37 1.32 1.33 1.36 1.42 1.39 1.42 1.4 1.42 1.44 1.49 1.54 1.55 1.47 1.47 1.35 1.2 1.12
 
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
alpha1
beta0.236026842400955
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
31.051.040.01
41.031.09236026842401-0.0623602684240097
51.071.057641571176610.0123584288233853
61.121.100558492108840.0194415078911647
71.11.1551472098279-0.0551472098279002
81.061.12213098802500-0.0621309880249981
91.111.067466407106210.042533592893794
101.081.12750547673290-0.047505476732896
111.071.08629290906288-0.0162929090628785
121.021.07244734518324-0.0524473451832415
1311.01006836390733-0.0100683639073280
141.040.9876919597661380.0523080402338625
151.021.04003806133472-0.0200380613347182
161.071.015308540990050.0546914590099521
171.121.078217193366470.0417828066335317
181.081.13807905728283-0.0580790572828305
191.021.08437084078274-0.0643708407827399
201.011.009177594490100.000822405509904867
211.040.9993717042657710.040628295734229
220.981.03896107262005-0.0589610726200533
230.950.965044676824969-0.0150446768249687
240.940.9314937292590290.00850627074097143
250.940.9235014374826280.0164985625173724
260.960.9273955410977580.0326044589022422
270.970.9550910685806460.0149089314193542
281.030.9686099765871280.0613900234128717
291.011.04309966996819-0.0330996699681891
300.991.01528725938108-0.0252872593810838
3110.9893187873963930.0106812126036074
3211.00183984028024-0.00183984028023532
331.021.001405588588370.0185944114116308
341.011.02579436880016-0.0157943688001607
350.991.01206647380454-0.0220664738045426
360.980.986858193669533-0.00685819366953311
371.010.9752394758731390.0347605241268610
381.031.013443892623000.0165561073769958
391.031.03735157836965-0.00735157836964762
4011.03561640854040-0.0356164085403967
410.960.997209980094944-0.0372099800949444
420.970.9484274259873320.0215725740126678
430.980.9635191325140030.0164808674859969
441.020.9774090596267520.0425909403732485
451.041.027461664797940.0125383352020634
461.011.05042104846464-0.0404210484646446
471.011.01088059602900-0.00088059602899837
4811.01067275172884-0.0106727517288432
491.010.9981536958385550.0118463041614451
501.021.010949741603900.00905025839609785
511.031.023085845516050.00691415448395416
521.061.034717771566770.0252822284332341
531.121.070685056112720.0493149438872782
541.121.14232470660162-0.0223247066016163
551.131.13705547659491-0.00705547659490935
561.131.14539019473258-0.0153901947325787
571.131.14175769566591-0.0117576956659124
581.171.138982563883980.0310174361160243
591.141.18630351138981-0.0463035113898143
601.081.1453746398044-0.0653746398043995
611.071.069944469998275.55300017324178e-05
621.121.059957576569240.060042423430765
631.141.12412920018170.0158707998183003
641.211.147875134949190.0621248650508095
651.21.23253827068172-0.0325382706817186
661.231.214858365395520.0151416346044750
671.291.248432197600010.0415678023999917
681.311.31824331474603-0.00824331474602524
691.371.336297671195600.0337023288043965
701.351.40425232544486-0.0542523254448641
711.261.37144732037720-0.111447320377204
721.261.255142761254520.00485723874547528
731.281.256289199978410.0237108000215931
741.281.28188558523830-0.00188558523830396
751.271.28144053650843-0.0114405365084294
761.351.268740262800970.0812597371990282
771.371.367919741986390.00208025801361011
781.371.38841073871672-0.0184107387167216
791.41.384065310191140.0159346898088550
801.41.41782632471137-0.0178263247113675
811.281.41361883357813-0.133618833578129
821.231.26208120220338-0.0320812022033847
831.231.204509177346890.0254908226531068
841.251.210525695727910.0394743042720913
851.211.23984269112123-0.0298426911212251
861.221.192799014967140.0272009850328647
871.291.209219177574640.0807808224253621
881.321.298285620018250.0217143799817516
891.361.333410796560040.0265892034399642
901.361.37968656228993-0.0196865622899272
911.371.37504000515491-0.00504000515490599
921.321.38385042865251-0.063850428652509
931.331.318780013591710.0112199864082903
941.361.331428231555440.0285717684445599
951.421.368171935843220.051828064156779
961.391.4404047501739-0.0504047501738996
971.421.398507876148340.021492123851655
981.41.43358059427754-0.0335805942775413
991.421.405654672644270.0143453273557343
1001.441.429040554963250.0109594450367523
1011.491.451627278169740.0383727218302607
1021.541.510684270537670.0293157294623341
1031.551.56760356959534-0.0176035695953412
1041.471.57344865464877-0.103448654648767
1051.471.469031995341390.000968004658608024
1061.351.46926047042439-0.119260470424392
1071.21.32111179816687-0.121111798166871
1081.121.14252616286804-0.0225261628680422


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1091.057209383774890.9743829402294041.14003582732037
1100.9944187675497780.8627335169216121.12610401817794
1110.9316281513246660.7521658881916851.11109041445765
1120.8688375350995550.6403169383061721.09735813189294
1130.8060469188744440.5264932916685661.08560054608032
1140.7432563026493330.4104549304988061.07605767479986
1150.6804656864242210.2921287463017071.06880262654674
1160.617675070199110.1715124818971771.06383765850104
1170.5548844539739990.04863596839014631.06113293955785
1180.492093837748887-0.0764563784780471.06064405397582
1190.429303221523776-0.2037140454512351.06232048849879
1200.366512605298665-0.3330847162709541.06610992686828
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264440888bk6c38b14te71yg/16bgv1264440808.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264440888bk6c38b14te71yg/16bgv1264440808.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/25/t1264440888bk6c38b14te71yg/29kxm1264440808.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264440888bk6c38b14te71yg/29kxm1264440808.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/25/t1264440888bk6c38b14te71yg/3d25j1264440808.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264440888bk6c38b14te71yg/3d25j1264440808.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 12 ; par2 = Double ; 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=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