Home » date » 2011 » Jan » 16 »

opgave10; oefening 2

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 16 Jan 2011 18:13:18 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/Jan/16/t12952020631tpd0qi7rqgq4rf.htm/, Retrieved Sun, 16 Jan 2011 19:21:03 +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/2011/Jan/16/t12952020631tpd0qi7rqgq4rf.htm/},
    year = {2011},
}
@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 = {2011},
    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 «
17.88 18.11 18.16 18.27 18.29 18.35 18.35 18.38 18.41 18.41 18.42 18.43 18.48 18.54 18.65 18.66 18.69 18.72 18.72 18.73 18.84 18.83 18.91 18.91 18.94 18.97 19 19.08 19.18 19.24 19.23 19.25 19.3 19.33 19.35 19.35 19.31 19.47 19.7 19.76 19.9 19.97 20.1 20.26 20.44 20.43 20.57 20.6 20.69 20.93 20.98 21.11 21.14 21.16 21.32 21.32 21.48 21.58 21.74 21.75 21.81 21.89 22.21 22.37 22.47 22.51 22.55 22.61 22.58 22.85 22.93 22.98 23.01 23.11 23.18 23.18 23.21 23.22 23.12 23.15 23.16 23.21 23.21 23.22
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.967403347699123
beta0.315348716873752
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
318.1618.34-0.180000000000000
418.2718.3409549046228-0.0709549046228268
518.2918.4257542290714-0.13575422907142
618.3518.4064520083127-0.0564520083127036
718.3518.4466452408430-0.0966452408430172
818.3818.4184718996069-0.0384718996069395
918.4118.4348390439304-0.0248390439303989
1018.4118.4568170261364-0.0468170261364271
1118.4218.4432509925016-0.0232509925016231
1218.4318.4453896522630-0.0153896522630284
1318.4818.45043848683890.0295615131610951
1418.5418.50799154254220.0320084574578345
1518.6518.57767658140200.0723234185979713
1618.6618.7084261108668-0.0484261108668029
1718.6918.7075888164949-0.0175888164948965
1818.7218.7312178141602-0.0112178141602293
1918.7218.7575879289278-0.0375879289278238
2018.7318.7469805792995-0.0169805792995348
2118.8418.75112859347560.0888714065243548
2218.8318.8847901201546-0.0547901201546352
2318.9118.86275821566640.0472417843335755
2418.9118.9538443401615-0.0438443401614919
2518.9418.9434378761519-0.00343787615187807
2618.9718.9710719698638-0.00107196986380487
271919.0006678240313-0.000667824031275188
2819.0819.03045091755060.0495490824493672
2919.1819.12392992358170.0560700764183331
3019.2419.240822625826-0.000822625826000234
3119.2319.3024261794887-0.0724261794887333
3219.2519.2726652041917-0.0226652041916608
3319.319.28412870263850.0158712973615209
3419.3319.3377143889295-0.00771438892953569
3519.3519.3661297793088-0.0161297793088231
3619.3519.3814833906962-0.0314833906962093
3719.3119.3723792477801-0.0623792477801004
3819.4719.31435634932400.155643650675966
3919.719.51473164851920.185268351480786
4019.7619.8002856880873-0.0402856880872875
4119.919.85534806381970.0446519361803333
4219.9720.0062013211898-0.0362013211898251
4320.120.06779295121400.0322070487860273
4420.2620.20538845255390.0546115474460791
4520.4420.38131845315370.0586815468463442
4620.4320.5790877293438-0.149087729343808
4720.5720.53037820740490.0396217925951312
4820.620.6763143054005-0.0763143054004729
4920.6920.68681227438050.00318772561948322
5020.9320.77519325187430.154806748125740
5120.9821.0574777817627-0.0774777817626742
5221.1121.09141337908200.0185866209179686
5321.1421.2239522105225-0.0839522105225434
5421.1621.2316833822965-0.0716833822964844
5521.3221.22941505282640.0905849471736389
5621.3221.4117603443927-0.0917603443927106
5721.4821.38971091684950.0902890831504841
5821.5821.57132115177850.00867884822147147
5921.7421.67662902328850.0633709767115356
6021.7521.8541787891139-0.104178789113881
6121.8121.8378585894279-0.0278585894278898
6221.8921.88687200313110.00312799686889775
6322.2121.96681620029330.243183799706657
6422.3722.35317912169080.0168208783092325
6522.4722.5256893304606-0.055689330460595
6622.5122.6110638096493-0.101063809649279
6722.5522.621711389555-0.0717113895550021
6822.6122.6388776480230-0.0288776480230304
6922.5822.6886717245608-0.108671724560814
7022.8522.62812032604290.221879673957105
7122.9322.9550341570196-0.0250341570195793
7222.9823.0354455659447-0.0554455659446766
7323.0123.0695221302882-0.0595221302882294
7423.1123.08149663180330.0285033681967093
7523.1823.1873228007946-0.00732280079462555
7623.1823.2562566514916-0.0762566514915797
7723.2123.2352400930027-0.025240093002715
7823.2223.2558771438448-0.0358771438448215
7923.1223.2552788571885-0.135278857188450
8023.1523.11724957988650.0327504201134659
8123.1623.15176353911570.00823646088430507
8223.2123.16507530433750.044924695662484
8323.2123.2275845408534-0.0175845408533561
8423.2223.2242576272969-0.00425762729694057


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8523.232524342705923.082954745854823.382093939557
8623.244909901015123.002847928232723.4869718737976
8723.257295459324422.919260686738323.5953302319104
8823.269681017633622.829731450416823.7096305848505
8923.282066575942922.733776167235523.8303569846503
9023.294452134252222.631404782852323.9574994856520
9123.306837692561422.522779080970624.0908963041522
9223.319223250870722.408105941257424.2303405604839
9323.331608809179922.287599059435124.3756185589247
9423.343994367489222.161464556267624.5265241787108
9523.356379925798422.029895861274524.6828639903223
9623.368765484107721.893072411159024.8444585570563
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/16/t12952020631tpd0qi7rqgq4rf/13mj11295201594.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t12952020631tpd0qi7rqgq4rf/13mj11295201594.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t12952020631tpd0qi7rqgq4rf/23v0i1295201594.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t12952020631tpd0qi7rqgq4rf/23v0i1295201594.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t12952020631tpd0qi7rqgq4rf/3n4md1295201594.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t12952020631tpd0qi7rqgq4rf/3n4md1295201594.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