Home » date » 2010 » Aug » 19 »

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: Thu, 19 Aug 2010 10:19:50 +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/19/t1282213237myxuen5b94f700a.htm/, Retrieved Thu, 19 Aug 2010 12:20:46 +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/19/t1282213237myxuen5b94f700a.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:
Quaglia Laura
 
Dataseries X:
» Textbox « » Textfile « » CSV «
239 238 237 235 255 254 239 229 230 230 231 233 239 236 231 235 253 257 236 226 226 221 217 219 225 226 225 229 242 252 233 232 225 218 209 211 220 225 215 222 238 246 226 230 222 214 208 203 208 212 199 200 223 225 203 207 195 198 193 189 184 188 180 186 215 212 191 190 180 190 189 181 174 179 165 185 211 209 183 178 170 182 195 188 175 176 162 193 211 207 179 176 167 175 190 173 159 159 147 181 196 199 171 170 156 164 178 155 138 142 113 148 156 158 141 139 119 120 125 102
 
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.318694192704481
beta0.0303866885745872
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13239239.501602564103-0.501602564102598
14236236.306292784362-0.306292784362086
15231231.211927605806-0.211927605805784
16235235.395583741748-0.395583741747743
17253253.933545543219-0.933545543218514
18257258.499354863838-1.49935486383822
19236235.7869908622270.213009137773327
20226225.6224101172480.377589882751977
21226226.763936903452-0.763936903452105
22221226.450934387029-5.45093438702912
23217225.424759142588-8.42475914258767
24219224.244257335430-5.24425733542958
25225227.726499201986-2.72649920198592
26226223.7095428062512.29045719374929
27225219.2865347301575.71346526984334
28229225.0703314606223.92966853937796
29242244.498973841876-2.49897384187616
30252248.0440056704873.95599432951349
31233228.1533078416714.84669215832898
32232219.53889218057712.4611078194228
33225223.8319620561121.16803794388841
34218221.038424386372-3.03842438637179
35209218.875415174319-9.87541517431916
36211219.505841004978-8.5058410049777
37220223.738761898307-3.73876189830708
38225222.8822455368372.11775446316290
39215220.799601670005-5.79960167000496
40222221.6507347962600.349265203740174
41238235.4755742358032.52442576419671
42246244.9851107529881.01488924701195
43226224.7012246814041.29877531859557
44230220.0467831564439.95321684355702
45222215.7252111040726.27478889592774
46214211.6213746316672.37862536833345
47208206.5072217701451.49277822985491
48203211.784369516200-8.78436951619969
49208219.264312243418-11.2643122434177
50212220.014595981365-8.01459598136529
51199209.225638539535-10.2256385395351
52200212.72956449837-12.7295644983699
53223223.615636569291-0.615636569291297
54225230.813019087993-5.81301908799298
55203208.197431256241-5.19743125624066
56207206.9569977745250.0430022254745381
57195196.462982511168-1.46298251116784
58198186.65577029627611.3442297037240
59193183.2992800385999.70071996140123
60189183.7737662845495.22623371545146
61184193.748282632906-9.74828263290559
62188196.929523205335-8.92952320533482
63180184.067483864448-4.06748386444804
64186187.612570834901-1.61257083490079
65215210.1870434964494.8129565035513
66212215.518240859261-3.51824085926091
67191194.020372509962-3.02037250996233
68190197.032158964540-7.03215896454046
69180183.176844669691-3.17684466969106
70190181.4520153480368.5479846519637
71189175.96051904400813.0394809559917
72181174.3587620762996.64123792370097
73174174.503916596795-0.503916596795193
74179181.200540997147-2.20054099714739
75165173.872121226677-8.87212122667705
76185177.5886126525987.41138734740161
77211207.5341740132653.46582598673487
78209206.8643664047832.13563359521675
79183187.666718920437-4.66671892043723
80178187.563790918699-9.56379091869866
81170175.647011754299-5.64701175429934
82182181.2179310992550.782068900745287
83195176.33114172146818.6688582785322
84188172.23836637683315.7616336231667
85175170.5845171392834.41548286071702
86176177.903059653120-1.90305965311964
87162166.33699406429-4.33699406429005
88193182.84970654270310.1502934572968
89211211.263384649236-0.263384649236059
90207208.746094704912-1.74609470491191
91179183.886553025488-4.8865530254879
92176180.584705037044-4.58470503704382
93167173.179017248116-6.17901724811594
94175183.211168773218-8.21116877321765
95190187.8081784438662.1918215561341
96173176.487511702037-3.48751170203701
97159160.786416888864-1.78641688886418
98159161.581074342772-2.58107434277193
99147147.891593907455-0.891593907455132
100181175.1568921403155.84310785968518
101196194.8455684043451.15443159565464
102199191.526252075037.47374792496998
103171167.3109965110653.68900348893504
104170166.8764138874433.12358611255709
105156160.844381635660-4.84438163566017
106164169.933563917539-5.93356391753915
107178182.382313991437-4.38231399143731
108155165.071744605154-10.0717446051538
109138148.342095570001-10.3420955700008
110142145.696686252288-3.69668625228783
111113132.619899034861-19.6198990348613
112148158.140799978916-10.1407999789158
113156169.022099499516-13.0220994995162
114158164.833929784938-6.83392978493771
115141132.6855134681538.31448653184705
116139132.5897981552976.41020184470264
117119121.458371208245-2.45837120824541
118120129.870803870640-9.8708038706402
119125141.388434474232-16.388434474232
120102115.525854545312-13.5258545453119


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12196.628271686382283.194194931532110.062348441232
122101.02360025098386.883749267713115.163451234253
12377.529363194433462.678063303448292.3806630854186
124115.20419261936699.635459970831130.772925267901
125126.895479596409110.603081998895143.187877193922
126130.740739630246113.718245447803147.763233812690
127110.82446754942193.0652853445223128.583649754320
128106.43456194335587.9319728591344124.937151027575
12986.80894227997167.556126666479106.061757893463
13090.569428877099770.559488311789110.579369442410
131100.50263596640779.7286115580843121.27666037473
13281.682262058377660.1371497292265103.227374387529
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282213237myxuen5b94f700a/1jept1282213187.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282213237myxuen5b94f700a/1jept1282213187.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282213237myxuen5b94f700a/2c5ow1282213187.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282213237myxuen5b94f700a/2c5ow1282213187.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282213237myxuen5b94f700a/3c5ow1282213187.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282213237myxuen5b94f700a/3c5ow1282213187.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