Home » date » 2010 » Dec » 09 »

Workshop 8 - double exponential smoothing (jonas poels)

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 09 Dec 2010 17:49:55 +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/09/t1291916878hm9rnziyhmy63c6.htm/, Retrieved Thu, 09 Dec 2010 18:48:00 +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/09/t1291916878hm9rnziyhmy63c6.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 «
9700 9081 9084 9743 8587 9731 9563 9998 9437 10038 9918 9252 9737 9035 9133 9487 8700 9627 8947 9283 8829 9947 9628 9318 9605 8640 9214 9567 8547 9185 9470 9123 9278 10170 9434 9655 9429 8739 9552 9687 9019 9672 9206 9069 9788 10312 10105 9863 9656 9295 9946 9701 9049 10190 9706 9765 9893 9994 10433 10073 10112 9266 9820 10097 9115 10411 9678 10408 10153 10368 10581 10597 10680 9738 9556
 
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.536600454094042
beta0.263284283989557
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
390848462622
497438264.640688512851478.35931148715
585878735.66450867056-148.664508670558
697318312.623514324971418.37648567503
795638930.84348372464632.156516275361
899989216.48756363578781.512436364215
994379692.68697652703-255.686976527028
10100389576.20164956672461.798350433275
1199189909.961437568828.03856243117843
12925210001.3691930513-749.36919305127
1397379580.4818726873156.518127312702
1490359667.80674077054-632.806740770538
1591339242.17756038399-109.177560383992
1694879082.10359767946404.896402320541
1787009255.0850995484-555.085099548405
1896278834.51852003764792.481479962358
1989479249.01734710991-302.017347109908
2092839033.53905896064249.460941039359
2188299149.2277298182-320.227729818202
2299478913.979918651631033.02008134837
2396289550.828990254977.1710097450996
2493189685.67161789354-367.671617893542
2596059529.8674072464675.1325927535436
2686409622.28675458407-982.286754584067
2792149008.51843377422205.481566225782
2895679061.13725380792505.862746192081
2985479346.40826437574-799.408264375737
3091858818.33108438285366.668915617145
3194708967.77387073749502.22612926251
3291239260.91045679035-137.910456790352
3392789191.0656822568186.9343177431874
34101709254.15466292212915.845337077884
3594349891.4268975972-457.42689759721
3696559727.1760569936-72.176056993596
3794299759.45406975913-330.454069759135
3887399606.45393941927-867.45393941927
3995529042.74687298558509.253127014419
4096879289.72794432049397.272055679514
4190199532.74590867512-513.745908675119
4296729214.32998560078457.670014399218
4392069481.83520568856-275.83520568856
4490699316.77161677335-247.771616773352
4597889131.76216839209656.237831607912
46103129524.5568749244787.4431250756
471010510099.00515855535.99484144468806
48986310254.9748803442-391.974880344151
49965610142.0162587648-486.016258764781
5092959909.93135916443-614.931359164435
5199469521.7939988201424.206001179911
5297019751.18939116349-50.1893911634852
5390499718.93332034495-669.933320344948
54101909259.47522365412930.524776345883
5597069790.28678170389-84.2867817038896
5697659764.642089632020.357910367976729
5798939784.46834279045108.531657209553
5899949877.67386370552116.32613629448
59104339991.49628376847441.503716231528
601007310342.1841088015-269.184108801486
611011210273.4866061469-161.48660614686
62926610239.7650522699-973.765052269875
6398209632.6024821878187.3975178122
64100979674.99550840207422.004491597934
6591159902.89889064689-787.898890646886
66104119370.2544216641040.745578336
6796789965.89634427614-287.896344276138
68104089807.91485390067600.085146099329
691015310211.2037436049-58.2037436048831
701036810253.0315805367114.968419463261
711058110404.0262407872176.973759212757
721059710613.2955757884-16.2955757884029
731068010716.5542839099-36.554283909898
74973810803.7778268849-1065.77782688493
75955610188.1480924889-632.148092488867


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
769715.89535746898605.8465242502510825.9441906876
779582.853575933168241.7970472395410923.9101046268
789449.811794397417829.5440223367111070.0795664581
799316.770012861667377.2076089396311256.3324167837
809183.728231325916890.7987958139811476.6576668378
819050.686449790166374.6211157103511726.75178387
828917.644668254415831.7911504598412003.498186049
838784.602886718665264.6294541770412304.5763192603
848651.561105182914674.9196131318312628.202597234
858518.519323647164064.0749709480812972.9636763462
868385.477542111413433.2464734648913337.7086107579
878252.435760575662783.3937475056513721.4777736457
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291916878hm9rnziyhmy63c6/136jo1291916991.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291916878hm9rnziyhmy63c6/136jo1291916991.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291916878hm9rnziyhmy63c6/2ex091291916991.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291916878hm9rnziyhmy63c6/2ex091291916991.ps (open in new window)


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