Home » date » 2010 » Dec » 20 »

Opgave 10; Opdracht 2; Stap 1

*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:37 +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/t1292841244mfv8xf7uol6ze6o.htm/, Retrieved Mon, 20 Dec 2010 11:34:08 +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/t1292841244mfv8xf7uol6ze6o.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
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13,81 13,9 13,91 13,94 13,96 14,01 14,01 14,06 14,09 14,13 14,12 14,13 14,14 14,16 14,21 14,26 14,29 14,32 14,33 14,39 14,48 14,44 14,46 14,48 14,53 14,58 14,62 14,62 14,61 14,65 14,68 14,7 14,78 14,84 14,89 14,89 15,13 15,25 15,33 15,36 15,4 15,4 15,41 15,47 15,54 15,55 15,59 15,65 15,75 15,86 15,89 15,94 15,93 15,95 15,99 15,99 16,06 16,08 16,07 16,11 16,15 16,18 16,3 16,42 16,49 16,5 16,58 16,64 16,66 16,81 16,91 16,92 16,95 17,11 17,16 17,16 17,27 17,34 17,39 17,43 17,45 17,5 17,56 17,65
 
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
alpha1
beta0.165143187979639
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
313.9113.99-0.08
413.9413.9867885449616-0.046788544961629
513.9614.0090617354857-0.0490617354857346
614.0114.0209595240798-0.0109595240798104
714.0114.0691496333345-0.0591496333345294
814.0614.05938147431780.00061852568216203
914.0914.1094836196208-0.0194836196208392
1014.1314.1362660325633-0.00626603256326952
1114.1214.1752312399698-0.055231239969789
1214.1314.1561101769251-0.0261101769251066
1314.1414.1617982590690-0.0217982590689836
1414.1614.1681984250739-0.00819842507392643
1514.2114.18684451102080.0231554889791958
1614.2614.24066848229010.0193315177099418
1714.2914.2938609507532-0.00386095075316284
1814.3214.3232233410372-0.00322334103715072
1914.3314.3526910282223-0.0226910282223312
2014.3914.35894375948320.0310562405168415
2114.4814.42407248604880.055927513951227
2214.4414.5233085339985-0.083308533998455
2314.4614.4695506971080-0.0095506971080379
2414.4814.4879734645402-0.00797346454019099
2514.5314.50665670118680.0233432988132183
2614.5814.56051168797080.0194883120292442
2714.6214.61373004994760.00626995005239195
2814.6214.6547654894877-0.0347654894877323
2914.6114.6490242057221-0.0390242057220558
3014.6514.63257962398070.0174203760192579
3114.6814.67545648041240.00454351958763333
3214.714.7062068117217-0.00620681172171622
3314.7814.72518179904680.0548182009531981
3414.8414.81423465151150.0257653484884788
3514.8914.87848962330030.0115103766996842
3614.8914.9303904836033-0.040390483603348
3715.1314.92372027037710.206279729622947
3815.2515.19778596254260.0522140374574356
3915.3315.32640875514560.00359124485442663
4015.3615.4070018247696-0.0470018247696498
4115.415.4292397935863-0.0292397935863278
4215.415.4644110408576-0.0644110408576157
4315.4115.4537739962293-0.0437739962293016
4415.4715.45654501894140.0134549810586133
4515.5415.51876701740760.0212329825923874
4615.5515.5922734998432-0.0422734998432333
4715.5915.5952923193121-0.00529231931206731
4815.6515.63441832882910.0155816711709349
4915.7515.69699153568030.0530084643197153
5015.8615.80574552246790.0542544775320533
5115.8915.9247052798498-0.0347052798497582
5215.9415.9489739392956-0.00897393929564672
5315.9315.9974919543516-0.0674919543516257
5415.9515.9763461178470-0.026346117847023
5515.9915.9919952359549-0.00199523595487605
5615.9916.0316657363285-0.0416657363285164
5716.0616.02478492380170.0352150761982912
5816.0816.1006004537500-0.0206004537500384
5916.0716.1171984291439-0.0471984291439291
6016.1116.09940393008750.0105960699125269
6116.1516.14115379885290.00884620114711865
6216.1816.1826146887118-0.00261468871182302
6316.316.21218289068240.0878171093176192
6416.4216.34668528807420.0733147119257538
6516.4916.47879271332750.0112072866725192
6616.516.5506435203772-0.0506435203771751
6716.5816.55228008797160.0277199120284202
6816.6416.63685784261450.00314215738553614
6916.6616.6973767485023-0.0373767485022505
7016.8116.71120423309830.0987957669017234
7116.9116.87751968100330.0324803189966829
7216.9216.9828835844290-0.0628835844290236
7316.9516.9824987888248-0.0324987888248316
7417.1117.00713183523280.102868164767180
7517.1617.1841198119041-0.0241198119040860
7617.1617.2301365892728-0.0701365892727779
7717.2717.21855400932630.0514459906737486
7817.3417.33704996423490.00295003576511377
7917.3917.4075371425458-0.0175371425457911
8017.4317.4546410029177-0.0246410029177255
8117.4517.4905717091409-0.0405717091408775
8217.517.5038715677516-0.00387156775157038
8317.5617.55323220471060.0067677952894023
8417.6517.61434986000030.0356501399997171


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8517.710237237771817.619742554063517.8007319214801
8617.770474475543517.631525829528217.9094231215588
8717.830711713315317.646866679859118.0145567467714
8817.890948951087017.662666715582718.1192311865913
8917.951186188858817.677882776207318.2244896015102
9018.011423426630517.692062179352218.3307846739089
9118.071660664402317.704986404722218.4383349240824
9218.131897902174017.71654665841818.5472491459301
9318.192135139945817.726691033556218.6575792463353
9418.252372377717617.735399094909318.7693456605258
9518.312609615489317.742668554009718.8825506769689
9618.372846853261117.748507832841918.9971858736802
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292841244mfv8xf7uol6ze6o/10ext1292841154.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292841244mfv8xf7uol6ze6o/10ext1292841154.ps (open in new window)


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


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