Home » date » 2010 » Dec » 10 »

Workshop 8 (Smoothing model)

*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, 10 Dec 2010 15:44:28 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/10/t12919958055rinm9jwcybe3sm.htm/, Retrieved Fri, 10 Dec 2010 16:43:29 +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/Dec/10/t12919958055rinm9jwcybe3sm.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
37 30 47 35 30 43 82 40 47 19 52 136 80 42 54 66 81 63 137 72 107 58 36 52 79 77 54 84 48 96 83 66 61 53 30 74 69 59 42 65 70 100 63 105 82 81 75 102 121 98 76 77 63 37 35 23 40 29 37 51 20 28 13 22 25 13 16 13 16 17 9 17 25 14 8 7 10 7 10 3
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.365156398722266
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
23037-7
34734.443905208944112.5560947910559
43539.0288435648615-4.0288435648615
53037.5576855577013-7.5576855577013
64334.79794831677588.20205168322419
78237.792979971555944.2070200284441
84053.9354562033856-13.9354562033856
94748.8468352016055-1.84683520160546
101948.1724515103537-29.1724515103537
115237.51994417493314.480055825067
1213642.807429213311893.1925707866882
138076.83729274944883.16270725055122
144277.9921755392729-35.9921755392729
155464.8494023371723-10.8494023371723
166660.88767365144155.11232634855845
178162.754472329974118.2455276700259
186369.4169435067482-6.41694350674823
1913767.073755525019869.9262444749802
207292.6077711336764-20.6077711336764
2110785.082711640810421.9172883591896
225893.0859497278095-35.0859497278095
233680.2740906794521-44.2740906794521
245264.1071231702403-12.1071231702403
257959.686129674508519.3138703254915
267766.738713007953810.2612869920462
275470.485687612225-16.4856876122250
288464.465833293284719.5341667067153
294871.5988592599492-23.5988592599492
309662.981584798632633.0184152013674
318375.03847038508047.96152961491958
326677.9456738675851-11.9456738675851
336173.583634617787-12.5836346177871
345368.9886399179191-15.9886399179191
353063.1502857450247-33.1502857450247
367451.045246785757422.9547532142426
376959.42732180302869.5726781969714
385962.9228464995618-3.92284649956183
394261.4903939990416-19.4903939990416
406554.373351916673510.6266480833265
417058.253740461269911.7462595387301
4210062.542962292889637.4570377071104
436376.2206392888222-13.2206392888222
4410571.393038257309833.6069617426902
458283.6648353792675-1.66483537926752
468183.0569100877088-2.05691008770877
477582.3058162075855-7.30581620758554
4810279.638050671496822.3619493285032
4912187.803659556702933.1963404432971
509899.9255156837356-1.92551568373557
517699.2224013109794-23.2224013109794
527790.742592878579-13.7425928785790
536385.7243971539308-22.7243971539308
543777.4264381260669-40.4264381260669
553562.6644655667838-27.6644655667838
562352.5626089478409-29.5626089478409
574041.7676331276127-1.76763312761265
582941.1221705804714-12.1221705804714
593736.69568242660950.30431757339052
605136.806805935776714.1931940642233
612041.9895415666347-21.9895415666347
622833.9599197586088-5.95991975860879
631331.7836169228815-18.7836169228815
642224.9246590123435-2.92465901234348
652523.85670105990551.14329894009448
661324.2741839835334-11.2741839835334
671620.1573435615741-4.15734356157409
681318.6392629583785-5.6392629583785
691616.5800500050491-0.580050005049131
701716.36824103412660.631758965873445
71916.5989318629654-7.5989318629654
721713.82413326974913.17586673025092
732514.983821327789410.0161786722106
741418.6412930606926-4.64129306069257
75816.9464952012354-8.94649520123542
76713.6796252323663-6.67962523236626
771011.240517337701-1.24051733770101
78710.7875344941136-3.78753449411358
79109.40449203820670.595507961793299
8039.62194558094558-6.62194558094558


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
817.20389978007267-36.933000232124351.3407997922696
827.20389978007267-39.783539906716554.1913394668618
837.20389978007267-42.470772176092556.8785717362378
847.20389978007267-45.01991260073359.4277121608784
857.20389978007267-47.450286932553261.8580864926985
867.20389978007267-49.777094163974664.1848937241199
877.20389978007267-52.012544021328766.420343581474
887.20389978007267-54.166620521758768.574420081904
897.20389978007267-56.2476116893270.6554112494653
907.20389978007267-58.262487422700772.670286982846
917.20389978007267-60.217175552618574.6249751127638
927.20389978007267-62.116767734380776.524567294526
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919958055rinm9jwcybe3sm/12za91291995865.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919958055rinm9jwcybe3sm/12za91291995865.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12919958055rinm9jwcybe3sm/22za91291995865.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919958055rinm9jwcybe3sm/22za91291995865.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12919958055rinm9jwcybe3sm/3d89c1291995865.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919958055rinm9jwcybe3sm/3d89c1291995865.ps (open in new window)


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