Home » date » 2008 » May » 27 »

Joeri Van de Velde opgave 10 oef 2

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 27 May 2008 13:26:26 -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/May/27/t1211916446e5e54l289jtzwm8.htm/, Retrieved Tue, 27 May 2008 21:27:30 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
105,18 105,18 105,18 105,18 105,18 105,18 105,18 105,18 105,18 105,18 97,82 97,83 97,82 97,83 97,82 97,82 97,8 97,8 97,44 97,44 97,44 97,44 97,7 97,7 97,7 97,7 97,7 97,7 97,7 97,7 97,7 97,7 97,7 89,38 89,38 89,38 89,38 87,69 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 92,07 92,07 92,07 92,07 92,07 92,07 92,07 92,07 92,07 92,07 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94
 
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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.981229383786507
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
2105.18105.180
3105.18105.180
4105.18105.180
5105.18105.180
6105.18105.180
7105.18105.180
8105.18105.180
9105.18105.180
10105.18105.180
1197.82105.18-7.36000000000001
1297.8397.9581517353313-0.128151735331301
1397.8297.832405487041-0.0124054870409935
1497.8397.82023285863620.00976714136382384
1597.8297.829816664738-0.00981666473795428
1697.8297.8201842648463-0.000184264846296855
1797.897.8200034587647-0.0200034587647053
1897.897.8003754772474-0.000375477247416711
1997.4497.8000070479393-0.360007047939305
2097.4497.446757554131-0.00675755413101342
2197.4497.4401268434551-0.000126843455134917
2297.4497.4400023809298-2.38092981419413e-06
2397.797.44000004469150.259999955308487
2497.797.69511964062340.00488035937662801
2597.797.69990839264729.16073528429706e-05
2697.797.69999828047351.71952646610407e-06
2797.797.69999996772343.22765743021591e-08
2897.797.69999999939426.05851369073207e-10
2997.797.69999999998861.13686837721616e-11
3097.797.69999999999982.1316282072803e-13
3197.797.71.4210854715202e-14
3297.797.70
3397.797.70
3489.3897.7-8.32
3589.3889.5361715268963-0.156171526896273
3689.3889.3829314357948-0.00293143579484934
3789.3889.3800550248563-5.50248562660727e-05
3887.6989.3800010328505-1.69000103285046
3989.2187.7217223607881.48827763921196
4089.2189.18206411161520.0279358883847749
4189.2189.20947562616050.000524373839454029
4289.2189.20999015717999.84282009142134e-06
4389.2189.20999981524421.84755805321402e-07
4489.2189.2099999965323.46797435213375e-09
4589.2189.2099999999356.50999254503404e-11
4689.2189.20999999999881.22213350550737e-12
4789.2189.212.8421709430404e-14
4889.2189.210
4989.2189.210
5089.2189.210
5189.2189.210
5289.2189.210
5389.2189.210
5489.2189.210
5589.2189.210
5689.2189.210
5789.2189.210
5889.2189.210
5989.2189.210
6089.2189.210
6189.2189.210
6289.2189.210
6389.2189.210
6489.2189.210
6589.2189.210
6689.2189.210
6789.2189.210
6889.2189.210
6989.2189.210
7089.2189.210
7192.0789.212.86
7292.0792.01631603762940.0536839623705845
7392.0792.06899231894550.00100768105447457
7492.0792.06998108520571.89147943387979e-05
7592.0792.06999964495763.5504234574546e-07
7692.0792.06999999333566.66435084895056e-09
7792.0792.06999999987491.25083943203208e-10
7892.0792.06999999999762.34479102800833e-12
7992.0792.074.2632564145606e-14
8092.0792.070
819492.071.93000000000001
829493.9637727107080.036227289292043
839493.99931999145620.000680008543753274
849493.99998723582061.27641793881139e-05
859493.99999976040852.39591500417191e-07
869493.99999999550274.49728077001055e-09
879493.99999999991568.44124770082999e-11
889493.99999999999841.57740487338742e-12
8994942.8421709430404e-14
9094940
9194940
9294940
9394940
9494940
9594940
9694940


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
979491.614531122036596.3854688779635
989490.65794950032997.342050499671
999489.91978660889398.080213391107
1009489.296067486497398.7039325135027
1019488.745875823107599.2541241768925
1029488.248073310548599.7519266894515
1039487.7900482759169100.209951724083
1049487.3635596747909100.636440325209
1059486.962871326693101.037128673307
1069486.5838001820812101.416199817919
1079486.2231844875993101.776815512401
1089485.878565441467102.121434558533
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211916446e5e54l289jtzwm8/1jlyj1211916380.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211916446e5e54l289jtzwm8/1jlyj1211916380.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211916446e5e54l289jtzwm8/2j3v41211916380.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211916446e5e54l289jtzwm8/2j3v41211916380.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211916446e5e54l289jtzwm8/3e8m01211916380.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211916446e5e54l289jtzwm8/3e8m01211916380.ps (open in new window)


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