Home » date » 2010 » Dec » 18 »

Eigen reeks (Opgave 10)

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 18 Dec 2010 10:29: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/Dec/18/t12926681307jdn3ie1xg1oukc.htm/, Retrieved Sat, 18 Dec 2010 11:28:50 +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/18/t12926681307jdn3ie1xg1oukc.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 «
98.4 96.5 97.4 99.2 100.8 101.8 102.7 100 100.8 101.7 99 101.7 100.2 101.2 99.5 100.8 100.7 99.5 99.4 101.1 97.2 98.1 97.8 95.5 96.3 93.6 96.7 95.1 97.7 96.5 98.1 97.3 97 93.7 95.6 94.6 95.1 94.5 93.6 92.1 95.9 98.1 98.2 96.2 94.1 95 93.4 95.4 93.5 94.5 94.3 95.7 98.4 99.4 99.2 99 99.4 99.3 98.6 98.7 96 98.7 100.1 100 101.5 101.5 103.8 104.1 101 104.9 104.4 105.6 103.4 101.7 103.5 101.2 105.4 105.4 108.6 110.6 110.2 106.2 108.6 107.5 106.9 108.4 109.9 108.6 106.5 105.7 105.6 104.2 105.1 102.7 108.3 104.2 105.4 104.6 106.4 111 111.7 113.8 115.9 117.3 113.6 113.6 114.6 113.2 112.8 109.6 111.1 109.7 113 111 113.3 111.8 107.2 106.4 110 108.2 108.2
 
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.727358642373541
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
296.598.4-1.90000000000001
397.497.01801857949030.381981420509732
499.297.29585606692411.90414393307586
5100.898.680851612972.11914838702998
6101.8100.2222325067481.57776749325177
7102.7101.3698353286211.33016467137907
8100102.337342098128-2.33734209812846
9100.8100.6372561228710.162743877128776
10101.7100.7556292883940.944370711605785
1199101.442525487085-2.44252548708513
12101.799.66593346483612.03406653516389
13100.2101.145429338350-0.945429338350365
14101.2100.4577631383480.742236861652273
1599.5100.997635534359-1.49763553435872
16100.899.90831738531720.891682614682807
17100.7100.5568904413610.143109558639040
1899.5100.660982415643-1.16098241564333
1999.499.8165318219814-0.416531821981437
20101.199.51356380143961.58643619856035
2197.2100.667471881037-3.46747188103674
2298.198.1453762411774-0.0453762411774363
2397.898.1123714399986-0.3123714399986
2495.597.885165373485-2.38516537348495
2596.396.15029472559060.149705274409442
2693.696.2591841507412-2.65918415074117
2796.794.32500357703682.37499642296318
2895.196.0524777508853-0.95247775088535
2997.795.35968482711042.34031517288963
3096.597.0619332939896-0.561933293989568
3198.196.65320625616881.44679374383117
3297.397.7055441894764-0.405544189476402
339797.4105681183964-0.41056811839637
3493.797.1119378491977-3.41193784919773
3595.694.63023536734240.969764632657629
3694.695.3356020539741-0.735602053974105
3795.194.80055554266830.299444457331688
3894.595.0183590566194-0.51835905661936
3993.694.6413261169347-1.04132611693468
4092.193.883908566253-1.78390856625296
4195.992.58636725338473.31363274661534
4298.194.99656666928733.10343333071269
4398.297.25387572341130.94612427658872
4496.297.9420473927475-1.74204739274749
4594.196.6749541662083-2.57495416620831
469594.8020389997010.197961000299060
4793.494.9460276441214-1.54602764412137
4895.493.82151107582131.57848892417871
4993.594.9696386367136-1.46963863671360
5094.593.90068427313390.599315726866109
5194.394.3366017465803-0.0366017465803452
5295.794.30997914987921.39002085012083
5398.495.3210228282943.07897717170603
5499.497.56054348380521.8394565161948
5599.298.89848807812980.301511921870187
569999.1177953802808-0.117795380280754
5799.499.03211589240190.367884107598130
5899.399.29969957745530.000300422544739831
5998.699.2999180923895-0.699918092389538
6098.798.7908266189364-0.09082661893639
619698.7247630926954-2.72476309269544
6298.796.7428831088031.95711689119705
63100.198.16640899375041.93359100624963
6410099.57282312296180.427176877038221
65101.599.88353391629771.61646608370233
66101.5101.0592844923820.440715507617725
67103.8101.3798427256762.42015727432393
68104.1103.1401650350590.959834964941223
69101103.838309292061-2.83830929206107
70104.9101.7738404987513.12615950124868
71104.4104.0476796294230.352320370577289
72105.6104.3039428958461.29605710415363
73103.4105.246641231562-1.84664123156213
74101.7103.903470772422-2.20347077242209
75103.5102.3007572628831.19924273711662
76101.2103.173036832029-1.97303683202885
77105.4101.7379314405313.66206855946865
78105.4104.4015686562250.998431343774698
79108.6105.1277863229363.47221367706354
80110.6107.6533309491162.94666905088376
81110.2109.7966161494910.403383850508817
82106.2110.090020879353-3.89002087935269
83108.6107.2605805737421.33941942625800
84107.5108.234818869194-0.73481886919376
85106.9107.700342014107-0.800342014106519
86108.4107.1182063332911.28179366670851
87109.9108.0505300345121.84946996548841
88108.6109.395757997720-0.795757997719889
89106.5108.816956540840-2.31695654084045
90105.7107.131698176856-1.43169817685624
91105.6106.090340134649-0.490340134649415
92104.2105.733687000010-1.53368700000955
93105.1104.6181465058570.481853494143337
94102.7104.968626809180-2.26862680917969
95108.3103.3185214932034.98147850679746
96104.2106.941842936920-2.74184293691971
97105.4104.9475397807200.452460219279700
98104.6105.276640631544-0.676640631543634
99106.4104.7844802204091.61551977959073
100111105.959542494025.04045750598
101111.7109.6257628225112.07423717748887
102113.8111.1344771598902.66552284010983
103115.9113.0732682340882.82673176591189
104117.3115.1293160136962.17068398630404
105113.6116.708181770996-3.10818177099605
106113.6114.447418897794-0.84741889779417
107114.6113.8310414387730.76895856122708
108113.2114.390350093909-1.19035009390855
109112.8113.524538665654-0.724538665654009
110109.6112.997539205457-3.39753920545678
111111.1110.5263097015650.573690298435139
112109.7110.943588298178-1.24358829817751
113113110.0390536019432.96094639805651
114111112.192723554175-1.19272355417471
115113.3111.3251857690831.97481423091675
116111.8112.761583967023-0.961583967022804
117107.2112.062167558241-4.86216755824093
118106.4108.525627964086-2.12562796408612
119110106.9795340939373.02046590606280
120108.2109.176496074707-0.976496074706603
121108.2108.466233215525-0.266233215524920


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
122108.272586185326104.467761022791112.077411347861
123108.272586185326103.567737796666112.977434573986
124108.272586185326102.814152142206113.731020228446
125108.272586185326102.152667391264114.392504979388
126108.272586185326101.556016384547114.989155986105
127108.272586185326101.008206395450115.536965975201
128108.272586185326100.498905102700116.046267267951
129108.272586185326100.02097898326116.524193387392
130108.27258618532699.5692577840759116.975914586576
131108.27258618532699.139852251677117.405320118975
132108.27258618532698.7297494505996117.815422920052
133108.27258618532698.3365589717732118.208613398879
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/18/t12926681307jdn3ie1xg1oukc/1jvgr1292668145.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t12926681307jdn3ie1xg1oukc/1jvgr1292668145.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t12926681307jdn3ie1xg1oukc/2u4xb1292668145.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t12926681307jdn3ie1xg1oukc/2u4xb1292668145.ps (open in new window)


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