Home » date » 2009 » Dec » 21 »

Paper

*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: Mon, 21 Dec 2009 15:02:05 -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/21/t126143298259mzyyp9z5zyu76.htm/, Retrieved Mon, 21 Dec 2009 23:03:07 +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/21/t126143298259mzyyp9z5zyu76.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 «
25.6 23.7 22 21.3 20.7 20.4 20.3 20.4 19.8 19.5 23.1 23.5 23.5 22.9 21.9 21.5 20.5 20.2 19.4 19.2 18.8 18.8 22.6 23.3 23 21.4 19.9 18.8 18.6 18.4 18.6 19.9 19.2 18.4 21.1 20.5 19.1 18.1 17 17.1 17.4 16.8 15.3 14.3 13.4 15.3 22.1 23.7 22.2 19.5 16.6 17.3 19.8 21.2 21.5 20.6 19.1 19.6 23.5 24
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1323.523.6301148459851-0.130114845985076
1422.922.9437996857881-0.0437996857881267
1521.921.9463706339436-0.0463706339436101
1621.521.5244856179741-0.0244856179740971
1720.520.5031491944293-0.00314919442930162
1820.220.18312323563790.0168767643621131
1919.419.7431788967428-0.343178896742813
2019.219.5608170367688-0.360817036768811
2118.818.62470765819150.175292341808486
2218.818.4690453485850.330954651414999
2322.622.22041171078940.379588289210556
2423.322.95795082530390.342049174696136
252323.2985525957402-0.298552595740205
2621.422.4545640949381-1.05456409493806
2719.920.5056726303232-0.605672630323188
2818.819.554435563383-0.754435563382998
2918.617.92262645556440.677373544435621
3018.418.30833504565070.0916649543492731
3118.617.97997047946910.620029520530938
3219.918.75235437239001.14764562760995
3319.219.3053074364747-0.105307436474696
3418.418.8629082197206-0.4629082197206
3521.121.7465655569433-0.646565556943287
3620.521.4307901943330-0.930790194332968
3719.120.4925522061045-1.39255220610451
3818.118.6385264863076-0.538526486307553
391717.3361370223583-0.336137022358262
4017.116.69786298422590.402137015774091
4117.416.29785287924201.10214712075797
4216.817.1242582940799-0.324258294079879
4315.316.4126741085591-1.11267410855907
4414.315.4174458818276-1.11744588182761
4513.413.8605092102093-0.460509210209255
4615.313.15189658825442.14810341174558
4722.118.07425786463564.0257421353644
4823.722.44889728164691.25110271835310
4922.223.6994097942596-1.49940979425959
5019.521.6717871495780-2.17178714957796
5116.618.680788492404-2.08078849240398
5217.316.30385297330770.996147026692313
5319.816.48900271175053.31099728824946
5421.219.49241179722161.70758820277844
5521.520.72273912856160.777260871438443
5620.621.6830315307631-1.08303153076309
5719.119.9859072147579-0.885907214757875
5819.618.76444250193670.835557498063299
5923.523.16810401848180.331895981518244
602423.87424720388640.125752796113602


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
6124.000052693149121.697520001019726.3025853852786
6223.433086835366120.211675025328026.6544986454041
6322.458382060255818.601592037690526.315172082821
6422.074505922118917.632173040710926.5168388035268
6521.052232748370216.22231554150825.8821499552324
6620.728028201305515.435130508192926.0209258944181
6720.260414324020514.587417208953025.9334114390881
6820.430333107852914.252223608077026.6084426076288
6919.82094257307613.387877050054626.2540080960975
7019.474323781325712.734455393048226.2141921696032
7123.019226036359914.709693167847431.3287589048724
7223.3847678241084-30.821838726567377.5913743747842
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/21/t126143298259mzyyp9z5zyu76/1v9lk1261432923.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/21/t126143298259mzyyp9z5zyu76/1v9lk1261432923.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/21/t126143298259mzyyp9z5zyu76/24zyi1261432923.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/21/t126143298259mzyyp9z5zyu76/24zyi1261432923.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/21/t126143298259mzyyp9z5zyu76/3hbvu1261432923.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/21/t126143298259mzyyp9z5zyu76/3hbvu1261432923.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = 2 ; par3 = 1 ; par4 = 1 ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ; par4 = 1 ;
 
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