Home » date » 2009 » Jun » 04 »

Mattias Dierckx Opg 10 Exponential smoothing Biefstuk

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 04 Jun 2009 13:44:00 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/04/t1244144855qecivcinlfh1b0x.htm/, Retrieved Thu, 04 Jun 2009 21:47:35 +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/2009/Jun/04/t1244144855qecivcinlfh1b0x.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 «
9,3700 9,3300 9,3100 9,2600 9,3500 9,3800 9,4300 9,2700 9,2900 9,2700 9,2900 9,3100 9,3300 9,3500 9,3400 9,4700 9,6300 9,6200 9,6300 9,5000 9,5500 9,5800 9,6100 9,5700 9,6100 9,6500 9,6200 9,6500 9,9600 10,0300 10,0300 9,7200 9,7500 9,7700 9,7800 9,8200 9,8400 9,9000 9,9400 10,1200 10,5200 10,5700 10,5700 10,1200 10,0500 10,1400 10,1700 10,2000 10,2000 10,3500 10,4300 10,5700 10,8200 10,9000 10,8300 10,6500 10,5700 10,6100 10,6300 10,6100 10,7200 10,7700 10,7900 10,9200 10,9000 11,0000 10,9900 10,9100 10,8800 10,8700 11,0000 10,9900 11,0300 11,0400 10,9900
 
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
alpha1
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
39.319.33-0.0199999999999996
49.269.31-0.0500000000000007
59.359.260.0899999999999999
69.389.350.0300000000000011
79.439.380.0499999999999989
89.279.43-0.16
99.299.270.0199999999999996
109.279.29-0.0199999999999996
119.299.270.0199999999999996
129.319.290.0200000000000014
139.339.310.0199999999999996
149.359.330.0199999999999996
159.349.35-0.00999999999999979
169.479.340.130000000000001
179.639.470.16
189.629.63-0.0100000000000016
199.639.620.0100000000000016
209.59.63-0.130000000000001
219.559.50.0500000000000007
229.589.550.0299999999999994
239.619.580.0299999999999994
249.579.61-0.0399999999999991
259.619.570.0399999999999991
269.659.610.0400000000000009
279.629.65-0.0300000000000011
289.659.620.0300000000000011
299.969.650.310000000000000
3010.039.960.0699999999999985
3110.0310.030
329.7210.03-0.309999999999999
339.759.720.0299999999999994
349.779.750.0199999999999996
359.789.770.00999999999999979
369.829.780.0400000000000009
379.849.820.0199999999999996
389.99.840.0600000000000005
399.949.90.0399999999999991
4010.129.940.180000000000000
4110.5210.120.4
4210.5710.520.0500000000000007
4310.5710.570
4410.1210.57-0.450000000000001
4510.0510.12-0.0699999999999985
4610.1410.050.0899999999999999
4710.1710.140.0299999999999994
4810.210.170.0299999999999994
4910.210.20
5010.3510.20.150000000000000
5110.4310.350.08
5210.5710.430.140000000000001
5310.8210.570.25
5410.910.820.08
5510.8310.9-0.0700000000000003
5610.6510.83-0.180000000000000
5710.5710.65-0.08
5810.6110.570.0399999999999991
5910.6310.610.0200000000000014
6010.6110.63-0.0200000000000014
6110.7210.610.110000000000001
6210.7710.720.0499999999999989
6310.7910.770.0199999999999996
6410.9210.790.130000000000001
6510.910.92-0.0199999999999996
661110.90.0999999999999996
6710.9911-0.00999999999999979
6810.9110.99-0.08
6910.8810.91-0.0299999999999994
7010.8710.88-0.0100000000000016
711110.870.130000000000001
7210.9911-0.00999999999999979
7311.0310.990.0399999999999991
7411.0411.030.00999999999999979
7510.9911.04-0.0499999999999989


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7610.9910.767528492198011.2124715078020
7710.9910.675377776424811.3046222235752
7810.9910.604668045250511.3753319547495
7910.9910.545056984396011.4349430156040
8010.9910.492538585497911.4874614145021
8110.9910.445058323577511.5349416764225
8210.9910.401395716558411.5786042834416
8310.9910.360755552849711.6192444471503
8410.9910.322585476594111.6574145234059
8510.9910.286483320853811.6935166791462
8610.9910.252145482076211.7278545179238
8710.9910.219336090501011.7606639094990
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244144855qecivcinlfh1b0x/1qwqx1244144634.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244144855qecivcinlfh1b0x/1qwqx1244144634.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244144855qecivcinlfh1b0x/2ppvp1244144634.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244144855qecivcinlfh1b0x/2ppvp1244144634.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244144855qecivcinlfh1b0x/3ztc21244144634.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244144855qecivcinlfh1b0x/3ztc21244144634.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Double ; 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=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