Home » date » 2009 » Jun » 05 »

Kristof Nollekens - Exp Smoothing - 10 oef2

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 05 Jun 2009 10:52:18 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/05/t1244220841rlkfni4yxf3gbrr.htm/, Retrieved Fri, 05 Jun 2009 18:54:05 +0200
 
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/Jun/05/t1244220841rlkfni4yxf3gbrr.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 «
155 176 180 181 208 183 185 205 180 196 183 147 128 158 186 165 191 168 171 169 157 175 156 129 89 138 146 151 156 129 146 141 137 155 147 128 92 136 159 131 134 148 146 144 161 140 141 139 94 136 164 141 159 162 154 166 156 147 161 135 98 150 173 144 167 161 156 175 163 159 167 148 119 150 161 136 166 155 140 141
 
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.3969420535359
beta0.0141114199930199
gamma0.748470071977163


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13128132.711239909822-4.71123990982153
14158162.035845855414-4.03584585541398
15186189.872729176268-3.87272917626845
16165167.325171462959-2.32517146295910
17191193.090291447698-2.09029144769787
18168169.380749569493-1.38074956949299
19171166.7743965012054.22560349879512
20169186.777689862744-17.7776898627438
21157156.5347478063370.465252193663417
22175169.1844398233875.81556017661254
23156159.642212085019-3.64221208501897
24129126.6315514869382.36844851306249
2589108.830295004100-19.8302950041004
26138125.10636426553712.8936357344631
27146153.961101046977-7.96110104697655
28151133.90227523616417.0977247638365
29156163.126103617622-7.12610361762194
30129141.027605450006-12.0276054500063
31146136.1407474449419.85925255505938
32141146.248096189310-5.24809618931027
33137131.2717687777505.72823122224952
34155145.8580815419089.14191845809154
35147135.37510130635511.6248986936453
36128114.08779133324213.9122086667578
379292.2353524910681-0.235352491068141
38136131.1686450940794.83135490592053
39159147.24188586463811.7581141353619
40131146.173778234449-15.1737782344485
41134151.040510383096-17.0405103830955
42148124.34587548461023.6541245153904
43146143.9717650715422.02823492845809
44144144.413956293347-0.413956293347411
45161136.46701363023224.5329863697678
46140161.582316185765-21.5823161857653
47141140.1601934704170.839806529582859
48139116.27766308360222.7223369163978
499491.8489413263682.15105867363202
50136134.5464007161891.45359928381100
51164152.48669036029111.5133096397090
52141139.1206400302291.87935996977117
53159150.4617142557348.53828574426637
54162151.94961172076110.0503882792389
55154156.979452763920-2.97945276392025
56166154.71729941120211.2827005887980
57156162.851672916130-6.85167291613024
58147154.32957591457-7.32957591457014
59161148.94912054519112.0508794548088
60135137.762111693425-2.76211169342454
619893.72059733803994.27940266196015
62150137.96453497706812.0354650229324
63173166.0132482737336.98675172626656
64144145.910747362506-1.91074736250616
65167159.4025010004787.59749899952249
66161161.341465694832-0.341465694831726
67156156.534217737577-0.534217737576796
68175161.83341962571113.1665803742893
69163162.6418971155920.35810288440814
70159156.7752531849242.22474681507646
71167164.5607847497592.43921525024095
72148142.2265603995645.77343960043552
73119102.28867597765316.7113240223466
74150160.756366135467-10.7563661354669
75161178.968330529485-17.9683305294851
76136145.093550740936-9.0935507409362
77166159.6936419725416.3063580274586
78155157.718226366012-2.71822636601217
79140152.069585565496-12.0695855654961
80141158.102515288249-17.1025152882493


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
81142.136324689947124.722436441939159.550212937954
82137.371135600819118.188185783879156.554085417759
83143.141605675039121.884313834243164.398897515835
84124.117359846772102.392175413404145.842544280141
8592.041873460655471.1085742980996112.975172623211
86122.65145047378796.6429781166018148.659922830972
87137.486923677882107.826741531098167.147105824666
88118.01250119346389.772109282876146.252893104049
89139.307014715856105.863473255490172.750556176223
90131.77035283365098.2106089764762165.330096690825
91123.88731905228390.3695367839728157.405101320592
92130.84111234286893.385530154248168.296694531489
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244220841rlkfni4yxf3gbrr/1e38g1244220736.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244220841rlkfni4yxf3gbrr/1e38g1244220736.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244220841rlkfni4yxf3gbrr/2hdap1244220736.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244220841rlkfni4yxf3gbrr/2hdap1244220736.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244220841rlkfni4yxf3gbrr/3pc0g1244220736.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244220841rlkfni4yxf3gbrr/3pc0g1244220736.ps (open in new window)


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