Home » date » 2010 » Dec » 29 »

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: Wed, 29 Dec 2010 09:43:45 +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/Dec/29/t1293615798ewh7702p1aybc9d.htm/, Retrieved Wed, 29 Dec 2010 10:43:18 +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/Dec/29/t1293615798ewh7702p1aybc9d.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1775 2197 2920 4240 5415 6136 6719 6234 7152 3646 2165 2803 1615 2350 3350 3536 5834 6767 5993 7276 5641 3477 2247 2466 1567 2237 2598 3729 5715 5776 5852 6878 5488 3583 2054 2282 1552 2261 2446 3519 5161 5085 5711 6057 5224 3363 1899 2115 1491 2061 2419 3430 4778 4862 6176 5664 5529 3418 1941 2402 1579 2146 2462 3695 4831 5134 6250 5760 6249 2917 1741 2359 1511 2059 2635 2867 4403 5720 4502 5749 5627 2846 1762 2429 1169 2154 2249 2687 4359 5382 4459 6398 4596 3024 1887 2070 1351 2218 2461 3028 4784 4975 4607 6249 4809 3157 1910 2228 1594 2467 2222 3607 4685 4962 5770 5480 5000 3228 1993 2288 1588 2105 2191 3591 4668 4885 5822 5599 5340 3082 2010 2301
 
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.0535977728080357
beta0.000530028422734916
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1316151538.1907051282176.8092948717931
1423502260.434111538589.5658884614995
1533503281.0721207056368.9278792943678
1635363537.06427000638-1.06427000638359
1758345834.92996575642-0.929965756420643
1867676774.80283349635-7.80283349634556
1959936672.55710916704-679.557109167037
2072766147.704213362741128.29578663726
2156417098.19692601847-1457.19692601847
2234773521.77992444771-44.7799244477064
2322472046.52238964722200.477610352776
2424662647.79080771315-181.790807713152
2515671522.9661466493244.0338533506792
2622372255.50181624142-18.5018162414208
2725983250.78879452445-652.788794524454
2837293401.81032399214327.189676007861
2957155717.35864362219-2.35864362219036
3057766650.61223710473-874.612237104733
3158525866.09488908419-14.0948890841892
3268787087.82137027955-209.821370279547
3354885519.59598532189-31.5959853218883
3435833356.2611774559226.738822544102
3520542127.63499569831-73.6349956983131
3622822352.39039501135-70.3903950113454
3715521447.21916351783104.780836482169
3822612123.79021822474137.209781775262
3924462527.10018503946-81.1001850394614
4035193636.20080115686-117.200801156859
4151615616.01693622107-455.016936221075
4250855699.46486948967-614.464869489669
4357115743.25232569529-32.2523256952891
4460576778.73506519813-721.735065198128
4552245351.69603916262-127.696039162623
4633633427.64728149998-64.6472814999765
4718991899.06888669762-0.068886697616108
4821152130.77993654896-15.7799365489645
4914911394.2616726443596.7383273556547
5020612101.03578936866-40.0357893686601
5124192288.17501080885130.824989191147
5234303374.4129225040255.5870774959753
5347785043.72935077699-265.729350776988
5448624986.37536557658-124.375365576579
5561765607.40626614289568.593733857108
5656646022.55057533152-358.550575331516
5755295177.17316318898351.826836811018
5834183338.5047476517279.4952523482793
5919411878.7828024395962.217197560411
6024022098.97863869733303.021361302675
6115791486.0593700856592.940629914353
6221462063.2109223095982.78907769041
6324622418.6641060036843.3358939963173
6436953429.03278599895265.967214001049
6548314805.5618303769225.4381696230757
6651344897.6310664831236.368933516904
6762506193.8743695440256.1256304559829
6857605704.1353446718155.8646553281851
6962495553.31945782004695.680542179962
7029173475.4024122172-558.4024122172
7117411965.17725698159-224.177256981593
7223592397.95112283166-38.9511228316551
7315111567.90284137867-56.9028413786732
7420592127.43223157852-68.4322315785166
7526352437.45397897118197.546021028818
7628673666.80340626359-799.803406263588
7744034758.55866983873-355.558669838734
7857205029.80821921765690.191780782354
7945026179.78119562558-1677.78119562558
8057495596.80082469422152.199175305781
8156276056.61335608884-429.613356088836
8228462731.42611714609114.573882853915
8317621573.51149640558188.488503594418
8424292203.64254960891225.357450391094
8511691370.71937694711-201.719376947109
8621541911.51967316080242.480326839205
8722492489.88107473489-240.881074734888
8826872751.77863475017-64.7786347501728
8943594303.3252457164455.6747542835556
9053825586.28967745597-204.289677455972
9144594447.2132615139811.7867384860228
9263985686.68318588384711.316814116162
9345965625.84610379992-1029.84610379992
9430242783.50229160411240.497708395894
9518871702.28799668004184.712003319959
9620702367.10751149119-297.107511491186
9713511101.97809781242249.021902187579
9822182087.32469437971130.675305620286
9924612202.23209534194258.767904658057
10030282657.58046995612370.419530043876
10147844346.46945290073437.530547099273
10249755403.89979933126-428.899799331258
10346074457.30381344760149.696186552395
10462496366.22994747587-117.229947475873
10548094613.14835207163195.85164792837
10631573038.7944538962118.205546103800
10719101898.2654130246511.7345869753472
10822282097.84930476264130.150695237362
10915941372.52085362760221.479146372397
11024672244.42973561878222.570264381223
11122222485.53423166698-263.534231666984
11236073018.58549318573588.414506814272
11346854782.7085014647-97.7085014647
11449624991.48037623507-29.4803762350712
11557704613.909017205551156.09098279445
11654806324.21687882173-844.216878821731
11750004828.51156540994171.488434590063
11832283179.4067606328048.593239367196
11919931934.4196758106558.5803241893482
12022882248.6223676341439.3776323658581
12115881604.89825765683-16.8982576568255
12221052465.09263190931-360.092631909306
12321912214.93011791436-23.9301179143608
12435913567.1294177977323.8705822022721
12546684651.6493561046716.3506438953264
12648854931.11260714286-46.1126071428598
12758225674.68351019995147.316489800049
12855995437.80517075069161.194829249307
12953404957.25969883867382.740301161328
13030823203.18148086508-121.181480865077
13120101958.5540691836251.4459308163841
13223012254.2081211312646.7918788687393


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1331557.62919925444787.2136130653212328.04478544356
1342093.937271036441322.414712147992865.45982992488
1352181.238010401741408.608894189852953.86712661364
1363579.977418517132806.242157956434353.71267907784
1374656.119200453743881.278206132015430.96019477547
1384875.608409033644099.662089166085651.55472890121
1395804.73155880395027.680319247236581.78279836057
1405573.106675472034794.950919738566351.2624312055
1415293.602868991974514.342998263526072.86273972043
1423042.097274680242261.733687821933822.46086153855
1431967.342678141841185.875771715802748.80958456788
1442255.836066928711473.266235207693038.40589864974
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293615798ewh7702p1aybc9d/1ybge1293615821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293615798ewh7702p1aybc9d/1ybge1293615821.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293615798ewh7702p1aybc9d/29lgz1293615821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293615798ewh7702p1aybc9d/29lgz1293615821.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293615798ewh7702p1aybc9d/3jux21293615821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293615798ewh7702p1aybc9d/3jux21293615821.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