Home » date » 2010 » Aug » 05 »

Tijdreeks 1 - Stap 32

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 05 Aug 2010 13:42:52 +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/Aug/05/t128101586740z6c0le8djopyn.htm/, Retrieved Thu, 05 Aug 2010 15:44:31 +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/2010/Aug/05/t128101586740z6c0le8djopyn.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:
Mathias Goossenaerts
 
Dataseries X:
» Textbox « » Textfile « » CSV «
36 35 34 32 52 51 36 26 27 27 28 30 28 29 25 28 55 53 42 32 37 41 37 38 39 32 36 39 83 83 66 53 72 77 69 72 81 71 63 66 114 116 109 97 111 120 110 106 115 110 103 112 163 166 156 140 166 176 163 162 171 167 163 168 222 216 197 178 204 220 196 195 213 218 216 225 280 272 252 230 248 259 240 237 252 250 255 255 313 291 271 247 268 283 259 259 267 270 279 269 334 326 301 276 301 313 291 287 289 298 320 312 385 380 351 322 350 363 344 345
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.601667916362739
beta0.0534961536760316
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
132828.6610576923077-0.661057692307701
142929.0120022848353-0.0120022848352548
152524.58640970874050.413590291259538
162827.09686139512530.90313860487474
175553.97259451139451.02740548860555
185352.20616404223710.793835957762909
194238.61642008072093.38357991927913
203231.69374898630310.306251013696908
213733.97107176463573.02892823536429
224136.90070060924864.09929939075144
233741.1062812553989-4.10628125539889
243840.9926587481785-2.99265874817853
253937.06442222084371.93557777915627
263239.5188411962294-7.51884119622937
273630.78715218943915.21284781056087
283936.57563977987992.42436022012006
298364.660579892360818.3394201076392
308374.01885263683628.98114736316384
316667.4519113967683-1.45191139676832
325357.3036239330653-4.30362393306527
337258.653027325727213.3469726742728
347769.31032648273977.68967351726033
356973.6164079359505-4.61640793595049
367274.8318646627762-2.83186466277621
378174.16103748594096.83896251405915
387177.1550821602728-6.15508216027283
396375.7146734558376-12.7146734558376
406670.428280962221-4.42828096222098
41114101.33139864425512.6686013557446
42116103.96920816414112.0307918358593
4310995.598663545122913.4013364548771
449794.24659588126762.75340411873236
45111108.0953552643682.90464473563188
46120111.1028203035198.89717969648059
47110112.158841656803-2.15884165680269
48106116.568208733904-10.568208733904
49115115.85029392439-0.850293924389959
50110109.5499429774550.450057022545423
51103110.191266184242-7.19126618424195
52112112.427175337348-0.427175337347634
53163153.5749586397649.42504136023553
54166154.92985395516511.0701460448349
55156147.4190230245748.58097697542607
56140139.6619056671390.338094332861033
57166152.77657227729013.2234277227102
58176165.37054439156710.6294556084333
59163164.111616664646-1.11161666464602
60162166.881815760854-4.88181576085424
61171174.719676939564-3.71967693956404
62167168.382023717026-1.38202371702567
63163165.989431415208-2.98943141520823
64168174.695221143629-6.69522114362937
65222217.041844311054.95815568894989
66216217.266348439443-1.26634843944308
67197201.846347553377-4.8463475533766
68178182.79966987299-4.79966987298999
69204197.8630161610366.13698383896426
70220204.83921509951315.1607849004873
71196201.454821641072-5.4548216410721
72195199.795292596558-4.79529259655803
73213207.8361442890165.16385571098436
74218207.74853859749810.2514614025021
75216212.0635537090843.93644629091582
76225224.0316042879780.968395712021987
77280276.4490793193613.55092068063914
78272274.120166637217-2.12016663721715
79252257.505631495046-5.50563149504649
80230238.804865984211-8.80486598421086
81248256.40990835776-8.40990835775995
82259258.3550328356790.644967164320974
83240237.6847149800322.3152850199684
84237240.872652118435-3.8726521184347
85252253.375102955871-1.37510295587134
86250251.108730943252-1.10873094325166
87255245.4365188139869.56348118601386
88255259.152332045134-4.1523320451343
89313308.8971376402974.10286235970273
90291304.038705444525-13.0387054445246
91271278.552233324085-7.55223332408542
92247256.285965185278-9.2859651852782
93268272.723447776690-4.72344777668951
94283279.5766784316843.42332156831594
95259260.416008828737-1.41600882873661
96259257.9466537797991.05334622020098
97267273.618887948337-6.61888794833737
98270267.3459361925732.65406380742729
99279267.35220713447611.6477928655236
100269276.089168638958-7.08916863895843
101334326.4912882168547.50871178314645
102326316.0996392761839.9003607238173
103301306.584272393367-5.58427239336697
104276284.858772003442-8.85877200344248
105301303.431739945875-2.43173994587499
106313315.043760152929-2.04376015292894
107291290.6249166719270.375083328072833
108287290.233331739831-3.23333173983139
109289300.148841420857-11.1488414208574
110298294.5768000768053.42319992319545
111320298.38580638476521.6141936152353
112312305.7339662881526.26603371184842
113385370.49441732609514.5055826739048
114380365.99856990382614.0014300961735
115351353.647997782839-2.64799778283901
116322333.344670072757-11.3446700727569
117350353.861881279653-3.86188127965318
118363365.601779590946-2.60177959094551
119344342.6265392158381.37346078416221
120345342.2462757041662.75372429583427


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121353.651685569883339.688594721905367.614776417862
122361.991584982937345.459781017536378.523388948339
123372.276364865005353.308218648937391.244511081073
124361.099945830178339.7729215597382.426970100656
125425.764370218070402.124177852895449.404562583244
126412.265237017782386.337554205881438.192919829682
127384.332867497281356.129958788011412.535776206552
128361.71823756373331.242991236539392.19348389092
129391.966603668744359.215138880941424.718068456546
130406.581109077463371.544535994063441.617682160862
131386.887583162421349.55323390625424.221932418592
132386.319389504836346.671704058641425.967074951032
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/05/t128101586740z6c0le8djopyn/1jjb31281015770.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/05/t128101586740z6c0le8djopyn/1jjb31281015770.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/05/t128101586740z6c0le8djopyn/2uss61281015770.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/05/t128101586740z6c0le8djopyn/2uss61281015770.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/05/t128101586740z6c0le8djopyn/3uss61281015770.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/05/t128101586740z6c0le8djopyn/3uss61281015770.ps (open in new window)


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