Home » date » 2009 » Dec » 11 »

Exponential Smoothing

*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: Fri, 11 Dec 2009 09:49:18 -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/11/t1260550211zefiqg59ixvp6oy.htm/, Retrieved Fri, 11 Dec 2009 17:50:15 +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/11/t1260550211zefiqg59ixvp6oy.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 «
21790 13253 37702 30364 32609 30212 29965 28352 25814 22414 20506 28806 22228 13971 36845 35338 35022 34777 26887 23970 22780 17351 21382 24561 17409 11514 31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698 31956 29506 34506 27165 26736 23691 18157 17328 18205 20995 17382 9367 31124 26551 30651 25859 25100 25778 20418 18688 20424 24776 19814 12738 31566 30111 30019 31934 25826 26835 20205 17789 20520 22518 15572 11509 25447 24090 27786 26195 20516 22759 19028 16971 20036 22485 18730
 
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.230182393893731
beta0
gamma0.28444699539051


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
132222821149.82959750331078.17040249674
141397113588.7596295972382.240370402844
153684536445.3424185781399.657581421903
163533835450.8049382778-112.804938277804
173502235304.5430264437-282.543026443716
183477735144.8728998077-367.872899807655
192688729732.5753717209-2845.57537172092
202397027435.850287071-3465.85028707102
212278024233.9575488456-1453.95754884561
221735120598.4935099989-3247.49350999893
232138217937.48479894493444.51520105514
242456126008.0581728100-1447.05817281004
251740919964.8424926678-2555.84249266784
261151412243.8474802573-729.847480257307
273151432055.8959657687-541.895965768697
282707130881.6624255383-3810.66242553825
292946229865.7841584855-403.784158485501
302610529671.5674365729-3566.56743657292
312239723992.4787650306-1595.47876503061
322384322126.00732408521716.99267591479
332170520805.3919757416899.60802425836
341808917695.1369369274393.863063072622
352076417338.28043804363425.71956195636
362531623895.22882828541420.77117171457
371770418518.8460800047-814.846080004656
381554811769.68596066573778.31403933433
392802933877.5975507525-5848.59755075249
402938330701.9994781931-1318.99947819307
413643831032.37825024495405.6217497551
423203431392.211465989641.788534010993
432267926563.4959835361-3884.49598353610
442431924811.3793141501-492.379314150086
451800422654.0412966401-4650.04129664013
461753718095.0421221875-558.042122187544
472036618151.41728828102214.58271171902
482278223925.1751122384-1143.17511223840
491916917686.55554392281482.44445607718
501380712453.61120137961353.38879862038
512974330846.6773732998-1103.67737329980
522559129769.2538182288-4178.25381822879
532909630777.7198476437-1681.71984764368
542648228636.2333948486-2154.23339484863
552240522810.3158587468-405.315858746832
562704422608.86203588934435.13796411073
571797020741.2948231539-2771.29482315392
581873017567.71883724111162.28116275894
591968418613.55369896371070.44630103632
601978523317.8696718011-3532.86967180106
611847917306.65780886081172.34219113921
621069812203.4019613282-1505.40196132819
633195627777.52958049394178.47041950614
642950627291.57733177932214.42266822073
653450630305.17207372964200.8279262704
662716529329.6346858415-2164.63468584151
672673623677.13895265253058.86104734754
682369125363.6832163915-1672.68321639146
691815720424.4120690273-2267.41206902729
701732818189.8409635505-861.840963550465
711820518742.3652604285-537.365260428542
722099521954.7512370020-959.75123700203
731738217561.6668823415-179.666882341469
74936711655.7105238571-2288.71052385711
753112427670.20162988883453.79837011123
762655126652.8408876847-101.840887684688
773065129367.23926598851283.76073401151
782585926578.4534003276-719.45340032757
792510022657.5180933472442.48190665300
802577823162.78726039262615.21273960745
812041819228.27680877731189.7231912227
821868818088.3098553626599.6901446374
832042419067.57607743081356.42392256924
842477622776.42852306241999.57147693764
851981418918.4361508756895.56384912437
861273812178.6161757851559.38382421489
873156632900.2593318825-1334.25933188250
883011129706.9363832271404.063616772899
893001933207.3254338703-3188.32543387033
903193428654.50172339663279.49827660344
912582625967.3458825070-141.345882507041
922683525900.6731709862934.32682901384
932020520910.5442576052-705.544257605234
941778919128.1665817947-1339.16658179469
952052019847.8475332951672.15246670493
962251823590.1985439608-1072.19854396078
971557218844.7977293402-3272.79772934022
981150911516.4325405584-7.43254055842954
992544730202.2039985014-4755.20399850137
1002409026846.3398832316-2756.33988323155
1012778628492.0808521020-706.080852102026
1022619526167.478807974027.5211920259644
1032051622528.9946074653-2012.99460746532
1042275922231.5700946494527.429905350604
1051902817623.0212087041404.97879129598
1061697116406.9627957891564.037204210872
1072003617844.04968835892191.95031164107
1082248521263.1646706431221.83532935697
1091873016871.88108725621858.11891274379


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
11011464.89785034179473.6149233101713456.1807773733
11128999.738893427225737.272570188232262.2052166662
11227101.446613943523826.811308482230376.0819194048
11329990.829159127226311.336833006833670.3214852476
11427862.497782309524236.429321818531488.5662428005
11523499.797545590120144.86491451726854.7301766633
11624286.416346299320696.852620603927875.9800719946
11719377.310425688516164.635743589222589.9851077878
11817547.88765766614378.332494224620717.4428211074
11919287.55367525515739.326858273222835.7804922368
12022052.616549101817974.477657739226130.7554404645
12117459.456828260314524.210110767520394.7035457531
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260550211zefiqg59ixvp6oy/1l2go1260550155.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260550211zefiqg59ixvp6oy/1l2go1260550155.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260550211zefiqg59ixvp6oy/230at1260550155.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260550211zefiqg59ixvp6oy/230at1260550155.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260550211zefiqg59ixvp6oy/3pba21260550155.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260550211zefiqg59ixvp6oy/3pba21260550155.ps (open in new window)


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