Home » date » 2009 » Jun » 06 »

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 06 Jun 2009 03:02:15 -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/06/t124427896164cki81k0vc1118.htm/, Retrieved Sat, 06 Jun 2009 11:02:45 +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/06/t124427896164cki81k0vc1118.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1,73 1,75 1,75 1,75 1,73 1,74 1,75 1,75 1,34 1,24 1,24 1,26 1,25 1,26 1,26 1,22 1,01 1,03 1,01 1,01 1 0,98 1 1,01 1 1 1 1,03 1,26 1,43 1,61 1,76 1,93 2,16 2,28 2,5 2,63 2,79 3 3,04 3,26 3,5 3,62 3,78 4 4,16 4,29 4,49 4,59 4,79 4,94 4,99 5,24 5,25 5,25 5,25 5,25 5,24 5,25 5,26 5,26 5,25 5,25 5,25 5,26 5,02 4,94 4,76 4,49 4,24 3,94 2,98 2,61 2,28 1,98 2 2,01 2 1,81 0,97 0,39 0,16 0,15 0,22
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.932952155499902
beta0.189496457771257
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131.251.55613514957265-0.306135149572649
141.261.241740261726990.0182597382730081
151.261.206551776803160.0534482231968443
161.221.153641636445760.066358363554239
171.010.950340942689850.0596590573101498
181.030.980920642147760.0490793578522398
191.011.22114011659760-0.211140116597604
201.010.9704262385880680.0395737614119325
2110.551029370096330.44897062990367
220.980.9046208836160970.0753791163839029
2311.03257908172319-0.0325790817231904
241.011.08155775357132-0.0715577535713181
2511.03182804490521-0.0318280449052057
2611.07706301749370-0.0770630174936968
2711.02041453445696-0.0204145344569628
281.030.9515135522036460.0784864477963538
291.260.813276724427980.44672327557202
301.431.32688711231420.103112887685801
311.611.73225041648978-0.122250416489781
321.761.729171397776620.0308286022233808
331.931.475414022055500.454585977944496
342.161.956537754955510.203462245044488
352.282.36673885446528-0.0867388544652825
362.52.52298648122298-0.0229864812229752
372.632.69023307474055-0.0602330747405508
382.792.86991068644488-0.0799106864448795
3932.977876260931490.0221237390685056
403.043.12628557745283-0.0862855774528297
413.263.000876613913430.259123386086571
423.53.425123743254580.0748762567454193
433.623.89273831067774-0.272738310677737
443.783.83662479299525-0.0566247929952528
4543.59132850592670.4086714940733
464.164.066300547302120.0936994526978783
474.294.38875739711791-0.0987573971179065
484.494.57005852830135-0.080058528301354
494.594.70346426753753-0.113464267537532
504.794.84465151794328-0.0546515179432818
514.944.99998060954632-0.0599806095463196
524.995.06696329871044-0.0769632987104432
535.244.977500010530910.262499989469089
545.255.39723043875835-0.147230438758349
555.255.59974324735948-0.349743247359479
565.255.438083932831-0.188083932830997
575.255.02990504056740.220094959432600
585.245.203052712181590.0369472878184061
595.255.34485212237757-0.094852122377568
605.265.41693425669915-0.156934256699154
615.265.34867173961789-0.0886717396178938
625.255.39360850247778-0.143608502477775
635.255.32653687580434-0.0765368758043357
645.255.234956903271190.0150430967288102
655.265.128379571594040.131620428405959
665.025.24968385364721-0.229683853647209
674.945.19826625598185-0.258266255981847
684.764.98553455906218-0.225534559062178
694.494.415907653486670.0740923465133312
704.244.26087436358426-0.0208743635842579
713.944.14998186561459-0.209981865614586
722.983.90022685977977-0.920226859779767
732.612.77921823239927-0.169218232399271
742.282.38587818868410-0.105878188684096
751.982.00572714136778-0.0257271413677773
7621.623896163937250.376103836062746
772.011.582025525826110.427974474173886
7821.728020086337940.271979913662062
791.812.00383490291067-0.193834902910672
800.971.72592056673923-0.75592056673923
810.390.460302090557214-0.0703020905572139
820.16-0.08259540904704050.242595409047040
830.15-0.1605671418129350.310567141812935
840.22-0.08047145515621550.300471455156215


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
850.095358954104449-0.3691969504759110.55991485868481
860.0016869236061966-0.6922809480008630.695654795213256
87-0.118043874765269-1.033902727736840.797814978206305
88-0.288115419315582-1.428694547722220.852463709091057
89-0.583071609198795-1.954731844111140.788588625713548
90-0.828154427966192-2.438707456792270.782398600859889
91-0.866737945478451-2.724612803606880.991136912649974
92-0.996654140072004-3.110512236988631.11720395684462
93-1.37257951964057-3.751121661249441.00596262196830
94-1.67799450997325-4.329859787365620.973870767419127
95-1.86971259109484-4.803424694972061.06399951278237
96-2.02691739513862-5.250856749537831.19702195926059
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t124427896164cki81k0vc1118/1ldeh1244278932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t124427896164cki81k0vc1118/1ldeh1244278932.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t124427896164cki81k0vc1118/2rr1l1244278932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t124427896164cki81k0vc1118/2rr1l1244278932.ps (open in new window)


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