Home » date » 2010 » Jan » 20 »

*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 08:07:04 -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/t1264000054fy1fhc4d76ptv20.htm/, Retrieved Wed, 20 Jan 2010 16:07:38 +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/t1264000054fy1fhc4d76ptv20.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 «
23.98 24.24 24.92 25.46 25.84 26.08 26.18 26.34 26.42 26.38 26.04 25.58 25.65 25.56 25.62 25.62 25.69 25.68 25.68 25.83 25.93 26.11 24.72 24.62 24.65 25.24 25.56 25.9 25.87 25.78 25.78 25.74 25.78 25.73 24.67 24.31 24.56 25 25.38 25.99 26.22 26.19 26.22 26.22 26.61 26.72 25.46 25.48 25.59 25.88 26 26.97 27.2 27.19 27.19 27.19 27.26 26.9 26.11 25.87 26.02 26.31 26.37 26.52 26.86 26.92 26.98 26.98 27.03 26.75 26.39 26.3 26.3 26.52 26.53 26.98 27.22 27.34 27.41 27.47 27.46 27.53 27.21 26.91 26.95 26.91 27.39 27.62 27.79 27.88 27.9 28.09 28.46 28.73 27.93 27.61 27.65 28.19 28.98 28.99 29.02 29 29.04 29.19 29.23 29.26 29.02 28.47 28.53 28.48 28.68 28.89 29.2 29.21 29.15 29.22 29.34 29.13 28.84 28.76
 
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.843623991338351
beta0.0118408398755793
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1325.6525.58193643162390.0680635683760684
1425.5625.5776136070211-0.0176136070211399
1525.6225.6504188489409-0.0304188489409185
1625.6225.6421174210916-0.0221174210915933
1725.6925.7451816745618-0.0551816745618048
1825.6825.7685509088495-0.0885509088494842
1925.6826.0858011689778-0.405801168977835
2025.8325.75885786263150.0711421373685077
2125.9325.79540269291320.134597307086846
2226.1125.81515768173080.294842318269218
2324.7225.7084611169199-0.988461116919861
2424.6224.41259836715560.207401632844416
2524.6524.6828927457645-0.0328927457645385
2625.2424.57068241828670.66931758171328
2725.5625.21853828376440.341461716235578
2825.925.52651858724170.373481412758295
2925.8725.9633569948208-0.093356994820791
3025.7825.9541290667629-0.17412906676293
3125.7826.1535449529318-0.373544952931844
3225.7425.9326902118613-0.192690211861329
3325.7825.75824108727470.0217589127253106
3425.7325.70839268602340.0216073139765776
3524.6725.1683125548834-0.49831255488343
3624.3124.4756532429014-0.165653242901371
3724.5624.39262488427150.167375115728522
382524.56014627859770.439853721402251
3925.3824.96183207141300.418167928586954
4025.9925.33897685992570.651023140074287
4126.2225.93917239649790.280827603502068
4226.1926.2389411656517-0.0489411656517156
4326.2226.5199916444388-0.299991644438823
4426.2226.3974112576997-0.177411257699710
4526.6126.27748082444090.332519175559057
4626.7226.50097208250940.219027917490610
4725.4626.0593083445771-0.599308344577054
4825.4825.34562825763350.134371742366490
4925.5925.58294459542880.00705540457121145
5025.8825.67138285897840.208617141021605
512625.88584822193710.114151778062944
5226.9726.05114121225800.918858787742032
5327.226.83028564637790.369714353622147
5427.1927.16524741541610.0247525845839505
5527.1927.4817195097738-0.291719509773802
5627.1927.3978790297665-0.207879029766502
5727.2627.3442744935536-0.0842744935536395
5826.927.2065262154050-0.306526215405043
5926.1126.196399282182-0.0863992821820183
6025.8726.0381501473715-0.168150147371531
6126.0226.00531918174610.0146808182538791
6226.3126.13676266038540.173237339614595
6326.3726.31130805447080.0586919455292438
6426.5226.5597960663654-0.0397960663653905
6526.8626.43889243692090.421107563079147
6626.9226.75834956932670.161650430673344
6726.9827.1372733937366-0.157273393736567
6826.9827.1777585994591-0.197758599459089
6927.0327.1499148573228-0.119914857322790
7026.7526.9448828289851-0.194882828985058
7126.3926.06201688913290.327983110867081
7226.326.24335954705830.0566404529417461
7326.326.4337959219185-0.13379592191853
7426.5226.4683303504030.0516696495970237
7526.5326.52474686114620.00525313885380996
7626.9826.71455832771120.265441672288802
7727.2226.92809080974370.291909190256341
7827.3427.10154559601600.238454403983958
7927.4127.4997236433436-0.0897236433436355
8027.4727.5958718764446-0.125871876444609
8127.4627.646571836462-0.186571836461987
8227.5327.37864278240940.151357217590608
8327.2126.87815520143260.331844798567420
8426.9127.0288810252406-0.118881025240622
8526.9527.0482671031612-0.098267103161163
8626.9127.1489352796717-0.238935279671708
8727.3926.95718757413480.432812425865190
8827.6227.55691204236430.0630879576357088
8927.7927.61037809077720.179621909222831
9027.8827.68612905473440.193870945265640
9127.928.0003143676811-0.100314367681083
9228.0928.08670761637570.00329238362428441
9328.4628.24300419845050.216995801549508
9428.7328.37853237809640.351467621903563
9527.9328.0872395042733-0.157239504273267
9627.6127.7621466436877-0.152146643687651
9727.6527.7636275457869-0.113627545786905
9828.1927.83612169273360.35387830726636
9928.9828.26223425621110.717765743788853
10028.9929.0600858832815-0.0700858832815179
10129.0229.0336458364341-0.0136458364340761
1022928.96086854514770.0391314548522708
10329.0429.1092515046038-0.0692515046038444
10429.1929.2491051518121-0.0591051518120835
10529.2329.3966098727707-0.166609872770746
10629.2629.23614545796840.0238545420315681
10729.0228.59224633118240.427753668817598
10828.4728.7706333619727-0.300633361972665
10928.5328.6605567175041-0.130556717504103
11028.4828.7993925477856-0.319392547785629
11128.6828.7152123212211-0.0352123212210564
11228.8928.74790222487790.142097775122053
11329.228.90468055064570.295319449354302
11429.2129.09928248882240.110717511177633
11529.1529.290299356577-0.140299356577003
11629.2229.3702829534414-0.150282953441426
11729.3429.4216269154447-0.0816269154447475
11829.1329.3610593215966-0.231059321596614
11928.8428.56114158160080.278858418399228
12028.7628.49440010792220.265599892077816


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12128.88864891232828.347254504180529.4300433204755
12229.109441871859228.397625466499329.821258277219
12329.343684055735728.492047306958230.1953208045131
12429.438694931934228.464541929998130.4128479338703
12529.503024882303728.417756321946830.5882934426606
12629.420139446621928.231928616068830.6083502771749
12729.477911881608228.192943416767330.7628803464491
12829.675508199090528.298641002627331.0523753955537
12929.866685844741228.401844066170331.3315276233122
13029.854743642243628.305164044575731.4043232399115
13129.334930702286527.703327732289730.9665336722833
13229.033517396082827.322198051819630.7448367403461
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264000054fy1fhc4d76ptv20/1w2yk1264000021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264000054fy1fhc4d76ptv20/1w2yk1264000021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/20/t1264000054fy1fhc4d76ptv20/26vz91264000021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264000054fy1fhc4d76ptv20/26vz91264000021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/20/t1264000054fy1fhc4d76ptv20/3x9v01264000021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264000054fy1fhc4d76ptv20/3x9v01264000021.ps (open in new window)


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