Home » date » 2008 » Jun » 01 »

opgave 10 - oefening 2 - Seghers Sanne 2MAR03

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 01 Jun 2008 08:09:02 -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/Jun/01/t1212329418h35ur1pdul867e4.htm/, Retrieved Sun, 01 Jun 2008 14:10:18 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
additief triple model PPI
 
Dataseries X:
» Textbox « » Textfile « » CSV «
121.3 124.0 122.9 120.1 118.3 118.1 118.4 116.6 116.4 116.7 117.7 119.5 123.3 124.6 125.4 127.0 126.8 131.8 128.1 130.1 133.5 142.7 140.0 137.9 132.6 133.7 137.0 141.1 145.3 146.1 141.8 140.0 137.4 139.5 140.3 142.7 143.3 146.0 147.2 146.1 147.1 141.7 138.8 138.3 140.2 143.1 142.0 142.4 141.2 138.0 137.9 136.8 135.9 138.8 139.5 138.0 139.7 137.5 137.8 137.4 141.7 145.3 148.9 151.3 151.4 149.2 143.8 143.6 144.3 142.0 140.8 141.8
 
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.829991115439346
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13123.3116.0772342995177.22276570048308
14124.6122.4053989931512.19460100684874
15125.4123.751898330771.64810166923002
16127124.9239747402382.07602525976171
17126.8124.4345572612682.36544273873179
18131.8129.7020203851632.09797961483727
19128.1126.5891581591841.5108418408161
20130.1129.0764767972291.0235232027714
21133.5132.4634919619751.03650803802515
22142.7141.4529510912841.24704890871615
23140138.4296572727031.57034272729678
24137.9136.2663611178881.63363888211234
25132.6138.575201216059-5.97520121605925
26133.7133.0943379561490.605662043850998
27137133.0291223287023.9708776712975
28141.1136.2018329953464.89816700465397
29145.3138.1039716339197.19602836608095
30146.1147.335306803528-1.23530680352798
31141.8141.3560278270470.443972172953437
32140142.875005621354-2.87500562135395
33137.4143.028484036150-5.62848403614967
34139.5146.521852778001-7.02185277800052
35140.3136.6904068464863.60959315351411
36142.7136.2304313362646.46956866373617
37143.3141.2594797701812.04052022981884
38146143.550399316452.4496006835501
39147.2145.5877529324971.61224706750275
40146.1146.960468578617-0.860468578616718
41147.1144.4736476929532.62635230704655
42141.7148.478790445586-6.77879044558568
43138.8138.1839616432710.616038356729206
44138.3139.281497128688-0.981497128687835
45140.2140.538454975444-0.338454975444165
46143.1148.185615772513-5.08561577251277
47142141.7686696170220.231330382978427
48142.4138.9909872679993.409012732001
49141.2140.7268238863560.473176113644399
50138141.786409052998-3.78640905299781
51137.9138.50557243767-0.605572437670077
52136.8137.617133970016-0.817133970015561
53135.9135.7590709539170.140929046083272
54138.8136.1023766533342.69762334666558
55139.5134.9300737010144.56992629898645
56138139.037705824025-1.03770582402504
57139.7140.357333832239-0.657333832239487
58137.5146.932768499327-9.43276849932681
59137.8137.811652288286-0.0116522882861432
60137.4135.3725307125542.02746928744634
61141.7135.4625802375976.23741976240271
62145.3140.5822690970654.71773090293539
63148.9144.9005635745563.99943642544426
64151.3147.7982742096763.50172579032446
65151.4149.6877056481931.71229435180680
66149.2151.769891336676-2.56989133667565
67143.8146.543906133219-2.74390613321893
68143.6143.627775035428-0.0277750354281636
69144.3145.850303243428-1.55030324342820
70142150.192679373583-8.19267937358342
71140.8143.702499577618-2.90249957761804
72141.8139.2106692202222.58933077977798


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
73140.482787776311133.352005410921147.613570141701
74140.167113041841130.900153789418149.434072294265
75140.447616341958129.451934897427151.443297786489
76139.941215047284127.453881982409152.428548112160
77138.620025948267124.801127160135152.438924736400
78138.553012925353123.520034499233153.585991351473
79135.430430637524119.274350760162151.586510514886
80135.253483670160118.047455841308152.459511499012
81137.240221588443119.044731205088155.435711971797
82141.74007268016122.606219253987160.873926106333
83142.949121542149122.920820975756162.977422108543
84141.8120.915524899550162.684475100451
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212329418h35ur1pdul867e4/1murr1212329336.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212329418h35ur1pdul867e4/1murr1212329336.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212329418h35ur1pdul867e4/2gpd11212329336.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212329418h35ur1pdul867e4/2gpd11212329336.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212329418h35ur1pdul867e4/35g2p1212329336.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212329418h35ur1pdul867e4/35g2p1212329336.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