Home » date » 2010 » Jan » 19 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 19 Jan 2010 13:52:57 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/19/t1263934821v5g42pbdoy5gvln.htm/, Retrieved Tue, 19 Jan 2010 22:00:25 +0100
 
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/Jan/19/t1263934821v5g42pbdoy5gvln.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
8.55 8.56 8.57 8.59 8.61 8.62 8.62 8.63 8.71 8.72 8.74 8.75 8.79 8.82 8.82 8.84 8.86 8.86 8.85 8.86 8.86 8.87 8.88 8.9 8.91 8.96 8.98 8.99 9 9 9 9.01 9.01 8.99 8.99 8.99 9 9 9.02 9.05 9.05 9.05 9.06 9.06 9.08 9.07 9.06 9.08 9.07 9.11 9.15 9.15 9.17 9.2 9.23 9.26 9.27 9.28 9.29 9.29 9.11 9.06 9.11 9.13 9.13 9.19 9.2 9.23 9.24 9.28 9.32 9.32 9.32 9.36 9.37 9.38 9.41 9.44 9.44 9.44 9.47 9.48 9.56 9.58 9.56 9.58 9.7 9.74 9.76 9.78 9.84 9.88 9.96 9.97 9.96 9.96
 
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
alpha1
beta0.0405252708246452
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
38.578.570
48.598.580.00999999999999979
58.618.600405252708250.0095947472917537
68.628.62079408244074-0.00079408244073953
78.628.63076190203477-0.0107619020347709
88.638.63032577304022-0.000325773040222188
98.718.640312570999540.0696874290004601
108.728.72313667293286-0.00313667293285746
118.748.733009558412770.00699044158723439
128.758.75329284795127-0.00329284795127194
138.798.763159404396260.0268405956037370
148.828.80424712680220.0157528731978029
158.828.8348855162548-0.0148855162548056
168.848.834282276677210.00571772332278542
178.868.854513988963370.00548601103662882
188.868.87473631104638-0.0147363110463772
198.858.87413911805027-0.0241391180502664
208.868.86316087375381-0.0031608737538118
218.868.87303277848889-0.0130327784888955
228.878.87250462161104-0.00250462161103648
238.888.88240312114193-0.00240312114193308
248.98.892305734006830.00769426599316603
258.918.91261754622-0.00261754622000332
268.968.922511469450540.0374885305494583
278.988.974030702303880.00596929769612231
288.998.99427260970965-0.00427260970964483
2999.00409946104404-0.00409946104403502
3099.01393332927499-0.0139333292749892
3199.01336867733263-0.0133686773326307
329.019.01282690806316-0.00282690806315955
339.019.0227123468483-0.0127123468483035
348.999.02219717554946-0.0321971755494594
358.999.00089237629053-0.0108923762905277
368.999.00045095979143-0.0104509597914308
3799.0000274318155-2.74318155053521e-05
3899.01002632013375-0.0100263201337540
399.029.009620000794960.0103799992050408
409.059.03004065307390.0199593469260986
419.059.06084951101357-0.0108495110135660
429.059.06040983164143-0.0104098316414252
439.069.059987970394921.20296050827307e-05
449.069.06998845789792-0.00998845789792213
459.089.069583672936490.0104163270635116
469.079.09000579741173-0.0200057974117342
479.069.07919505705356-0.0191950570535617
489.089.068417172167970.0115828278320276
499.079.08888656940278-0.0188865694027793
509.119.078121186062780.0318788139372153
519.159.119413083631160.0305869163688435
529.159.1606526267007-0.0106526267006952
539.179.160220926118660.0097790738813437
549.29.180617225736110.019382774263887
559.239.211402717912490.0185972820875122
569.269.242156377805690.0178436221943112
579.279.2728794954276-0.00287949542760479
589.289.28276280309556-0.00276280309556221
599.299.29265083975188-0.00265083975187963
609.299.30254341375302-0.0125434137530220
619.119.30203508851361-0.192035088513615
629.069.11425281454377-0.0542528145437657
639.119.062054204541380.0479457954586184
649.139.113997220887240.0160027791127568
659.139.13464573784474-0.00464573784473643
669.199.13445746806040.0555425319396008
679.29.196708344209540.00329165579046276
689.239.20684173945190.0231582605480938
699.249.237780234232450.00221976576755445
709.289.247870190841340.0321298091586559
719.329.289172260059040.0308277399409587
729.329.33042156256906-0.0104215625690607
739.329.32999922592353-0.00999922592353464
749.369.329594004584950.0304059954150535
759.379.37082621578383-0.000826215783833462
769.389.38079273316543-0.000792733165432935
779.419.390760607439210.0192393925607863
789.449.421540289033240.0184597109667592
799.449.45228837381951-0.0122883738195139
809.449.45179038414248-0.0117903841424827
819.479.451312575631980.0186874243680180
829.489.48206988856551-0.00206988856551149
839.569.491986005770820.0680139942291831
849.589.574742291306820.0052577086931791
859.569.59495536137553-0.0349553613755287
869.589.573538785889010.00646121411098655
879.79.593800628340720.106199371659283
889.749.718104386638610.0218956133613855
899.769.758991712299960.00100828770004213
909.789.779032573432070.000967426567928698
919.849.799071778655740.0409282213442612
929.889.860730405910090.0192695940899146
939.969.901511311429260.0584886885707387
949.979.98388158137377-0.0138815813737683
959.969.99331902652912-0.0333190265291226
969.969.98196876395542-0.0219687639554156


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
979.981078473846449.919718338867410.0424386088255
9810.00215694769299.9136048368184610.0907090585673
9910.02323542153939.9125936697225910.1338771733561
10010.04431389538589.9140150251028910.1746127656686
10110.06539236923229.9168580697787210.2139266686857
10210.08647084307869.9206158114559410.2523258747013
10310.10754931692519.9249937842333610.2901048496168
10410.12862779077159.929804507835210.3274510737078
10510.14970626461809.9349208270383110.3644917021976
10610.17078473846449.9402524233531610.4013170535756
10710.19186321231089.9457328466538610.4379935779678
10810.21294168615739.951311839469210.4745715328454
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263934821v5g42pbdoy5gvln/1snn21263934374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263934821v5g42pbdoy5gvln/1snn21263934374.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/19/t1263934821v5g42pbdoy5gvln/2ly281263934374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263934821v5g42pbdoy5gvln/2ly281263934374.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/19/t1263934821v5g42pbdoy5gvln/3xz831263934374.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263934821v5g42pbdoy5gvln/3xz831263934374.ps (open in new window)


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