Home » date » 2010 » Jun » 02 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 02 Jun 2010 21:01:19 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jun/02/t1275512719nv6bzfqlpcs1z30.htm/, Retrieved Wed, 02 Jun 2010 23:05:20 +0200
 
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/Jun/02/t1275512719nv6bzfqlpcs1z30.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 «
225 243 270 289 273 274 220 271 288 276 266 239 201 242 239 273 280 294 212 264 272 262 238 227 250 245 270 288 298 281 218 284 281 277 276 222 255 267 261 263 264 278 248 320 305 301 274 220 235 252 272 280 305 299 246 307 325 302 274 251 272 253 292 288 258 295 231 250 268
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.34126575693962
beta0
gamma0.660091540095026


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13201201.63706732081-0.637067320809876
14242242.488883213482-0.488883213482097
15239239.61359667665-0.613596676650189
16273274.115023149593-1.11502314959273
17280281.985390904853-1.98539090485286
18294296.581420610356-2.58142061035574
19212212.790148615504-0.790148615504137
20264262.1658222915841.83417770841567
21272280.002229273858-8.00222927385767
22262267.057972290363-5.05797229036318
23238255.423546961307-17.4235469613072
24227222.5722185024824.42778149751754
25250187.32721121270262.6727887872979
26245251.420246684895-6.4202466848952
27270246.40276364184223.5972363581584
28288291.201448650303-3.20144865030318
29298298.508750191992-0.508750191991851
30281314.351749950383-33.3517499503829
31218218.513780594727-0.513780594726995
32284270.61736009839113.3826399016089
33281288.682131665687-7.68213166568745
34277276.7429617462950.257038253705332
35276260.59365149915615.4063485008438
36222246.770044116115-24.7700441161146
37255223.35098868510931.6490113148906
38267246.68692559233920.3130744076611
39261263.826998694924-2.8269986949245
40263287.769491070318-24.7694910703182
41264288.552323159868-24.5523231598683
42278281.249581308694-3.24958130869396
43248211.97317424998936.0268257500108
44320284.1546730565535.8453269434504
45305300.9693370560634.03066294393693
46301296.1201349374814.8798650625194
47274287.31717017368-13.3171701736804
48220244.475945031834-24.475945031834
49235245.414214163067-10.4142141630666
50252249.0298595453492.97014045465119
51272250.14885813605721.8511418639427
52280272.4044068545537.59559314544714
53305284.24035776522220.7596422347779
54299302.553013704055-3.55301370405482
55246245.2252556490560.774744350943848
56307306.041151631790.958848368209772
57325297.2621720713527.7378279286503
58302300.8160470467771.18395295322267
59274282.668197088828-8.66819708882787
60251235.7616286325315.2383713674699
61272257.39458906686614.6054109331338
62253276.799370819002-23.7993708190017
63292277.3170862861114.6829137138899
64288291.422901204502-3.42290120450195
65258305.667026345426-47.6670263454264
66295290.0005045364844.9994954635165
67231238.92048890566-7.92048890565954
68250294.450211543451-44.4502115434515
69268281.186686679723-13.1866866797228


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
70261.441490444896232.052786489386290.830194400405
71241.534605288313209.801421745394273.267788831233
72211.969218632856178.743330365976245.195106899736
73225.611899135989189.176350181303262.047448090675
74223.339726755872184.800981073848261.878472437896
75245.088421844246202.445563513779287.731280174714
76246.020424798304201.298196593896290.742653002711
77241.671118341207195.538420324883287.80381635753
78262.727368689373212.084006447435313.370730931311
79210.418487076428164.937932987881255.899041164974
80247.6861486502195.009494059684300.362803240716
81262.331946860743192.501922094577332.161971626909
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275512719nv6bzfqlpcs1z30/1j6wp1275512475.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275512719nv6bzfqlpcs1z30/1j6wp1275512475.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t1275512719nv6bzfqlpcs1z30/2uxea1275512475.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275512719nv6bzfqlpcs1z30/2uxea1275512475.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t1275512719nv6bzfqlpcs1z30/3uxea1275512475.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275512719nv6bzfqlpcs1z30/3uxea1275512475.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