Home » date » 2010 » Aug » 18 »

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: Wed, 18 Aug 2010 08:58:58 +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/Aug/18/t1282121916ckqvrf9em3p9e51.htm/, Retrieved Wed, 18 Aug 2010 10:58:52 +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/Aug/18/t1282121916ckqvrf9em3p9e51.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:
Patrick Fieremans
 
Dataseries X:
» Textbox « » Textfile « » CSV «
136 135 134 132 152 151 136 126 127 127 128 130 125 118 111 104 126 131 122 116 115 115 113 122 114 106 93 89 114 122 115 116 120 120 120 121 118 112 99 96 120 135 128 134 134 132 130 125 124 114 101 101 123 143 133 136 137 135 141 136 133 124 110 104 130 160 142 142 137 135 139 135 134 120 103 101 127 159 141 140 135 127 130 128 126 110 101 102 129 169 146 145 138 123 124 137 132 112 105 106 137 175 151 142 140 122 127 135 128 117 107 108 134 171 154 146 148 122 124 135
 
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.999933893038648
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
2135136-1
3134135.000066106961-1.00006610696136
4132134.000066111331-2.00006611133148
5152132.00013221829319.9998677817069
6151151.998677869514-0.9986778695135
7136151.000066019559-15.0000660195593
8126136.000991608785-10.0009916087846
9127126.0006611351660.999338864834243
10127126.9999339367446.60632557156760e-05
11128126.9999999956331.00000000436724
12130127.9999338930382.00006610696164
13125129.999867781707-4.99986778170717
14118125.000330526066-7.00033052606621
15111118.000462770580-7.00046277057953
16104111.000462779322-7.00046277932181
17126104.00046277932221.9995372206776
18131125.9985456774435.00145432255681
19122130.999669369052-8.99966936905238
20116122.000594940795-6.00059494079515
21115116.000396681098-1.00039668109784
22115115.000066133185-6.61331847453539e-05
23113115.000000004372-2.00000000437187
24122113.0001322139238.999867786077
25114121.999405046088-7.99940504608809
26106114.000528816360-8.00052881636022
2793106.000528890649-13.0005288906492
288993.000859425461-4.00085942546093
2911489.000264484659424.9997355153406
30122113.9983473434508.00165265654952
31115121.999471035057-6.99947103505707
32116115.0004627137610.999537286238791
33120115.9999339236274.00006607637275
34120119.9997355677860.000264432213512578
35120119.9999999825191.74808150177341e-08
36121119.9999999999991.00000000000115
37118120.999933893039-2.99993389303864
38112118.000198316514-6.00019831651392
3999112.000396654878-13.0003966548782
409699.0008594167192-3.00085941671922
4112096.000198377697523.9998016223025
42135119.99841344604215.0015865539583
43128134.999008290697-6.99900829069747
44134128.0004626831715.99953731682942
45134133.9996033888180.000396611181514572
46132133.999999973781-1.99999997378126
47130132.000132213921-2.00013221392098
48125130.000132222663-5.00013222266296
49124125.000330543548-1.00033054354759
50114124.000066128813-10.0000661288126
51101114.000661073985-13.0006610739851
52101101.000859434199-0.000859434199171005
53123101.00000005681521.9999999431854
54143122.99854564685420.001454353146
55133142.99867776463-9.99867776463009
56136133.0006609822052.99933901779542
57137135.9998017228111.00019827718853
58135136.999933879931-1.99993387993115
59141135.0001322095525.99986779044829
60136140.999603366972-4.99960336697185
61133136.000330508587-3.00033050858656
62124133.000198342733-9.00019834273297
63110124.000594975764-14.000594975764
64104110.000925536791-6.00092553679096
65130104.00039670295325.9996032970475
66160129.99828124523030.0017187547703
67142159.998016677538-17.9980166775378
68142142.001189794193-0.00118979419292486
69137142.000000078654-5.00000007865367
70135137.000330534812-2.00033053481195
71139135.0001322357733.99986776422665
72135138.999735580896-3.99973558089627
73134135.000264410365-1.00026441036547
74120134.000066124441-14.0000661244407
75103120.000925501830-17.0009255018302
76101103.001123879525-2.00112387952510
77127101.00013228821925.9998677117810
78159126.9982812277532.00171877225
79141158.997884463614-17.9978844636139
80140141.001189785453-1.00118978545265
81135140.000066185614-5.00006618561446
82127135.000330539182-8.0003305391821
83130127.0005288775422.99947112245825
84128129.999801714078-1.99980171407842
85126128.000132200815-2.00013220081462
86110126.000132222662-16.0001322226621
87101110.001057720122-9.00105772012246
88102101.0005950325750.999404967425164
89129101.99993393237427.0000660676256
90169128.99821510767640.001784892324
91146168.997355603552-22.9973556035521
92145146.001520285298-1.00152028529806
93138145.000066207463-7.00006620746279
94123138.000462753106-15.0004627531062
95124123.0009916350110.999008364988512
96137123.99993395859313.0000660414074
97132136.999140605137-4.99914060513663
98112132.000330477995-20.0003304779948
99105112.001322161074-7.00132216107394
100106105.0004628361340.999537163866478
101137105.99993392363531.0000660763647
102175136.9979506798338.00204932017
103151174.997487799994-23.9974877999943
104142151.001586400999-9.00158640099855
105140142.000595067524-2.00059506752433
106122140.000132253261-18.0001322532608
107127122.0011899340474.99881006595281
108135126.9996695438568.00033045614383
109128134.999471122464-6.99947112246375
110117128.000462713767-11.0004627137670
111107117.000727207163-10.0007272071635
112108107.0006611176870.999338882313026
113134107.99993393674326.0000660632569
114171133.99828121463837.0017187853624
115154170.997553928806-16.9975539288063
116146154.001123656641-8.00112365664063
117148146.0005289299721.99947107002768
118122147.999867821043-25.9998678210433
119124122.0017187722571.99828122774281
120135123.999867899711.0001321002999


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121134.999272814692108.768390807580161.230154821805
122134.99927281469297.904429861163172.094115768222
123134.99927281469289.5680547303954180.430490898989
124134.99927281469282.540109844827187.458435784558
125134.99927281469276.3483394685398193.650206160845
126134.99927281469270.7505359769087199.248009652476
127134.99927281469265.6028147773637204.395730852021
128134.99927281469260.8114261617354209.187119467649
129134.99927281469256.3112508934456213.687294735939
130134.99927281469252.0548757962406217.943669833144
131134.99927281469248.0065076003914221.992038028993
132134.99927281469244.1383384011259225.860207228259
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/18/t1282121916ckqvrf9em3p9e51/1a74t1282121935.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/18/t1282121916ckqvrf9em3p9e51/1a74t1282121935.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/18/t1282121916ckqvrf9em3p9e51/2a74t1282121935.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/18/t1282121916ckqvrf9em3p9e51/2a74t1282121935.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/18/t1282121916ckqvrf9em3p9e51/3lglw1282121935.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/18/t1282121916ckqvrf9em3p9e51/3lglw1282121935.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