Home » date » 2008 » May » 07 » attachments

triple exponential smoothing

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 07 May 2008 09:20:20 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/07/t12101736723ainlvetprhatg9.htm/, Retrieved Wed, 07 May 2008 17:21:16 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
56421 53152 53536 52408 41454 38271 35306 26414 31917 38030 27534 18387 50556 43901 48572 43899 37532 40357 35489 29027 34485 42598 30306 26451 47460 50104 61465 53726 39477 43895 31481 29896 33842 39120 33702 25094 51442 45594 52518 48564 41745 49585 32747 33379 35645 37034 35681 20972 58552 54955 65540 51570 51145 46641 35704 33253 35193 41668 34865 21210 56126 49231 59723 48103 47472 50497 40059 34149 36860 46356 36577
 
Text written by user:
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0
beta0.00123082877145252
gamma0.371586577726775


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
135055650513.913472222342.0865277777484
144390143929.062602657-28.0626026570244
154857248570.83673309181.16326690820279
164389943787.1525301932111.847469806758
173753237300.9683272947231.031672705300
184035739861.1174577295495.882542270527
193548934972.7665881643516.233411835739
202902728567.9573852657459.042614734299
213448533416.93984903381068.06015096618
224259840769.92231280191828.07768719806
233030628174.07144323672131.92855676329
242645124277.26224033822173.73775966184
254746052769.341826265-5309.34182626495
265010446158.42448139103945.57551860905
276146550811.058552678610653.9414473214
285372646068.50311394357657.4968860565
293947739626.6061611191-149.606161119111
304389542285.17031978361609.82968021640
313148137404.3815601939-5923.38156019388
322989630978.3210247229-1082.32102472293
333384236053.606230555-2211.60623055504
343912043689.0010096239-4569.0010096239
353370231206.05704481972495.94295518028
362509427324.7835805437-2230.78358054374
375144253036.2512322789-1594.25123227890
384559449864.3369507308-4270.33695073079
395251857009.7097596075-4491.70975960753
404856451153.715741004-2589.71574100402
414174541810.8040849194-65.8040849193858
424958545123.15098659564461.84901340444
433274737443.1220428889-4696.12204288891
443337932815.9346243618563.065375638238
453564537471.5926052812-1826.59260528124
463703444231.0111260449-7197.01112604494
473568134373.30551095381307.69448904622
482097228735.6439094178-7763.64390941777
495855254683.6384380573868.36156194295
505495550517.32662268594437.67337731409
516554057580.44026711047959.55973288963
525157052431.2016967365-861.201696736542
535114544026.14173542117118.85826457889
544664149020.9037570375-2379.90375703746
553570437937.8956896019-2233.89568960192
563325335264.951725549-2011.95172554898
573519339032.6448754011-3839.64487540111
584166843796.4879570737-2128.48795707374
593486537099.016796068-2234.01679606799


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
6028090.567603645320440.291372404535740.843834886
6158360.859237486650710.583006245866011.1354687274
6254406.096051248646755.819820007962056.3722824894
6362777.89539368455127.619162443370428.1716249248
6454350.980270731146700.704039490362001.2565019719
6548911.203480495341260.927249254556561.4797117361
6650376.353029858242726.076798617458026.629261099
6739347.599600521531697.323369280846997.8758317623
6836757.127034518129106.850803277444407.4032657589
6939845.67394168232195.397710441347495.9501729228
7045245.359966589437595.083735348752895.6361978302
7138508.675705450330858.399474209646158.9519366911
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t12101736723ainlvetprhatg9/16l7y1210173618.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t12101736723ainlvetprhatg9/16l7y1210173618.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t12101736723ainlvetprhatg9/2o64u1210173618.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t12101736723ainlvetprhatg9/2o64u1210173618.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t12101736723ainlvetprhatg9/3dlxt1210173618.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t12101736723ainlvetprhatg9/3dlxt1210173618.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=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