Home » date » 2009 » Dec » 04 »

workshop 9

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 04 Dec 2009 04:59:12 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928012wvemfjci7ka8nbb.htm/, Retrieved Fri, 04 Dec 2009 13:00:16 +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/2009/Dec/04/t1259928012wvemfjci7ka8nbb.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
0.6348 0.634 0.62915 0.62168 0.61328 0.6089 0.60857 0.62672 0.62291 0.62393 0.61838 0.62012 0.61659 0.6116 0.61573 0.61407 0.62823 0.64405 0.6387 0.63633 0.63059 0.62994 0.63709 0.64217 0.65711 0.66977 0.68255 0.68902 0.71322 0.70224 0.70045 0.69919 0.69693 0.69763 0.69278 0.70196 0.69215 0.6769 0.67124 0.66532 0.67157 0.66428 0.66576 0.66942 0.6813 0.69144 0.69862 0.695 0.69867 0.68968 0.69233 0.68293 0.68399 0.66895 0.68756 0.68527 0.6776 0.68137 0.67933 0.67922
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.66962132181715
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
130.616590.6124975009721890.00409249902781061
140.61160.6094778529537740.00212214704622571
150.615730.6151582273487060.000571772651294267
160.614070.614161909656626-9.1909656625977e-05
170.628230.62808601512280.000143984877200243
180.644050.6431368538542590.00091314614574145
190.63870.6157118160601380.0229881839398619
200.636330.652568374770993-0.0162383747709927
210.630590.640196745644255-0.00960674564425479
220.629940.636568216833885-0.00662821683388526
230.637090.6270535176546550.0100364823453450
240.642170.6342721909358440.0078978090641565
250.657110.6353811248611230.021728875138877
260.669770.6431264109400540.026643589059946
270.682550.6649488831037420.0176011168962579
280.689020.6748948689523470.0141251310476532
290.713220.6999283214535810.0132916785464188
300.702240.725875451407125-0.0236354514071250
310.700450.6868884376184670.0135615623815333
320.699190.70505955943636-0.00586955943635947
330.696930.701769731679134-0.00483973167913399
340.697630.702615579996933-0.00498557999693339
350.692780.699619890729639-0.00683989072963931
360.701960.6947104784078690.00724952159213132
370.692150.699737775508837-0.00758777550883682
380.67690.688879878046408-0.0119798780464085
390.671240.681751226894113-0.0105112268941132
400.665320.671704469979952-0.00638446997995168
410.671570.682223139164555-0.0106531391645552
420.664280.679558931514768-0.0152789315147677
430.665760.6589505191081310.00680948089186895
440.669420.6660746952025170.00334530479748285
450.68130.6692829778789840.0120170221210159
460.691440.681271253541480.0101687464585204
470.698620.6878113604641390.0108086395358614
480.6950.699369288308636-0.00436928830863603
490.698670.6917401560229610.00692984397703855
500.689680.6890562416716740.000623758328326174
510.692330.6908254459327940.00150455406720562
520.682930.690097840493339-0.00716784049333918
530.683990.69901943908038-0.0150294390803799
540.668950.691871173926501-0.0229211739265007
550.687560.6733545980810970.0142054019189030
560.685270.6842974029987450.000972597001255071
570.67760.688802500116735-0.0112025001167348
580.681370.684598615739255-0.00322861573925481
590.679330.682354259245283-0.00302425924528293
600.679220.679669736423884-0.000449736423883906


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
610.6784244413199210.6558436308190110.701005251820831
620.6693137700754710.6422607946432020.69636674550774
630.6709321018889880.6399234802470970.70194072353088
640.6664839277424070.6321403050019610.700827550482853
650.6772898340375420.639406541379350.715173126695734
660.6774335461866460.6366737221857490.718193370187543
670.6865695388293880.6427071266353860.73043195102339
680.6836334348937610.637433444366890.729833425420631
690.6834266628907440.6348745145094010.731978811272087
700.6893987928348970.6382411943776640.740556391292131
710.6893705614648640.6360816824161990.742659440513529
720.689551747635884-25.947317825718627.3264213209903
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928012wvemfjci7ka8nbb/11h531259927949.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928012wvemfjci7ka8nbb/11h531259927949.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928012wvemfjci7ka8nbb/2g9gm1259927949.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928012wvemfjci7ka8nbb/2g9gm1259927949.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928012wvemfjci7ka8nbb/3jieo1259927949.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928012wvemfjci7ka8nbb/3jieo1259927949.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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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