Home » date » 2010 » Aug » 02 »

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: Mon, 02 Aug 2010 14:17:42 +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/02/t12807588609cyavhudg1gbie0.htm/, Retrieved Mon, 02 Aug 2010 16:21:01 +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/02/t12807588609cyavhudg1gbie0.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:
Van Puyenbroeck Cassandra
 
Dataseries X:
» Textbox « » Textfile « » CSV «
408 407 406 404 402 401 402 404 405 405 406 408 405 400 402 404 410 402 400 392 390 397 394 397 400 395 391 392 395 386 385 372 367 364 364 368 370 357 350 353 353 348 337 322 315 316 317 326 329 310 301 299 300 295 274 258 250 247 248 256 253 237 225 214 221 221 207 194 191 185 180 185 189 179 162 148 152 151 134 122 119 115 113 109
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.385319959597228
beta0.126395076856841
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13405404.6044337606840.395566239316054
14400399.9907163130630.00928368693701032
15402402.770275293822-0.770275293822124
16404405.045273605086-1.04527360508581
17410411.038402092426-1.03840209242622
18402403.10860548517-1.10860548516996
19400397.3060995332562.6939004667438
20392400.349974832255-8.3499748322547
21390397.773426181316-7.77342618131627
22397393.7487809211413.25121907885949
23394394.630494173634-0.630494173633792
24397394.9441324944062.05586750559428
25400392.0528189090847.94718109091576
26395389.879673808155.12032619185021
27391394.166585508922-3.16658550892197
28392395.249640657892-3.24964065789209
29395400.190686981649-5.19068698164949
30386390.208633337376-4.2086333373764
31385384.988823875090.0111761249100937
32372379.519761302911-7.51976130291058
33367376.967156034955-9.96715603495471
34364378.116664632598-14.1166646325984
35364368.31712618489-4.31712618489041
36368367.0788883574480.921111642552262
37370365.5337419058514.46625809414854
38357358.274324945194-1.27432494519417
39350352.684623450914-2.68462345091416
40353351.6069813792911.39301862070857
41353355.074569403655-2.07456940365512
42348344.9793845394343.02061546056621
43337343.573582111179-6.57358211117884
44322329.052069877344-7.05206987734368
45315323.311994559176-8.31199455917624
46316320.765944176461-4.76594417646083
47317319.265703917486-2.26570391748641
48326320.8103680332075.18963196679306
49329322.0695939901966.93040600980396
50310311.331546432876-1.33154643287583
51301303.950633025261-2.95063302526131
52299304.361701015488-5.36170101548828
53300301.850895219406-1.85089521940648
54295293.7404900470291.2595099529708
55274284.439651568884-10.439651568884
56258266.626976107296-8.62697610729606
57250257.921532865865-7.92153286586466
58247256.140563474066-9.1405634740658
59248252.713429684825-4.7134296848252
60256256.000258710118-0.000258710118487215
61253254.179650712091-1.17965071209116
62237232.6931142071094.30688579289065
63225224.2191221112410.780877888758567
64214222.49725549439-8.49725549438966
65221218.6948458637512.30515413624943
66221212.0587292647298.94127073527062
67207196.861682597610.1383174023995
68194187.4296213467766.57037865322368
69191185.0910905878895.90890941211131
70185188.640977102408-3.64097710240847
71180191.073082575933-11.0730825759331
72185195.515639332241-10.5156393322413
73189189.11530756775-0.115307567749511
74179171.660195414977.33980458502995
75162162.584038865561-0.584038865560757
76148154.96324233736-6.96324233735993
77152158.796737688916-6.79673768891575
78151152.694077120603-1.69407712060283
79134133.5783590257010.421640974299237
80122117.1794404765134.82055952348716
81119112.6451696997336.35483030026651
82115109.4035634451335.59643655486659
83113110.183357086692.81664291330964
84109120.353711739743-11.353711739743


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85120.015674235211109.084749489666130.946598980755
86107.18546073812595.2693712604991119.101550215751
8790.050995109519477.0188799564509103.083110262588
8878.403008084591664.134846004884992.6711701642983
8985.029991124854869.4161100469001100.643872202809
9085.021835630414767.9619016480715102.081769612758
9168.280957593865349.68279996476586.8791152229656
9254.824553450763934.603018790178675.0460881113492
9349.542190632448927.618113444412871.466267820485
9443.242555647035419.541872548907566.9432387451634
9539.74146992704214.194475134896665.2884647191874
9639.5633270086512.104054004965167.0226000123348
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/02/t12807588609cyavhudg1gbie0/1aef01280758657.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/02/t12807588609cyavhudg1gbie0/1aef01280758657.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/02/t12807588609cyavhudg1gbie0/235w31280758657.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/02/t12807588609cyavhudg1gbie0/235w31280758657.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/02/t12807588609cyavhudg1gbie0/335w31280758657.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/02/t12807588609cyavhudg1gbie0/335w31280758657.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