Home » date » 2009 » Dec » 03 »

*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: Thu, 03 Dec 2009 13:15:03 -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/03/t1259871436hmutih0prbl6nf8.htm/, Retrieved Thu, 03 Dec 2009 21:17:19 +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/03/t1259871436hmutih0prbl6nf8.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 «
1915 1843 1761 2858 3968 5061 4661 4269 3857 3568 3274 2987 1683 1381 1071 2772 4485 6181 5479 4782 4067 3489 2903 2330 1736 1483 1242 2334 3423 4523 3986 3462 2908 2575 2237 1904 1610 1251 941 2450 3946 5409 4741 4069 3539 3189 2960 2704 1697 1598 1456 2316 3083 4158 3469 2892 2578 2233 1947 2049
 
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
alpha0.828031507927449
beta0.0238508238386854
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1316831608.8268856885674.173114311443
1413811357.9136980367123.0863019632907
1510711066.288485842844.71151415715826
1627722785.53972128617-13.5397212861740
1744854545.20556285968-60.2055628596772
1861816316.13672702229-135.136727022292
1954794832.39132443641646.60867556359
2047825000.19699281017-218.196992810166
2140674452.10689138544-385.106891385442
2234893886.04616744914-397.046167449143
2329033260.85490757784-357.854907577836
2423302655.72885525292-325.728855252919
2517361322.58623241317413.41376758683
2614831344.55721732629138.442782673713
2712421126.73212815318115.267871846817
2823343177.97827150418-843.97827150418
2934234040.06744600806-617.067446008059
3045234918.78016910112-395.780169101118
3139863634.74365214425351.256347855753
3234623527.23052753161-65.2305275316098
3329083158.16172619785-250.161726197848
3425752744.05834623958-169.058346239581
3522372365.38877749005-128.388777490051
3619042004.33273938258-100.332739382581
3716101130.67522592317479.32477407683
3812511198.9032983611952.0967016388136
39941955.488148912645-14.4881489126451
4024502261.01843060231188.981569397691
4139464061.70666127552-115.706661275522
4254095632.51938345435-223.519383454351
4347414463.70607781966277.293922180342
4440694153.60882164347-84.608821643471
4535393683.19537392962-144.195373929622
4631893339.77686084301-150.776860843009
4729602938.6695733070121.3304266929872
4827042641.6066929309262.3933070690814
4916971699.11320866254-2.11320866254096
5015981273.45633975121324.543660248789
5114561178.62199538218277.378004617822
5223163451.24944071099-1135.24944071099
5330834139.73061534856-1056.73061534856
5441584601.15720943110-443.157209431104
5534693504.3834670024-35.3834670024021
5628923008.05001865794-116.050018657943
5725782593.80801454288-15.8080145428780
5822332395.13960123425-162.139601234248
5919472066.11658394733-119.116583947327
6020491742.94071949305306.059280506953


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
611244.68194867836561.9716036041061927.39229375260
62960.496174209674143.3898290122121777.60251940714
63724.153742216713-158.878650047491607.18613448091
641560.72603964466-331.2759126242123452.72799191354
652611.86068960467-649.3298436878435873.05122289719
663815.91764761312-1095.807103599848727.64239882609
673207.60637079217-1076.645516859017491.85825844334
682760.52415725046-1072.732125232636593.78043973356
692473.99289193048-1101.448683627146049.4344674881
702271.16634397577-1147.360788084215689.69347603576
712084.18226056431-1186.621904411565354.98642554018
721922.31883787362-1151.610368063634996.24804381086
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259871436hmutih0prbl6nf8/1n5r81259871301.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259871436hmutih0prbl6nf8/1n5r81259871301.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259871436hmutih0prbl6nf8/200tf1259871301.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259871436hmutih0prbl6nf8/200tf1259871301.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259871436hmutih0prbl6nf8/3ug091259871301.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259871436hmutih0prbl6nf8/3ug091259871301.ps (open in new window)


 
Parameters (Session):
par1 = FALSE ; par2 = 0.5 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 2 ; par9 = 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