Home » date » 2010 » Dec » 29 »

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: Wed, 29 Dec 2010 09:58:39 +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/29/t1293616610vstam1sk29xvqyx.htm/, Retrieved Wed, 29 Dec 2010 10:56: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/29/t1293616610vstam1sk29xvqyx.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 «
7.24 7.52 7.57 7.59 7.58 7.55 7.52 7.55 7.62 7.64 7.68 7.69 7.7 7.6 7.51 7.66 7.69 7.66 7.7 7.72 7.74 7.76 7.72 7.73 7.75 8.1 8.22 8.32 8.07 8.18 8.33 8.34 8.25 8.36 8.36 8.34 8.41 8.39 8.43 8.44 8.49 8.47 8.53 8.52 8.51 8.53 8.54 8.53 8.47 8.63 8.67 8.73 8.57 8.55 8.63 8.65 8.44 8.62 8.37 8.59 8.84 8.72 8.8 8.69 8.68 8.57 8.85 8.85 8.85 8.93 8.75 8.78 8.77 9.03 9.01 9.07 8.99 9.02 8.99 8.98 8.94 8.94 8.75 8.86
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.508302927087735
beta0.00202277055986297
gamma0.695819962431208


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
137.77.656367521367520.0436324786324764
147.67.573127613309670.0268723866903322
157.517.493896131115180.016103868884815
167.667.651290870812170.0087091291878334
177.697.688269130563610.00173086943638712
187.667.66503543343643-0.00503543343643376
197.77.63085722742050.0691427725795046
207.727.68278844521140.0372115547885983
217.747.78019385838409-0.0401938583840913
227.767.78862921360613-0.0286292136061261
237.727.81583014229573-0.0958301422957293
247.737.7771074449082-0.0471074449081987
257.757.77511363066171-0.0251136306617079
268.17.651111245702130.448888754297865
278.227.783057112061570.436942887938426
288.328.152617728548590.167382271451412
298.078.26880781850052-0.198807818500519
308.188.142063854297020.037936145702977
318.338.155890303684840.174109696315156
328.348.251143019747130.0888569802528707
338.258.34926135188351-0.0992613518835128
348.368.332512753967470.0274872460325319
358.368.36618749438794-0.00618749438794453
368.348.3907334932471-0.0507334932471029
378.418.39545107238710.0145489276128981
388.398.45485147158106-0.0648514715810631
398.438.322116891979280.107883108020722
408.448.432393926758580.00760607324141915
418.498.342123399627330.147876600372667
428.478.47299410548398-0.00299410548397638
438.538.512959048897180.0170409511028193
448.528.499398074633620.0206019253663836
458.518.498583112037150.011416887962854
468.538.5816935876789-0.0516935876789084
478.548.56375400659804-0.0237540065980433
488.538.56426695004882-0.0342669500488242
498.478.59984339308978-0.129843393089779
508.638.55868844847690.0713115515231078
518.678.554409233288730.115590766711268
528.738.63444913556050.095550864439497
538.578.6371158404428-0.0671158404428027
548.558.6071099272806-0.0571099272806013
558.638.626389106697070.00361089330293574
568.658.607172931590560.0428270684094407
578.448.6144884359516-0.174488435951602
588.628.581295256324810.0387047436751864
598.378.61874211865705-0.248742118657054
608.598.500942461162440.0890575388375634
618.848.566278418076820.273721581923178
628.728.79926647691246-0.0792664769124567
638.88.733630625875930.0663693741240738
648.698.78177748913779-0.0917774891377867
658.688.63336109084340.0466389091565969
668.578.66450739598698-0.0945073959869767
678.858.685420452474490.164579547525509
688.858.761476299037830.0885237009621651
698.858.717749842982880.132250157017118
708.938.913809550138680.0161904498613161
718.758.84184064575374-0.0918406457537433
728.788.91990134564693-0.139901345646926
738.778.93233560799874-0.162335607998738
749.038.822756619668460.207243380331539
759.018.95272676437290.0572732356271057
769.078.942278896341290.127721103658713
778.998.953152793140770.0368472068592318
789.028.931382872157130.0886171278428716
798.999.13456072744822-0.144560727448217
808.989.0276805956285-0.0476805956284974
818.948.929763417917450.0102365820825447
828.949.02405207516776-0.0840520751677634
838.758.86402219194334-0.11402219194334
848.868.91419556014425-0.054195560144251


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
858.962437698989148.724315088516629.20056030946165
869.061905188387178.79467494114179.32913543563264
879.03509592984998.74152978622229.32866207347758
889.01945223123578.701631960596359.33727250187503
898.933996678517838.593558642799559.2744347142361
908.910853995974338.549127309408169.27258068254051
918.988763238341138.606854527852769.3706719488295
928.988211724538448.587060408738149.38936304033874
938.93409723620338.514513322397319.35368115000928
948.990664002863058.553354923718169.42797308200795
958.862931322175218.408521586377139.3173410579733
968.991475424900228.520521379936529.46242946986393
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616610vstam1sk29xvqyx/1gcpf1293616714.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616610vstam1sk29xvqyx/1gcpf1293616714.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616610vstam1sk29xvqyx/2gcpf1293616714.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293616610vstam1sk29xvqyx/2gcpf1293616714.ps (open in new window)


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