Home » date » 2008 » May » 31 »

sven van roy - opgave 10 - oefening 2- eigen reeks

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 31 May 2008 10:28:22 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/31/t12122513941o3im1928g1bnym.htm/, Retrieved Sat, 31 May 2008 16:29:54 +0000
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
7,1 7,1 7,3 7,1 7,4 7,3 7,4 7,6 7,8 7,7 8 8,1 7,7 7,9 8,1 8,1 8,2 8,1 8,3 8,3 8,3 8,5 8,7 8,7 8,4 8,4 8,6 8,7 8,7 8,6 8 8,1 8,1 8,5 8,6 8,6 8,3 8,3 8,5 9,2 9,2 9 7,4 7,3 7,4 8,6 8,7 8,7 8,5 8,4 8,6 8,4 8,4 8,2 7,7 7,6 7,7 8,1 8,2 8,3 8,1 8 8,2 7,6 7,7 7,6 6,9 6,9 7 7,4 7,4 7,5
 
Text written by user:
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.759346220500825
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
137.77.372747162997980.327252837002016
147.97.754005839604880.145994160395121
158.18.013863735249590.0861362647504098
168.18.02524293564330.074757064356703
178.28.119139641694340.080860358305662
188.18.027507109709040.0724928902909596
198.38.227882946575410.0721170534245879
208.38.232874234189360.0671257658106406
218.38.242571162790.057428837210006
228.58.43959065685180.0604093431481942
238.78.638034776392360.061965223607638
248.78.642492994943660.0575070050563422
258.48.322284382729530.0777156172704654
268.48.47778538836818-0.0777853883681825
278.68.561970717357860.0380292826421424
288.78.530507629195890.169492370804109
298.78.70031868514656-0.000318685146565301
308.68.535447880779160.0645521192208385
3188.73826863996108-0.738268639961078
328.18.12734877532027-0.0273487753202684
338.18.063918400808860.0360815991911441
348.58.241493425700720.258506574299279
358.68.589536757229520.0104632427704807
368.68.554260066641010.0457399333589894
378.38.234430267129940.0655697328700562
388.38.34234278710195-0.0423427871019530
398.58.479452538464810.0205474615351875
409.28.466103192973550.733896807026447
419.29.023635944797630.176364055202370
4299.00060930513061-0.000609305130609528
437.48.94616870431184-1.54616870431184
447.37.8894016654441-0.589401665444092
457.47.41664253361104-0.0166425336110434
468.67.588882865584451.01111713441555
478.78.447171077459160.252828922540841
488.78.604220466921740.0957795330782574
498.58.323934656657220.176065343342783
508.48.49035250013043-0.0903525001304306
518.68.60883654246001-0.00883654246001164
528.48.73552077333166-0.335520773331657
538.48.356720769648680.0432792303513203
548.28.2076243241798-0.00762432417980641
557.77.76246074038417-0.0624607403841715
567.68.06849393088288-0.468493930882877
577.77.83174362246814-0.131743622468142
588.18.1599319666047-0.0599319666046956
598.28.026356074619680.173643925380317
608.38.089830149387270.210169850612727
618.17.932374426333460.167625573666543
6288.02972734991236-0.0297273499123598
638.28.2041951279071-0.00419512790709753
647.68.25093153080812-0.650931530808116
657.77.7262645662722-0.0262645662721974
667.67.52814705316680.0718529468331965
676.97.16412147444243-0.264121474442434
686.97.19014777554868-0.290147775548684
6977.15290119137087-0.152901191370868
707.47.44385958051969-0.0438595805196851
717.47.380792673912570.0192073260874306
727.57.340750954238050.159249045761952


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
737.166874345473546.522234201634097.811514489313
747.09834945552096.281341348695227.91535756234659
757.278634366353746.333465683363288.2238030493442
767.175934730598326.100863256247968.25100620494868
777.289170547535616.124515457010848.45382563806038
787.142738035326545.940468728073268.3450073425798
796.671626511488075.342493055297318.00075996767882
806.882522793316815.430930746800848.33411483983279
817.097474767902295.487136793705528.70781274209906
827.536765030042885.856503585538089.21702647454767
837.521901178382085.776192173918689.26761018284548
847.5NANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t12122513941o3im1928g1bnym/1t9dh1212251296.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t12122513941o3im1928g1bnym/1t9dh1212251296.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t12122513941o3im1928g1bnym/2umuh1212251296.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t12122513941o3im1928g1bnym/2umuh1212251296.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t12122513941o3im1928g1bnym/319g81212251296.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t12122513941o3im1928g1bnym/319g81212251296.ps (open in new window)


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