Home » date » 2010 » Jun » 05 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 05 Jun 2010 14:15:29 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jun/05/t1275747391eydbtrbylcywrg7.htm/, Retrieved Sat, 05 Jun 2010 16:16:31 +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/2010/Jun/05/t1275747391eydbtrbylcywrg7.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 «
1664.81 2397.53 2840.71 3547.29 3752.96 3714.74 4349.61 3566.34 5021.82 6423.48 7600.60 19756.21 2499.81 5198.24 7225.14 4806.03 5900.88 4951.34 6179.12 4752.15 5496.43 5835.10 12600.08 28541.72 4717.02 5702.63 9957.58 5304.78 6492.43 6630.80 7349.62 8176.62 8573.17 9690.50 15151.84 34061.01 5921.10 5814.58 12421.25 6369.77 7609.12 7224.75 8121.22 7979.25 8093.06 8476.70 17914.66 30114.41 4826.64 6470.23 9638.77 8821.17 8722.37 10209.48 11276.55 12552.22 11637.39 13606.89 21822.11 45060.69 7615.03 9849.69 14558.40 11587.33 9332.56 13082.09 16732.78 19888.61 23933.38 25391.35 36024.80 80721.71 10243.24 11266.88 21826.84 17357.33 15997.79 18601.53 26155.15 28586.52 30505.41 30821.33 46634.38 104660.67
 
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
alpha0.0218820013470966
beta1
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
132499.811442.110657051281057.69934294872
145198.244216.98507326975981.254926730251
157225.146396.58272096476828.557279035236
164806.034218.88411335655587.145886643452
175900.885374.17461841729526.705381582714
184951.344104.69918213418846.64081786582
196179.125827.90910234919351.210897650813
204752.155169.9615550515-417.811555051501
215496.436576.9007877307-1080.47078773070
225835.17956.12559695512-2121.02559695512
2312600.089134.816616139243465.26338386076
2428541.7221490.98621636057050.73378363948
254717.025715.70909868618-998.689098686176
265702.638590.06100855337-2887.43100855337
279957.5810670.2402046897-712.660204689728
285304.788323.55537984434-3018.77537984434
296492.439362.785924832-2870.355924832
306630.88279.53885680331-1648.73885680331
317349.629356.58031188177-2006.96031188177
328176.627736.25940935995440.360590640047
338573.178374.01962039411199.150379605891
349690.58651.66176311011038.83823688991
3515151.8415320.8929183157-169.052918315658
3634061.0130982.36961529793078.64038470207
375921.17037.79247075986-1116.69247075986
385814.587850.47035009641-2035.89035009641
3912421.2511883.4194163748537.830583625248
406369.777142.76230407558-772.992304075576
417609.128259.76627715667-650.64627715667
427224.758352.00768933597-1127.25768933597
438121.229033.51954392351-912.299543923514
447979.259798.31620205185-1819.06620205185
458093.0610068.6583729870-1975.59837298696
468476.710990.3934007887-2513.69340078874
4717914.6616193.05840627141721.60159372864
4830114.4134906.5354178772-4792.12541787723
494826.646347.97321754052-1521.33321754052
506470.235905.6320364054564.597963594599
519638.7712222.7109280304-2583.94092803038
528821.175773.116307158543048.05369284146
538722.376818.525957893461903.84404210654
5410209.486281.504583680253927.97541631975
5511276.557175.530158124634101.01984187537
5612552.227164.445621710285387.77437828972
5711637.397598.423182257734038.96681774227
5813606.898416.101453677285190.78854632272
5921822.1118389.21664328323432.89335671677
6045060.6931265.635439887713795.0545601123
617615.037216.43227988702398.597720112984
629849.699801.8154157156347.8745842843691
6314558.413962.0634179994596.336582000629
6411587.3314094.5243893338-2507.19438933385
659332.5614781.3515428740-5448.79154287396
6613082.0916784.5382363052-3702.4482363052
6716732.7818235.1429173245-1502.3629173245
6819888.6119791.719874673196.890125326856
6923933.3819106.53116176164826.84883823835
7025391.3521401.20968259523990.14031740477
7136024.829935.49302519326089.30697480676
7280721.7153370.453156374327351.2568436257
7310243.2417176.2054264752-6932.96542647522
7411266.8819759.3155481584-8492.43554815835
7521826.8424583.4708185425-2756.63081854247
7617357.3321847.8988074668-4490.56880746677
7715997.7919811.6525941686-3813.86259416864
7818601.5323792.0760980126-5190.54609801263
7926155.1527562.8301822428-1407.68018224283
8028586.5230888.5779340407-2302.05793404075
8130505.4134927.7001630747-4422.29016307467
8230821.3336149.5466525105-5328.21665251051
8346634.3846277.2113898907357.168610109307
84104660.6790002.059060156814658.6109398432


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8519336.93781388139416.5729263925529257.3027013701
8620038.998309378610109.137788858529968.8588298986
8730337.699404160620386.506838285740288.8919700354
8825705.193131636815716.189412177535694.1968510962
8924266.111805536314218.313008896234313.9106021764
9026903.890016144716772.025688079337035.75434421
9134522.351086397224277.172569207444767.5296035869
9237068.935791463426677.615849026747460.2557339002
9339199.809055835328626.424456694649773.193654976
9439844.304364175129050.383701000650638.2250273495
9555978.114108507344923.225616134867033.0026008798
96114004.404108507102646.753999570125362.054217444
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275747391eydbtrbylcywrg7/1j0cd1275747324.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275747391eydbtrbylcywrg7/1j0cd1275747324.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/05/t1275747391eydbtrbylcywrg7/2urby1275747324.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275747391eydbtrbylcywrg7/2urby1275747324.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/05/t1275747391eydbtrbylcywrg7/3urby1275747324.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275747391eydbtrbylcywrg7/3urby1275747324.ps (open in new window)


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