Home » date » 2008 » May » 28 »

Nicky Van Calster 2MAR04b-Opgave 10, pond

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 28 May 2008 08:06:29 -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/28/t1211983633du02jwfknwjmc3x.htm/, Retrieved Wed, 28 May 2008 16:07:13 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
0,70291 0,6885 0,67127 0,66502 0,65825 0,65025 0,65779 0,66014 0,64683 0,64587 0,63702 0,62651 0,61834 0,61466 0,61063 0,59802 0,60151 0,62927 0,62304 0,6071 0,60773 0,58933 0,60039 0,61342 0,6348 0,634 0,62915 0,62168 0,61328 0,6089 0,60857 0,62672 0,62291 0,62393 0,61838 0,62012 0,61659 0,6116 0,61573 0,61407 0,62823 0,64405 0,6387 0,63633 0,63059 0,62994 0,63709 0,64217 0,65711 0,66977 0,68255 0,68902 0,71322 0,70224 0,70045 0,69919 0,69693 0,69763 0,69278 0,70196 0,69215 0,6769 0,67124 0,66532 0,67157 0,66428 0,66576 0,66942 0,6813 0,69144 0,69862 0,695 0,69867 0,68968 0,69233 0,68293 0,68399 0,66895 0,68756 0,68527 0,6776 0,68137 0,67933 0,67922 0,68598 0,68297 0,68935 0,69463 0,6833 0,68666 0,68782 0,67669 0,67511 0,67254 0,67397 0,67286 0,66341 0,668 0,68021 0,67934 0,68136 0,67562 0,6744 0,67766 0,68887 0,69614 0,70896 0,72064 0,74725
 
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 time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.17436144158383
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
30.671270.67409-0.00281999999999993
40.665020.6563683007347340.00865169926526632
50.658250.6516268234907750.00662317650922484
60.650250.6460116500947880.00423834990521221
70.657790.6387506548941970.0190393451058027
80.660140.6496103825536570.0105296174463428
90.646830.653796341830928-0.00696634183092759
100.645870.6392716804267210.00659831957327861
110.637020.639462172939549-0.00244217293954907
120.626510.630186352145212-0.00367635214521222
130.618340.619035338085403-0.00069533808540323
140.614660.6107440979344440.00391590206555581
150.610630.6077468802636960.00288311973630440
160.598020.604219585177176-0.00619958517717645
170.601510.5905286165684620.0109813834315378
180.629270.595933346414170.0333366535858300
190.623040.629505973390976-0.00646597339097599
200.60710.622148556949283-0.0150485569492829
210.607730.6035846688658490.00414533113415061
220.589330.604937454778242-0.0156074547782422
230.600390.5838161164636540.0165738835363465
240.613420.5977659626896930.0156540373103066
250.63480.6135254232017250.0212745767982746
260.6340.638614889081359-0.00461488908135854
270.629150.637010230368383-0.00786023036838346
280.621680.630789709270171-0.00910970927017107
290.613280.621731327229414-0.00845132722941444
300.60890.611857741630397-0.00295774163039719
310.608570.6069620255358890.00160797446411154
320.626720.6069123942814810.0198076057185190
330.622910.628516076968886-0.00560607696888615
340.623930.6237285933069610.000201406693038808
350.618380.624783710868304-0.00640371086830405
360.620120.618117150609820.00200284939017947
370.616590.620206370316768-0.00361637031676754
380.61160.616045814775035-0.00444581477503492
390.615730.6102806361018450.00544936389815476
400.614070.615360795046842-0.00129079504684237
410.628230.6134757301616860.0147542698383143
420.644050.6302083059202110.0138416940797891
430.63870.648441763653925-0.00974176365392532
440.636330.641393175699658-0.00506317569965808
450.630590.638140353085673-0.00755035308567331
460.629940.631083862637188-0.00114386263718835
470.637090.6302344170987940.00685558290120558
480.642170.6385797664163460.00359023358365396
490.657110.6442857647196150.0128242352803853
500.669770.6614618168703130.00830818312968717
510.682550.6755704436577480.00697955634225245
520.689020.689567409163198-0.000547409163198287
530.713220.6959419621123670.0172780378876332
540.702240.723154585706195-0.0209145857061945
550.700450.708527888392334-0.00807788839233392
560.699190.705329416127293-0.0061394161272933
570.696930.702998938680855-0.00606893868085534
580.697630.699680749783578-0.00205074978357767
590.692780.700023178094985-0.00724317809498531
600.701960.6939102471206950.00804975287930487
610.692150.704493813637124-0.0123438136371243
620.67690.692531528496713-0.0156315284967133
630.671240.674555992653868-0.00331599265386762
640.665320.668317811394458-0.00299781139445776
650.671570.6618751086781240.00969489132187618
660.664280.669815523905005-0.00553552390500467
670.665760.6615603419770060.00419965802299371
680.669420.6637726004040550.0056473995959454
690.68130.6684172891388040.0128827108611964
700.691440.682543537176070.00889646282393064
710.698620.6942347372590470.00438526274095308
720.6950.702179357992283-0.00717935799228342
730.698670.6973075547831020.00136244521689766
740.689680.7012151126952-0.0115351126951998
750.692330.6902138338168330.00211616618316735
760.682930.693232811603161-0.0103028116031607
770.683990.6820363985196670.00195360148033297
780.668950.683437031290058-0.0144870312900581
790.687560.6658710516300540.0216889483699463
800.685270.688262767934275-0.00299276793427461
810.67760.685450944602929-0.00785094460292879
820.681370.6764120425841670.00495795741583283
830.679330.681046519186503-0.00171651918650317
840.679220.6787072244266380.000512775573361934
850.685980.6786866327148190.00729336728518148
860.682970.686718314748663-0.00374831474866311
870.689350.6830547531855760.00629524681442384
880.694630.6905324014952650.00409759850473479
890.68330.696526864677582-0.0132268646775824
900.686660.6828906094847650.00376939051523506
910.687820.6869078458488940.000912154151106126
920.676690.688226890361627-0.0115368903616273
930.675110.675085301526782.4698473220619e-05
940.672540.673509607988175-0.000969607988175025
950.673970.6707705457415860.00319945425841428
960.672860.6727584071983640.000101592801635797
970.663410.671666121065712-0.00825612106571205
980.6680.6607765718948040.00722342810519616
990.680210.6666260592324030.0135839407675969
1000.679340.68120457472703-0.0018645747270305
1010.681360.6800094647896850.00135053521031514
1020.675620.682264946055865-0.00664494605586496
1030.67440.675366323682318-0.000966323682317638
1040.677660.6739778340920320.00368216590796788
1050.688870.6778798618478960.0109901381521037
1060.696140.6910061181793020.00513388182069752
1070.708960.699171269214480.00978873078551967
1080.720640.713698046425520.00694195357448035
1090.747250.7265884554581740.020661544541826


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1100.7568010321498350.7382090361800960.775393028119574
1110.766352064299670.737675004087190.79502912451215
1120.7759030964495060.7378091074800940.813997085418918
1130.7854541285993410.7379881982452360.832920058953446
1140.7950051607491760.7380053447889930.85200497670936
1150.8045561928990120.7377724897097510.871339896088272
1160.8141072250488470.73724836666780.890966083429893
1170.8236582571986820.7364134297868430.910903084610521
1180.8332092893485170.7352592612839470.931159317413088
1190.8427603214983530.7337835076086490.951737135388057
1200.8523113536481880.7319872438282850.97263546346809
1210.8618623857980230.729873515419570.993851256176476
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211983633du02jwfknwjmc3x/1a2661211983581.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211983633du02jwfknwjmc3x/1a2661211983581.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211983633du02jwfknwjmc3x/2rrhq1211983581.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211983633du02jwfknwjmc3x/2rrhq1211983581.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211983633du02jwfknwjmc3x/3sko41211983581.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211983633du02jwfknwjmc3x/3sko41211983581.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Double ; 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=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