Home » date » 2010 » Aug » 19 »

Tijdreeks B - Stap 27

*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:46: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/Aug/19/t1282250779pa2mtv2cq1hsyh3.htm/, Retrieved Thu, 19 Aug 2010 22:46:19 +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/t1282250779pa2mtv2cq1hsyh3.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:
Gregory Goris
 
Dataseries X:
» Textbox « » Textfile « » CSV «
225 224 223 221 219 218 219 221 222 222 223 225 226 229 235 229 231 229 226 232 234 230 232 231 237 241 256 255 264 259 253 258 265 258 257 255 255 255 275 276 278 268 253 257 255 253 245 248 246 243 260 262 262 251 236 238 239 243 233 238 232 224 238 236 231 209 179 179 165 174 163 166 164 152 163 167 157 138 111 110 91 100 88 89
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.999924474600477
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
2224225-1
3223224.000075525400-1.00007552539952
4221223.000075531104-2.00007553110362
5219221.000151056504-2.00015105650357
6218219.000151062208-1.00015106220764
7219218.0000755368090.999924463191434
8221218.9999244803052.00007551969458
9222220.9998489434971.00015105650269
10222221.9999244631927.55368081399865e-05
11223221.9999999942951.00000000570495
12225222.99992447462.00007552539995
13226224.9998489434971.00015105650314
14229225.9999244631923.00007553680814
15235228.9997734180966.00022658190352
16229234.99954683049-5.99954683049017
17231229.0004531181711.99954688182868
18229230.999848983423-1.99984898342288
19226229.000151039393-3.00015103939347
20232226.0002265876065.99977341239412
21234231.9995468647162.00045313528403
22230233.999848914978-3.99984891497772
23232230.0003020901871.99969790981265
24231231.999848972016-0.999848972016423
25237231.0000755139935.99992448600693
26241236.9995468533064.00045314669393
27256240.99969786417815.0003021358222
28255255.998867096188-0.998867096188235
29264255.0000754398378.9999245601635
30259263.999320277102-4.9993202771019
31253259.000377575661-6.00037757566128
32258253.0004531809144.99954681908631
33265257.9996224072297.00037759277097
34258264.999471293685-6.99947129368547
35257258.000528637866-1.00052863786590
36255257.000075565325-2.00007556532512
37255255.000151056506-0.000151056506155101
38255255.000000011409-1.14086162739113e-08
39275255.00000000000119.9999999999991
40276274.9984894920101.00151050799047
41278275.9999243605192.00007563948122
42268277.999848943488-9.99984894348825
43253268.000755242587-15.0007552425866
44257253.0011329380333.99886706196716
45255256.999697983968-1.99969798396751
46253255.000151027989-2.00015102798918
47245253.000151062206-8.0001510622055
48248245.0006042146052.99939578539477
49246247.999773469435-1.99977346943498
50243246.00015103369-3.00015103369023
51260243.00022658760516.9997734123945
52262259.9987160853212.00128391467877
53262261.9998488522330.000151147767212478
54251261.999999988584-10.9999999885845
55236251.000830779394-15.0008307793939
56238236.0011329437381.99886705626221
57239237.9998490347671.00015096523302
58243238.9999244631994.00007553680123
59233242.999697892697-9.99969789269696
60238233.0007552311784.99924476882154
61232237.999622430042-5.99962243004151
62224232.000453123881-8.00045312388102
63238224.00060423741913.9993957625815
64236237.998942690042-1.99894269004196
65231236.000150970945-5.0001509709453
66209231.000377638400-22.0003776383998
67179209.001661587311-30.0016615873108
68179179.002265887478-0.00226588747773349
69165179.000000171132-14.0000001711321
70174165.0010573556068.99894264439376
71163173.999320351262-10.9993203512615
72166163.0008307280642.99916927193598
73164165.999773486542-1.99977348654249
74152164.000151033692-12.0001510336915
75163152.00090631620110.9990936837988
76167162.9991692890554.00083071094485
77157166.999697835662-9.99969783566212
78138157.000755231174-19.0007552311741
79111138.00143503963-27.0014350396301
80110111.002039294169-1.00203929416907
8191110.000075679418-19.0000756794180
8210091.00143498830678.99856501169334
838899.9993203797824-11.9993203797824
848988.00090625346570.999093746534314


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8588.999924543045671.8050580448059106.194791041285
8688.999924543045664.68362940433113.316219681761
8788.999924543045659.2190416707404118.780807415351
8888.999924543045654.6121395019179123.387709584173
8988.999924543045650.5533572656456127.446491820446
9088.999924543045646.8839262668978131.115922819193
9188.999924543045643.5095290053354134.490320080756
9288.999924543045640.3687117105636137.631137375528
9388.999924543045637.4187880982270140.581060987864
9488.999924543045634.6286783524364143.371170733655
9588.999924543045631.9749196092389146.024929476852
9688.999924543045629.4392834863753148.560565599716
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282250779pa2mtv2cq1hsyh3/1645x1282250805.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282250779pa2mtv2cq1hsyh3/1645x1282250805.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282250779pa2mtv2cq1hsyh3/3yv5i1282250805.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282250779pa2mtv2cq1hsyh3/3yv5i1282250805.ps (open in new window)


 
Parameters (Session):
par1 = 0.01 ; par2 = 0.99 ; par3 = 0.01 ;
 
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

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