Home » date » 2010 » Aug » 04 »

Tijdreeks B stap 27

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 04 Aug 2010 16:00:42 +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/04/t1280937623dr3wcsdzf5ci0zw.htm/, Retrieved Wed, 04 Aug 2010 18:00:27 +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/04/t1280937623dr3wcsdzf5ci0zw.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:
Bogaerts Yannik
 
Dataseries X:
» Textbox « » Textfile « » CSV «
83 82 81 79 77 76 77 79 80 80 81 83 83 76 77 72 64 70 69 78 84 91 96 101 99 98 98 97 92 106 100 107 111 115 117 120 117 108 111 118 113 129 122 135 146 151 147 151 156 144 151 159 148 170 163 179 184 192 197 199 205 194 200 211 211 230 229 236 239 250 254 254 264 258 264 277 274 284 279 290 287 297 302 294
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.469691048112616
beta0.300455994256597
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
138386.5926816239316-3.59268162393161
147677.5833956371879-1.58339563718788
157776.7944021385840.205597861416024
167270.37469714812541.62530285187455
176461.39284671085872.60715328914131
187066.94842132694383.05157867305624
196975.018381899208-6.01838189920794
207873.72894015779974.27105984220033
218477.04176209153226.95823790846778
229181.64035108170239.3596489182977
239690.06270893524975.93729106475028
2410198.67382864157362.32617135842639
2599101.803545958472-2.80354595847177
269897.8906806257280.109319374271934
2798102.744566298714-4.74456629871405
289797.9532280513072-0.953228051307178
299291.11759495283430.882405047165733
3010698.6920006206997.30799937930114
31100107.145202148465-7.14520214846502
32107113.817987072556-6.81798707255635
33111114.817415673438-3.81741567343757
34115115.577588247146-0.577588247145613
35117116.0645718839040.935428116096247
36120118.2524460054861.74755399451405
37117116.1494953401680.850504659832467
38108113.772726932398-5.77272693239794
39111110.7348294412750.265170558725416
40118108.4591022500889.54089774991193
41113107.1588673296435.8411326703568
42129120.8026247695298.1973752304714
43122122.467137667288-0.467137667287886
44135133.8507348443551.14926515564494
45146142.7085509445633.29144905543666
46151152.054027295175-1.05402729517451
47147156.580586273897-9.58058627389698
48151156.236812945517-5.23681294551687
49156151.3689628314734.63103716852675
50144148.780340552410-4.7803405524096
51151151.075379051861-0.0753790518606365
52159155.1755109546433.82448904535673
53148150.038414410777-2.03841441077736
54170160.9288851286049.07111487139568
55163158.2303498840924.76965011590769
56179173.4912685133315.50873148666875
57184186.708376833063-2.70837683306266
58192191.2603099010620.739690098938382
59197192.6897496366534.31025036334708
60199203.716313693272-4.71631369327176
61205206.941794185064-1.94179418506357
62194197.963313758854-3.96331375885367
63200204.940765425902-4.9407654259021
64211209.9407730822061.05922691779378
65211201.1224387863399.87756121366084
66230225.9095509610254.09044903897453
67229220.2959888545458.70401114545461
68236240.057458559765-4.05745855976522
69239245.334487401686-6.33448740168612
70250250.410767879563-0.41076787956257
71254253.429951850480.570048149520062
72254257.621689750201-3.62168975020074
73264262.695913869341.30408613066021
74258254.4912839414113.5087160585891
75264265.835713240551-1.83571324055060
76277277.289958841612-0.289958841612020
77274274.137939662596-0.137939662595841
78284291.362074898671-7.36207489867076
79279281.409952410558-2.40995241055839
80290286.2093264992493.79067350075098
81287292.098119231321-5.09811923132111
82297299.204085676986-2.20408567698553
83302299.9555975862062.04440241379399
84294300.879471159033-6.87947115903336


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85304.838545394674295.685693040981313.991397748368
86294.809316128952284.084094669302305.534537588601
87298.795162221134286.051654261088311.53867018118
88309.314039898841294.174312088511324.453767709172
89303.802434953038285.947176423893321.657693482183
90314.703407908807293.858013100900335.548802716715
91309.317360248233285.240216865131333.394503631335
92317.359030181487289.833004384508344.885055978467
93315.040740993757283.867241584663346.214240402851
94325.082604339094290.077454234522360.087754443665
95328.440034716885289.430557738399367.449511695371
96322.700419509781279.523340649142365.87749837042
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/04/t1280937623dr3wcsdzf5ci0zw/1dlk21280937640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/04/t1280937623dr3wcsdzf5ci0zw/1dlk21280937640.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/04/t1280937623dr3wcsdzf5ci0zw/2dlk21280937640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/04/t1280937623dr3wcsdzf5ci0zw/2dlk21280937640.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/04/t1280937623dr3wcsdzf5ci0zw/3dlk21280937640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/04/t1280937623dr3wcsdzf5ci0zw/3dlk21280937640.ps (open in new window)


 
Parameters (Session):
 
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