Home » date » 2009 » Dec » 04 »

ws 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 08:14:43 -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/t125993972548a6kdg5gcbylmf.htm/, Retrieved Fri, 04 Dec 2009 16:15:29 +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/t125993972548a6kdg5gcbylmf.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 «
8.2 8 7.5 6.8 6.5 6.6 7.6 8 8.1 7.7 7.5 7.6 7.8 7.8 7.8 7.5 7.5 7.1 7.5 7.5 7.6 7.7 7.7 7.9 8.1 8.2 8.2 8.2 7.9 7.3 6.9 6.6 6.7 6.9 7 7.1 7.2 7.1 6.9 7 6.8 6.4 6.7 6.6 6.4 6.3 6.2 6.5 6.8 6.8 6.4 6.1 5.8 6.1 7.2 7.3 6.9 6.1 5.8 6.2 7.1 7.7 7.9 7.7 7.4 7.5 8 8.1
 
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
alpha1
beta0
gamma0.668258580403658


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
137.87.535619351761540.264380648238461
147.87.838265199013-0.0382651990129999
157.87.85558974755393-0.0555897475539346
167.57.53297162445567-0.0329716244556737
177.57.50408923805517-0.0040892380551707
187.17.092189306604490.00781069339551177
197.57.726775108697-0.226775108697007
207.57.93452869210363-0.434528692103629
217.67.60303279772518-0.00303279772517673
227.77.197400156712310.50259984328769
237.77.442276051241980.257723948758016
247.97.751277917586130.148722082413871
258.18.10295103420125-0.00295103420124754
268.28.139247195739680.0607528042603231
278.28.2577839329626-0.057783932962602
288.27.918644807158560.281355192841441
297.98.20332000728594-0.303320007285938
307.37.46981853034878-0.169818530348782
316.97.94407445538895-1.04407445538895
326.67.30083508308107-0.700835083081073
336.76.692291024161320.00770897583868368
346.96.346589778946860.553410221053142
3576.670333707871070.32966629212893
367.17.047742949375410.0522570506245881
377.27.2836842702277-0.0836842702276916
387.17.23630120555964-0.136301205559645
396.97.15174992308877-0.251749923088767
4076.665206963374180.334793036625819
416.87.00463868860462-0.204638688604619
426.46.43133816505198-0.0313381650519773
436.76.96622739527521-0.266227395275208
446.67.08960388007355-0.489603880073554
456.46.69229102416132-0.292291024161316
466.36.062986319691710.237013680308293
476.26.091376950342880.108623049657117
486.56.243702985706020.256297014293979
496.86.669234197247530.130765802752474
506.86.83499187659074-0.0349918765907411
516.46.85010428403227-0.450104284032268
526.16.18311548499557-0.0831154849955738
535.86.10562769959363-0.305627699593630
546.15.487265105691250.612734894308752
557.26.64027837523730.559721624762706
567.37.61768188759235-0.317681887592351
576.97.40064573693321-0.500645736933206
586.16.53565875178363-0.435658751783627
595.85.89839136450015-0.098391364500154
606.25.841683003871320.358316996128676
617.16.362009160757440.737990839242557
627.77.135973873317420.564026126682581
637.97.755041201201770.144958798798232
647.77.62938992013140.0706100798686062
657.47.70386945783539-0.303869457835389
667.56.997782000668420.502217999331584
6788.1613738020809-0.161373802080893
688.18.46260669962242-0.362606699622425


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
698.210193980101087.52583909608818.89454886411406
707.774243901956766.832496755036448.71599104887708
717.513916065813866.376326404845868.65150572678187
727.564254267983036.231754646100158.8967538898659
737.75911938496696.232538334448129.28570043548569
747.797250768546086.119730900543589.47477063654858
757.852825435291166.032558372548699.67309249803363
767.583905008846695.70012848487269.46768153282078
777.587902043595435.58561317003979.59019091715117
787.175175257825695.164801636911029.18554887874037
797.808452780761615.5194895974079710.0974159641153
808.26030295186008-49.091117114819765.6117230185399
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t125993972548a6kdg5gcbylmf/10tpr1259939682.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t125993972548a6kdg5gcbylmf/10tpr1259939682.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t125993972548a6kdg5gcbylmf/395my1259939682.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t125993972548a6kdg5gcbylmf/395my1259939682.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