Home » date » 2011 » May » 19 »

oef 10.2 Thomas Simons

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 19 May 2011 21:52:51 +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/19/t1305841740i1fq779vxsxyjz1.htm/, Retrieved Thu, 19 May 2011 23:49:00 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
17,1 13,4 15,3 14 9,7 13,7 13,7 12,5 9,8 7 -1,9 -2,9 -6,8 -10,4 -17,2 -19,8 -16,8 -23,2 -21,7 -17,6 -13 -12,6 -4 -0,2 3,1 6,5 19,2 26,6 26,6 31,4 31,2 26,4 20,7 20,7 15 13,3 8,7 10,2 4,3 -0,1 -4,6 -3,9 -3,5 -3,4 -2,5 -1,1 0,3 -0,9 3,6 2,7 -0,2 -1 5,8 6,4 9,6 13,2 10,6 10,9 12,9 15,9 12,2 9,1 9 17,4 14,7 17 13,7 9,5 14,8 13,6 12,6 8,9 10,2 12,7 16 10,4 9,9 9,5 8,6 10 3,5 -4,2 -4,4 -1,5 -0,1 0,8 -2,4 -1,2 0,2 -1,9 -1,6 -4,2 -2,2 6,2 5,7 3,1 1,1 -0,9 0,1 -4 -4 -5,3 -8 -6,3 -3,6 -3,5 -5,1 -3,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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0129118310986201
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13-6.85.29011904502332-12.0901190450233
14-10.4-8.84171324014721-1.55828675985279
15-17.2-15.9777490065531-1.22225099344691
16-19.8-19.2767864574917-0.523213542508337
17-16.8-17.44475506137830.644755061378326
18-23.2-25.65157120327832.45157120327834
19-21.7-22.72161068608331.02161068608327
20-17.6-27.764476489042210.1644764890422
21-13-23.266646714886410.2666467148864
22-12.6-26.301004478294113.7010044782941
23-4-18.908657569811614.9086575698116
24-0.2-2.023579030634581.82357903063458
253.1-1.492018578937184.59201857893718
266.52.018445087970774.48155491202923
2719.27.0126500534818512.1873499465182
2826.617.63151834244168.96848165755836
2926.620.04328826200526.55671173799476
3031.435.4760470482716-4.07604704827165
3131.226.67072825757234.52927174242769
3226.435.0400343978482-8.6400343978482
3320.729.121780244723-8.42178024472298
3420.731.8724152661828-11.1724152661828
351519.698985465602-4.69898546560196
3613.32.6869192063481310.6130807936519
378.715.0018137763925-6.30181377639252
3810.28.186336855008122.01366314499188
394.312.1873122352001-7.88731223520014
40-0.12.85287939834127-2.95287939834127
41-4.6-1.23202195284512-3.36797804715488
42-3.9-8.01891756743344.1189175674334
43-3.5-4.887443311379331.38744331137933
44-3.4-5.722307401483292.32230740148329
45-2.5-5.851434718347273.35143471834727
46-1.1-7.323001810207936.22300181020793
470.3-4.646167891066064.94616789106606
48-0.9-0.723371722037258-0.176628277962742
493.6-2.027366841969945.62736684196994
502.72.88068944693305-0.180689446933046
51-0.22.33993111446629-2.53993111446629
52-1-1.458949986596930.458949986596932
535.8-1.787055214063847.58705521406384
546.46.78395031443612-0.383950314436121
559.64.579274875646385.02072512435362
5613.29.984837335172753.21516266482725
5710.614.0490822853714-3.44908228537135
5810.915.5107002009973-4.61070020099728
5912.99.528061617671833.37193838232817
6015.92.4211949993224813.4788050006775
6112.218.4313153693455-6.23131536934553
629.112.235734114758-3.135734114758
63911.0968677546165-2.09686775461647
6417.47.957314082970659.44268591702935
6514.713.11406516904691.58593483095308
661719.4266947755849-2.42669477558491
6713.714.265274203766-0.565274203766021
689.514.9983918972925-5.49839189729249
6914.89.86462007329084.9353799267092
7013.623.018654100887-9.41865410088695
7112.612.9705529867879-0.37055298678793
728.92.433082775969816.46691722403019
7310.210.05978556987040.140214430129612
7412.710.19583853837122.50416146162881
751616.0653780776154-0.0653780776153816
7610.415.1310834436457-4.73108344364572
779.97.59801027702022.3019897229798
789.512.8440215409794-3.34402154097945
798.67.64371472671470.956285273285293
80109.119330414231050.880669585768947
813.510.6275335375779-7.1275335375779
82-4.23.97518243477542-8.17518243477542
83-4.4-7.036407180582492.63640718058249
84-1.5-1.585329664255950.0853296642559509
85-0.1-2.434719726966722.33471972696672
860.8-0.754500794135031.55450079413503
87-2.40.227130211188902-2.6271302111889
88-1.2-3.243007425344642.04300742534464
890.2-1.612237267253141.81223726725314
90-1.9-0.605446798773695-1.29455320122631
91-1.6-2.486331531950070.88633153195007
92-4.2-2.78478623755605-1.41521376244395
93-2.2-6.000170331765833.80017033176583
946.2-5.4796354310202911.6796354310203
955.75.170969642849820.529030357150184
963.10.9243947132669592.17560528673304
971.13.22217617686705-2.12217617686705
98-0.90.626064053175678-1.52606405317568
990.1-1.931943857176742.03194385717674
100-4-0.609061691802807-3.39093830819719
101-4-3.7668836166656-0.233116383334405
102-5.3-6.362847210694961.06284721069496
103-8-5.43241262096231-2.56758737903769
104-6.3-10.21657085156163.91657085156157
105-3.6-8.332433262132624.73243326213262
106-3.5-7.619409886476014.11940988647601
107-5.1-5.622542780410960.522542780410958
108-3.3-1.60974105661271-1.69025894338729


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
109-4.44284851504703-15.10263720203446.21694017194033
110-5.23428871886869-20.865935048825510.3973576110881
111-7.63572478088411-31.161994384752715.8905448229845
112-8.27753317344292-34.222225060648617.6671587137628
113-7.11374296291278-30.508512396536116.2810264707105
114-10.6058132489667-45.06804640919123.8564199112576
115-10.1003986641228-42.877358473036722.6765611447911
116-12.5753399888747-52.727186186491827.5765062087423
117-15.6150514136752-64.275388322672433.0452854953221
118-27.9316081905319-111.78341464953355.9201982684687
119-33.2535434044915-129.52215151478263.015064705799
120-8.326146148085-32.406543699000515.7542514028305
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t1305841740i1fq779vxsxyjz1/1elpw1305841967.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305841740i1fq779vxsxyjz1/1elpw1305841967.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305841740i1fq779vxsxyjz1/2lsjq1305841967.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305841740i1fq779vxsxyjz1/2lsjq1305841967.ps (open in new window)


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