Home » date » 2009 » Dec » 02 »

ws9 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: Wed, 02 Dec 2009 14:50:49 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790703n9jcszml6488hp5.htm/, Retrieved Wed, 02 Dec 2009 22:51:48 +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/2009/Dec/02/t1259790703n9jcszml6488hp5.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
216234 213587 209465 204045 200237 203666 241476 260307 243324 244460 233575 237217 235243 230354 227184 221678 217142 219452 256446 265845 248624 241114 229245 231805 219277 219313 212610 214771 211142 211457 240048 240636 230580 208795 197922 194596 194581 185686 178106 172608 167302 168053 202300 202388 182516 173476 166444 171297 169701 164182 161914 159612 151001 158114 186530 187069 174330 169362 166827 178037 186412 189226 191563 188906 186005 195309 223532 226899 214126
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.719322263189433
beta0.175883227652681
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13235243226737.0961736098505.90382639144
14230354229123.6636576791230.33634232086
15227184228466.606944256-1282.60694425550
16221678223800.799736545-2122.79973654507
17217142219569.963404597-2427.96340459693
18219452221777.488382775-2325.48838277528
19256446253078.864927263367.13507274029
20265845275261.348592982-9416.34859298158
21248624249812.961546658-1188.96154665813
22241114248787.113109431-7673.11310943082
23229245230323.758223731-1078.75822373136
24231805230951.619090012853.3809099879
25219277230021.713136055-10744.7131360545
26219313213007.9129497206305.08705027957
27212610212302.915434283307.084565716534
28214771205964.4181599978806.58184000323
29211142208148.3320263152993.66797368464
30211457213328.520399341-1871.52039934113
31240048244474.550451757-4426.55045175678
32240636254512.147891949-13876.147891949
33230580227069.6300962313510.36990376926
34208795225903.193603848-17108.1936038479
35197922200792.922646433-2870.92264643265
36194596197141.523346073-2545.52334607317
37194581187540.0723098687040.9276901315
38185686187093.073748093-1407.07374809266
39178106177822.535574330283.464425669546
40172608172111.618182285496.381817715155
41167302164666.6606126382635.33938736227
42168053164733.291009473319.70899053002
43202300189312.37075327312987.6292467267
44202388206422.384439344-4034.38443934402
45182516192976.209422581-10460.2094225812
46173476176004.181549568-2528.18154956779
47166444166722.951638836-278.951638836093
48171297165447.7946307535849.20536924707
49169701166504.9886842263196.01131577438
50164182162870.4929960471311.50700395295
51161914158194.4231867923719.57681320762
52159612157313.0464267632298.95357323682
53151001154302.302218677-3301.30221867724
54158114151651.0416679996462.9583320012
55186530181293.2368813365236.76311866372
56187069188881.128254835-1812.12825483538
57174330177306.013959189-2976.01395918918
58169362170383.00391962-1021.00391961989
59166827165305.2417372411521.75826275870
60178037169696.5306077718340.46939222876
61186412174725.03604087511686.9639591248
62189226180249.0571876008976.9428124004
63191563186117.3409117415445.65908825921
64188906190545.546284782-1639.54628478200
65186005186419.699256824-414.699256823573
66195309194188.4970802771120.50291972345
67223532230249.192150284-6717.1921502841
68226899230891.317106715-3992.31710671465
69214126217945.224671812-3819.22467181191


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
70212749.177448599201158.928045624224339.426851573
71211087.295561823196017.170010025226157.421113621
72220331.805448108201147.479503513239516.131392704
73221516.021217242198492.334928469244539.707506015
74216743.438960666190321.804979516243165.072941816
75213364.77811028183397.841609235243331.714611325
76209566.740699672176100.354199004243033.12720034
77204836.148573866168029.552205537241642.744942196
78212386.963886877170027.002367126254746.925406628
79246091.041662252192384.317915784299797.765408720
80251602.164189145191711.285210845311493.043167446
81239704.508944503178808.146533843300600.871355164
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790703n9jcszml6488hp5/1wvlr1259790647.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790703n9jcszml6488hp5/1wvlr1259790647.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790703n9jcszml6488hp5/2k4ap1259790647.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790703n9jcszml6488hp5/2k4ap1259790647.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790703n9jcszml6488hp5/3o3a81259790647.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790703n9jcszml6488hp5/3o3a81259790647.ps (open in new window)


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