Home » date » 2009 » Jun » 07 »

Opgave 10 Oefening 2 Anke Winckelmans

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 07 Jun 2009 11:38:07 -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/07/t1244396369m9qoogd6dwqhxc3.htm/, Retrieved Sun, 07 Jun 2009 19:39:33 +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/07/t1244396369m9qoogd6dwqhxc3.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 «
3779.7 3795.5 3813.1 3826.9 3833.3 3844.8 3851.3 3851.8 3854.1 3858.4 3861.6 3856.3 3855.8 3860.4 3855.1 3839.5 3833 3833.6 3826.8 3818.2 3811.4 3806.8 3810.3 3818.2 3858.9 3867.8 3872.3 3873.3 3876.7 3882.6 3883.5 3882.2 3888.1 3893.7 3901.9 3914.3 3930.3 3948.3 3971.5 3990.1 3993 3998 4015.8 4041.2 4060.7 4076.7 4103 4125.3 4139.7 4146.7 4158 4155.1 4144.8 4148.2 4142.5 4142.1 4145.4 4146.3 4143.5 4149.2 4158.9 4166.1 4179.1 4194.4 4211.7 4226.3 4235.8 4243.6 4258.7 4278.2 4298 4315.1 4334.3 4356 4374 4395.5
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.953285713274124
beta0.626443540095629
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
53833.33808.7524.5500000000002
63844.83861.02642532990-16.2264253299045
73851.33861.11617551792-9.81617551792124
83851.83862.40470474558-10.6047047455818
93854.13852.280461911061.81953808893832
103858.43860.18498607344-1.78498607344136
113861.63862.1667033142-0.566703314202186
123856.33865.58508257384-9.28508257383919
133855.83851.436553792174.36344620782575
143860.43857.254284121053.14571587895216
153855.13862.59431297472-7.49431297472165
163839.53853.46543302540-13.9654330254048
1738333827.161769117465.83823088254212
183833.63826.878211444196.72178855581296
193826.83829.81548209863-3.01548209863267
203818.23822.01384482079-3.8138448207892
213811.43809.73491205651.66508794350375
223806.83806.444568561430.355431438574215
233810.33799.9862901454810.3137098545189
243818.23809.942086593848.2579134061607
253858.93821.7241420085337.1758579914713
263867.83885.72804787444-17.9280478744431
273872.33884.89058072046-12.5905807204554
283873.33881.82302928681-8.52302928681229
293876.73877.8447151562-1.14471515620153
303882.63878.745541189213.85445881078613
313883.53887.93194746552-4.43194746552081
323882.23886.71367232604-4.51367232604298
333888.13883.178155090444.92184490955697
343893.73889.994566892243.70543310776475
353901.93898.461708298323.43829170167783
363914.33909.252041643875.04795835612686
373930.33925.492114958054.8078850419497
383948.33942.294863286876.00513671313138
393971.53964.466932870997.03306712901076
403990.13992.43116843838-2.3311684383757
4139934010.8908059289-17.8908059288974
4239984001.82114344158-3.82114344158117
434015.84004.5159230059411.2840769940576
444041.24028.4757020874812.7242979125190
454060.74061.93202184969-1.23202184968522
464076.74080.71986042768-4.01986042768431
4741034095.131831735657.86816826435324
484125.34125.063637657510.236362342488974
494139.74147.66697093734-7.96697093734292
504146.74157.58581576719-10.8858157671903
5141584159.5892706188-1.58927061879604
524155.14168.08249039799-12.9824903979925
534144.84157.74080674122-12.9408067412214
544148.24139.851078935948.34892106405823
554142.54149.18087474119-6.68087474118511
564142.14137.803372070624.29662792938234
574145.44139.769567729515.63043227049184
584146.34147.50243316831-1.2024331683142
594143.54148.24544058326-4.74544058326228
604149.24141.602055129427.5979448705848
614158.94151.125425443927.77457455608328
624166.14166.21128551512-0.111285515118652
634179.14174.10877739734.99122260270451
644194.44189.41818173944.98181826060045
654211.74206.987944857004.71205514299527
664226.34227.48915003764-1.18915003763595
674235.84242.65699375054-6.85699375053628
684243.64247.65521403761-4.05521403761304
694258.74252.184760194356.51523980565435
704278.24270.793328806807.40667119319551
7142984295.688010407662.31198959233916
724315.14316.83063876329-1.73063876329161
734334.34332.731013743171.56898625683061
7443564352.373283211413.62671678859351
7543744376.87653303091-2.87653303090610
764395.54393.235627299152.26437270085262


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
774415.835727819474398.263694706824433.40776093212
784435.878662370864403.45865212114468.29867262062
794456.255250504844406.503358985314506.00714202438
804476.948893717574407.655379388864546.24240804628
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244396369m9qoogd6dwqhxc3/1wvoh1244396284.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244396369m9qoogd6dwqhxc3/1wvoh1244396284.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244396369m9qoogd6dwqhxc3/2pbfs1244396284.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244396369m9qoogd6dwqhxc3/2pbfs1244396284.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244396369m9qoogd6dwqhxc3/3qngd1244396284.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244396369m9qoogd6dwqhxc3/3qngd1244396284.ps (open in new window)


 
Parameters (Session):
par1 = 4 ; par2 = Triple ; par3 = additive ;
 
Parameters (R input):
par1 = 4 ; 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