Home » date » 2011 » May » 19 »

Oefening 10; Eigen reeks; Weuts Koen

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 19 May 2011 06:44:06 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/19/t13057873493bb371fsdtvrjf1.htm/, Retrieved Thu, 19 May 2011 08:42:33 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
190,2 180,7 193,6 192,8 195,5 197,2 196,9 178,9 172,4 156,4 143,7 153,6 168,8 185,8 199,9 205,4 197,5 199,6 200,5 193,7 179,6 169,1 169,8 195,5 194,8 204,5 203,8 204,8 204,9 240 248,3 258,4 254,9 288,3 333,6 346,3 357,5 490,7 468,2 471,2 517,1 609,2 682 614 554,2 406,8 348,6 298,8 313,7 282,1 232,9 239,3 241,9 265,7 276 271,5 254,6 269,9 293,5 306,1 365,4 347,9 352,1 377,9 377,4 372,2 362,5 341,9 354,8 369,2 406,7 454,7
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13168.8166.5279113247862.27208867521364
14185.8185.7334353146850.0665646853146598
15199.9199.6834353146850.216564685314694
16205.4205.2709353146850.12906468531466
17197.5196.5834353146850.916564685314682
18199.6197.4667686480192.13323135198135
19200.5206.187601981352-5.68760198135203
20193.7183.8792686480199.82073135198132
21179.6187.425101981352-7.82510198135199
22169.1163.5126019813525.58739801864803
23169.8156.49176864801913.3082313519814
24195.5180.21676864801915.2832313519813
25194.8211.150101981352-16.350101981352
26204.5211.733435314685-7.23343531468535
27203.8218.383435314685-14.5834353146853
28204.8209.170935314685-4.37093531468534
29204.9195.9834353146858.91656468531468
30240204.86676864801935.1332313519814
31248.3246.5876019813521.71239801864797
32258.4231.67926864801926.7207313519813
33254.9252.1251019813522.77489801864806
34288.3238.81260198135249.4873980186481
35333.6275.69176864801957.9082313519814
36346.3344.0167686480192.28323135198133
37357.5361.950101981352-4.45010198135196
38490.7374.433435314685116.266564685315
39468.2504.583435314685-36.3834353146853
40471.2473.570935314685-2.37093531468537
41517.1462.38343531468554.7165646853147
42609.2517.06676864801992.1332313519814
43682615.78760198135266.212398018648
44614665.379268648019-51.3792686480188
45554.2607.725101981352-53.5251019813519
46406.8538.112601981352-131.312601981352
47348.6394.191768648019-45.5917686480186
48298.8359.016768648019-60.2167686480187
49313.7314.450101981352-0.750101981351975
50282.1330.633435314685-48.5334353146853
51232.9295.983435314685-63.0834353146853
52239.3238.2709353146851.02906468531467
53241.9230.48343531468511.4165646853147
54265.7241.86676864801923.8332313519813
55276272.2876019813523.71239801864795
56271.5259.37926864801912.1207313519814
57254.6265.225101981352-10.6251019813519
58269.9238.51260198135231.387398018648
59293.5257.29176864801936.2082313519815
60306.1303.9167686480192.18323135198136
61365.4321.75010198135243.649898018648
62347.9382.333435314685-34.4334353146853
63352.1361.783435314685-9.6834353146852
64377.9357.47093531468520.4290646853146
65377.4369.0834353146858.31656468531475
66372.2377.366768648019-5.1667686480186
67362.5378.787601981352-16.287601981352
68341.9345.879268648019-3.97926864801866
69354.8335.62510198135219.1748980186481
70369.2338.71260198135230.487398018648
71406.7356.59176864801950.1082313519814
72454.7417.11676864801937.5832313519813


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
73470.350101981352395.567542889567545.132661073137
74487.283537296037381.525027999468593.042046592607
75501.166972610723371.639780743729630.694164477716
76506.537907925408356.972789741838656.103026108978
77497.721343240093330.502457579467664.94022890072
78497.688111888112314.509000453708680.867223322516
79504.275713869464306.419660107608702.131767631319
80487.654982517482276.137963924343699.172001110622
81481.380084498834257.032407223479705.72776177419
82465.292686480186228.809470494013701.77590246636
83452.684455128205204.658765758173700.710144498237
84463.101223776224204.046840042237722.155607510211
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t13057873493bb371fsdtvrjf1/1ryrd1305787440.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t13057873493bb371fsdtvrjf1/1ryrd1305787440.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t13057873493bb371fsdtvrjf1/2zr2x1305787440.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t13057873493bb371fsdtvrjf1/2zr2x1305787440.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t13057873493bb371fsdtvrjf1/34ou31305787440.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t13057873493bb371fsdtvrjf1/34ou31305787440.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=F, beta=F)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=F)
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