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:49:36 -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/t1244397007o982fbhv17fsyza.htm/, Retrieved Sun, 07 Jun 2009 19:50:07 +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/t1244397007o982fbhv17fsyza.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 time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.953285713274383
beta0.626443540081187
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
53833.33808.7524.5500000000002
63844.83861.02642532958-16.2264253295775
73851.33861.11617551798-9.81617551798354
83851.83862.40470474576-10.6047047457605
93854.13852.280461911281.81953808872413
103858.43860.18498607354-1.78498607354140
113861.63862.16670331421-0.56670331421401
123856.33865.58508257386-9.28508257386284
133855.83851.43655379234.36344620769842
143860.43857.254284121093.14571587890759
153855.13862.59431297464-7.49431297464389
163839.53853.46543302548-13.9654330254793
1738333827.161769117675.83823088233294
183833.63826.878211444266.7217885557402
193826.83829.81548209852-3.01548209852126
203818.23822.01384482077-3.81384482077237
213811.43809.734912056521.66508794347692
223806.83806.444568561490.355431438508731
233810.33799.9862901454710.3137098545340
243818.23809.942086593678.25791340632577
253858.93821.7241420083237.17585799168
263867.83885.72804787394-17.9280478739352
273872.33884.89058072043-12.5905807204313
283873.33881.82302928699-8.52302928698646
293876.73877.84471515636-1.14471515636251
303882.63878.745541189413.85445881059331
313883.53887.93194746546-4.43194746546169
323882.23886.71367232607-4.51367232606708
333888.13883.178155090494.92184490950831
343893.73889.99456689233.70543310769926
353901.93898.461708298233.43829170177150
363914.33909.252041643765.04795835623554
373930.33925.492114957914.8078850420884
383948.33942.294863286866.00513671314275
393971.53964.466932870857.03306712915264
403990.13992.43116843819-2.33116843819334
4139934010.89080592883-17.8908059288269
4239984001.8211434419-3.82114344190131
434015.84004.5159230060911.2840769939053
444041.24028.4757020873612.7242979126399
454060.74061.93202184942-1.23202184942102
464076.74080.71986042767-4.01986042766794
4741034095.131831735687.86816826431914
484125.34125.063637657410.236362342592656
494139.74147.66697093726-7.96697093725743
504146.74157.58581576732-10.8858157673249
5141584159.58927061899-1.58927061898885
524155.14168.08249039810-12.9824903980953
534144.84157.74080674139-12.9408067413915
544148.24139.851078936248.348921063759
554142.54149.18087474119-6.68087474118784
564142.14137.80337207074.29662792929685
574145.44139.769567729445.63043227056005
584146.34147.50243316825-1.20243316824599
594143.54148.24544058326-4.7454405832641
604149.24141.602055129477.59794487053114
614158.94151.12542544387.77457455619697
624166.14166.211285515-0.11128551499678
634179.14174.108777397264.99122260274453
644194.44189.41818173934.98181826069685
654211.74206.987944856874.71205514312805
664226.34227.48915003755-1.18915003755046
674235.84242.65699375052-6.85699375052172
684243.64247.65521403769-4.05521403769308
694258.74252.184760194416.51523980558704
704278.24270.793328806787.40667119322461
7142984295.688010407552.31198959245285
724315.14316.8306387632-1.73063876319702
734334.34332.731013743131.56898625686881
7443564352.373283211413.62671678859078
7543744376.87653303087-2.87653303086518
764395.54393.235627299152.2643727008508


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
774415.835727819424398.263694706764433.40776093207
784435.878662370794403.458652121224468.29867262035
794456.255250504764406.503358985724506.00714202381
804476.948893717464407.65537938964546.24240804533
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244397007o982fbhv17fsyza/1rqel1244396971.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244397007o982fbhv17fsyza/1rqel1244396971.ps (open in new window)


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


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


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