Home » date » 2009 » Jun » 01 »

Opgave 10 oefening 2 !!!!!!

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 01 Jun 2009 13:09:38 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/01/t1243883421t2lq1ur04mz4mic.htm/, Retrieved Mon, 01 Jun 2009 21:10:21 +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/2009/Jun/01/t1243883421t2lq1ur04mz4mic.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
5,29 5,29 5,29 5,31 5,33 5,34 5,34 5,37 5,41 5,41 5,38 5,44 5,44 5,46 5,46 5,45 5,46 5,46 5,48 5,47 5,48 5,51 5,55 5,58 5,59 5,6 5,6 5,67 5,71 5,7 5,73 5,72 5,75 5,75 5,77 5,83 5,85 5,87 5,86 5,87 5,93 5,97 5,98 5,99 5,99 6,03 6,06 6,07 6,08 6,08 6,1 6,13 6,14 6,14 6,16 6,2 6,19 6,32 6,32 6,33 6,32 6,33 6,38 6,42 6,46 6,47 6,42 6,48 6,47 6,49 6,48 6,51 6,51 6,52 6,57 6,59 6,62 6,63 6,61 6,64
 
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.999944487040144
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
25.295.290
35.295.290
45.315.290.0199999999999996
55.335.30999888974080.0200011102591979
65.345.329998889679170.0100011103208306
75.345.339999444808765.55191236095709e-07
85.375.339999999969180.0300000000308209
95.415.36999833461120.0400016653887976
105.415.409997779389162.22061084453884e-06
115.385.40999999987673-0.0299999998767273
125.445.380001665388790.0599983346112118
135.445.439996669314863.33068514102308e-06
145.465.43999999981510.0200000001848961
155.465.459998889740791.11025920723762e-06
165.455.45999999993837-0.00999999993836642
175.465.45000055512960.00999944487040505
185.465.459999444901225.55098782051289e-07
195.485.459999999969180.0200000000308158
205.475.4799988897408-0.00999888974080143
215.485.470000555067960.00999944493203575
225.515.479999444901220.0300005550987841
235.555.509998334580390.0400016654196111
245.585.549997779389150.0300022206108466
255.595.579998334487930.0100016655120685
265.65.589999444777940.0100005552220557
275.65.599999444839585.55160420745437e-07
285.675.599999999969180.0700000000308192
295.715.669996114092810.0400038859071916
305.75.70999777926589-0.00999777926588763
315.735.700000555006320.0299994449936811
325.725.72999833464201-0.00999833464201494
335.755.720000555037150.0299994449628507
345.755.749998334642021.66535798395984e-06
355.775.749999999907550.0200000000924483
365.835.76999888974080.0600011102592024
375.855.829996669160780.0200033308392245
385.875.84999888955590.0200011104441025
395.865.86999888967916-0.0099988896791583
405.875.860000555067960.00999944493203841
415.935.869999444901220.0600005550987843
425.975.929996669191590.0400033308084069
435.985.96999777929670.0100022207032984
445.995.979999444747120.0100005552528764
455.995.989999444839585.55160422521794e-07
466.035.989999999969180.0400000000308189
476.066.02999777948160.0300022205183952
486.076.059998334487940.0100016655120641
496.086.069999444777940.0100005552220557
506.086.079999444839585.55160420745437e-07
516.16.079999999969180.0200000000308185
526.136.09999888974080.0300011102591995
536.146.129998334549570.0100016654504289
546.146.139999444777955.55222052334159e-07
556.166.139999999969180.0200000000308229
566.26.15999888974080.0400011102591993
576.196.19999777941997-0.00999777941997149
586.326.190000555006330.129999444993672
596.326.319992783346037.21665397129811e-06
606.336.319999999599380.010000000400618
616.326.32999944487038-0.0099994448703793
626.336.320000555098780.00999944490121774
636.386.329999444901220.0500005550987828
646.426.379997224321190.0400027756788077
656.466.419997779327520.0400022206724806
666.476.459997779358330.0100022206416703
676.426.46999944474713-0.0499994447471268
686.486.420002775617170.0599972243828315
696.476.47999666937649-0.00999666937649213
706.496.47000055494470.0199994450552943
716.486.48999888977161-0.00999888977160968
726.516.480000555067970.0299994449320327
736.516.509998334642021.66535798218348e-06
746.526.509999999907550.0100000000924485
756.576.51999944487040.0500005551296043
766.596.569997224321190.0200027756788090
776.626.589998889586720.0300011104132833
786.636.619998334549560.0100016654504378
796.616.62999944477795-0.0199994447779472
806.646.610001110228380.0299988897716243


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
816.639998334672846.590063710654296.68993295869139
826.639998334672846.569382072239876.7106145971058
836.639998334672846.553512229637826.72648443970786
846.639998334672846.540133244635056.73986342471062
856.639998334672846.528346079646876.7516505896988
866.639998334672846.517689643663126.76230702568255
876.639998334672846.507890024031016.77210664531466
886.639998334672846.498768750007436.78122791933825
896.639998334672846.490201854644466.78979481470121
906.639998334672846.482099077951926.79789759139375
916.639998334672846.474392280685846.80560438865984
926.639998334672846.467028525280356.81296814406532
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243883421t2lq1ur04mz4mic/17in11243883373.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243883421t2lq1ur04mz4mic/17in11243883373.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243883421t2lq1ur04mz4mic/2s4hh1243883373.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243883421t2lq1ur04mz4mic/2s4hh1243883373.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243883421t2lq1ur04mz4mic/3ud4m1243883373.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243883421t2lq1ur04mz4mic/3ud4m1243883373.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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