Home » date » 2009 » Jun » 05 »

Duncan Huysmans Opgave 10 Opdracht 2

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 05 Jun 2009 14:19:40 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/05/t124423328496ue81pejg2loi7.htm/, Retrieved Fri, 05 Jun 2009 22:21:28 +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/2009/Jun/05/t124423328496ue81pejg2loi7.htm/},
    year = {2009},
}
@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 = {2009},
    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:
Duncan Huysmans Opgave 10 Opdracht 2
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1664.81 2397.53 2840.71 3547.29 3752.96 3714.74 4349.61 3566.34 5021.82 6423.48 7600.60 19756.21 2499.81 5198.24 7225.14 4806.03 5900.88 4951.34 6179.12 4752.15 5496.43 5835.10 12600.08 28541.72 4717.02 5702.63 9957.58 5304.78 6492.43 6630.80 7349.62 8176.62 8573.17 9690.50 15151.84 34061.01 5921.10 5814.58 12421.25 6369.77 7609.12 7224.75 8121.22 7979.25 8093.06 8476.70 17914.66 30114.41 4826.64 6470.23 9638.77 8821.17 8722.37 10209.48 11276.55 12552.22 11637.39 13606.89 21822.11 45060.69 7615.03 9849.69 14558.40 11587.33 9332.56 13082.09 16732.78 19888.61 23933.38 25391.35 36024.80 80721.71 10243.24 11266.88 21826.84 17357.33 15997.79 18601.53 26155.15 28586.52 30505.41 30821.33 46634.38 104660.67
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.488903716392153
beta0.0465372441384407
gamma0.947454970073025


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
132499.812094.39367811309405.416321886914
145198.244816.56402005839381.675979941614
157225.147085.97950572379139.160494276210
164806.034899.7479008483-93.7179008483026
175900.885962.72230169536-61.8423016953557
184951.344719.27181523893232.068184761075
196179.126003.72918904137175.390810958627
204752.154985.4572851177-233.307285117704
215496.436674.10111646775-1177.67111646775
225835.17669.30214520937-1834.20214520937
2312600.087978.97906365394621.10093634609
2428541.7226666.79327594031874.92672405971
254717.023807.00257376309910.017426236914
265702.638505.38475298753-2802.75475298753
279957.589763.6994469637193.880553036308
285304.786579.83538265766-1275.05538265767
296492.437281.90853964856-789.47853964856
306630.85584.41745840671046.38254159331
317349.627446.24219872818-96.6221987281779
328176.625789.925777760882386.69422223912
338573.178824.0750751731-250.905075173094
349690.510482.5750151408-792.075015140841
3515151.8416708.8825988694-1557.04259886937
3634061.0135009.7735615791-948.76356157905
375921.15061.18076645123859.919233548773
385814.587994.35792622826-2179.77792622826
3912421.2511745.5899383707675.660061629298
406369.777117.20428899281-747.434288992808
417609.128660.91093174328-1051.79093174328
427224.757530.0624350017-305.312435001703
438121.228207.73478065402-86.5147806540235
447979.257442.77961440537536.470385594627
458093.068175.56306823937-82.5030682393735
468476.79464.45362099461-987.753620994614
4717914.6614563.62134250343351.03865749662
4830114.4136632.6098584899-6518.19985848985
494826.645299.83716395774-473.197163957743
506470.235755.2482338799714.981766120101
519638.7712474.7316323203-2835.96163232033
528821.175959.141193593852862.02880640615
538722.379342.26261108106-619.892611081061
5410209.488734.549331445481474.93066855452
5511276.5510711.2978516089565.252148391053
5612552.2210451.088378692101.13162130999
5711637.3911791.9475416962-154.557541696195
5813606.8913041.1690625705565.720937429522
5921822.1125293.0891801767-3470.97918017666
6045060.6944001.51367772431059.1763222757
617615.037477.63237666557137.397623334435
629849.699550.00943106132299.680568938678
6314558.416515.8104435388-1957.41044353881
6411587.3311430.1019549011157.228045098867
659332.5611887.3401339983-2554.78013399832
6613082.0911406.19509485531675.89490514472
6716732.7813161.68378472153571.0962152785
6819888.6115070.44738283054818.16261716948
6923933.3816370.95329913157562.4267008685
7025391.3523103.39345664282287.95654335720
7136024.842162.4754632356-6137.67546323562
7280721.7180109.8347724822611.875227517798
7310243.2413559.8674871677-3316.6274871677
7411266.8815246.5065443697-3979.62654436974
7521826.8420922.411621172904.428378828004
7617357.3316836.9839506788520.346049321186
7715997.7915516.1542990580481.635700942026
7818601.5320488.2313864995-1886.70138649949
7926155.1522071.31484114034083.83515885965
8028586.5224719.02149760633867.49850239369
8130505.4126017.35729559894488.05270440106
8230821.3328590.10397495262231.2260250474
8346634.3845451.69398663841182.68601336162
84104660.67102035.0519320412625.61806795884


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8514994.740538504610497.819535634319491.6615413749
8618948.092093010313580.857437864824315.3267481558
8735767.050890771327310.675380443044223.4264010997
8828159.426476604920617.143244715435701.7097084944
8925669.264058371318148.210131572133190.3179851706
9031472.701700214122232.108175695340713.295224733
9140496.448156936728592.117867700652400.7784461729
9241217.958490546628690.662244796753745.2547362965
9340537.849845041027771.046133964953304.6535561172
9439431.640459647326561.542362445852301.7385568489
9558785.199779729739615.015599752877955.3839597066
96129819.01236330887614.241560001172023.783166615
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t124423328496ue81pejg2loi7/1nf5w1244233178.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t124423328496ue81pejg2loi7/1nf5w1244233178.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t124423328496ue81pejg2loi7/2pwbv1244233178.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t124423328496ue81pejg2loi7/2pwbv1244233178.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t124423328496ue81pejg2loi7/3attx1244233178.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t124423328496ue81pejg2loi7/3attx1244233178.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