Home » date » 2011 » Jan » 15 »

Opgave 10 oef 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, 15 Jan 2011 20:31:01 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/Jan/15/t1295123605yk2wyjx8eyclgf3.htm/, Retrieved Sat, 15 Jan 2011 21:33:28 +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/2011/Jan/15/t1295123605yk2wyjx8eyclgf3.htm/},
    year = {2011},
}
@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 = {2011},
    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 «
2834 4683 4120 3849 8435 12854 15883 10520 12562 5060 4520 2150 2905 4820 3950 4053 8700 13520 15400 11100 11950 4900 4633 2300 2945 3960 3900 3767 8820 11980 14085 11600 9814 4930 4360 2640 3050 5485 4366 4790 10100 14830 17930 13580 12490 6400 4980 4930 5856 5120 5100 5623 12035 19846 17030 15860 14890 8053 6080 5987 5682 4980 5450 6035 13240 18400 17689 16490 14062 9556 7555 4328
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0537548879628944
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
341206532-2412
438495839.3432102335-1990.3432102335
584355461.352533959692973.64746604031
61285410207.20062033782646.79937966217
71588314768.47902445181114.52097554817
81052017857.3899746247-7337.38997462472
91256212099.9693985987462.030601401299
10506014166.8058018125-9106.80580181246
1145206175.27047623619-1655.27047623619
1221505546.29159723783-3396.29159723783
1329052993.72432293899-88.7243229389887
1448203743.954956899821076.04504310018
1539505716.7976376347-1766.7976376347
1640534751.82362857054-698.823628570538
1787004817.258442710913882.74155728909
18135209672.974780111863847.02521988814
191540014699.7711897974700.228810202629
201110016617.4119110382-5517.41191103821
211195012020.8240519152-70.824051915206
22490012867.0169129394-7967.01691293943
2346335388.75081138588-755.750811385883
2423005081.12551119197-2781.12551119197
2529452598.6264209271346.373579072903
2639603262.24569386347697.754306136533
2739004314.75339841546-414.753398415463
2837674232.45837595141-465.458375951411
2988204074.437713100754745.56228689925
30119809382.534882153962597.46511784604
311408512682.16132855131402.8386714487
321160014862.570764165-3262.57076416504
33981412202.1916382663-2388.19163826633
34493010287.8146643174-5357.8146643174
3543605115.80593731107-755.80593731107
3626404505.17767382922-1865.17767382922
3730502684.91525694164365.084743058359
3854853114.54034640172370.4596535983
3943665676.96413950144-1310.96413950144
4047904487.49340905917302.506590940829
41101004927.754616963235172.24538303677
421483010515.7880880454314.21191195503
431793015477.69806602032452.3019339797
441358018709.5212817326-5129.52128173257
451249014083.7844399298-1593.78443992975
46640012908.1107359243-6508.11073592432
4749806468.2679724646-1488.2679724646
4849304968.266294346-38.2662943460009
4958564916.20929398068939.790706019324
5051205892.72763809131-772.727638091314
5151005115.18975047988-15.1897504798844
5256235094.37322714465528.626772855347
53120355645.789500093686389.21049990632
541984612401.24079468757444.75920531251
551703020612.4329916798-3582.43299167979
561586017603.8597075775-1743.85970757747
571489016340.1187243736-1450.11872437364
58805315292.167754812-7239.16775481204
5960808066.02710320752-1986.02710320752
6059875986.268438783330.73156121667489
6156825893.30776377457-211.307763774566
6249805576.94893860717-596.948938607175
6354504842.86001529278607.139984707223
6460355345.4967571485689.503242851493
65132405967.560926718047272.43907328196
661840013563.49007431934836.50992568071
671768918983.4761235057-1294.47612350568
681649018202.891704516-1712.89170451599
691406216911.8154028472-2849.81540284717
70955614330.6238951522-4774.62389515218
7175559567.96452260332-2012.96452260332
7243287458.7578402175-3130.7578402175


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
734063.46430327765-2636.7088412895410763.6374478448
743798.9286065553-5934.5560687840613532.4132818947
753534.39290983296-8705.0781527232315773.8639723891
763269.85721311061-11233.368106897417773.0825331186
773005.32151638826-13626.480638455719637.1236712322
782740.78581966591-15937.650603479621419.2222428114
792476.25012294356-18197.511464809723150.0117106968
802211.71442622122-20425.369671707224848.7985241497
811947.17872949887-22634.174012757726528.5314717555
821682.64303277652-24833.009652994528198.2957185475
831418.10733605417-27028.471038396129864.6857105045
841153.57163933183-29225.472039504731532.6153181684
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295123605yk2wyjx8eyclgf3/163qh1295123460.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295123605yk2wyjx8eyclgf3/163qh1295123460.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/15/t1295123605yk2wyjx8eyclgf3/2i2tq1295123460.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295123605yk2wyjx8eyclgf3/2i2tq1295123460.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/15/t1295123605yk2wyjx8eyclgf3/3xp7o1295123460.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295123605yk2wyjx8eyclgf3/3xp7o1295123460.ps (open in new window)


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