Home » date » 2010 » Aug » 19 »

TIJDREEKS - STAP32

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 19 Aug 2010 20:45:08 +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/19/t12822507739u2q9k5tijgkv51.htm/, Retrieved Thu, 19 Aug 2010 22:46:13 +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/19/t12822507739u2q9k5tijgkv51.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:
Mertens Jeroen
 
Dataseries X:
» Textbox « » Textfile « » CSV «
349 348 347 345 365 364 349 339 340 340 341 343 341 343 341 335 355 357 337 325 336 338 337 328 326 327 319 310 320 322 303 292 303 315 311 307 308 312 309 310 309 304 287 275 290 298 294 286 294 292 287 281 280 271 264 259 271 279 279 273 286 286 280 277 269 255 252 245 257 267 261 258 271 262 258 253 236 228 235 226 231 235 227 222 233 221 218 220 204 196 208 190 191 194 179 162 179 176 168 170 153 142 155 136 136 144 135 114 135 132 123 123 103 97 113 108 111 121 111 97
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.531154412223295
beta0.0234130278133079
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13341344.971005098799-3.97100509879908
14343345.230084535257-2.23008453525716
15341342.031277410535-1.03127741053476
16335334.9613611972320.0386388027675366
17355354.436223561250.563776438749869
18357356.7604070728310.239592927169099
19337340.962517825021-3.96251782502145
20325328.868357744425-3.86835774442505
21336327.3655750327928.6344249672075
22338331.8521386191246.14786138087607
23337336.2485901064860.75140989351371
24328338.656364206358-10.6563642063585
25326329.227864980564-3.22786498056416
26327330.433855824206-3.43385582420603
27319327.065605231230-8.06560523123034
28310316.837320985567-6.8373209855668
29320331.263876005043-11.2638760050435
30322326.471034633389-4.47103463338897
31303307.277186128511-4.27718612851055
32292295.435934275592-3.4359342755921
33303298.7835312528874.21646874711342
34315299.24267660013715.7573233998633
35311305.8544081887815.14559181121939
36307305.0300281997621.96997180023806
37308305.5384202234752.46157977652547
38312309.3037699134282.6962300865722
39309307.0477941624931.95220583750677
40310302.8880431177397.11195688226121
41309322.610335665247-13.6103356652467
42304319.873465336919-15.8734653369193
43287295.275493038155-8.27549303815533
44275282.029435349058-7.0294353490579
45290286.5393074430893.46069255691071
46298291.5391678939546.46083210604621
47294288.4199756836055.58002431639483
48286286.439241295129-0.439241295128795
49294285.6674438309818.33255616901937
50292292.341572900368-0.341572900368249
51287288.173121250955-1.17312125095521
52281284.681943920705-3.68194392070501
53280287.876034282732-7.87603428273155
54271286.31467221216-15.3146722121599
55264266.245851842678-2.24585184267846
56259257.1135237064971.88647629350316
57271270.3107698971460.689230102854026
58279274.7161653905924.28383460940785
59279270.2789075638548.7210924361458
60273267.4873406507985.51265934920156
61286273.66188310441912.3381168955813
62286278.4678562630207.53214373698034
63280278.3314950937031.66850490629741
64277275.4089835343371.59101646566251
65269279.546521296137-10.5465212961367
66255273.066915316-18.066915316
67252257.940750965684-5.9407509656844
68245249.051848488310-4.05184848830973
69257257.961202050557-0.961202050557006
70267262.8186396356734.18136036432747
71261260.5205285799270.479471420072628
72258252.2372218254925.7627781745079
73271261.0363796786139.96362032138666
74262262.367878948694-0.367878948693885
75258255.5682526485992.43174735140101
76253253.055750819112-0.0557508191115801
77236250.447748694841-14.4477486948412
78228238.157417061136-10.1574170611362
79235232.5901676070752.4098323929249
80226229.192164888464-3.19216488846354
81231238.947510546337-7.94751054633679
82235241.53163023721-6.53163023720987
83227232.049073345839-5.0490733458391
84222223.499654305332-1.49965430533229
85233228.6396465223684.36035347763192
86221222.767286701235-1.76728670123529
87218216.6452846902561.35471530974414
88220212.476162143527.52383785647987
89204207.737225301989-3.73722530198881
90196202.938562717491-6.93856271749127
91208203.8113786313084.18862136869248
92190199.227057633402-9.22705763340161
93191201.675223548629-10.6752235486290
94194201.692966021135-7.69296602113548
95179192.469333396527-13.4693333965270
96162181.090369306887-19.090369306887
97179176.4768739790832.52312602091683
98176168.2521410719717.74785892802885
99168168.494785808252-0.494785808251777
100170165.6398719265194.36012807348078
101153156.268837803188-3.26883780318838
102142150.243512661275-8.24351266127513
103155152.0289651465922.9710348534083
104136142.808469363308-6.80846936330826
105136142.870668125711-6.87066812571109
106144143.1811185372950.81888146270461
107135136.611460286680-1.61146028667986
108114129.298602276119-15.2986022761191
109135131.8835361844933.11646381550671
110132127.2065710261944.79342897380643
111123123.085158709136-0.0851587091361665
112123121.8057824601921.19421753980778
113103110.479564649033-7.47956464903281
11497100.779417214822-3.77941721482249
115113105.5922837992367.40771620076369
11610897.66323098073610.3367690192641
117111105.1975890851385.80241091486204
118121113.8351017938627.16489820613818
119111110.6643263444680.335673655531906
1209799.6124134355594-2.61241343555938


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121114.816336493040101.307662274083128.325010711998
122109.93786119009694.633224997304125.242497382889
123102.26582499524285.5186842746664119.012965715817
124101.51555888428582.9645523451852120.066565423386
12587.958601887472669.0316348189462106.885568955999
12684.443135279758664.1282615071186104.758009052399
12794.8440273693270.8973535825154118.790701156125
12885.671648100242361.5890113991952109.754284801289
12985.161603525366459.2495411975863111.073665853146
13089.286448168071460.3402311909033118.232665145240
13181.132528108068452.3728565984233109.892199617713
13271.301487241887846.431434729919596.171539753856
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507739u2q9k5tijgkv51/1dd6c1282250703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507739u2q9k5tijgkv51/1dd6c1282250703.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507739u2q9k5tijgkv51/2dd6c1282250703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507739u2q9k5tijgkv51/2dd6c1282250703.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507739u2q9k5tijgkv51/3645x1282250703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507739u2q9k5tijgkv51/3645x1282250703.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=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