Home » date » 2010 » Aug » 06 »

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: Fri, 06 Aug 2010 07:52: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/06/t1281081221vp8qubzqqu2f4ez.htm/, Retrieved Fri, 06 Aug 2010 09:53:42 +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/06/t1281081221vp8qubzqqu2f4ez.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 de Walle Mathias
 
Dataseries X:
» Textbox « » Textfile « » CSV «
239 238 237 235 233 232 233 235 236 236 237 239 238 237 244 230 237 244 239 240 230 228 231 228 225 227 238 214 222 233 228 218 203 209 207 203 195 199 207 182 181 189 186 174 153 158 153 147 143 156 168 142 146 150 145 133 111 115 109 105 96 112 127 107 116 125 120 107 86 87 79 83 75 89 104 86 98 98 85 74 49 54 47 56
 
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.346185870041599
beta0.111603919487912
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13238235.9412393162392.0587606837606
14237235.39695637331.60304362670033
15244243.2568453370650.74315466293453
16230230.389431859024-0.389431859024484
17237238.114886958018-1.11488695801847
18244245.671125314383-1.67112531438292
19239234.4285700484774.57142995152327
20240238.4403862712791.55961372872056
21230240.136477709341-10.1364777093412
22228236.558584311988-8.55858431198797
23231234.321268417602-3.32126841760171
24228234.060384419367-6.06038441936744
25225230.879823462712-5.87982346271187
26227226.1822646530140.81773534698624
27238232.0706465409895.92935345901117
28214219.321056263557-5.3210562635569
29222223.737338651766-1.73733865176635
30233229.5627664418613.43723355813876
31228223.2158386092524.78416139074776
32218224.386065407814-6.38606540781421
33203214.431352238965-11.4313522389646
34209210.133759276445-1.1337592764454
35207212.874826045797-5.87482604579728
36203208.824187260518-5.82418726051802
37195204.737696897866-9.73769689786576
38199201.828752932247-2.82875293224694
39207208.40113315391-1.40113315390957
40182184.07924956736-2.07924956736014
41181190.407228731678-9.4072287316782
42189195.110669698856-6.11066969885616
43186184.120155513781.87984448622038
44174174.65060880023-0.650608800230458
45153161.273255306033-8.27325530603287
46158162.814183405711-4.81418340571108
47153159.051687882799-6.05168788279883
48147152.836422182996-5.83642218299565
49143144.050007460696-1.05000746069641
50156146.8644580681199.13554193188074
51168157.1730290655110.8269709344904
52142135.7743445650986.22565543490157
53146139.6404583157026.35954168429771
54150152.020859648375-2.02085964837457
55145147.891894023194-2.89189402319386
56133135.153036320324-2.15303632032445
57111116.250765887901-5.2507658879006
58115121.195399428938-6.1953994289378
59109116.188056501917-7.1880565019172
60105109.718643381837-4.71864338183654
6196104.490303212596-8.49030321259619
62112111.1427133906790.857286609321037
63127119.1257420742717.87425792572856
6410793.016777353754413.9832226462456
6511699.27601941158816.7239805884119
66125109.78568702068915.2143129793113
67120111.7401617864828.25983821351832
68107104.4621685389122.53783146108769
698686.4569225710658-0.456922571065846
708793.9271673493949-6.92716734939488
717989.4728762963973-10.4728762963973
728384.8093236651718-1.80932366517177
737579.5630694829347-4.56306948293468
748995.2792353176928-6.27923531769282
75104106.696387949595-2.69638794959508
768681.83063014551624.16936985448385
779887.013723935562510.9862760644375
789894.85767969713063.14232030286936
798587.9272998192283-2.92729981922825
807472.44435819597611.55564180402391
814951.5121415641949-2.51214156419486
825453.3322183015270.667781698472979
834748.7740500496292-1.77405004962918
845652.70743988517113.29256011482893


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8547.545241311448735.359614237733759.7308683851638
8664.013614695827250.956855221393177.0703741702614
8780.484259598617266.444832214378694.5236869828558
8861.68225299832546.55570438973876.8088016069121
8970.359243267994854.04841470899286.6700718269975
9069.327237721759851.741994094984486.9124813485352
9157.275043153890238.331738956375476.2183473514051
9245.784015817361425.404850586252766.1631810484702
9321.6410942953023-0.24654842658154143.5287370171862
9426.49438661964233.0302082865449.9585649527446
9520.1672063788479-4.9375733256874445.2719860833833
9628.15457895555471.3486261253763754.9605317857329
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281081221vp8qubzqqu2f4ez/1hrfd1281081158.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281081221vp8qubzqqu2f4ez/1hrfd1281081158.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/06/t1281081221vp8qubzqqu2f4ez/2siwy1281081158.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281081221vp8qubzqqu2f4ez/2siwy1281081158.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/06/t1281081221vp8qubzqqu2f4ez/3siwy1281081158.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281081221vp8qubzqqu2f4ez/3siwy1281081158.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