Home » date » 2008 » May » 25 »

Sanne Aertgeerts - opgave 10 - 2

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 25 May 2008 12:11:49 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/25/t1211739244cfavxwp0ydkbqme.htm/, Retrieved Sun, 25 May 2008 20:14:07 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
4,68 4,68 4,67 4,58 4,48 4,46 4,46 4,46 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,44 4,44 4,44 4,44 4,44 4,43 4,38 4,23 4,2 4,2 4,2 4,2 4,2 4,19 4,16 4,06 4 3,99 3,95 3,81 3,8 3,8 3,8 3,8 3,79 3,79 3,78 3,69 3,69 3,69 3,69 3,69 3,69 3,69 3,69 3,68 3,63 3,61 3,61 3,61 3,6 3,58 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,51 3,47 3,43 3,42 3,42
 
Text written by user:
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.702495359258423
beta0.000744121041695145
gamma0.987476481795519


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
134.454.52479486087743-0.074794860877434
144.454.45874328968312-0.00874328968311566
154.454.438659643379820.0113403566201793
164.454.432684994327960.0173150056720432
174.444.4234436106940.0165563893060003
184.444.431979888646920.00802011135307623
194.444.44206457378818-0.00206457378817682
204.444.4463630164589-0.00636301645889681
214.444.44767200006759-0.00767200006758717
224.434.43806874717169-0.00806874717168693
234.384.38770084760291-0.0077008476029139
244.234.23737769228695-0.00737769228695395
254.24.27301762837097-0.0730176283709687
264.24.22649809251183-0.0264980925118286
274.24.199401675767390.000598324232612413
284.24.187402486457460.0125975135425422
294.24.174927029487420.0250729705125767
304.194.186352124540120.00364787545987788
314.164.18940474195076-0.0294047419507564
324.064.17195639262795-0.111956392627949
3344.09695432324497-0.0969543232449706
343.994.02331385763772-0.0333138576377161
353.953.9579761700664-0.00797617006640339
363.813.82006252335074-0.0100625233507445
373.83.83051487618554-0.0305148761855389
383.83.8241995343314-0.0241995343314003
393.83.80514360525338-0.00514360525337754
403.83.791863620522220.00813637947778245
413.793.779959212719790.0100407872802051
423.793.774086713213800.0159132867862044
433.783.775258033082760.00474196691723705
443.693.75735547532147-0.0673554753214685
453.693.71550395482912-0.0255039548291207
463.693.70843775579092-0.0184377557909197
473.693.662312877062510.0276871229374893
483.693.556780498914600.133219501085404
493.693.660728977822810.0292710221771881
503.693.69727560673611-0.0072756067361075
513.693.69522427939798-0.00522427939797909
523.683.68556616919589-0.00556616919588704
533.633.66469035591541-0.0346903559154077
543.613.62896521162893-0.0189652116289274
553.613.602260496667300.00773950333269635
563.613.566286191292680.0437138087073241
573.63.61394750604186-0.013947506041863
583.583.61646643239148-0.0364664323914763
593.523.57135770806769-0.0513577080676919
603.523.443659687734920.0763403122650814
613.523.477320156004110.0426798439958866
623.523.511532245110780.00846775488922091
633.523.5202613607948-0.000261360794798104
643.523.513570401175490.00642959882451111
653.523.492965246885750.0270347531142519
663.523.504968952165530.0150310478344724
673.523.509796063998830.0102039360011665
683.513.48648136477010.0235186352299031
693.473.50260628389314-0.0326062838931351
703.433.48466705053475-0.0546670505347469
713.423.42260106780859-0.00260106780859193
723.423.367492890770710.0525071092292904


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
733.37494733310353.299998839668563.44989582653844
743.368761455354393.276949926962003.46057298374678
753.368333529055653.262124839938243.47454221817306
763.363346611762283.244443438876863.48224978464769
773.344422733828913.214332275816993.47451319184082
783.333660269699173.193032359489463.47428817990887
793.326066619502823.175488300159613.47664493884604
803.300076529228863.140799541324713.45935351713301
813.283206725357083.115353928809883.45105952190428
823.280773160061003.104121039704193.45742528041781
833.272123598497973.087303208625863.45694398837007
843.23583972329864-1.636347356580038.10802680317732
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211739244cfavxwp0ydkbqme/1lnwt1211739103.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211739244cfavxwp0ydkbqme/1lnwt1211739103.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211739244cfavxwp0ydkbqme/2anis1211739103.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211739244cfavxwp0ydkbqme/2anis1211739103.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211739244cfavxwp0ydkbqme/3ub2t1211739103.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211739244cfavxwp0ydkbqme/3ub2t1211739103.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; 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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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