Home » date » 2008 » Jun » 01 »

Opgave 10 oef 2 willem dierickx

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 01 Jun 2008 13:17:09 -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/Jun/01/t1212347986nbtjqldv37y5ocq.htm/, Retrieved Sun, 01 Jun 2008 19:19:50 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3,35 3,35 3,35 3,4 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,43 3,47 3,51 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,58 3,6 3,61 3,61 3,61 3,63 3,68 3,69 3,69 3,69 3,69 3,69 3,69 3,69 3,69 3,78 3,79 3,79 3,8 3,8 3,8 3,8 3,81 3,95 3,99 4 4,06 4,16 4,19 4,2 4,2 4,2 4,2 4,2 4,23 4,38 4,43 4,44 4,44 4,44 4,44 4,44 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,46 4,46 4,46 4,48 4,58 4,67 4,68 4,68
 
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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0267594807601861
gamma0.189768133478781


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133.423.375888562757480.0441114372425191
143.423.42125663406065-0.00125663406064991
153.423.42122005591351-0.00122005591351426
163.433.43118801297687-0.00118801297686932
173.473.47116689691699-0.00116689691698868
183.513.51114601048734-0.00114601048734286
193.523.52111584812909-0.00111584812909182
203.523.52108339922625-0.00108339922625289
213.523.52105189991888-0.00105189991887711
223.523.518933677653050.00106632234695114
233.523.517717566815910.00228243318409271
243.523.519859158771270.000140841228727151
253.523.52725631854992-0.00725631854992326
263.523.52066866925353-0.000668669253534926
273.523.52064920560608-0.000649205606076286
283.583.530924552856440.0490754471435606
293.63.62359185338927-0.0235918533892709
303.613.64277357021164-0.0327735702116403
313.613.62075858549629-0.0107585854962853
323.613.61020987094782-0.000209870947822655
333.633.610203769051740.0197962309482604
343.683.628531639714910.0514683602850878
353.693.678456660787940.0115433392120616
363.693.69091057956862-0.000910579568619063
373.693.6986360438745-0.00863604387450012
383.693.69170027495085-0.00170027495085101
393.693.69165078328954-0.00165078328953872
403.693.70239690162931-0.0123969016293137
413.693.73434575429593-0.0443457542959322
423.693.73276847830309-0.0427684783030871
433.783.699702354312190.0802976456878097
443.793.781145540278800.00885445972120502
453.793.79135540566411-0.00135540566411008
463.83.789068100684120.0109318993158816
473.83.797985842689820.00201415731017551
483.83.80028456439374-0.000284564393736364
493.83.80825819241790-0.00825819241789638
503.813.801134161938170.0088658380618285
513.953.811343966506860.138656033493137
523.993.966268603347880.0237313966521153
5344.0418648555755-0.041864855575497
544.064.050450363733380.0095496362666152
554.164.076132133067400.0838678669325965
564.194.166582349819990.0234176501800070
574.24.197120485430480.00287951456951863
584.24.20466226896450-0.00466226896450372
594.24.20303330740683-0.00303330740683005
604.24.2054193819983-0.00541938199829772
614.24.21409271030591-0.0140927103059125
624.234.206074225458510.0239257745414916
634.384.236625870075820.143374129924178
644.434.402912683199160.0270873168008423
654.444.4925019439234-0.0525019439233958
664.444.50080362897636-0.0608036289763598
674.444.46077086208357-0.0207708620835731
684.444.44757759426897-0.00757759426896687
694.444.44735727938848-0.00735727938848019
704.454.444506659964670.00549334003532742
714.454.45303088351653-0.00303088351652914
724.454.45556436552752-0.0055643655275226
734.454.46475882108412-0.0147588210841247
744.454.45626807460502-0.00626807460502032
754.454.45608562327545-0.00608562327544604
764.454.46893748942416-0.0189374894241565
774.454.50739572231754-0.0573957223175423
784.464.50542348674352-0.0454234867435153
794.464.47571799978883-0.0157179997888264
804.464.46261496105226-0.00261496105225678
814.484.462538932327140.0174610676728584
824.584.480293605297850.0997063947021504
834.674.581032500630800.088967499369196
844.684.675859181322830.00414081867717453
854.684.69576899697257-0.0157689969725654


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
864.686832201341914.613262573116184.76040182956764
874.693631428739114.588317510334374.79894534714385
884.714141773896174.58334110090184.84494244689053
894.775949629968274.621811877707084.93008738222946
904.837881890826374.662197200440245.01356658121249
914.858529740541674.663870810203055.05318867088028
924.865361715104084.653147509748655.07757592045951
934.872161187408824.643088541971575.10123383284608
944.876035629215434.630780611423295.12129064700757
954.878156915094444.617244390689125.13906943949976
964.883140364928624.606780453303415.15950027655383
974.898363686752990.8816711614591078.91505621204688
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347986nbtjqldv37y5ocq/17h7d1212347823.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347986nbtjqldv37y5ocq/17h7d1212347823.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347986nbtjqldv37y5ocq/2ahr21212347823.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347986nbtjqldv37y5ocq/2ahr21212347823.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347986nbtjqldv37y5ocq/39us91212347823.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212347986nbtjqldv37y5ocq/39us91212347823.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