Home » date » 2010 » Aug » 05 »

Tijdreeks 2 - 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, 05 Aug 2010 17:03:11 +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/t12810278244a62ahwuv728cua.htm/, Retrieved Thu, 05 Aug 2010 19:04:40 +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/t12810278244a62ahwuv728cua.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 «
430 429 428 426 424 423 424 426 427 427 428 430 432 435 426 411 405 403 402 399 392 387 380 379 386 385 365 356 338 338 343 338 320 316 317 315 317 321 303 303 290 285 300 291 278 273 277 269 275 278 255 254 245 240 261 247 229 213 218 206 217 219 196 193 188 171 190 180 149 135 151 134 145 151 137 124 125 109 131 133 103 85 104 82
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.307424590775851
beta0.196794089031134
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13432438.758814102564-6.7588141025642
14435439.444724495245-4.4447244952446
15426429.114806696529-3.11480669652906
16411413.546961243023-2.54696124302302
17405407.541262632317-2.54126263231717
18403405.841904530174-2.84190453017379
19402402.211521694026-0.211521694025691
20399400.58531963483-1.5853196348296
21392397.607534177317-5.60753417731712
22387392.928968930485-5.92896893048527
23380389.501221348796-9.50122134879553
24379385.608791220062-6.60879122006196
25386377.6497492749198.35025072508051
26385382.3700060213552.62999397864479
27365373.350881557889-8.35088155788901
28356354.4646171847951.53538281520508
29338347.862860828351-9.86286082835107
30338341.406476921289-3.40647692128869
31343337.0921435694245.90785643057598
32338334.4338229581133.56617704188653
33320328.603802339481-8.60380233948132
34316320.949975484108-4.94997548410754
35317313.576851551973.42314844803042
36315314.6705435416990.329456458300683
37317318.634140610284-1.63414061028442
38321315.1485781340865.85142186591372
39303298.5349470754464.46505292455373
40303290.23118694013112.7688130598685
41290279.66392239543510.3360776045649
42285285.585946458503-0.585946458502747
43300290.4574568623919.54254313760856
44291289.3825000185351.61749998146513
45278276.4946472761011.50535272389885
46273277.060638715541-4.0606387155413
47277278.395207605667-1.39520760566705
48269278.208765185761-9.20876518576063
49275279.646844913491-4.64684491349061
50278282.003858504252-4.00385850425232
51255262.388507852757-7.3885078527565
52254256.462720068085-2.46272006808482
53245238.8776255429066.12237445709434
54240235.0345726979184.96542730208247
55261248.05795353929612.9420464607039
56247242.1755641255984.8244358744015
57229230.026115936374-1.02611593637397
58213225.636034702473-12.6360347024727
59218225.338554057704-7.33855405770413
60206216.712160422525-10.7121604225253
61217219.555236335325-2.55523633532545
62219221.83482240719-2.83482240719007
63196199.139707201191-3.13970720119136
64193197.093604263142-4.09360426314203
65188184.0163133188573.98368668114301
66171177.648465039572-6.64846503957168
67190190.857190139797-0.857190139796927
68180172.5070039303287.4929960696723
69149154.683919932116-5.68391993211577
70135138.097308371729-3.09730837172867
71151142.2543956616998.74560433830081
72134135.062496105495-1.06249610549492
73145145.931504579047-0.931504579046731
74151148.0249694060482.97503059395223
75137126.76462057834510.2353794216547
76124128.838716875522-4.83871687552221
77125121.750428601123.24957139887967
78109108.3728504396210.62714956037911
79131128.8488648994792.15113510052055
80133118.40833911044214.5916608895578
8110395.2727094333967.72729056660397
828587.0429849328856-2.04298493288563
83104102.2326207663111.76737923368931
848288.1867294804112-6.1867294804112


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8599.345266812769287.3595368519948111.330996773544
86106.26114736134393.4899146782371119.032380044449
8790.76503074845177.0001385637869104.529922933115
8880.283828297961465.323448489466995.2442081064558
8981.608826323121165.263241928044297.954410718198
9066.54342437647548.637576841226984.4492719117233
9188.971569662883969.345354344465108.597784981303
9287.445049140808465.9523385621415108.937759719475
9355.146018969500431.653129825562178.6389081134387
9437.383115748446311.767151035954162.9990804609386
9555.572412127518927.719698525810983.4251257292269
9635.10007184179964.9047827339876565.2953609496116
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/05/t12810278244a62ahwuv728cua/1sojq1281027787.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/05/t12810278244a62ahwuv728cua/1sojq1281027787.ps (open in new window)


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


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


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