Home » date » 2011 » Jan » 16 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 16 Jan 2011 15:29:18 +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/Jan/16/t1295193489i9tqs3fu90gc33w.htm/, Retrieved Sun, 16 Jan 2011 16:58:12 +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/2011/Jan/16/t1295193489i9tqs3fu90gc33w.htm/},
    year = {2011},
}
@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 = {2011},
    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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
132 131,4 132,7 130,9 126 109,7 68,3 70,6 75,3 74,1 74,9 74 74,2 76 76,2 74,9 74,1 76,5 57,8 59,2 57,3 57,5 60,4 59,9 59,9 60 60,2 65,4 62,4 78,8 65,6 64,4 67,4 65,3 66,7 66,8 69,4 71,7 77,1 81,1 82,1 92,1 77,1 78,2 77,7 77,3 78,5 78,8 78,7 79,8 82,2 84 81,7 77,6 64,3 72,6 73,8 73,8 70,1 70 72,3 72,1 73,3 79,1 77 76,1 66,4 72,7 73,2 70,7 73,6 74,2 72,6 73,6 79,1 79,6 78 85,4 82 91,9 89,4 92,1 93,8 93,6 95,6 99,9 103,7 99,2 93,7 93,5 80,7 91,8 105,8 111,3 110,3 109,4 111,4 111,6 111,8 106,6 104,3 105,5 98,5 108,5 106 101,8 101,3 92,4 88,9 84,9 86,4 90,7 86,8 90,6 88,3 95,4 93,6 91,3 91,3 89,3
 
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' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.422780569694171
beta0.0509407545878842
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1374.297.4696531217023-23.2696531217022
147687.494643728192-11.4946437281919
1576.280.5631398801289-4.36313988012893
1674.975.1529736755632-0.25297367556324
1774.171.79300501093922.30699498906077
1876.572.45694621080164.04305378919841
1957.843.447141938971414.3528580610286
2059.251.49462390936317.70537609063691
2157.359.101675497228-1.80167549722803
2257.558.1160143828865-0.616014382886526
2360.459.10486173105091.29513826894911
2459.958.93780898078610.962191019213911
2559.949.241021418359410.6589785816406
266058.113895686841.88610431315995
2760.260.6656652120729-0.465665212072849
2865.459.87708162841785.52291837158225
2962.461.35993741020991.04006258979014
3078.863.002158968136315.7978410318637
3165.647.06816400485918.531835995141
3264.453.93198243236410.468017567636
3367.458.42811709159688.97188290840322
3465.364.48083054091990.819169459080115
3566.769.5370952029573-2.83709520295727
3666.869.3524718183228-2.55247181832276
3769.464.46030962536174.93969037463829
3871.767.46314204429944.23685795570059
3977.171.65905748282855.44094251717152
4081.179.80813702741081.29186297258923
4182.178.44446580275553.65553419724452
4292.194.3248915968475-2.22489159684748
4377.168.26479846714598.83520153285413
4478.266.351439117427411.8485608825726
4577.771.1568248009666.54317519903393
4677.372.13954469092895.16045530907108
4778.578.33650702656430.16349297343568
4878.881.0048785672222-2.20487856722218
4978.781.8921236100645-3.19212361006447
5079.882.1544281846514-2.35442818465143
5182.285.5143976129973-3.31439761299734
528488.6262144761773-4.62621447617728
5381.786.6457532719863-4.94575327198626
5477.696.239005014121-18.639005014121
5564.370.1333206186518-5.83332061865181
5672.663.46249869724999.13750130275007
5773.864.00168288768339.79831711231674
5873.865.50908694895378.29091305104627
5970.169.80426480058460.295735199415404
607070.7937736619488-0.79377366194879
6172.371.34947669671080.950523303289202
6272.173.5281505906217-1.42815059062174
6373.376.2605680300349-2.96056803003492
6479.178.2671089478010.832891052198917
657778.358877753979-1.35887775397902
6676.180.5495677278125-4.44956772781251
6766.467.885605728391-1.48560572839101
6872.772.05886536473020.641134635269779
6973.269.27963552135423.92036447864582
7070.767.39495200386133.30504799613865
7173.665.16986450812758.43013549187245
7274.269.09493014149095.1050698585091
7372.673.459453684245-0.859453684244997
7473.673.7354950191562-0.135495019156181
7579.176.43364333406642.66635666593362
7679.683.7697271094478-4.16972710944778
777880.7440313801815-2.74403138018148
7885.480.83402336250484.56597663749523
798273.35084844011478.64915155988534
8091.984.78503525350397.11496474649613
8189.487.27070039361922.1292996063808
8292.184.26592083505837.83407916494174
8393.887.36266397696176.43733602303834
8493.688.8665571364.73344286399994
8595.690.098407080525.50159291947995
8699.994.67392293561685.22607706438323
87103.7103.6919437334670.00805626653330194
8899.2107.626946895424-8.42694689542438
8993.7104.41953270131-10.7195327013104
9093.5107.672460848824-14.1724608488235
9180.793.3824335894013-12.6824335894013
9291.895.1567553518504-3.35675535185038
93105.889.933920562894815.8660794371052
94111.395.74412799603115.555872003969
95110.3101.1352364525919.16476354740917
96109.4102.5801647636136.81983523638668
97111.4105.1301569513416.26984304865859
98111.6110.1820353613651.41796463863541
99111.8115.032988744125-3.23298874412546
100106.6112.441452563164-5.84145256316397
101104.3108.625099541743-4.32509954174287
102105.5113.022136945463-7.52213694546255
10398.5100.870763698647-2.37076369864693
104108.5115.935183891023-7.43518389102304
105106121.547081317978-15.5470813179784
106101.8113.018661503138-11.2186615031376
107101.3102.670528322464-1.37052832246422
10892.497.6663895177743-5.26638951777433
10988.993.7881508284179-4.88815082841788
11084.990.2287038185965-5.3287038185965
11186.487.9298778453421-1.5298778453421
11290.783.90116931656116.79883068343888
11386.885.38923152255621.41076847744381
11490.688.59271529138462.00728470861539
11588.383.64655988757154.65344011242854
11695.496.2940503355499-0.894050335549878
11793.698.5150288102285-4.91502881022848
11891.396.2854850042793-4.98548500427928
11991.393.9583231648315-2.65832316483147
12089.386.35594100505022.94405899494976


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12186.053356382028772.0227301067477100.08398265731
12284.259397508707568.951749927569399.5670450898457
12386.474672062979869.6925754801267103.256768645833
12487.90043367521669.6287167864192106.172150564013
12583.507685722232964.318977658555102.696393785911
12686.273741564631465.3116470751294107.235836054133
12782.049978979231460.309161865594103.790796092869
12888.779202035737664.369524411365113.18887966011
12988.78073408154662.8649961024594114.696472060633
13088.435551089626461.0667205537393115.804381625514
13189.508412128392460.3147844651656118.702039791619
13286.362283281006314.1923432461477158.532223315865
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295193489i9tqs3fu90gc33w/1hbda1295191756.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295193489i9tqs3fu90gc33w/1hbda1295191756.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295193489i9tqs3fu90gc33w/29bvw1295191756.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295193489i9tqs3fu90gc33w/29bvw1295191756.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295193489i9tqs3fu90gc33w/3e5u31295191756.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295193489i9tqs3fu90gc33w/3e5u31295191756.ps (open in new window)


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