Home » date » 2010 » Jan » 20 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 20 Jan 2010 12:35:56 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/20/t1264016196j9lj0w4ns7v79ib.htm/, Retrieved Wed, 20 Jan 2010 20:36:41 +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/2010/Jan/20/t1264016196j9lj0w4ns7v79ib.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 «
0,62 0,62 0,62 0,63 0,62 0,63 0,63 0,62 0,63 0,63 0,63 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,63 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,64 0,65 0,65 0,65 0,65 0,65 0,65 0,66 0,66 0,66 0,66 0,68 0,69 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,71 0,7 0,71 0,7 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,7 0,71 0,71 0,7 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,7 0,7 0,68 0,68 0,69 0,69 0,7 0,7 0,7 0,7 0,7 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,71 0,76 0,77 0,78 0,85 0,89 0,9 0,91 0,91 0,91 0,9 0,89 0,88 0,87 0,86 0,87 0,87 0,87 0,85
 
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.999923349407294
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
20.620.620
30.620.620
40.630.620.01
50.620.629999233494073-0.00999923349407295
60.630.6200007664471740.00999923355282606
70.630.6299992335528227.66447178390806e-07
80.620.629999999941251-0.00999999994125134
90.630.6200007665059230.0099992334940775
100.630.6299992335528267.66447173949913e-07
110.630.6299999999412515.87486725933672e-11
120.640.6299999999999950.0100000000000046
130.640.6399992334940737.66505927063399e-07
140.640.6399999999412475.87531134854657e-11
150.640.6399999999999954.55191440096314e-15
160.640.640
170.640.640
180.640.640
190.640.640
200.630.64-0.01
210.640.6300007665059270.00999923349407295
220.640.6399992335528267.66447173949913e-07
230.640.6399999999412515.87486725933672e-11
240.640.6399999999999954.55191440096314e-15
250.640.640
260.640.640
270.640.640
280.640.640
290.640.640
300.640.640
310.640.640
320.640.640
330.650.640.01
340.650.6499992334940737.66505927063399e-07
350.650.6499999999412475.87531134854657e-11
360.650.6499999999999954.55191440096314e-15
370.650.650
380.650.650
390.660.650.01
400.660.6599992334940737.66505927063399e-07
410.660.6599999999412475.87531134854657e-11
420.660.6599999999999954.55191440096314e-15
430.680.660.02
440.690.6799984669881460.0100015330118540
450.70.6899992333765670.0100007666234333
460.70.6999992334353117.66564689169691e-07
470.70.6999999999412425.87576653998667e-11
480.70.6999999999999954.55191440096314e-15
490.70.70
500.70.70
510.70.70
520.70.70
530.70.70
540.710.70.01
550.70.709999233494073-0.00999923349407295
560.710.7000007664471740.00999923355282606
570.70.709999233552822-0.00999923355282162
580.710.7000007664471780.00999923355282162
590.710.7099992335528227.66447178390806e-07
600.710.7099999999412515.87486725933672e-11
610.710.7099999999999954.55191440096314e-15
620.710.710
630.710.710
640.710.710
650.710.710
660.710.710
670.710.710
680.710.710
690.710.710
700.710.710
710.70.71-0.01
720.70.700000766505927-7.66505927063399e-07
730.70.700000000058753-5.87531134854657e-11
740.70.700000000000005-4.55191440096314e-15
750.70.70
760.70.70
770.70.70
780.70.70
790.70.70
800.710.70.01
810.710.7099992334940737.66505927063399e-07
820.70.709999999941247-0.0099999999412469
830.710.7000007665059220.0099992334940775
840.710.7099992335528267.66447173949913e-07
850.710.7099999999412515.87486725933672e-11
860.710.7099999999999954.55191440096314e-15
870.710.710
880.710.710
890.710.710
900.710.710
910.710.710
920.710.710
930.710.710
940.710.710
950.70.71-0.01
960.70.700000766505927-7.66505927063399e-07
970.680.700000000058753-0.020000000058753
980.680.680001533011859-1.53301185867871e-06
990.690.6800000001175060.00999999988249367
1000.690.6899992334940827.66505918070592e-07
1010.70.6899999999412470.0100000000587531
1020.70.6999992334940687.66505931615313e-07
1030.70.6999999999412475.87531134854657e-11
1040.70.6999999999999954.55191440096314e-15
1050.70.70
1060.710.70.01
1070.710.7099992334940737.66505927063399e-07
1080.710.7099999999412475.87531134854657e-11
1090.710.7099999999999954.55191440096314e-15
1100.710.710
1110.710.710
1120.710.710
1130.710.710
1140.710.710
1150.760.710.05
1160.770.7599961674703650.0100038325296353
1170.780.7699992332003070.0100007667996928
1180.850.7799992334352970.0700007665647027
1190.890.8499946343997530.0400053656002471
1200.90.8899969335650150.0100030664349847
1210.910.8999992332590290.0100007667409712
1220.910.9099992334353027.66564698162497e-07
1230.910.9099999999412425.87576653998667e-11
1240.90.909999999999995-0.00999999999999546
1250.890.900000766505927-0.0100007665059271
1260.880.89000076656468-0.0100007665646802
1270.870.880000766564685-0.0100007665646847
1280.860.870000766564685-0.0100007665646847
1290.870.8600007665646850.00999923343531528
1300.870.869999233552837.66447169397999e-07
1310.870.8699999999412515.87486725933672e-11
1320.850.869999999999995-0.0199999999999955


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1330.8500015330118540.8301794368590450.869823629164664
1340.8500015330118540.821969930137960.878033135885747
1350.8500015330118540.8156704097638720.884332656259836
1360.8500015330118540.8103596197475250.889643446276183
1370.8500015330118540.8056806964781760.894322369545532
1380.8500015330118540.801450613197360.898552452826348
1390.8500015330118540.797560641728220.902442424295488
1400.8500015330118540.7939399388282210.906063127195487
1410.8500015330118540.7905392962039540.909463769819754
1420.8500015330118540.7873228853717910.912680180651917
1430.8500015330118540.784263658587930.915739407435778
1440.8500015330118540.781340602363020.918662463660689
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264016196j9lj0w4ns7v79ib/1buix1264016154.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264016196j9lj0w4ns7v79ib/1buix1264016154.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/20/t1264016196j9lj0w4ns7v79ib/2mpzw1264016154.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264016196j9lj0w4ns7v79ib/2mpzw1264016154.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/20/t1264016196j9lj0w4ns7v79ib/3oegg1264016154.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264016196j9lj0w4ns7v79ib/3oegg1264016154.ps (open in new window)


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