Home » date » 2010 » Jun » 06 »

IKO opgave 10 oe 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, 06 Jun 2010 12:42:09 +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/Jun/06/t1275828151dbcxz3l93p8wir7.htm/, Retrieved Sun, 06 Jun 2010 14:42:35 +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/Jun/06/t1275828151dbcxz3l93p8wir7.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
278,1 283,3 287 287,9 279,7 273,2 272,6 274,8 277,2 277,5 278,7 279 280,1 280,8 280,1 270,5 260 258,2 260,1 262,2 263,4 264,7 267,4 266,8 265,2 262,5 255 252,8 249,6 254,2 259,4 260,8 261,6 257,2 249,8 235,2 227,4 223,1 221,6 218,5 220,1 222,1 222,9 222,8 222,1 209 201,7 204,5 208,7 213 218,6 221,9 224,6 226,8 229,6 231,4 229,1 232,7 236,6 242,2 251,5 261,5 266,4 280,9 294,4 308,8 328,8 348,2 365,9 387,5 395,9 395,8
 
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.999924589277296
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
2283.3278.15.19999999999999
3287283.2996078642423.70039213575802
4287.9286.9997209507550.900279049245228
5279.7287.899932109306-8.19993210930625
6273.2279.700618362806-6.50061836280645
7272.6273.200490216329-0.600490216328694
8274.8272.6000452834012.19995471659877
9277.2274.7998340998252.40016590017507
10277.5277.1998190017550.300180998245196
11278.7277.4999773631341.20002263686604
12279278.6999095054260.300090494574306
13280.1278.9999773699591.10002263004111
14280.8280.0999170464980.700082953501521
15280.1280.799947206239-0.699947206238505
16270.5280.100052783525-9.60005278352469
17260270.500723946918-10.5007239469184
18258.2260.000791867182-1.80079186718177
19260.1258.2001357990161.89986420098387
20262.2260.0998567298682.10014327013238
21263.4262.1998416266781.20015837332181
22264.7263.3999094951901.30009050481033
23267.4264.6999019592352.70009804076449
24266.8267.399796383655-0.59979638365536
25265.2266.800045231079-1.60004523107875
26262.5265.200120660567-2.70012066056722
27255262.500203618050-7.50020361805036
28252.8255.000565595775-2.20056559577526
29249.6252.800165946242-3.20016594624195
30254.2249.6002413268274.59975867317323
31259.4254.1996531288745.20034687112579
32260.8259.3996078380841.40039216191593
33261.6260.7998943954150.800105604585042
34257.2261.599939663458-4.39993966345816
35249.8257.20033180263-7.40033180262986
36235.2249.800558064369-14.6005580643695
37227.4235.201101038635-7.8011010386355
38223.1227.400588286667-4.30058828666722
39221.6223.100324310471-1.50032431047077
40218.5221.600113140541-3.10011314054054
41220.1218.5002337817721.59976621822761
42222.1220.0998793604732.00012063952667
43222.9222.0998491694570.800150830542918
44222.8222.899939660048-0.0999396600475961
45222.1222.800007536522-0.700007536522008
46209222.100052788074-13.1000527880742
47201.7209.000987884448-7.30098788444823
48204.5201.7005505727732.79944942722722
49208.7204.4997888914964.20021110850445
50213208.6996832590454.3003167409552
51218.6212.9996757100075.6003242899933
52221.9218.5995776754983.30042232450211
53224.6221.8997511127672.70024888723270
54226.8224.599796372282.20020362772007
55229.6226.7998340810542.80016591894565
56231.4229.5997888374641.80021116253565
57229.1231.399864244775-2.29986424477525
58232.7229.1001734344253.59982656557517
59236.6232.6997285344773.90027146552293
60242.2236.599705877715.60029412228994
61251.5242.1995776777739.30042232222712
62261.5251.49929864843110.0007013515688
63266.4261.4992458398844.90075416011643
64280.9266.39963043058714.500369569413
65294.4280.89890651665113.5010934833487
66308.8294.39898187278314.4010181272169
67328.8308.79891400881520.0010859911847
68348.2328.79849170365119.4015082963494
69365.9348.19853691823817.7014630817622
70387.5365.89866511987621.6013348801239
71395.9387.4983710277258.40162897227464
72395.8395.899366427087-0.0993664270872614


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
73395.800007493294381.842329321405409.757685665183
74395.800007493294376.061613980661415.538401005928
75395.800007493294371.625815118592419.974199867997
76395.800007493294367.886229972531423.713785014058
77395.800007493294364.591573152747427.008441833841
78395.800007493294361.612966490923429.987048495665
79395.800007493294358.873849136279432.726165850309
80395.800007493294356.324336890796435.275678095792
81395.800007493294353.929779788797437.670235197791
82395.800007493294351.664949245502439.935065741086
83395.800007493294349.510799625309442.08921536128
84395.800007493294347.452534306424444.147480680164
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275828151dbcxz3l93p8wir7/1srf41275828126.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275828151dbcxz3l93p8wir7/1srf41275828126.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275828151dbcxz3l93p8wir7/2liw71275828126.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275828151dbcxz3l93p8wir7/2liw71275828126.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275828151dbcxz3l93p8wir7/3liw71275828126.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275828151dbcxz3l93p8wir7/3liw71275828126.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Single ; 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