Home » date » 2010 » Dec » 20 »

opdracht 10

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 20 Dec 2010 10:32:55 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/20/t12928412632r5c0bolbv9bk3z.htm/, Retrieved Mon, 20 Dec 2010 11:34:27 +0100
 
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/2010/Dec/20/t12928412632r5c0bolbv9bk3z.htm/},
    year = {2010},
}
@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 = {2010},
    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:
KDGP2W102 - Evi Van Dingenen
 
Dataseries X:
» Textbox « » Textfile « » CSV «
84,9 81,9 95,9 81 89,2 102,5 89,8 88,8 83,2 90,2 100,4 187,1 87,6 85,4 86,1 86,7 89,1 103,7 86,9 85,2 80,8 91,2 102,8 182,5 80,9 83,1 88,3 86,6 93 105,3 93,8 86,4 87 96,7 100,5 196,7 86,8 88,2 93,8 85 90,4 115,9 94,9 87,7 91,7 95,9 106,8 204,5 90,2 90,5 93,2 97,8 99,4 120 108,2 98,5 104,3 102,9 111,1 188,1 93,8 94,5 112,4 102,5 115,8 136,5 122,1 110,6 116,4 112,6 121,5 199,3 102,1 100,6 119 106,8 121,3 145,5 129,7 117,7 121,3 124,3 135,2 210,1 106,8 110,5 111,5 122,1 126,3 143,2 137,3 121,5 121,9 123,9 131,6 220,9
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.0545658791491502
beta0.25774916210425
gamma0.484979752162203


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1387.687.43747329059830.162526709401661
1485.485.4574707694395-0.0574707694395045
1586.186.3438222724077-0.243822272407698
1686.786.9249094831851-0.224909483185087
1789.189.1038654903233-0.00386549032332084
18103.7103.728161925143-0.0281619251432375
1986.989.263236525602-2.36323652560203
2085.287.7751584373825-2.57515843738254
2180.882.160132151459-1.36013215145903
2291.289.10060885663352.09939114336653
23102.899.05521731223563.74478268776444
24182.5185.839775787221-3.33977578722073
2580.986.181975289146-5.28197528914602
2683.183.668516015986-0.568516015986035
2788.384.29884890520854.00115109479145
2886.685.03725350441381.56274649558621
299387.3572638364855.64273616351507
30105.3102.3001043025522.99989569744844
3193.886.9938976183996.80610238160105
3286.486.10210341884660.297896581153410
338781.4344854498095.56551455019095
3496.790.67004684042986.0299531595702
35100.5101.979782024187-1.47978202418733
36196.7185.54360448879811.1563955112018
3786.886.30288187253090.497118127469122
3888.286.86385316069711.3361468393029
3993.890.31806160415133.48193839584873
408590.5274626381015-5.52746263810151
4190.494.8489890207248-4.44898902072482
42115.9108.4051041189657.49489588103494
4394.995.5283225539246-0.628322553924605
4487.791.5811265114215-3.8811265114215
4591.789.3763738762032.323626123797
4695.998.8780047194497-2.97800471944967
47106.8106.3561984927840.443801507216449
48204.5195.9492540767078.55074592329348
4990.291.7726280734287-1.57262807342873
5090.592.6699904442213-2.16999044422133
5193.296.9320728302648-3.73207283026477
5297.892.53072550724535.26927449275469
5399.498.00158053056561.3984194694344
54120117.5011688922192.49883110778102
55108.2100.7048146439647.49518535603633
5698.595.90134340636142.59865659363864
57104.397.1782028177127.12179718228789
58102.9104.86130443706-1.96130443705988
59111.1114.328767906606-3.22876790660592
60188.1207.751779632248-19.6517796322481
6193.897.3110620246897-3.51106202468972
6294.597.7180259149318-3.21802591493179
63112.4101.08121534712711.3187846528730
64102.5101.7146110586330.785388941367344
65115.8105.18909998190110.6109000180992
66136.5125.84865100086410.6513489991358
67122.1112.05543475352810.0445652464716
68110.6105.4491674747525.15083252524811
69116.4109.2783509388397.12164906116134
70112.6113.135819450739-0.535819450739439
71121.5122.459087510953-0.959087510953069
72199.3208.866822068269-9.56682206826866
73102.1106.910116854964-4.81011685496409
74100.6107.895222227845-7.2952222278455
75119118.1586227258190.841377274181042
76106.8113.700537986824-6.90053798682369
77121.3121.462661551200-0.162661551199690
78145.5141.6032335060103.89676649398976
79129.7127.1185719540112.58142804598928
80117.7117.711596156171-0.0115961561713505
81121.3121.940513740341-0.640513740340609
82124.3121.5319634810982.76803651890198
83135.2130.556505855044.64349414495996
84210.1213.11703099708-3.01703099708001
85106.8113.584734859316-6.78473485931625
86110.5113.180846833161-2.68084683316064
87111.5127.349912094680-15.8499120946802
88122.1118.1196188130763.98038118692401
89126.3129.406290293180-3.10629029318035
90143.2151.047548918185-7.84754891818466
91137.3134.953762529272.34623747073013
92121.5123.976519736902-2.47651973690213
93121.9127.379410643105-5.47941064310531
94123.9127.798485263545-3.89848526354541
95131.6136.754218408707-5.15421840870664
96220.9214.5648755388856.33512446111544


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
97113.244094803911102.467369407242124.020820200579
98114.616305249382103.814229925541125.418380573224
99122.455308528548111.616534345608133.294082711489
100122.967200226293112.078383074296133.85601737829
101130.516148052962119.562029371918141.470266734005
102149.925471584574138.888982000064160.961961169083
103138.816794562731127.679180679348149.954408446115
104125.350098416348114.091071668384136.609125164312
105127.395963051111115.993868135220138.798057967002
106128.800685877624117.232685024923140.368686730326
107137.409977678774125.652245996318149.167709361230
108220.859030615277208.886957049244232.831104181309
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928412632r5c0bolbv9bk3z/106271292841171.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928412632r5c0bolbv9bk3z/106271292841171.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928412632r5c0bolbv9bk3z/2sxka1292841171.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928412632r5c0bolbv9bk3z/2sxka1292841171.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928412632r5c0bolbv9bk3z/3sxka1292841171.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928412632r5c0bolbv9bk3z/3sxka1292841171.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