Home » date » 2009 » Jun » 04 »

Opgave 10 oef 2

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 04 Jun 2009 06:15:59 -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/04/t1244117791xncdt7g7os52zql.htm/, Retrieved Thu, 04 Jun 2009 14:16:35 +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/04/t1244117791xncdt7g7os52zql.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 «
65 65,05 65,84 66,6 67,55 68,07 69,06 69,06 69,11 69,29 69,38 69,28 69,75 69,9 70,21 70,48 71,55 72,18 72,64 72,77 72,74 73,13 73,44 73,34 73,34 73,81 74,26 74,72 75,11 75,26 75,89 75,91 76,43 76,56 76,76 76,76 76,56 76,82 77,09 77,51 77,76 77,86 77,89 77,94 77,99 78,17 78,91 78,87 78,88 79,08 79,41 79,51 79,73 80,38 80,56 80,46 80,45 80,58 80,68 80,52 81,49 81,66 81,95 82,3 82,4 83,14 83,17 83,11 83,21 83,33 83,88 83,8 83,73
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.942505883717753
beta0.0229525145944379
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1369.7567.67580128205132.07419871794869
1469.969.8517967397160.0482032602840547
1570.2170.2772390001607-0.0672390001606828
1670.4870.5470050110147-0.0670050110146718
1771.5571.5976253799827-0.0476253799827333
1872.1872.2163142244234-0.0363142244234069
1972.6473.1361283182693-0.496128318269299
2072.7772.62891557218320.141084427816793
2172.7472.7911649843006-0.0511649843005983
2273.1372.94152801505450.188471984945451
2373.4473.24724415778920.192755842210772
2473.3473.3615843918819-0.0215843918818877
2573.3473.9801949839464-0.64019498394643
2673.8173.4628418179170.347158182083007
2774.2674.15134708584050.108652914159478
2874.7274.57864424798610.141355752013865
2975.1175.8230060543459-0.713006054345882
3075.2675.7970719004046-0.537071900404555
3175.8976.1895013798266-0.299501379826623
3275.9175.87951931729940.0304806827006274
3376.4375.8993508147360.530649185264039
3476.5676.5973211313606-0.0373211313605708
3576.7676.67105396671040.0889460332896022
3676.7676.65356557426860.106434425731393
3776.5677.3383736330767-0.778373633076654
3876.8276.72566952006490.0943304799351381
3977.0977.1348173952727-0.044817395272716
4077.5177.3886749575030.121325042497062
4177.7678.5339304522478-0.773930452247839
4277.8678.4282654303364-0.568265430336425
4377.8978.7718544823174-0.881854482317436
4477.9477.88627599746990.0537240025300889
4577.9977.91157680270450.0784231972955212
4678.1778.09568915897050.0743108410295434
4778.9178.22933297072530.68066702927473
4878.8778.73078877408670.1392112259133
4978.8879.3565651549811-0.476565154981145
5079.0879.0459688991750.0340311008250183
5179.4179.35645586052510.0535441394748659
5279.5179.6808715937616-0.170871593761618
5379.7380.461236694468-0.731236694468009
5480.3880.3705374864430.00946251355694017
5580.5681.2160090859209-0.656009085920886
5680.4680.5773672471657-0.117367247165660
5780.4580.41941817778170.0305818222182666
5880.5880.53375295003080.0462470499691676
5980.6880.65075091592940.0292490840706279
6080.5280.46796143312670.052038566873307
6181.4980.9351382383230.55486176167696
6281.6681.60730162255990.0526983774401231
6381.9581.9181857357850.0318142642149297
6482.382.19042951860850.109570481391501
6582.483.1901731678355-0.790173167835505
6683.1483.07251480654080.0674851934592482
6783.1783.9216705926155-0.75167059261554
6883.1183.2090246944902-0.0990246944901827
6983.2183.06245532918920.147544670810802
7083.3383.2760447153780.0539552846220204
7183.8883.38761298861660.492387011383414
7283.883.64094552953670.159054470463289
7383.7384.2385114320388-0.508511432038773


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7483.857180663144782.966319370951684.7480419553377
7584.093668292797782.856184176521885.3311524090737
7684.316181996104582.798757454950485.8336065372587
7785.134339057564483.371384845446986.8972932696819
7885.801241788643883.814183486096187.7883000911915
7986.528743768684884.332269438966888.7252180984027
8086.567383949526684.17217065712688.9625972419271
8186.535773242165783.949891339490989.1216551448405
8286.609179265775483.838898090788489.3794604407623
8386.698193599103583.748480519883889.6479066783233
8486.460724064327483.335571842404289.5858762862506
8586.858998514147683.561649869886490.1563471584088
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244117791xncdt7g7os52zql/1typp1244117756.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244117791xncdt7g7os52zql/1typp1244117756.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244117791xncdt7g7os52zql/2yxzr1244117756.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244117791xncdt7g7os52zql/2yxzr1244117756.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244117791xncdt7g7os52zql/30lhg1244117756.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/04/t1244117791xncdt7g7os52zql/30lhg1244117756.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=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