Home » date » 2009 » Jun » 06 »

opgave 10(2) dennis gys

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 06 Jun 2009 05:35:11 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/06/t1244288191ymfflby88z6zqc3.htm/, Retrieved Sat, 06 Jun 2009 13:36:34 +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/2009/Jun/06/t1244288191ymfflby88z6zqc3.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
10.738 10.171 9.721 9.897 9.828 9.924 10.371 10.846 10.413 10.709 10.662 10.570 10.297 10.635 10.872 10.296 10.383 10.431 10.574 10.653 10.805 10.872 10.625 10.407 10.463 10.556 10.646 10.702 11.353 11.346 11.451 11.964 12.574 13.031 13.812 14.544 14.931 14.886 16.005 17.064 15.168 16.050 15.839 15.137 14.954 15.648 15.305 15.579 16.348 15.928 16.171 15.937 15.713 15.594 15.683 16.438 17.032 17.696 17.745 19.394 20.148 20.108 18.584 18.441 18.391 19.178 18.079 18.483 19.644 19.195 19.650 20.830
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.734065025144526
beta0.0248623119871675
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1310.29710.02342628205130.273573717948715
1410.63510.59445800073740.0405419992626399
1510.87210.8862941989203-0.0142941989202647
1610.29610.3097828515273-0.0137828515272513
1710.38310.4142703216996-0.0312703216995658
1810.43110.4799334842889-0.0489334842888773
1910.57410.6905710071398-0.116571007139800
2010.65311.1083057046558-0.455305704655805
2110.80510.29474419338820.510255806611832
2210.87210.9309884014872-0.0589884014871682
2310.62510.8301271080005-0.205127108000454
2410.40710.5687468179479-0.161746817947913
2510.46310.24267799909150.220322000908512
2610.55610.7065360984725-0.150536098472536
2710.64610.8339262919257-0.187926291925704
2810.70210.11732540801170.584674591988321
2911.35310.65462293130090.698377068699068
3011.34611.26266784476770.0833321552323198
3111.45111.5662940594310-0.115294059431035
3211.96411.90879231608530.0552076839147215
3312.57411.74998215620800.82401784379205
3413.03112.49411724050430.536882759495665
3513.81212.83162679380440.980373206195605
3614.54413.51347925641921.03052074358080
3714.93114.24743945833030.683560541669712
3814.88615.0443966308006-0.158396630800594
3916.00515.24760586452110.757394135478927
4017.06415.53917840404011.52482159595990
4115.16816.9227857935655-1.75478579356547
4216.0515.64765948161490.402340518385138
4315.83916.2196307866016-0.380630786601587
4415.13716.4948483322086-1.35784833220859
4514.95415.5595789516196-0.605578951619558
4615.64815.20820910263510.439790897364880
4715.30515.6208858919815-0.315885891981493
4815.57915.36937778041690.209622219583117
4916.34815.39833629074850.949663709251526
5015.92816.1614412189243-0.233441218924302
5116.17116.5464506210905-0.375450621090536
5215.93716.1831991857762-0.246199185776197
5315.71315.33494967959710.378050320402904
5415.59416.1783943624217-0.584394362421724
5515.68315.7790854577268-0.0960854577268098
5616.43815.96976137342010.468238626579939
5717.03216.57480031852680.45719968147316
5817.69617.3007628141230.395237185877001
5917.74517.49814358030110.246856419698858
6019.39417.82811644925841.5658835507416
6120.14819.10285494782971.04514505217028
6220.10819.67655606357740.431443936422632
6318.58420.5791393119491-1.99513931194912
6418.44119.0990134935879-0.658013493587891
6518.39118.14466940412510.246330595874880
6619.17818.66326570382860.514734296171401
6718.07919.2484969907143-1.16949699071426
6818.48318.8295520677096-0.346552067709617
6919.64418.84693515252110.797064847478904
7019.19519.8254946452781-0.63049464527807
7119.6519.23133360010500.418666399895027
7220.8320.04220892708760.787791072912384


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7320.597101066967719.262098793353721.9321033405818
7420.211125382192518.540515927930121.8817348364550
7520.114545499929618.15261401561322.0764769842462
7620.453840717289818.227153506946322.6805279276334
7720.234297678462217.760635300520722.7079600564037
7820.65023320086617.942287246481623.3581791552504
7920.407109819326517.474326092406723.3398935462464
8021.084235319789717.933848024264224.2346226153153
8121.685196407762018.322858274655525.0475345408684
8221.709532115899618.139722530194325.2793417016049
8321.879222271396318.105524397550225.6529201452425
8422.495310020910418.520606198399626.4700138434211
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288191ymfflby88z6zqc3/1mjex1244288109.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288191ymfflby88z6zqc3/1mjex1244288109.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288191ymfflby88z6zqc3/25bsy1244288109.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288191ymfflby88z6zqc3/25bsy1244288109.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288191ymfflby88z6zqc3/3smqu1244288109.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288191ymfflby88z6zqc3/3smqu1244288109.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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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