Home » date » 2009 » Dec » 12 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 12 Dec 2009 10:11:35 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/12/t1260637926p73o0h5ahk76o4t.htm/, Retrieved Sat, 12 Dec 2009 18:12:10 +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/2009/Dec/12/t1260637926p73o0h5ahk76o4t.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 «
4716.99 4926.65 4920.10 5170.09 5246.24 5283.61 4979.05 4825.20 4695.12 4711.54 4727.22 4384.96 4378.75 4472.93 4564.07 4310.54 4171.38 4049.38 3591.37 3720.46 4107.23 4101.71 4162.34 4136.22 4125.88 4031.48 3761.36 3408.56 3228.47 3090.45 2741.14 2980.44 3104.33 3181.57 2863.86 2898.01 3112.33 3254.33 3513.47 3587.61 3727.45 3793.34 3817.58 3845.13 3931.86 4197.52 4307.13 4229.43 4362.28 4217.34 4361.28 4327.74 4417.65 4557.68 4650.35 4967.18 5123.42 5290.85 5535.66 5514.06 5493.88 5694.83 5850.41 6116.64 6175.00 6513.58 6383.78 6673.66 6936.61 7300.68 7392.93 7497.31 7584.71 7160.79 7196.19 7245.63 7347.51 7425.75 7778.51 7822.33 8181.22 8371.47 8347.71 8672.11 8802.79 9138.46 9123.29 9023.21 8850.41 8864.58 9163.74 8516.66 8553.44 7555.20 7851.22 7442.00 7992.53 8264.04 7517.39 7200.40 7193.69 6193.58 5104.21 4800.46 4461.61 4398.59 4243.63 4293.82
 
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.917492764005406
beta0.110092205215912
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
134378.754816.92751819308-438.177518193077
144472.934496.21089354897-23.2808935489729
154564.074513.1035845527150.9664154472939
164310.544239.873307264270.666692735802
174171.384106.4558979601564.9241020398476
184049.383977.9488762367471.4311237632651
193591.374149.49506581446-558.125065814463
203720.463399.82009621670320.639903783297
214107.233505.15520732032602.074792679677
224101.714060.6841839455841.0258160544163
234162.344131.5655597404530.7744402595526
244136.223894.08387464931242.136125350693
254125.884154.94897685148-29.068976851484
264031.484325.45935120328-293.979351203282
273761.364154.43857173772-393.078571737716
283408.563533.71369017903-125.15369017903
293228.473243.4310620317-14.9610620316980
303090.453058.5764991859631.8735008140447
312741.143093.76311739398-352.62311739398
322980.442619.18289770903361.257102290968
333104.332805.84420711042298.485792889582
343181.573018.1441663724163.425833627598
352863.863178.15656141591-314.296561415905
362898.012666.39603585652231.613964143483
373112.332845.94875378530266.381246214703
383254.333205.7240063557648.6059936442371
393513.473336.80918577878176.660814221217
403587.613351.7434447048235.866555295201
413727.453514.10829742696213.341702573044
423793.343668.52619479052124.813805209481
433817.583918.55387384301-100.97387384301
443845.133923.99556679087-78.865566790866
453931.863813.57699870634118.283001293661
464197.523958.53144217852238.988557821479
474307.134271.7702522396135.3597477603889
484229.434224.393986436045.03601356396393
494362.284336.9391548960925.3408451039068
504217.344616.91599552967-399.575995529669
514361.284449.25934087327-87.9793408732712
524327.744228.6982951567299.0417048432819
534417.654269.9900805267147.659919473294
544557.684355.87501902967201.804980970327
554650.354693.94957717584-43.5995771758407
564967.184796.15524089788171.024759102120
575123.424969.59510852716153.824891472836
585290.855214.3227324512776.527267548734
595535.665405.21553752457130.444462475433
605514.065448.853270534865.2067294652006
615493.885685.92969523329-192.049695233293
625694.835801.12967084213-106.299670842128
635850.416061.60435771929-211.194357719291
646116.645743.8688776575372.771122342502
6561756085.8350064765789.1649935234327
666513.586155.59766721843357.982332781573
676383.786731.26288163338-347.482881633385
686673.666665.485760034588.17423996541947
696936.616705.65235616964230.957643830358
707300.687063.28912002935237.390879970652
717392.937478.45176447565-85.5217644756458
727497.317294.2860237131203.023976286897
737584.717704.13622379215-119.426223792146
747160.798031.94951232763-871.15951232763
757196.197636.49312696004-440.303126960045
767245.637084.15881646387161.471183536134
777347.517129.29084442936218.219155570639
787425.757276.55492610909149.195073890907
797778.517542.82985474693235.68014525307
807822.338071.68707261266-249.35707261266
818181.227850.98990210087330.230097899135
828371.478279.8257099748291.6442900251823
838347.718500.08610434749-152.376104347488
848672.118206.79113280938465.318867190617
858802.798819.95727301461-17.1672730146129
869138.469200.11413671316-61.6541367131595
879123.299759.3846864971-636.094686497105
889023.219098.31483897915-75.104838979154
898850.418927.78492225431-77.3749222543138
908864.588775.4210599146689.1589400853445
919163.749000.88602495431162.853975045686
928516.669441.0806518963-924.420651896304
938553.448567.95779799683-14.5177979968266
947555.28549.0755763182-993.8755763182
957851.227534.92877157304316.291228426959
9674427566.61549329302-124.615493293017
977992.537373.89045050445618.639549495546
988264.048144.3513033938119.688696606198
997517.398625.34025516097-1107.95025516096
1007200.47399.17629217925-198.776292179252
1017193.696945.38035085194248.309649148064
1026193.586961.52078944754-767.940789447538
1035104.216128.92308453093-1024.71308453093
1044800.464961.83056552194-161.370565521944
1054461.614540.5469052901-78.9369052900956
1064398.594113.92388901846284.666110981540
1074243.634156.7289643610186.9010356389854
1084293.823851.46523822392442.35476177608


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1094072.206884610993414.036534622144730.37723459984
1103940.977504400112991.76610783094890.18890096933
1113837.979003586322609.532292775385066.42571439726
1123600.047352844542132.450319641655067.64438604742
1133325.078457965781638.791221024135011.36569490742
1143016.927759479441138.422700394484895.43281856441
1152808.12376982676685.8072964254954930.44024322802
1162658.59980265358238.9447570629955078.25484824416
1172457.07454951061-228.9774958211415143.12659484237
1182227.64673066096-699.3719999815625154.66546130347
1192030.17168991497-1184.402375927375244.74575575732
1201770.22206128955-1566.957279545015107.40140212411
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260637926p73o0h5ahk76o4t/1cwc91260637893.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260637926p73o0h5ahk76o4t/1cwc91260637893.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/12/t1260637926p73o0h5ahk76o4t/2kd5i1260637893.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260637926p73o0h5ahk76o4t/2kd5i1260637893.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/12/t1260637926p73o0h5ahk76o4t/35ql71260637893.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/12/t1260637926p73o0h5ahk76o4t/35ql71260637893.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ; par4 = 0 ; par5 = 12 ; par6 = 2 ; par7 = 0 ; par8 = 0 ; par9 = 0 ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ; par4 = 0 ; par5 = 12 ; par6 = 2 ; par7 = 0 ; par8 = 0 ; par9 = 0 ;
 
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