| workshop 8- 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: Thu, 09 Dec 2010 12:09:50 +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/t12918965103d3moa3y9ni1ir9.htm/, Retrieved Thu, 09 Dec 2010 13:08:35 +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/t12918965103d3moa3y9ni1ir9.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: |
Estimated Parameters of Exponential Smoothing | Parameter | Value | alpha | 0.158806071444759 | beta | FALSE | gamma | FALSE |
Interpolation Forecasts of Exponential Smoothing | t | Observed | Fitted | Residuals | 2 | 9081 | 9700 | -619 | 3 | 9084 | 9601.6990417757 | -517.699041775693 | 4 | 9743 | 9519.48529076058 | 223.51470923942 | 5 | 8587 | 9554.980783645 | -967.980783645009 | 6 | 9731 | 9401.25955816033 | 329.740441839675 | 7 | 9563 | 9453.62434232534 | 109.375657674656 | 8 | 9998 | 9470.99386083234 | 527.006139167657 | 9 | 9437 | 9554.68563542083 | -117.685635420828 | 10 | 10038 | 9535.99644199417 | 502.003558005834 | 11 | 9918 | 9615.71765489236 | 302.282345107637 | 12 | 9252 | 9663.72192658602 | -411.721926586017 | 13 | 9737 | 9598.33798489722 | 138.662015102776 | 14 | 9035 | 9620.3583547743 | -585.358354774309 | 15 | 9133 | 9527.39989406523 | -394.399894065233 | 16 | 9487 | 9464.7667963105 | 22.2332036894968 | 17 | 8700 | 9468.29756404406 | -768.297564044064 | 18 | 9627 | 9346.28724619765 | 280.712753802352 | 19 | 8947 | 9390.86613583344 | -443.866135833439 | 20 | 9283 | 9320.37749855436 | -37.3774985543641 | 21 | 8829 | 9314.44172484851 | -485.441724848513 | 22 | 9947 | 9237.35063160995 | 709.649368390048 | 23 | 9628 | 9350.04725990723 | 277.952740092771 | 24 | 9318 | 9394.18784260867 | -76.1878426086678 | 25 | 9605 | 9382.08875063213 | 222.911249367866 | 26 | 8640 | 9417.48841042509 | -777.488410425089 | 27 | 9214 | 9294.01853037165 | -80.0185303716498 | 28 | 9567 | 9281.31110192054 | 285.688898079456 | 29 | 8547 | 9326.68023347992 | -779.680233479925 | 30 | 9185 | 9202.86227861785 | -17.8622786178457 | 31 | 9470 | 9200.02564032349 | 269.974359676507 | 32 | 9123 | 9242.89920777453 | -119.899207774533 | 33 | 9278 | 9223.85848561852 | 54.1415143814793 | 34 | 10170 | 9232.45648681951 | 937.543513180486 | 35 | 9434 | 9381.34408895622 | 52.6559110437756 | 36 | 9655 | 9389.70616732743 | 265.293832672569 | 37 | 9429 | 9431.83643867268 | -2.83643867268438 | 38 | 8739 | 9431.38599499018 | -692.385994990182 | 39 | 9552 | 9321.43089520242 | 230.569104797580 | 40 | 9687 | 9358.04666893186 | 328.953331068142 | 41 | 9019 | 9410.28645512746 | -391.286455127456 | 42 | 9672 | 9348.14779037912 | 323.852209620882 | 43 | 9206 | 9399.57748751772 | -193.577487517716 | 44 | 9069 | 9368.83620720488 | -299.83620720488 | 45 | 9788 | 9321.22039706178 | 466.779602938224 | 46 | 10312 | 9395.34783203494 | 916.65216796506 | 47 | 10105 | 9540.9177617108 | 564.082238289207 | 48 | 9863 | 9630.49744594527 | 232.502554054732 | 49 | 9656 | 9667.42026315557 | -11.4202631555727 | 50 | 9295 | 9665.60665602897 | -370.606656028971 | 51 | 9946 | 9606.75206893373 | 339.247931066269 | 52 | 9701 | 9660.62670011213 | 40.3732998878731 | 53 | 9049 | 9667.03822525858 | -618.03822525858 | 54 | 10190 | 9568.89000270257 | 621.109997297426 | 55 | 9706 | 9667.52604130844 | 38.4739586915566 | 56 | 9765 | 9673.63593954118 | 91.3640604588218 | 57 | 9893 | 9688.14510705388 | 204.854892946116 | 58 | 9994 | 9720.6773078189 | 273.322692181107 | 59 | 10433 | 9764.08261080088 | 668.917389199121 | 60 | 10073 | 9870.31075350068 | 202.689246499323 | 61 | 10112 | 9902.49903646133 | 209.500963538667 | 62 | 9266 | 9935.7690614448 | -669.7690614448 | 63 | 9820 | 9829.4056680215 | -9.40566802150715 | 64 | 10097 | 9827.9119908337 | 269.088009166302 | 65 | 9115 | 9870.64480044229 | -755.644800442289 | 66 | 10411 | 9750.64381827639 | 660.356181723611 | 67 | 9678 | 9855.51238925018 | -177.512389250178 | 68 | 10408 | 9827.32234408059 | 580.677655919415 | 69 | 10153 | 9919.5374813929 | 233.462518607103 | 70 | 10368 | 9956.6127468025 | 411.38725319751 | 71 | 10581 | 10021.9435403252 | 559.056459674764 | 72 | 10597 | 10110.725100402 | 486.274899598 | 73 | 10680 | 10187.9485068494 | 492.051493150648 | 74 | 9738 | 10266.0892714251 | -528.089271425135 | 75 | 9556 | 10182.2254888580 | -626.225488857985 |
Extrapolation Forecasts of Exponential Smoothing | t | Forecast | 95% Lower Bound | 95% Upper Bound | 76 | 10082.7770791339 | 9200.11000863375 | 10965.444149634 | 77 | 10082.7770791339 | 9189.04915834539 | 10976.5049999224 | 78 | 10082.7770791339 | 9178.12353470454 | 10987.4306235632 | 79 | 10082.7770791339 | 9167.32829602245 | 10998.2258622453 | 80 | 10082.7770791339 | 9156.65888281559 | 11008.8952754522 | 81 | 10082.7770791339 | 9146.11099530065 | 11019.4431629671 | 82 | 10082.7770791339 | 9135.68057314564 | 11029.8735851221 | 83 | 10082.7770791339 | 9125.36377720688 | 11040.1903810609 | 84 | 10082.7770791339 | 9115.15697301867 | 11050.3971852491 | 85 | 10082.7770791339 | 9105.0567158346 | 11060.4974424331 | 86 | 10082.7770791339 | 9095.05973704572 | 11070.4944212220 | 87 | 10082.7770791339 | 9085.16293182374 | 11080.391226444 |
| | Charts produced by software: | | http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/11wlh1291896542.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/11wlh1291896542.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/2cok21291896542.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/2cok21291896542.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/3mxjn1291896542.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/3mxjn1291896542.ps (open in new window) |
| | Parameters (Session): | par1 = 12 ; par2 = Single ; par3 = additive ; | | Parameters (R input): | par1 = 12 ; par2 = Single ; 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
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
|