Home » date » 2010 » Aug » 15 »

tijdreeks B - stap 27

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 15 Aug 2010 13:53:17 +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/Aug/15/t12818803802ilui3t81ghh44g.htm/, Retrieved Sun, 15 Aug 2010 15:53:04 +0200
 
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/Aug/15/t12818803802ilui3t81ghh44g.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:
Vanhille Olivier
 
Dataseries X:
» Textbox « » Textfile « » CSV «
31 30 29 27 25 24 25 27 28 28 29 31 31 27 25 16 20 21 25 24 28 27 23 36 37 30 27 22 22 25 33 35 35 29 25 34 31 29 21 19 18 25 23 22 20 15 17 25 26 26 23 24 24 42 40 45 47 40 39 49 55 54 48 44 48 62 57 60 56 57 54 62 65 68 69 67 72 82 72 77 79 78 76 79
 
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' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.520658832476764
beta0.0678765650221037
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133133.4532585470086-2.45325854700856
142727.9437063932416-0.94370639324157
152525.1867648143935-0.186764814393538
161615.73399785280390.266002147196119
172019.77636866650640.223631333493604
182120.55458199235830.445418007641692
192521.63067848553883.36932151446123
202425.2648714500173-1.26487145001733
212825.60819635146242.39180364853759
222727.2732623898038-0.273262389803808
232328.5827476842846-5.58274768428455
243627.59717195164678.40282804835326
253730.80598902473756.19401097526254
263030.9832039372554-0.983203937255428
272729.0280343300294-2.02803433002937
282219.22805598650242.77194401349764
292225.0378508230883-3.03785082308835
302524.59198695420730.408013045792671
313327.41656444674425.58343555325582
323530.42685284841664.57314715158338
333536.2135641724594-1.21356417245944
342935.2475476858378-6.24754768583777
352531.2138392076751-6.21383920767509
363436.893664703057-2.89366470305702
373133.0529844221021-2.05298442210209
382925.09543887771093.90456112228908
392124.9564784361844-3.95647843618443
401916.15729495307582.84270504692423
411818.9255881332679-0.92558813326794
422521.01241521648473.98758478351532
432328.0892037074704-5.08920370747038
442224.5889209187551-2.58892091875512
452023.1502235058480-3.15022350584795
461517.9718243487926-2.97182434879256
471714.9845254806892.01547451931101
482526.156057971405-1.15605797140502
492623.30000439298392.69999560701610
502620.51776330912975.48223669087033
512317.33279619388005.66720380611997
522417.04418496759086.95581503240918
532420.53385518510023.46614481489981
544227.80371709043114.1962829095690
554036.74701110080243.25298889919762
564539.98560564456665.0143943554334
574743.70224386144863.29775613855138
584043.6600891697479-3.66008916974786
593944.3742660117102-5.37426601171016
604951.5860705744416-2.58607057444163
615551.19134795642313.80865204357686
625451.71667626581592.28332373418412
634848.238472867004-0.238472867003964
644446.567637215551-2.56763721555102
654844.16446531554833.83553468445174
666257.52147468337464.47852531662537
675756.56755475209050.432445247909548
686059.49023667149960.509763328500441
695660.1877617203684-4.18776172036841
705752.7976002848954.20239971510503
715456.946216368561-2.94621636856097
726267.0069523359703-5.00695233597027
736568.579723856218-3.57972385621802
746864.4286610041043.57133899589599
756960.3593770076448.64062299235602
766762.45595246972364.54404753027639
777267.33707245909544.66292754090462
788281.97455012879230.0254498712076980
797277.1467373538709-5.14673735387086
807777.3885519880269-0.388551988026904
817975.52181882477053.47818117522954
827876.57084128713031.42915871286971
837676.17700439504-0.177004395040044
847987.1177103046551-8.11771030465512


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8588.070982587434479.931872290917596.2100928839512
8689.65405775368980.341495271030698.9666202363473
8786.471552408868675.988775925140296.954328892597
8882.11660103844870.458773669128493.7744284077678
8984.539164678351271.696333892290797.3819954644116
9094.211481682307880.1703219083364108.252641456279
9186.575844236209371.3207464430091101.830942029410
9291.644703994618275.1584885600217108.130919429215
9391.714046613139673.9784464277361109.449646798543
9489.727310097691670.7233071895518108.731313005831
9587.526329359982167.2343947243924107.818263995572
9694.466002719895472.8662702628792116.065735176912
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/15/t12818803802ilui3t81ghh44g/1k5w81281880395.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/15/t12818803802ilui3t81ghh44g/1k5w81281880395.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/15/t12818803802ilui3t81ghh44g/2k5w81281880395.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/15/t12818803802ilui3t81ghh44g/2k5w81281880395.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/15/t12818803802ilui3t81ghh44g/3k5w81281880395.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/15/t12818803802ilui3t81ghh44g/3k5w81281880395.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