Home » date » 2011 » May » 20 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 20 May 2011 08:24:02 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/20/t13058798932afrdy4hgsk9lnn.htm/, Retrieved Fri, 20 May 2011 10:24:56 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
19097,1 19304,6 19601,7 16006,9 17681,2 19790,4 17014,2 17424,5 18908,9 15692,1 15160 15794,3 16032,1 16065 16236,8 12521 14762,1 15446,9 13635 14212,6 15021,7 14134,3 13721,4 14384,5 15638,6 19711,6 20359,8 16141,4 20056,9 20605,5 19325,8 20547,7 19211,2 19009,5 18746,8 16471,5 18957,2 20515,2 18374,4 16192,9 18147,5 19301,4 18344,7 17183,6 19630 17167,2 17428,5 16016,5 18466,5 18406,6 18174,1 14851,9 16260,7 18329,6 18003,8 15903,8 19554,2 16554,2 16198,9 16571,8 17535,2 16198,1 17487,5 13768 14915,8 17160,9 15607,4 16181,5 17413,2 15116,3 14544,5 15050,6 15535,4 15919,3 15853,1 12336,4 14355,5 16040,8 13867,7 14656,6
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.380888896422215
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
219304.619097.1207.5
319601.719176.1344460076425.565553992394
416006.919338.2276402231-3331.32764022308
517681.218069.3619317177-388.161931717685
619790.417921.51536191261868.88463808738
717014.218633.3527692542-1619.15276925415
817424.518016.635457834-592.135457833963
918908.917791.09763676711117.80236323288
1015692.118216.856145317-2524.75614531704
111516017255.204563392-2095.20456339202
1215794.316457.1644094628-662.864409462847
1316032.116204.686716065-172.586716064978
141606516138.9503522459-73.9503522458544
1516236.816110.7834841889126.016515811103
161252116158.7817758272-3637.78177582716
1714762.114773.1910898075-11.0910898075053
1815446.914768.9666168506677.933383149395
191363515027.1839150062-1392.18391500616
2014212.614496.9165200027-284.3165200027
2115021.714388.6235144643633.076485535734
2214134.314629.7553183908-495.455318390828
2313721.414441.0418889424-719.641888942428
2414384.514166.9382840439217.561715956053
2515638.614249.80512593821388.79487406183
2619711.614778.78167287644932.81832712359
2720359.816657.63740174583702.16259825421
2816141.418067.7500281704-1926.35002817044
2920056.917334.02469181772722.87530818231
3020605.518371.13766304652234.36233695345
3119325.819222.1814677761103.618532223889
3220547.719261.64861616381286.05138383625
3319211.219751.4913084954-540.291308495402
3419009.519545.7003482561-536.200348256076
3518746.819341.4675893476-594.667589347613
3616471.519114.9653075029-2643.46530750294
3718957.218108.0987237977849.101276202269
3820515.218431.51197184112083.68802815889
3918374.419225.1656053747-850.765605374727
4016192.918901.1184328296-2708.21843282957
4118147.517869.5881026788277.911897321188
4219301.417975.44165855211325.95834144792
4318344.718480.484467928-135.78446792801
4417183.618428.7656717876-1245.16567178763
451963017954.49589319761675.50410680239
4617167.218592.6768033885-1425.47680338846
4717428.518049.7285168704-621.228516870364
4816016.517813.1094726536-1796.6094726536
4918466.517128.80087331291337.69912668713
5018406.617638.3156174217768.284382578306
5118174.117930.9466080404243.153391959633
5214851.918023.5610351652-3171.66103516519
5316260.716815.5105636558-554.810563655778
5418329.616604.18938034151725.41061965846
5518003.817261.3791271384742.420872861578
5615903.817544.1589940835-1640.35899408349
5719554.216919.36446709082634.83553290923
5816554.217922.9440654746-1368.74406547461
5916198.917401.6046488915-1202.70464889153
6016571.816943.5078024534-371.707802453366
6117535.216801.9284277854733.271572214628
6216198.117081.223427704-883.123427703986
6317487.516744.8515199212742.648480078791
641376817027.7180799281-3259.71807992805
6514915.815786.1276578167-870.327657816715
6617160.915454.62951670521706.27048329483
6715607.416104.5289980851-497.128998085142
6816181.515915.178082625266.321917374989
6917413.216016.6171438271396.58285617298
7015116.316548.5600466769-1432.26004667693
7114544.516003.0280981085-1458.52809810852
7215050.615447.4909404192-396.890940419175
7315535.415296.3195881229239.080411877059
7415919.315387.382662359531.91733764104
7515853.115589.9840700809263.115929919104
7612336.415690.2020062589-3353.80200625889
7714355.514412.7760612763-57.2760612763268
7816040.814390.96024550541649.83975449462
7913867.715019.3658888683-1151.66588886833
8014656.614580.709139410275.8908605898378


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8114609.615125548811438.644435937917780.5858151596
8214609.615125548811216.415186896718002.8150642008
8314609.615125548811007.8715848518211.3586662476
8414609.615125548810810.759081650418408.4711694471
8514609.615125548810623.381570981318595.8486801163
8614609.615125548810444.425014538618774.8052365589
8714609.615125548810272.846816063718946.3834350339
8814609.615125548810107.803259260819111.4269918368
8914609.61512554889948.6001299980419270.6301210995
9014609.61512554889794.6580646762719424.5721864212
9114609.61512554889645.4875881719219573.7426629256
9214609.61512554889500.6707221871219718.5595289104
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/20/t13058798932afrdy4hgsk9lnn/1s9w31305879839.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t13058798932afrdy4hgsk9lnn/1s9w31305879839.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/20/t13058798932afrdy4hgsk9lnn/2vv311305879839.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t13058798932afrdy4hgsk9lnn/2vv311305879839.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/20/t13058798932afrdy4hgsk9lnn/3hq2z1305879839.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t13058798932afrdy4hgsk9lnn/3hq2z1305879839.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