Home » date » 2010 » Jul » 24 »

Triple exponential smoothing

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 24 Jul 2010 09:49:04 +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/Jul/24/t1279964958afz9h6cwly5yqfd.htm/, Retrieved Sat, 24 Jul 2010 11:49:22 +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/2010/Jul/24/t1279964958afz9h6cwly5yqfd.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:
Febiri Lordina
 
Dataseries X:
» Textbox « » Textfile « » CSV «
297 296 295 293 291 290 291 293 294 294 295 297 302 297 301 298 295 287 290 288 288 287 274 282 296 292 298 296 292 296 293 295 294 291 279 284 299 296 299 299 291 298 288 284 277 270 251 257 269 271 268 268 258 261 255 251 239 229 210 218 226 227 222 215 203 205 194 190 182 179 158 163 165 169 163 154 142 146 133 131 128 120 88 95
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.509341826247958
beta0.078544945072969
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13302300.9997329059831.00026709401698
14297296.6262964501440.373703549856259
15301301.157008776380-0.157008776379655
16298298.494459121936-0.494459121936472
17295296.265250448955-1.2652504489551
18287288.926160952036-1.92616095203596
19290289.0067169959160.99328300408439
20288291.030672126812-3.03067212681174
21288289.842146182603-1.84214618260268
22287288.018622230618-1.01862223061840
23274287.657135574702-13.6571355747016
24282281.6452883352650.35471166473485
25296286.483574191769.51642580824029
26292285.6541361244406.34586387555964
27298292.7190358318555.28096416814458
28296292.6309679261273.36903207387326
29292292.116232999024-0.116232999024191
30296285.20890400887010.7910959911295
31293293.878908422203-0.878908422202755
32295293.579560817561.42043918244013
33294296.024073310026-2.0240733100257
34291295.28741810765-4.28741810764978
35279287.704498014518-8.7044980145182
36284291.933090849267-7.93309084926716
37299297.5565857064521.4434142935483
38296291.2478559006574.7521440993433
39299297.1030398252771.89696017472301
40299294.3424049122624.65759508773829
41291292.814618647480-1.81461864747968
42298290.3667583519137.63324164808733
43288291.548775999850-3.54877599984974
44284290.757359124645-6.75735912464529
45277286.758948099093-9.7589480990934
46270280.075075289218-10.0750752892178
47251266.248446905583-15.2484469055829
48257266.132095343942-9.1320953439423
49269274.307243558909-5.30724355890897
50271264.4752059432336.524794056767
51268268.194901603801-0.194901603800758
52268264.0021808820033.99781911799749
53258257.2151622069550.784837793044858
54261259.0834417803051.91655821969528
55255249.9949202646355.00507973536531
56251250.4559850103270.544014989673258
57239247.465778122548-8.46577812254827
58229240.099258407255-11.0992584072547
59210221.985437880254-11.9854378802537
60218225.435476083455-7.43547608345511
61226235.322718477454-9.3227184774538
62227228.061513740369-1.06151374036861
63222223.1272086282-1.12720862820001
64215218.986616247199-3.98661624719853
65203204.706686619467-1.70668661946675
66205203.911911474981.08808852501997
67194193.9343750716960.065624928304402
68190187.5106531131972.48934688680305
69182178.9883239883193.01167601168112
70179174.5325502127224.46744978727796
71158162.892396424216-4.8923964242164
72163171.451161439866-8.4511614398663
73165179.117916333114-14.1179163331138
74169172.498741064334-3.49874106433359
75163165.224312807779-2.22431280777860
76154158.011529067990-4.01152906799032
77142143.726181146087-1.72618114608693
78146143.1805807298592.81941927014068
79133132.5402922153150.459707784685293
80131126.4793667424144.52063325758616
81128118.3020604969149.69793950308576
82120117.2877785628442.71222143715582
838899.4125193325367-11.4125193325367
8495101.894721206481-6.89472120648109


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85106.62660921416595.0943192121202118.158899216209
86112.02628153614898.868432478417125.184130593879
87106.91680566743392.107253891232121.726357443633
8899.806620152955783.3141697280492116.299070577862
8988.692897491885470.4833122189284106.902482764842
9091.332968406063671.3701840169507111.295752795176
9178.062144753811756.309031697370699.8152578102527
9273.70453073151550.123389762038197.285671700992
9365.529044616382340.081936366852690.976152865912
9455.523698941378228.172666665829982.8747312169264
9528.6041687821459-0.68860962168086857.8969471859727
9638.84010689974537.5679990260330270.1122147734576
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/24/t1279964958afz9h6cwly5yqfd/1nkyo1279964940.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/24/t1279964958afz9h6cwly5yqfd/1nkyo1279964940.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/24/t1279964958afz9h6cwly5yqfd/2gty91279964940.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/24/t1279964958afz9h6cwly5yqfd/2gty91279964940.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/24/t1279964958afz9h6cwly5yqfd/3gty91279964940.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/24/t1279964958afz9h6cwly5yqfd/3gty91279964940.ps (open in new window)


 
Parameters (Session):
par1 = 48 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = additive ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
 
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