Home » date » 2010 » Aug » 20 »

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 23:16:18 +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/20/t1282259766khl3831gt14h1lh.htm/, Retrieved Fri, 20 Aug 2010 01:16:10 +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/20/t1282259766khl3831gt14h1lh.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:
Dieter Van Boxel
 
Dataseries X:
» Textbox « » Textfile « » CSV «
93 92 91 89 87 86 87 89 90 90 91 93 93 87 89 92 98 92 92 87 92 98 101 102 102 90 87 92 105 90 88 83 98 109 118 118 115 107 101 111 128 115 111 105 120 132 135 142 139 127 113 130 143 139 137 134 139 157 152 153 147 132 117 123 139 134 134 128 118 144 140 151 144 135 122 124 146 146 147 148 132 161 159 173
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.373511042776394
beta0.00909734578251893
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
139390.76263994763732.23736005236272
148785.8857878960591.11421210394097
158988.61143267321230.388567326787694
169291.66764617337250.332353826627482
179897.34123640567250.658763594327468
189291.1684011386450.831598861355047
199290.08781225565851.91218774434149
208793.4508464783774-6.45084647837741
219292.6931746271342-0.693174627134184
229892.7169365368195.28306346318102
2310195.46677333869685.5332266613032
2410299.26753750769982.73246249230019
25102101.6929797367290.307020263271014
269094.7887630758412-4.7887630758412
278794.9788281228176-7.97882812281763
289294.9499166765758-2.94991667657584
2910599.6871385563315.31286144366892
309095.1041093141956-5.10410931419564
318892.4343723119153-4.43437231191533
328388.0748444720858-5.07484447208577
339891.34586227391516.65413772608485
3410997.840597195454211.1594028045458
35118102.88799085930015.1120091406997
36118108.4942462615819.50575373841885
37115111.9340363145013.0659636854986
38107101.7134383925325.28656160746831
39101103.518259211184-2.51825921118447
40111109.8024193071911.19758069280938
41128123.4457615863534.55423841364714
42115109.5228410867855.47715891321491
43111111.163069326092-0.163069326092099
44105107.185085362127-2.18508536212738
45120122.379409751109-2.37940975110898
46132129.7004170361712.29958296382898
47135134.0582089513420.941791048657706
48142130.18145240279211.8185475972083
49139129.8756163341309.1243836658702
50127121.6871766587825.31282334121799
51113117.840334277878-4.84033427787783
52130127.0353027864182.96469721358189
53143145.798997223635-2.79899722363479
54139127.68821388811111.3117861118893
55137127.4236622406539.57633775934681
56134124.9148654199439.08513458005665
57139147.786908234961-8.78690823496126
58157157.979956774861-0.97995677486125
59152160.838013178872-8.83801317887244
60153160.315987937495-7.31598793749484
61147150.314188458132-3.31418845813235
62132134.002251470766-2.00225147076577
63117120.382999554911-3.38299955491098
64123135.825886484309-12.8258864843092
65139145.114987861629-6.11498786162855
66134134.322702108223-0.322702108222501
67134128.5759521895625.42404781043794
68128124.2775990556813.72240094431938
69118133.217807005481-15.2178070054806
70144144.256997137560-0.256997137560319
71140142.371677286859-2.37167728685895
72151144.7715787763556.22842122364494
73144142.4155768286811.5844231713194
74135129.0651247273715.93487527262945
75122117.5484785095844.45152149041594
76124129.869070846281-5.8690708462806
77146146.564514681817-0.564514681816547
78146141.199880532394.80011946761013
79147140.7692075036336.23079249636666
80148135.17234844685912.8276515531415
81132134.791961754875-2.79196175487539
82161163.374736171705-2.37473617170534
83159159.004491639959-0.00449163995881463
84173168.8329591853304.16704081466963


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85161.858561825761150.123013955486173.594109696037
86149.213768800595136.795030289055161.632507312136
87132.981614256612120.082387859530145.880840653694
88137.489660098904123.725832588980151.253487608828
89162.139783985959146.731885454870177.547682517048
90160.131188383047144.165785027919176.096591738174
91158.618845241228142.098391841271175.139298641184
92154.229969759351137.341785262358171.118154256344
93138.602498657158122.057751410036155.147245904281
94169.950555024538150.625180674227189.275929374849
95167.821139854713148.101900772924187.540378936501
96180.908500239743150.662431825259211.154568654228
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282259766khl3831gt14h1lh/1topt1282259776.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282259766khl3831gt14h1lh/1topt1282259776.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/20/t1282259766khl3831gt14h1lh/2topt1282259776.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282259766khl3831gt14h1lh/2topt1282259776.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/20/t1282259766khl3831gt14h1lh/3mxow1282259776.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282259766khl3831gt14h1lh/3mxow1282259776.ps (open in new window)


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