Home » date » 2010 » Aug » 17 »

TIJDREEKS A - STAP 32

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 17 Aug 2010 19:20:39 +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/Aug/17/t1282072938cwhd9h1fsydtiy0.htm/, Retrieved Tue, 17 Aug 2010 21:22:24 +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/2010/Aug/17/t1282072938cwhd9h1fsydtiy0.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:
Schrauwen Nathalie
 
Dataseries X:
» Textbox « » Textfile « » CSV «
125 124 123 121 141 140 125 115 116 116 117 119 114 110 108 111 124 125 118 108 107 103 113 116 113 105 102 107 119 116 113 102 96 95 101 110 103 88 79 96 118 116 114 102 98 98 101 117 109 98 93 98 114 115 112 112 103 107 104 117 123 113 97 90 109 104 92 102 90 97 99 108 106 86 72 71 96 88 83 90 85 100 108 118 124 99 92 86 112 104 93 104 96 109 113 123 127 96 100 95 133 130 117 129 122 134 141 152 161 122 126 119 160 162 145 161 151 166 169 185
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.852574377903842
beta0.0116103049718575
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
31231230
4121122-1
5141120.13752697355820.8624730264425
6140137.1209485752102.87905142479033
7125138.800664410429-13.8006644104294
8115126.123073967225-11.1230739672251
9116115.6182251305460.381774869454063
10116114.925894688931.07410531107014
11117114.8344596338462.16554036615371
12119115.6949900648543.30500993514612
13114117.559718186550-3.5597181865503
14110113.536518601187-3.53651860118705
15108109.498091633199-1.49809163319894
16111107.182746186793.81725381321003
17124109.43691373157714.5630862684230
18125120.9968575695354.00314243046468
19118123.593289559116-5.59328955911619
20108117.952683507563-9.952683507563
21107108.496851756317-1.49685175631714
22103106.235428690599-3.23542869059904
23113102.45971310521710.5402868947825
24116110.5331542606915.46684573930912
25113114.335223863793-1.33522386379326
26105112.324806294824-7.32480629482389
27102105.135318527689-3.13531852768861
28107101.4866452711925.51335472880787
29119105.26618399677613.7338160032239
30116116.190223597188-0.190223597188449
31113115.241100840838-2.24110084083844
32102112.521268824763-10.5212688247633
3396102.637831398577-6.63783139857702
349595.9996076600766-0.999607660076649
3510194.15849425300726.84150574699275
3611099.070234891908210.9297651080918
37103107.575710615723-4.57571061572277
3888102.816321669003-14.8163216690034
397989.179388563341-10.1793885633410
409679.395023625893516.6049763741065
4111892.610688787659725.3893112123403
42116113.5669726277622.43302737223837
43114114.975400736747-0.97540073674736
44102113.468235222007-11.4682352220072
4598102.901627843727-4.90162784372738
469897.8850221746310.114977825369081
4710197.14658408813633.85341591186366
4811799.633586137351717.3664138626483
49109113.813328035276-4.81332803527634
5098109.035544839988-11.0355448399877
519398.8436220434358-5.84362204343577
529893.02035563447824.97964436552184
5311496.47402060044717.5259793995531
54115110.79785286344.20214713660005
55112113.803722701084-1.80372270108359
56112111.6712873810530.328712618946582
57103111.360165588103-8.36016558810333
58107103.5583745222143.44162547778619
59104105.852555573482-1.85255557348248
60117103.61471571193513.3852842880648
61123114.5007639157038.49923608429749
62113121.305223562580-8.30522356258025
6397113.70042099093-16.7004209909300
649098.7727765965878-8.77277659658776
6510990.51720005775718.482799942243
66104105.681984471569-1.68198447156894
6792103.638140985079-11.6381409850785
6810292.99073168551489.0092683144852
6990100.035954105488-10.0359541054881
709790.74436548627216.25563451372788
719995.40449022658723.59550977341283
7210897.832251458845810.1677485411542
73106105.9639820391850.0360179608146325
7486105.458015252038-19.4580152520378
757288.139327171366-16.139327171366
767173.4903099892101-2.49030998921013
779670.453444436794225.5465555632058
788891.5729684659963-3.57296846599631
798387.8305648520608-4.83056485206085
809082.96815071790867.03184928209143
818588.2889327392391-3.28893273923912
8210084.777924459999615.2220755400004
8310897.19960552460510.8003944753951
84118105.95838391525612.0416160847441
85124115.8945917727998.10540822720124
8699122.555122252200-23.5551222522002
8792101.989531777561-9.98953177756073
888692.8907332986035-6.8907332986035
8911286.365682057996125.6343179420039
90104107.824401248976-3.82440124897619
9193104.129514848028-11.1295148480281
9210494.0963086089659.903691391035
9396102.093508254810-6.09350825480951
9410996.391587867812812.6084121321872
95113106.7592518606946.24074813930596
96123111.75978365859311.2402163414069
97127121.1339968998105.86600310018953
9896125.984359133190-29.9843591331898
9910099.9728164551020.0271835448979232
1009599.5486151860766-4.54861518607657
10113395.178180017512737.8218199824873
102130127.3060771574012.69392284259881
103117129.511495441588-12.5114954415883
104129118.62931679529810.3706832047024
105122127.358553121602-5.35855312160182
106134122.62440313807811.3755968619217
107141132.2699637017608.73003629823953
108152139.74640267470012.2535973252996
109161150.34823355155010.6517664484504
110122159.689822557451-37.689822557451
111126127.443533082782-1.44353308278231
112119126.085612281661-7.08561228166147
113160119.84726133181540.1527386681853
114162154.2805759041787.71942409582229
115145161.138489347694-16.1384893476941
116161147.49600784502313.5039921549769
117151159.259617841229-8.25961784122887
118166152.38637252990413.6136274700962
119169164.2964522462824.70354775371754
120185168.65658505749516.3434149425053


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121183.102348116508159.621775068916206.582921164100
122183.614134348091152.606797653314214.621471042868
123184.125920579674146.963567960784221.288273198564
124184.637706811257142.091238989816227.184174632697
125185.149493042840137.725370612698232.573615472981
126185.661279274422133.722036996830237.600521552014
127186.173065506005129.992797902333242.353333109678
128186.684851737588126.478804110677246.890899364499
129187.196637969171123.138617077901251.254658860441
130187.708424200754119.941794355282255.475054046225
131188.220210432336116.865221435005259.575199429668
132188.731996663919113.890877706956263.573115620882
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282072938cwhd9h1fsydtiy0/152ya1282072837.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282072938cwhd9h1fsydtiy0/152ya1282072837.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/17/t1282072938cwhd9h1fsydtiy0/252ya1282072837.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282072938cwhd9h1fsydtiy0/252ya1282072837.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/17/t1282072938cwhd9h1fsydtiy0/352ya1282072837.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282072938cwhd9h1fsydtiy0/352ya1282072837.ps (open in new window)


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