Home » date » 2009 » Dec » 04 »

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 04 Dec 2009 02:50:05 -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/04/t12599203801qhvw1b2uve15w6.htm/, Retrieved Fri, 04 Dec 2009 10:53:04 +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/04/t12599203801qhvw1b2uve15w6.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:
ws9p2.2es
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2756.76 2849.27 2921.44 2981.85 3080.58 3106.22 3119.31 3061.26 3097.31 3161.69 3257.16 3277.01 3295.32 3363.99 3494.17 3667.03 3813.06 3917.96 3895.51 3801.06 3570.12 3701.61 3862.27 3970.1 4138.52 4199.75 4290.89 4443.91 4502.64 4356.98 4591.27 4696.96 4621.4 4562.84 4202.52 4296.49 4435.23 4105.18 4116.68 3844.49 3720.98 3674.4 3857.62 3801.06 3504.37 3032.6 3047.03 2962.34 2197.82 2014.45 1862.83 1905.41 1810.99 1670.07 1864.44 2052.02 2029.6 2070.83 2293.41 2443.27
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.960596258085363
beta0.155180585289121
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133295.322962.76559155129332.554408448710
143363.993392.98879678833-28.9987967883330
153494.173546.58680895763-52.4168089576297
163667.033722.78042621769-55.7504262176926
173813.063855.97632952237-42.9163295223652
183917.963947.54155853685-29.5815585368532
193895.513794.2083205011101.301679498902
203801.063854.59220615474-53.5322061547413
213570.123873.8904436771-303.770443677099
223701.613632.8712788352268.7387211647838
233862.273788.5754174266773.6945825733328
243970.13865.00887974193105.091120258073
254138.523998.12875106984140.391248930162
264199.754217.02339826659-17.2733982665886
274290.894391.40027088035-100.510270880351
284443.914533.88370146698-89.9737014669781
294502.644632.48542203175-129.845422031752
304356.984613.6483417335-256.668341733503
314591.274158.21487503664433.055124963359
324696.964491.69926816083205.260731839172
334621.44765.9242492627-144.524249262704
344562.844747.24615518697-184.406155186975
354202.524678.39475203288-475.874752032879
364296.494150.75837033177145.731629668234
374435.234255.07810908536180.151890914637
384105.184445.09564869543-339.91564869543
394116.684193.94661730321-77.2666173032057
403844.494241.83793067068-397.347930670677
413720.983867.54902688718-146.569026887182
423674.43653.1528287467221.2471712532843
433857.623402.43741968196455.182580318040
443801.063663.70342094598137.356579054023
453504.373746.06217649642-241.69217649642
463032.63487.58628066273-454.986280662727
473047.032954.2750807090492.7549192909573
482962.342912.9302198235149.4097801764929
492197.822832.39247361421-634.572473614209
502014.452011.172170360973.27782963902678
511862.831867.95929153018-5.12929153018263
521905.411721.00559015236184.404409847640
531810.991769.7858781369841.2041218630247
541670.071654.4828060271715.5871939728315
551864.441433.03442239943431.40557760057
562052.021674.65573155100377.364268448996
572029.61967.7010036355761.8989963644285
582070.832001.8054930077869.0245069922157
592293.412076.08781223182217.322187768176
602443.272274.38036988952168.889630110483


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
612416.715703949951956.869696991562876.56171090834
622455.791793582731767.762600193103143.82098697235
632550.312728690581634.173441135233466.45201624593
642680.659770594811519.489779576183841.82976161344
652783.786122077901377.614315063054189.95792909274
662854.029881297761208.619073671764499.44068892377
672797.38145038882980.6607444459784614.10215633167
682716.01911918143749.0980261067814682.94021225608
692697.94865330974539.532987186934856.36431943255
702743.24951877555339.4586142706985147.0404232804
712826.65811423442134.0224409952865519.29378747356
722834.39557499779-47.75510127534025716.54625127091
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599203801qhvw1b2uve15w6/1rjxm1259920203.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599203801qhvw1b2uve15w6/1rjxm1259920203.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599203801qhvw1b2uve15w6/211mb1259920203.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599203801qhvw1b2uve15w6/211mb1259920203.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599203801qhvw1b2uve15w6/33k341259920203.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599203801qhvw1b2uve15w6/33k341259920203.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