Home » date » 2010 » Dec » 28 »

opdracht 10 oefening 2 stap 1

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 28 Dec 2010 17:41:10 +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/Dec/28/t1293558073qc9hu3tp3d82yxp.htm/, Retrieved Tue, 28 Dec 2010 18:41:17 +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/2010/Dec/28/t1293558073qc9hu3tp3d82yxp.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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
132,1 125 127,1 101,5 85,7 79,3 70,9 77,1 83,9 96,2 111,7 127,2 143,6 134,9 135,6 105,3 86,4 74,6 67,6 73,4 78,5 98,2 118,6 136,9 137,9 115,6 119,3 98,5 84,3 73,5 60,7 69,5 77,9 113,9 126,3 135,1 130,5 113,1 110 90,8 85,4 72,5 64,7 67,2 77,9 105,2 107,2 120,7 121,3 107,9 105,6 81,3 71,7 64,8 57,3 61,9 70,1 88,8 106,8 110,7 114,1 108 111,5 86,8 78,4 68 57,3 65,3 73,3 88,6 101,3 122,9 126,6 114,1 124,7 93,3 77,2 66,5 57,9 63,7 65,8 85 101 105,3 121 117,9 106 86,6 79,9 65,2 61,2 67,6 78,9 95,5 113,1 124,4 122 110,3 114 93,3 75,5 65,4 59,2 63,8 74,2 91,7 107 120,7 127,4 119,7 112,7 84,4 75,6 66,5 59,9 64,8 74,3 100,4 105,9 131,1
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.316980625774965
beta0
gamma0.600837245360393


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13143.6142.5137553418801.08624465811960
14134.9134.5056991447310.394300855268853
15135.6135.765810167953-0.165810167953197
16105.3105.610876848531-0.310876848530825
1786.486.29746020191990.102539798080130
1874.673.89425528932410.705744710675887
1967.672.5822546473935-4.98225464739348
2073.476.3672684095344-2.9672684095344
2178.581.5159937702799-3.01599377027989
2298.292.40344080235185.7965591976482
23118.6109.6092963888738.9907036111274
24136.9128.1818005370608.71819946293971
25137.9148.180369678706-10.2803696787063
26115.6136.285354650808-20.6853546508077
27119.3130.633762970068-11.3337629700679
2898.596.87927201369461.62072798630540
2984.378.34779603823215.95220396176789
3073.568.04636666359985.45363333640022
3160.765.9050937623291-5.20509376232911
3269.570.4463889054797-0.946388905479694
3377.976.21569783296151.68430216703848
34113.992.209573761393421.6904262386066
35126.3115.76430136645010.5356986335498
36135.1134.7147078031970.38529219680251
37130.5144.275207878323-13.7752078783225
38113.1127.002362915626-13.9023629156255
39110127.338586931013-17.3385869310125
4090.896.9969921895486-6.19699218954861
4185.477.76501656208597.6349834379141
4272.567.792390530914.70760946909
4364.761.04047700525463.65952299474542
4467.270.1393860319418-2.93938603194177
4577.976.35654563851111.54345436148887
46105.2100.5159583459424.68404165405832
47107.2114.102275597597-6.90227559759728
48120.7123.359622940109-2.6596229401093
49121.3126.143708619721-4.8437086197206
50107.9111.649793554500-3.74979355450022
51105.6113.794015791984-8.1940157919841
5281.390.9233993479795-9.62339934797954
5371.776.2817333193824-4.58173331938238
5464.861.23529885091613.5647011490839
5557.353.6909881567943.60901184320601
5661.960.06580288085641.83419711914360
5770.169.63577949981480.464220500185192
5888.894.7419411228185-5.94194112281848
59106.8100.2051945179476.59480548205279
60110.7115.481969626421-4.78196962642106
61114.1116.696999844925-2.59699984492451
62108103.3641726036384.63582739636243
63111.5106.3426388328715.15736116712863
6486.887.117554815307-0.317554815307091
6578.477.49467765651260.905322343487413
666867.53069564708610.46930435291388
6757.359.0233885163179-1.72338851631790
6865.362.97958099589622.32041900410375
6973.372.14146476071611.15853523928389
7088.694.8387278081597-6.2387278081597
71101.3105.352779265323-4.05277926532256
72122.9112.58563574493010.3143642550704
73126.6119.4825868252737.11741317472689
74114.1112.1972731107161.90272688928439
75124.7114.52342827434910.1765717256512
7693.394.6425216905708-1.34252169057078
7777.285.1965984734846-7.99659847348461
7866.572.23194545287-5.73194545287001
7957.960.8591173492844-2.95911734928442
8063.766.0831195301012-2.38311953010123
8165.873.277254805-7.47725480500002
828590.2014251731632-5.20142517316324
83101101.941358637347-0.94135863734678
84105.3116.056513520694-10.7565135206938
85121114.9624286704266.03757132957429
86117.9105.19480491058212.7051950894179
87106114.340582435652-8.34058243565171
8886.683.86285110329362.73714889670643
8979.972.97938123996956.92061876003049
9065.265.6725732589468-0.472573258946824
9161.257.10478708932774.09521291067226
9267.664.80125527949592.79874472050409
9378.971.54739216890547.35260783109459
9495.594.10630455830641.39369544169355
95113.1109.6850244092253.41497559077521
96124.4121.1530754310263.24692456897415
97122131.389824122558-9.38982412255803
98110.3119.468297535695-9.16829753569536
99114113.0437622744790.956237725521177
10093.390.05906074186193.24093925813813
10175.581.0521095807769-5.55210958077686
10265.466.7576445010084-1.35764450100837
10359.259.7838518763816-0.583851876381573
10463.865.4650980555767-1.66509805557668
10574.272.66511345621231.53488654378775
10691.790.93448171195080.765518288049208
107107107.143581555905-0.143581555904632
108120.7117.4146735434623.28532645653773
109127.4122.4776819938054.92231800619484
110119.7115.1837380265774.5162619734228
111112.7117.251885009185-4.55188500918538
11284.493.458819049478-9.05881904947807
11375.676.9445608266687-1.34456082666867
11466.565.70514635734960.794853642650367
11559.959.7312056508590.168794349140995
11664.865.2073005325693-0.407300532569323
11774.374.11923419285840.180765807141555
118100.491.64363638843858.75636361156154
119105.9110.012599826484-4.11259982648355
120131.1120.43275711939410.6672428806060


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121128.507484345050115.750275241454141.264693448647
122119.486622248420106.103849497187132.869394999654
123116.401783974666102.421410985742130.382156963590
12492.202006101027677.6485511398265106.755461062229
12581.725022139285666.620212517645996.8298317609254
12671.789787755859956.153052287602687.4265232241172
12765.306969453180749.155817218664181.4581216876973
12870.493139974488453.843457067573887.142822881403
12979.775512723041562.64179849351596.909226952568
130100.76189932432983.1574571094403118.366341539218
131111.07405515410193.01114818718129.136962121021
132128.863230187763110.353210455361147.373249920165
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293558073qc9hu3tp3d82yxp/1awke1293558062.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293558073qc9hu3tp3d82yxp/1awke1293558062.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293558073qc9hu3tp3d82yxp/2knjh1293558062.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293558073qc9hu3tp3d82yxp/2knjh1293558062.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293558073qc9hu3tp3d82yxp/3knjh1293558062.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293558073qc9hu3tp3d82yxp/3knjh1293558062.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