Home » date » 2010 » Jun » 06 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 06 Jun 2010 19:56:30 +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/06/t1275854414ezahivfj1emsdgq.htm/, Retrieved Sun, 06 Jun 2010 22:00:14 +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/06/t1275854414ezahivfj1emsdgq.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 «
2 2.4 1.5 1.2 1.5 0.6 2.7 3.7 4.9 6.6 7.4 7.2 5.3 4.7 6.1 6.6 7 7.5 6.6 7.8 4.7 5.4 4.3 4.5 5.8 4.6 5.2 3.6 4.8 6.7 6.3 4.8 8.7 6.8 7.4 9 7.9 9.1 8.7 9.8 6.4 6.1 4.7 4.8 4.2 2.8 6.1 5.8 4.9 4.6 4.1 3.6 5.9 4.5 4.8 5.7 5 7 4.6 2.6 5 4.1 3.2 0 2.3 3.8 4.5 5.9 5 4.2 4.5 6
 
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
alpha0.52534352356398
beta0
gamma0.582031924980555


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
135.32.433207070707072.86679292929293
144.73.005924836176791.69407516382321
156.15.13339625192190.966603748078098
166.66.199528604160730.400471395839267
1776.989080325004180.0109196749958151
187.57.73648357220933-0.236483572209326
196.65.187248459119881.41275154088012
207.86.696094998192951.10390500180705
214.78.18852434152217-3.48852434152217
225.47.63918400524153-2.23918400524153
234.36.80867652335317-2.50867652335317
244.54.77409289242592-0.274092892425916
255.83.072095153536632.72790484646337
264.63.247867829568011.35213217043199
275.24.99472665563950.205273344360502
283.65.50449633063275-1.90449633063275
294.84.97552859144418-0.175528591444176
306.75.556633536213331.14336646378667
316.34.187920008800732.11207999119927
324.85.97883066220063-1.17883066220063
338.75.003311093237013.69668890676299
346.88.57382528858044-1.77382528858044
357.47.9133395840961-0.513339584096101
3697.544331035940881.45566896405912
377.97.580400059496760.319599940503242
389.16.11090720570752.98909279429250
398.78.400895484880990.299104515119012
409.88.377102768665541.42289723133446
416.410.0738133450862-3.67381334508625
426.19.18148188707782-3.08148188707782
434.75.86089349886677-1.16089349886677
444.85.02320456196742-0.223204561967418
454.25.8966534751326-1.69665347513261
462.85.12249735740854-2.32249735740854
476.14.521998698844961.57800130115504
485.85.795631125344860.00436887465514246
494.94.755412684406850.144587315593146
504.63.931466119286040.668533880713963
514.14.2592135911977-0.159213591197697
523.64.30511127109319-0.70511127109319
535.93.475842480320912.42415751967909
544.55.95068110514855-1.45068110514855
554.84.017415124701590.782584875298406
565.74.45977080781791.24022919218210
5755.69496247378058-0.69496247378058
5875.27413933672641.7258606632736
594.67.8779914758853-3.27799147588531
602.66.16581963376298-3.56581963376298
6153.288763260835191.71123673916481
624.13.432594038570890.667405961429107
633.23.53107112573691-0.331071125736907
6403.33587201878725-3.33587201878725
652.31.989058246490060.310941753509940
663.82.283249499112761.51675050088724
674.52.525878217917761.97412178208224
685.93.72063130721462.17936869278540
6954.914567671007880.0854323289921188
704.25.5725091324515-1.3725091324515
714.55.16626244031471-0.666262440314706
7264.746628622202441.25337137779756


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
735.859170190001512.322222302425319.3961180775777
744.81563968727610.8203195450737968.8109598294784
754.28765488018601-0.1186094920396488.69391925241167
763.43625985714-1.345763605496188.21828331977618
774.84941266424374-0.2809217377675619.97974706625504
785.31337570256353-0.14308045099606810.7698318561231
794.88554514771385-0.87861102947081610.6497013248985
805.09990872755792-0.95633425916526711.1561517142811
814.57044606730768-1.7644305529187610.9053226875341
824.78072768550555-1.8210330245436511.3824883955548
835.29063117680796-1.5676358894418612.1488982430578
845.75134208094253-1.354177592611612.8568617544967
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854414ezahivfj1emsdgq/1m13f1275854186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854414ezahivfj1emsdgq/1m13f1275854186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854414ezahivfj1emsdgq/2fa201275854186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275854414ezahivfj1emsdgq/2fa201275854186.ps (open in new window)


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