Home » date » 2010 » Jul » 29 »

Tijdreeks 1 - Stap 32

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 29 Jul 2010 12:07:54 +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/Jul/29/t1280405277bgorhoc3v4w8szg.htm/, Retrieved Thu, 29 Jul 2010 14:07:57 +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/Jul/29/t1280405277bgorhoc3v4w8szg.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:
Habimana Christelle
 
Dataseries X:
» Textbox « » Textfile « » CSV «
900 899 898 896 916 915 900 890 891 891 892 894 896 889 878 883 901 897 881 866 867 866 862 871 865 856 847 859 870 872 856 839 829 825 822 827 822 812 810 816 820 823 810 793 777 772 765 765 753 742 736 740 742 742 728 707 699 696 689 692 673 653 642 648 654 653 630 609 598 601 592 591 568 538 523 530 529 534 513 491 480 478 462 461 437 411 400 405 395 407 385 366 349 343 332 327 306 276 269 268 260 274 247 226 212 199 188 179 155 124 117 116 105 112 86 64 53 42 32 24
 
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.768991824691135
beta0.729803955352783
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13896903.770032051282-7.77003205128221
14889886.6124717802982.38752821970195
15878874.8142381818763.18576181812375
16883881.4593981857561.54060181424438
17901900.9540497864380.0459502135618095
18897897.241781061954-0.241781061954157
19881880.3392252638740.660774736125859
20866869.70989638307-3.70989638307083
21867865.3041807097161.69581929028436
22866865.1321324939820.867867506018456
23862865.602121557149-3.60212155714862
24871861.8215004705229.17849952947813
25865871.391894037613-6.3918940376135
26856860.792986846258-4.7929868462578
27847842.7799907236524.22000927634758
28859849.543462932099.45653706791052
29870878.925685014414-8.92568501441428
30872867.3583908033234.64160919667722
31856856.270800335272-0.270800335272043
32839845.243805159692-6.24380515969244
33829840.044603702055-11.0446037020552
34825822.6402210505352.35977894946518
35822816.8183646267245.18163537327587
36827821.2678605894915.73213941050903
37822821.1800519664590.819948033541323
38812817.13264328428-5.13264328428022
39810801.3862005066568.61379949334412
40816815.6496661807630.350333819237335
41820831.583850658154-11.5838506581536
42823817.415808659375.58419134062945
43810802.756442985457.24355701454988
44793797.183464927787-4.1834649277871
45777794.671265536733-17.6712655367334
46772773.760226477783-1.76022647778268
47765761.6024601170913.3975398829092
48765759.9863827437615.01361725623906
49753752.9872464972280.0127535027721706
50742741.2669726806050.733027319395319
51736730.8215736372085.17842636279181
52740736.2212106562253.77878934377543
53742749.645923301676-7.64592330167602
54742742.293058489909-0.293058489908503
55728720.0200573419177.97994265808313
56707709.309482295501-2.30948229550097
57699703.110135911258-4.11013591125823
58696701.901328632517-5.90132863251654
59689691.024787126059-2.02478712605864
60692685.8434421575686.15655784243177
61673679.440541357478-6.44054135747831
62653660.175014836356-7.17501483635579
63642637.4881104532744.51188954672614
64648634.4905801122413.5094198877603
65654650.658546707933.34145329207013
66653657.519398794553-4.51939879455335
67630635.601571358116-5.6015713581163
68609606.1419197729972.85808022700292
69598600.472463694726-2.47246369472634
70601598.000358867082.99964113292026
71592597.750571584554-5.75057158455377
72591592.389595163245-1.38959516324496
73568573.834239012965-5.83423901296533
74538551.766057103879-13.7660571038787
75523519.9122575828513.08774241714946
76530510.30061455872119.6993854412788
77529524.7561632428974.2438367571026
78534526.8778819125287.12211808747224
79513516.578531067405-3.57853106740504
80491494.680422662202-3.68042266220232
81480483.133610528595-3.1336105285954
82478481.428244198975-3.42824419897539
83462470.617734449276-8.61773444927587
84461458.8539040450132.14609595498695
85437438.769542800978-1.76954280097806
86411417.054752106214-6.05475210621438
87400398.4119231765061.58807682349357
88405394.03051729135310.9694827086469
89395395.849189114665-0.849189114664853
90407389.50775038427817.4922496157224
91385385.319295289814-0.31929528981442
92366368.341387966974-2.34138796697374
93349361.139497893285-12.1394978932851
94343350.575288727777-7.57528872777664
95332331.1842182307230.815781769276782
96327330.262729297620-3.26272929761961
97306303.1804883534352.81951164656454
98276284.646170170953-8.6461701709535
99269264.9632252220654.03677477793508
100268265.1933786213042.80662137869615
101260253.9849099814986.01509001850235
102274256.99163563359317.0083643664070
103247247.877468977656-0.87746897765615
104226229.250960956314-3.25096095631363
105212217.823459001706-5.823459001706
106199215.452532419926-16.4525324199259
107188188.473243654802-0.473243654801763
108179182.194820801609-3.19482080160881
109155153.1844449598421.81555504015776
110124127.280588985871-3.28058898587113
111117113.7159943304663.28400566953428
112116111.7230331877444.27696681225648
113105101.8515422688033.14845773119688
114112103.0497068972928.9502931027082
1158676.94119854769.05880145239999
1166464.3176950315437-0.317695031543721
1175355.1081601179772-2.10816011797725
1184255.7805178084333-13.7805178084333
1193238.6885555070466-6.68855550704657
1202427.6550092910357-3.65500929103571


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121-0.156966635392177-13.266085789997512.9521525192132
122-29.2582907949413-51.0740298877948-7.4425517020878
123-37.5666244872557-70.5925235666712-4.54072540784015
124-42.4815647584413-88.57333040847013.61020089158754
125-58.9289813252306-119.6364789394991.77851628903826
126-63.6049181363643-140.29787393916513.0880376664360
127-106.387320288330-200.31244851559-12.4621920610693
128-143.043192933233-255.355312657759-30.7310732087067
129-167.143917895076-298.925207483226-35.3626283069263
130-181.085567773435-333.358576216247-28.8125593306231
131-191.747069148066-365.484071319053-18.0100669770792
132-198.98763661954-395.117670008475-2.85760323060447
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280405277bgorhoc3v4w8szg/1fa7a1280405270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280405277bgorhoc3v4w8szg/1fa7a1280405270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280405277bgorhoc3v4w8szg/2c5w11280405270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280405277bgorhoc3v4w8szg/2c5w11280405270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280405277bgorhoc3v4w8szg/3c5w11280405270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280405277bgorhoc3v4w8szg/3c5w11280405270.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