Home » date » 2010 » Jan » 26 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 26 Jan 2010 12:49:09 -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/26/t12645354414w4uibgy96cs0xi.htm/, Retrieved Tue, 26 Jan 2010 20:50:45 +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/26/t12645354414w4uibgy96cs0xi.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 «
8,82000 8,80000 8,82000 8,58000 8,54000 8,42000 8,43000 8,44000 8,09000 7,69000 7,56000 7,54000 7,40000 7,39000 7,37000 7,31000 7,35000 7,26000 7,37000 7,35000 7,33000 7,32000 7,31000 7,33000 7,32000 7,27000 7,48000 7,70000 7,77000 7,80000 7,84000 7,81000 7,78000 7,82000 7,80000 7,81000 7,80000 7,66000 7,41000 7,35000 7,39000 7,32000 7,32000 7,30000 7,29000 7,26000 7,22000 7,21000 7,21000 7,21000 7,20000 7,19000 7,18000 7,12000 7,12000 7,07000 7,08000 7,05000 7,06000 7,07000 7,08000 7,08000 7,09000 7,07000 7,06000 6,99000 6,99000 6,99000 6,98000 6,96000 6,95000 6,91000 6,91000 6,87000 6,91000 6,89000 6,88000 6,90000 6,91000 6,85000 6,86000 6,82000 6,80000 6,83000 6,84000 6,89000 7,14000 7,21000 7,25000 7,31000 7,30000 7,48000 7,49000 7,40000 7,44000 7,42000 7,14000 7,24000 7,33000 7,61000 7,66000 7,69000 7,70000 7,68000 7,71000 7,71000 7,72000 7,68000 7,72000 7,74000 7,76000 7,90000 7,97000 7,96000 etc...
 
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
alpha1
beta0.178814212435339
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
38.828.780.0399999999999991
48.588.80715256849741-0.227152568497415
58.548.526534460858890.0134655391411140
68.428.48894229063542-0.0689422906354196
78.438.356614429231960.0733855707680409
88.448.379736812272960.0602631877270348
98.098.40051272672522-0.310512726725216
107.697.9949886380447-0.304988638044698
117.567.540452334931010.0195476650689903
127.547.413947735265270.126052264734731
137.47.4164876717095-0.0164876717095011
147.397.273539441677880.116460558322125
157.377.284364244694030.085635755305975
167.317.279677134835370.0303228651646306
177.357.225099294088560.124900705911435
187.267.28743331544874-0.0274333154487358
197.377.192527848752280.17747215124772
207.357.334262391706850.0157376082931533
217.337.31707649973940.0129235002605981
227.327.299387405260410.0206125947395908
237.317.293073230155020.0169267698449813
247.337.286099977173920.0439000228260777
257.327.313949925181460.00605007481853903
267.277.30503176454531-0.0350317645453142
277.487.248767587157920.231232412842078
287.77.50011522894980.199884771050198
297.777.755857466862960.0141425331370382
307.87.8283863527877-0.0283863527877006
317.847.85331046947006-0.0133104694700563
327.817.89093036835462-0.0809303683546245
337.787.84645886827519-0.0664588682751894
347.827.804575078085220.0154249219147822
357.87.84733327334929-0.0473332733492873
367.817.81886941135335-0.00886941135334762
377.87.82728343454743-0.0272834345474333
387.667.8124047686863-0.152404768686303
397.417.64515263000227-0.235152630002272
407.357.35310399766632-0.00310399766631697
417.397.292548958768210.0974510412317864
427.327.34997458995708-0.029974589957078
437.327.274614707260830.0453852927391685
447.37.282730242638130.0172697573618663
457.297.265818320699740.0241816793002556
467.267.26014234863918-0.000142348639184497
477.227.23011689467938-0.0101168946793768
487.217.188307850124990.0216921498750073
497.217.182186714820920.0278132851790787
507.217.187160125505460.0228398744945419
517.27.191244219675320.0087557803246785
527.197.182809877638340.00719012236166439
537.187.174095573705750.00590442629424892
547.127.16515136904344-0.0451513690434391
557.127.097077662547560.0229223374524405
567.077.1011765022663-0.0311765022662946
577.087.045601700567060.0343982994329410
587.057.06175260538927-0.0117526053892751
597.067.029651072512530.0303489274874718
607.077.045077892079460.0249221079205428
617.087.05953431917950.0204656808205019
627.087.073193873777370.00680612622263066
637.097.07441090587760.0155890941223955
647.077.08719845746568-0.0171984574656801
657.067.06412312883885-0.00412312883885324
666.997.05338585480276-0.063385854802763
676.996.972051563096670.0179484369033336
686.996.975260998705980.0147390012940187
696.986.977896541614450.00210345838554549
706.966.96827266986906-0.00827266986905695
716.956.946793398921680.00320660107831650
726.916.9373667847681-0.0273667847680974
736.916.89247321470290.0175267852970977
746.876.89560725301233-0.0256072530123266
756.916.85102831223230.0589716877677056
766.896.90157328813646-0.0115732881364599
776.886.879503819733050.000496180266948976
786.96.869592543816710.0304074561832888
796.916.895029829146290.0149701708537116
806.856.90770670845752-0.057706708457518
816.866.837387928832450.0226120711675497
826.826.8514312885298-0.0314312885298076
836.86.80581092742552-0.00581092742552247
846.836.784771851014410.0452281489855917
856.846.822859286855180.0171407131448245
866.896.835924289976750.0540757100232527
877.146.895593795476440.244406204523563
887.217.189297098452630.0207029015473719
897.257.26299907148795-0.0129990714879478
907.317.300674652757440.00932534724255962
917.37.3623421573803-0.0623421573803036
927.487.341194493606830.138805506393175
937.497.54601489091421-0.0560148909142093
947.47.54599863231073-0.145998632310733
957.447.429892001857450.0101079981425469
967.427.47169945558461-0.0516994555846111
977.147.44245485815091-0.302454858150913
987.247.108371630893410.131628369106585
997.337.231908654049360.0980913459506425
1007.617.339448780822240.270551219177756
1017.667.66782718400294-0.00782718400293536
1027.697.71642757225986-0.0264275722598635
1037.77.74170194673964-0.0417019467396385
1047.687.74424504597637-0.06424504597637
1057.717.71275711867723-0.00275711867723238
1067.717.74226410667237-0.0322641066723728
1077.727.73649482584782-0.0164948258478228
1087.687.74354531655459-0.0635453165545856
1097.727.692182510820920.0278174891790766
1107.747.73715667324040.0028433267595922
1117.767.757665100475620.00233489952437793
1127.97.778082613695190.121917386304812
1137.977.939883175109460.0301168248905412
1147.968.01526849143331-0.0552684914333126
1157.957.99538569966518-0.045385699665176
1167.977.97727009152372-0.00727009152372116
1177.937.99597009583357-0.065970095833574
1187.997.944173705102810.045826294897191
1197.968.01236809793368-0.0523680979336811
1207.927.97300393774493-0.0530039377449327
1217.977.92352608036110.046473919638899
1227.987.98183627770011-0.00183627770011263
12387.991507925149360.0084920748506443
1248.048.013026428825710.0269735711742847
1258.178.057849686711810.112150313288188
1268.298.207903756656820.082096243343182
1278.268.34258373175413-0.0825837317541271
1288.38.297816586800540.00218341319945914
1298.328.33820701211222-0.0182070121122244
1308.288.35495133958058-0.0749513395805774
1318.278.3015489748225-0.0315489748225009
1328.328.285907569736470.0340924302635273


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1338.342003780804058.172619361401558.51138820020656
1348.36400756160818.102167356512658.62584776670356
1358.386011342412168.037525472293258.73449721253107
1368.408015123216217.973075846064978.84295440036746
1378.430018904020277.906965962453558.95307184558698
1388.452022684824327.838415494873789.06562987477485
1398.474026465628377.767064547481969.18098838377478
1408.496030246432437.692747446043559.2993130468213
1418.518034027236487.615397410484629.42067064398834
1428.540037808040537.535001124889419.54507449119165
1438.562041588844587.451575181246729.67250799644244
1448.584045369648647.365153104950429.80293763434685
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/26/t12645354414w4uibgy96cs0xi/1kyih1264535347.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/26/t12645354414w4uibgy96cs0xi/1kyih1264535347.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/26/t12645354414w4uibgy96cs0xi/2eni61264535347.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/26/t12645354414w4uibgy96cs0xi/2eni61264535347.ps (open in new window)


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