Home » date » 2010 » Dec » 10 »

Workshop 8 (Double Smoothing model)

*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, 10 Dec 2010 15:49:13 +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/10/t1291996060bx3guhifjctqmud.htm/, Retrieved Fri, 10 Dec 2010 16:47:41 +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/10/t1291996060bx3guhifjctqmud.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 «
37 30 47 35 30 43 82 40 47 19 52 136 80 42 54 66 81 63 137 72 107 58 36 52 79 77 54 84 48 96 83 66 61 53 30 74 69 59 42 65 70 100 63 105 82 81 75 102 121 98 76 77 63 37 35 23 40 29 37 51 20 28 13 22 25 13 16 13 16 17 9 17 25 14 8 7 10 7 10 3
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.458869668373879
beta0.071121400333114
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3472324
43527.79612292221657.20387707778349
53025.12011628371294.87988371628709
64321.536956799664221.4630432003358
78226.263762354519955.7362376454801
84048.5364746640747-8.53647466407467
94741.03779706968155.96220293031854
101940.3867020506924-21.3867020506924
115226.488059354840925.5119406451591
1213634.9423750297094101.057624970291
138081.3603752268598-1.36037522685979
144280.7374651757254-38.7374651757254
155461.6991275159735-7.69912751597347
166656.65207704787469.34792295212543
178159.73247467857721.267525321423
186368.9764916268721-5.97649162687212
1913765.524010039035271.4759899609648
207299.944774330671-27.944774330671
2110787.832375102299319.1676248977007
225897.9639710130011-39.9639710130011
233679.657628804661-43.657628804661
245258.231592560615-6.231592560615
257953.77585830789625.224141692104
267764.57740770055212.4225922994481
275469.9101313006393-15.9101313006393
288461.722593069812222.2774069301878
294871.7851911183916-23.7851911183916
309659.934819579979136.0651804200209
318376.72497169587586.27502830412423
326680.0501149832532-14.0501149832532
336173.5901346381083-12.5901346381083
345367.3892102376778-14.3892102376778
353059.8931462135325-29.8931462135325
367444.3072198498729.69278015013
376957.032505098916511.9674949010835
385962.0147592058819-3.01475920588188
394260.0237233057599-18.0237233057599
406550.557316644719614.4426833552804
417056.460102760919913.5398972390801
4210062.390508396552537.6094916034475
436380.5931236261194-17.5931236261194
4410572.890773545924832.1092264540752
458289.0432235276064-7.04322352760644
468186.9999429770526-5.99994297705263
477585.2395813674112-10.2395813674112
4810281.199604915161320.8003950848387
4912192.081762488072128.9182375119279
5098107.632711515714-9.63271151571374
5176105.1794314399-29.1794314398995
527792.8044705001153-15.8044705001153
536386.0510873910001-23.0510873910001
543775.2201689043062-38.2201689043062
553556.1812864734165-21.1812864734165
562344.2697694857101-21.2697694857101
574031.62350175693228.37649824306778
582932.8543778873243-3.85437788732425
593728.34708657397088.6529134260292
605129.861403630592221.1385963694078
612037.7948895553043-17.7948895553043
622827.28223541652870.717764583471265
631325.2879013157388-12.2879013157388
642216.92464038620595.07535961379408
652516.69448990338578.3055100966143
661318.2176115890128-5.21761158901281
671613.36510379158162.63489620841841
681312.20186467544550.79813532455454
691610.22183920982815.77816079017186
701710.71556927523166.28443072476838
71911.6467065036014-2.6467065036014
72178.39323928706518.6067607129349
732510.584532378281214.4154676217188
741415.9117202040056-1.91172020400564
75813.6844669110586-5.68446691105861
7679.5404994328923-2.54049943289231
77106.75629291799333.2437070820067
7876.732143179661920.267856820338082
79105.351207647402374.64879235259763
8036.13226599611851-3.13226599611851


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
813.24060975985528-43.515313575419649.9965330951302
821.78625538248973-50.312040395105853.8845511600853
830.331901005124177-57.242482346980957.9062843572292
84-1.12245337224137-64.308723237674662.0638164931919
85-2.57680774960693-71.511373916108366.3577584168945
86-4.03116212697248-78.85011362845870.7877893745131
87-5.48551650433803-86.324026630380975.3529936217048
88-6.93987088170358-93.931817667892480.0520759044852
89-8.39422525906913-101.67195308719184.8835025690531
90-9.84857963643468-109.54275486755989.8455955946895
91-11.3029340138002-117.54246408899894.9365960613978
92-12.7572883911658-125.669284130188100.154707347857
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291996060bx3guhifjctqmud/1u3qj1291996149.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291996060bx3guhifjctqmud/1u3qj1291996149.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291996060bx3guhifjctqmud/2u3qj1291996149.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291996060bx3guhifjctqmud/2u3qj1291996149.ps (open in new window)


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