Home » date » 2010 » Aug » 16 »

Exponential Smoothing

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 16 Aug 2010 13:46:38 +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/Aug/16/t1281966373o4r9nju7is3c5pd.htm/, Retrieved Mon, 16 Aug 2010 15:46:13 +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/Aug/16/t1281966373o4r9nju7is3c5pd.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 «
244 243 242 240 260 259 244 234 235 235 236 238 240 233 233 233 247 251 233 226 233 233 227 225 223 212 206 202 223 221 212 205 204 200 195 193 196 180 174 164 192 189 181 167 166 164 167 164 161 141 134 111 147 144 142 140 143 137 140 130 129 112 101 74 104 103 100 98 99 91 92 94 93 76 64 32 62 69 69 68 68 59 66 73 70 57 48 22 64 74 67 61 61 52 54 69 69 53 50 22 69 78 74 63 67 59 60 80 77 58 54 32 78 86 84 78 72 64 62 72
 
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.644806046017667
beta8.40256683676266e-19
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
32422420
4240241-1
5260239.35519395398220.6448060460177
6259251.6670897113177.3329102886834
7244255.395394600365-11.3953946003648
8234247.047575265292-13.0475752652925
9235237.634419848361-2.63441984836135
10235234.9357300023890.0642699976110066
11236233.9771716854262.0228283145739
12238234.2815036127193.71849638728094
13240235.6792125653334.32078743466732
14233237.465282426763-4.46528242676334
15233233.58604132081-0.586041320809898
16233232.2081583339360.7918416660645
17247231.71874262770315.2812573722974
18251240.57218977211210.4278102278880
19233246.296104853779-13.2961048537790
20226236.722696055577-10.7226960555775
21233228.8086368093314.19136319066868
22233230.5112531357302.48874686426961
23227231.116012160819-4.11601216081894
24225227.461982634041-2.46198263404065
25223224.874481346421-1.87448134642074
26212222.665804441101-10.6658044411013
27206214.788429251837-8.7884292518371
28202208.121596935254-6.12159693525402
29223203.17435422011919.825645779881
30221214.9580504851916.04194951480909
31212217.853936062073-5.85393606207333
32205213.079282696248-8.07928269624759
33204206.869712366221-2.86971236622122
34200204.01930448215-4.01930448215012
35195200.427632651274-5.42763265127383
36193195.927862302170-2.92786230216956
37196193.0399589878232.96004101217659
38180193.948611328935-13.9486113289351
39174183.954462410487-9.95446241048722
40164176.535764863349-12.5357648633495
41192167.45262788800624.5473721119941
42189182.2809218396656.71907816033485
43181185.613424061114-4.61342406111433
44167181.638660333664-14.6386603336644
45166171.199563644919-5.19956364491861
46164166.846853570021-2.84685357002144
47167164.0111851759452.98881482405537
48164164.938391044923-0.938391044922753
49161163.333310825628-2.33331082562773
50141160.828777898024-19.8287778980245
51134147.043062024237-13.0430620242368
52111137.632816772425-26.6328167724255
53147119.45981549508527.5401845049152
54144136.2178929722967.7821070277038
55142140.2358426345161.76415736548381
56140140.373381969907-0.373381969906745
57143139.1326230182373.8673769817631
58137140.626331078307-3.62633107830729
59140137.2880508741532.71194912584701
60130138.036732066991-8.03673206699148
61129131.854598639971-2.8545986399713
62112129.013936177964-17.013936177964
63101117.043247263854-16.0432472638541
6474105.698464430365-31.6984644303646
6510484.259102916189519.7408970838105
6610395.9881527096437.01184729035695
6710099.50943423621780.4905657637822
689898.8257540066738-0.825754006673833
699997.29330283064721.70669716935276
709197.3937914841671-6.39379148416714
719292.2710360781999-0.271036078199899
729491.09627037628772.90372962371231
739391.9686127936581.03138720634200
747691.6336575000926-15.6336575000926
756480.5529806226635-16.5529806226635
763268.8795186375568-36.8795186375568
776244.099382045839017.9006179541610
786954.641808730134414.3581912698656
796962.90005727082186.09994272917818
806865.83333722295742.16666277704259
816866.23041448127591.7695855187241
825966.3714539226945-7.37145392269451
836660.61829586540045.38170413459955
847363.08845122926859.91154877073149
857068.47947780203511.52052219796485
865768.459919708387-11.4599197083870
874860.070494193542-12.0704941935420
882251.287366559125-29.287366559125
896431.402695529865632.5973044701344
907451.42163453608722.5783654639130
916764.98030109641462.01969890358544
926165.2826151605817-4.2826151605817
936161.5211590122717-0.521159012271696
945260.1851125302223-8.18511253022231
955453.90730248340.0926975165999977
966952.967074402554516.0329255974455
976962.30520176313886.69479823686123
985365.6220481431353-12.6220481431353
995056.4832751873156-6.4832751873156
1002251.3028201485382-29.3028201485382
1016931.408184551392537.5918154486075
1027854.647614433434923.3523855665651
1037468.70537383569185.29462616430823
1046371.119380797841-8.11938079784105
1056764.88395496947342.11604503052661
1065965.2483935988026-6.24839359880259
1076060.2193916283966-0.219391628396593
1088059.077926579960820.9220734200392
1097771.56860601642765.43139398357241
1105874.070801695339-16.0708016953391
1115462.7082515978335-8.70825159783347
1123256.0931183173074-24.0931183173074
1137839.557729958888638.4422700411114
1148663.34553810404122.6544618959589
1158476.95327210383227.04672789616777
1167880.4970448559226-2.49704485592257
1177277.8869352356464-5.88693523564638
1186473.0910038031871-9.09100380318715
1196266.2290695865225-4.22906958652247
1207262.50213994810339.49786005189665


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12167.62641753379641.702315322129993.550519745462
12266.62641753379635.780277936910597.4725571306814
12365.62641753379630.54209652597100.710738541622
12464.62641753379625.7633909773141103.489444090278
12563.62641753379621.3208613303911105.931973737201
12662.62641753379617.1381186182608108.114716449331
12761.62641753379613.1639517403727110.088883327219
12860.6264175337969.362045467727111.890789599865
12959.6264175337965.70553942635055113.547295641241
13058.6264175337962.1739034318747115.078931635717
13157.626417533796-1.24897291906858116.501807986661
13256.626417533796-4.57600769206326117.828842759655
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/16/t1281966373o4r9nju7is3c5pd/17fve1281966393.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t1281966373o4r9nju7is3c5pd/17fve1281966393.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/16/t1281966373o4r9nju7is3c5pd/20ocz1281966393.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t1281966373o4r9nju7is3c5pd/20ocz1281966393.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/16/t1281966373o4r9nju7is3c5pd/30ocz1281966393.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t1281966373o4r9nju7is3c5pd/30ocz1281966393.ps (open in new window)


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