Home » date » 2010 » Aug » 15 »

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: Sun, 15 Aug 2010 14:22:15 +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/15/t1281882122k8xok8o3fzi3kch.htm/, Retrieved Sun, 15 Aug 2010 16:22:06 +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/15/t1281882122k8xok8o3fzi3kch.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:
Jacobs Jeff
 
Dataseries X:
» Textbox « » Textfile « » CSV «
335 334 333 331 329 328 329 331 332 332 333 335 335 333 325 322 322 315 321 324 329 332 322 324 324 323 309 306 305 300 301 302 308 311 301 301 308 302 290 286 286 275 284 289 292 293 285 280 281 280 265 260 254 238 247 246 247 237 222 216 212 209 185 186 178 158 166 162 164 147 132 124 117 120 89 81 71 52 63 62 74 67 53 42
 
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.425790716300489
beta0.363870669843828
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13335339.209935897436-4.20993589743614
14333334.806502608273-1.80650260827315
15325324.9382091448710.0617908551287769
16322320.5833244541491.41667554585115
17322320.3581598623711.64184013762895
18315313.9415764095061.05842359049399
19321321.482230754680-0.482230754679506
20324322.3755087775051.62449122249456
21329323.7508296909475.2491703090534
22332326.81610705015.18389294990021
23322331.615078055856-9.61507805585558
24324329.789760748247-5.78976074824709
25324324.320486854875-0.320486854874673
26323322.6777830829070.322216917092931
27309314.84304297509-5.84304297508982
28306307.891442956404-1.89144295640426
29305305.013988640077-0.0139886400766613
30300295.9278081801454.07219181985499
31301302.704413151525-1.70441315152510
32302302.935014611050-0.935014611050349
33308303.5533128361164.44668716388401
34311304.3665532853186.6334467146819
35301299.6367434707041.36325652929582
36301304.73505460785-3.73505460784980
37308303.6521274245384.34787257546185
38302305.460460076231-3.46046007623073
39290292.983127039852-2.98312703985152
40286290.469578026091-4.46957802609114
41286288.124271799635-2.12427179963527
42275280.710765506475-5.71076550647479
43284278.7140877448695.28591225513105
44289282.1551208893266.84487911067407
45292290.1738293477771.82617065222286
46293291.7185125834541.2814874165461
47285281.4460790193053.55392098069547
48280284.651445795878-4.65144579587849
49281287.779429210233-6.77942921023282
50280278.6020690943621.39793090563762
51265267.456032914919-2.45603291491886
52260263.383595893848-3.38359589384788
53254262.085855751082-8.0858557510823
54238248.389388125163-10.3893881251626
55247248.304942615342-1.30494261534224
56246246.403636761513-0.403636761512843
57247243.8999855218633.10001447813656
58237241.317437649324-4.31743764932361
59222224.741569532128-2.7415695321279
60216214.355082749051.64491725095002
61212213.717909759354-1.71790975935434
62209206.9512273706282.04877262937214
63185189.53018209015-4.53018209014994
64186179.3814730301816.61852696981944
65178176.5316158121721.46838418782789
66158163.949963007576-5.94996300757555
67166170.02938663195-4.02938663195002
68162166.120700569598-4.12070056959837
69164162.1054167798961.89458322010435
70147152.622906454693-5.62290645469275
71132134.066268925489-2.06626892548874
72124124.260915470249-0.260915470249202
73117118.360849366858-1.36084936685826
74120111.4439435790268.55605642097385
758991.5590134459976-2.55901344599764
768187.4997715210797-6.49977152107968
777172.9230202749146-1.92302027491462
785250.928230955811.07176904419001
796358.47872781405514.52127218594491
806256.86164882476145.13835117523861
817460.380594725183513.6194052748165
826753.528131000233413.4718689997666
835350.05687058987652.94312941012345
844249.1099877428014-7.1099877428014


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8544.289776960115934.945858221541453.6336956986905
8648.485246671474637.680024741005159.2904686019442
8722.08779656578269.281411960842934.8941811707223
8820.76475966219205.4921579278167836.0373613965673
8916.5000120637975-1.6298252637479934.6298493913431
902.25804980161506-19.06121259894323.5773122021731
9116.3812689970629-8.4159840034923641.1785219976181
9217.5412485401203-10.990505209470746.0730022897114
9327.2939750888859-5.2048578987778759.7928080765497
9415.9994292583440-20.680740128761852.6795986454499
950.100689245159970-40.960661967901641.1620404582215
96-8.97351395682509-54.604259144492836.6572312308426
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/15/t1281882122k8xok8o3fzi3kch/1jd7u1281882132.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/15/t1281882122k8xok8o3fzi3kch/1jd7u1281882132.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/15/t1281882122k8xok8o3fzi3kch/2jd7u1281882132.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/15/t1281882122k8xok8o3fzi3kch/2jd7u1281882132.ps (open in new window)


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