Home » date » 2010 » Jan » 16 »

Opgave 10 Oefening 2

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 16 Jan 2010 02:07:27 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/16/t126363305215b807spmz61u2h.htm/, Retrieved Sat, 16 Jan 2010 10:10:56 +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/Jan/16/t126363305215b807spmz61u2h.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
5.2100 5.2300 5.2300 5.2300 5.2200 5.2100 5.2300 5.2500 5.2300 5.2300 5.2500 5.2400 5.2600 5.2700 5.2600 5.2900 5.2900 5.2900 5.2900 5.3100 5.3300 5.3400 5.3400 5.3700 5.4100 5.4100 5.3800 5.4400 5.4400 5.4600 5.4600 5.4500 5.4600 5.4600 5.4800 5.4700 5.4800 5.5100 5.5500 5.5800 5.5900 5.6000 5.6000 5.6700 5.7100 5.7000 5.7300 5.7300 5.7200 5.7500 5.7500 5.7700 5.8300 5.8500 5.8700 5.8600 5.8700 5.9300 5.9700 5.9800 5.9900 5.9900 6.0300 6.0600 6.0700 6.0800 6.0800 6.1000 6.1300 6.1400 6.1400 6.1600 6.2000 6.1900 6.3200 6.3200 6.3300 6.3200 6.3300 6.3800 6.4200 6.4600 6.4700 6.4200 6.4800 6.4700 6.4900 6.4800 6.5100 6.5100 6.5200 6.5700 6.5900 6.6200 6.6300 6.6100 6.6400 6.6900 6.6900 6.7500 6.7700 6.8100 6.8100 6.8100 6.8700 6.8600 6.8800 6.8800 6.9200 6.9200 6.9900 7.0200 7.0500 7.0600 7.0600 7.0900 7.1200 7.2300 7.3100 7.4500 7.4900 7.5400 7.5500 7.5800 7.6000 7.6300 7.6400 7.6300 etc...
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
35.235.25-0.0200000000000005
45.235.25-0.0200000000000005
55.225.25-0.0300000000000011
65.215.24-0.0300000000000002
75.235.230
85.255.25-8.88178419700125e-16
95.235.27-0.04
105.235.25-0.0200000000000005
115.255.25-8.88178419700125e-16
125.245.27-0.0300000000000002
135.265.26-8.88178419700125e-16
145.275.28-0.0100000000000007
155.265.29-0.0300000000000002
165.295.280.00999999999999979
175.295.31-0.0200000000000005
185.295.31-0.0200000000000005
195.295.31-0.0200000000000005
205.315.31-8.88178419700125e-16
215.335.330
225.345.35-0.0100000000000007
235.345.36-0.0200000000000005
245.375.360.00999999999999979
255.415.390.0199999999999996
265.415.43-0.0200000000000005
275.385.43-0.0500000000000007
285.445.40.04
295.445.46-0.0200000000000005
305.465.46-8.88178419700125e-16
315.465.48-0.0200000000000005
325.455.48-0.0300000000000002
335.465.47-0.0100000000000007
345.465.48-0.0200000000000005
355.485.480
365.475.5-0.0300000000000011
375.485.49-0.00999999999999979
385.515.50.0099999999999989
395.555.530.0199999999999996
405.585.570.00999999999999979
415.595.6-0.0100000000000007
425.65.61-0.0100000000000007
435.65.62-0.0200000000000005
445.675.620.0499999999999998
455.715.690.0199999999999996
465.75.73-0.0300000000000002
475.735.720.00999999999999979
485.735.75-0.0200000000000005
495.725.75-0.0300000000000011
505.755.740.00999999999999979
515.755.77-0.0200000000000005
525.775.77-8.88178419700125e-16
535.835.790.04
545.855.85-8.88178419700125e-16
555.875.870
565.865.89-0.0300000000000002
575.875.88-0.0100000000000007
585.935.890.0399999999999991
595.975.950.0199999999999996
605.985.99-0.00999999999999979
615.996-0.0100000000000007
625.996.01-0.0200000000000005
636.036.010.0199999999999996
646.066.050.0099999999999989
656.076.08-0.00999999999999979
666.086.09-0.0100000000000007
676.086.1-0.0200000000000005
686.16.1-8.88178419700125e-16
696.136.120.00999999999999979
706.146.15-0.0100000000000007
716.146.16-0.0200000000000005
726.166.160
736.26.180.0199999999999996
746.196.22-0.0300000000000002
756.326.210.109999999999999
766.326.34-0.0200000000000005
776.336.34-0.0100000000000007
786.326.35-0.0300000000000002
796.336.34-0.0100000000000007
806.386.350.0299999999999994
816.426.40.0199999999999996
826.466.440.0199999999999996
836.476.48-0.0100000000000007
846.426.49-0.0700000000000003
856.486.440.04
866.476.5-0.0300000000000011
876.496.490
886.486.51-0.0300000000000002
896.516.50.0099999999999989
906.516.53-0.0200000000000005
916.526.53-0.0100000000000007
926.576.540.0300000000000002
936.596.59-8.88178419700125e-16
946.626.610.00999999999999979
956.636.64-0.0100000000000007
966.616.65-0.04
976.646.630.0099999999999989
986.696.660.0300000000000002
996.696.71-0.0200000000000005
1006.756.710.0399999999999991
1016.776.77-8.88178419700125e-16
1026.816.790.0199999999999996
1036.816.83-0.0200000000000005
1046.816.83-0.0200000000000005
1056.876.830.04
1066.866.89-0.0300000000000002
1076.886.88-8.88178419700125e-16
1086.886.9-0.0200000000000005
1096.926.90.0199999999999996
1106.926.94-0.0200000000000005
1116.996.940.0499999999999998
1127.027.010.0099999999999989
1137.057.040.00999999999999979
1147.067.07-0.0100000000000007
1157.067.08-0.0200000000000005
1167.097.080.00999999999999979
1177.127.110.00999999999999979
1187.237.140.0899999999999999
1197.317.250.0599999999999987
1207.457.330.12
1217.497.470.0199999999999996
1227.547.510.0299999999999994
1237.557.56-0.0100000000000007
1247.587.570.00999999999999979
1257.67.6-8.88178419700125e-16
1267.637.620.00999999999999979
1277.647.65-0.0100000000000007
1287.637.66-0.0300000000000002
1297.667.650.00999999999999979
1307.647.68-0.0400000000000009
1317.697.660.0300000000000002
1327.77.71-0.0100000000000007
1337.687.72-0.0400000000000009


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1347.77.644916940634397.75508305936561
1357.727.642100790388157.79789920961185
1367.747.644593342542437.83540665745757
1377.767.649833881268787.87016611873123
1387.787.656830534849847.90316946515017
1397.87.665074611082827.93492538891719
1407.827.674263923465997.96573607653402
1417.847.68420158077637.9957984192237
1427.867.694750821903178.02524917809684
1437.887.70581207191448.05418792808561
1447.97.71731015977948.08268984022061
1457.927.729186685084868.11081331491515
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/16/t126363305215b807spmz61u2h/1vuqd1263632845.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t126363305215b807spmz61u2h/1vuqd1263632845.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/16/t126363305215b807spmz61u2h/2f8ns1263632845.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t126363305215b807spmz61u2h/2f8ns1263632845.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/16/t126363305215b807spmz61u2h/37zs81263632845.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t126363305215b807spmz61u2h/37zs81263632845.ps (open in new window)


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