Home » date » 2011 » May » 18 »

KDGP2W102

*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: Wed, 18 May 2011 14:41:23 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/18/t13057294802178k5on53126zs.htm/, Retrieved Wed, 18 May 2011 16:38:03 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
41 39 50 40 43 38 44 35 39 35 29 49 50 59 63 32 39 47 53 60 57 52 70 90 74 62 55 84 94 70 108 139 120 97 126 149 158 124 140 109 114 77 120 133 110 92 97 78 99 107 112 90 98 125 155 190 236 189 174 178 136 161 171 149 184 155 276 224 213 279 268 287 238 213 257 293 212 246 353 339 308 247 257 322 298 273 312 249 286 279 309 401 309 328 353 354 327 324 285 243 241 287 355 460 364 487 452 391 500 451 375 372 302 316 398 394 431 431
 
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'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.213143664571728
beta0.00645020019309578
gamma0.424943606209328


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
135047.10543991015492.89456008984506
145955.96233342379493.03766657620507
156359.60058789861573.39941210138434
163230.43937366267451.56062633732548
173936.56040094510422.43959905489584
184742.82510943552414.17489056447594
195356.0035962549115-3.00359625491154
206043.687488354030216.3125116459698
215751.89885109767645.10114890232358
225248.24019090219883.7598090978012
237041.881904574985428.1180954250146
249081.86586557226168.13413442773837
257486.9533818199762-12.9533818199762
266297.59893837588-35.5989383758799
275594.1112419276597-39.1112419276597
288442.929253022435241.0707469775648
299461.235481075663132.7645189243369
307078.9123828735137-8.91238287351375
3110893.191244531289614.8087554687104
3213985.745168240330853.2548317596692
3312098.161118102627721.8388818973723
349792.38268778487784.61731221512221
3512692.413334159752833.5866658402472
36149146.1903153237122.80968467628821
37158139.58302505972218.4169749402784
38124151.406900840488-27.4069008404876
39140147.812296583395-7.81229658339467
40109108.5353212094270.464678790573487
41114117.503833288205-3.50383328820544
4277111.491890235354-34.4918902353538
43120137.39274145732-17.39274145732
44133133.550538091547-0.55053809154694
45110121.870273958662-11.8702739586622
4692101.636565226357-9.6365652263573
4797107.771493254877-10.7714932548772
4878139.961931816656-61.9619318166555
4999124.886206798664-25.8862067986642
50107113.177831745124-6.1778317451242
51112119.061002171178-7.06100217117785
529089.0251134804040.974886519596055
539895.41996297598952.58003702401052
5412582.320232669811342.6797673301887
55155129.63084923443925.3691507655606
56190140.70015487820249.2998451217977
57236133.529531758246102.470468241754
58189132.20975747217856.790242527822
59174155.57070228570618.4292977142937
60178182.914272374356-4.91427237435593
61136198.150377986194-62.1503779861937
62161185.047759625669-24.0477596256693
63171190.702749040376-19.7027490403756
64149144.2994721551674.70052784483343
65184155.81958896549628.1804110345041
66155158.658606313424-3.65860631342397
67276205.40654058262470.5934594173757
68224239.226122351407-15.2261223514072
69213228.979468223588-15.9794682235881
70279177.769152238656101.230847761344
71268197.04525974419370.9547402558069
72287231.90942291166355.0905770883368
73238237.5203557885630.479644211436948
74213255.630083725713-42.630083725713
75257263.55145139239-6.5514513923896
76293212.26466516524180.7353348347592
77212257.289537670045-45.289537670045
78246227.38623846700318.6137615329972
79353335.43591869759517.5640813024049
80339324.95676728060514.0432327193946
81308317.200424013297-9.20042401329687
82247297.353097436938-50.3530974369376
83257269.048143450591-12.0481434505908
84322281.5856250072440.41437499276
85298263.0182407236534.9817592763499
86273273.783458765984-0.783458765984278
87312307.6340368082324.36596319176772
88249281.39354454695-32.3935445469503
89286258.37636111754327.6236388824572
90279265.24719021050713.7528097894926
91309384.965513568946-75.9655135689458
92401352.06668663173948.9333133682611
93309342.098302816729-33.0983028167292
94328300.23275821302227.7672417869783
95353300.5263774845552.4736225154502
96354349.8066004467284.19339955327212
97327316.66835967606910.3316403239307
98324308.93117235870415.0688276412964
99285352.763567038031-67.7635670380308
100243294.805200411893-51.8052004118931
101241287.646325003512-46.6463250035125
102287273.79882701988713.2011729801129
103355363.304616749659-8.30461674965943
104460387.21980598328572.7801940167154
105364351.47134467329612.5286553267037
106487337.976115293889149.023884706111
107452371.92643091762180.073569082379
108391414.750270368213-23.7502703682132
109500372.294169448289127.705830551711
110451388.94363921965862.0563607803422
111375417.178199639249-42.1781996392486
112372357.81512560494514.1848743950554
113302367.547487313136-65.5474873131365
114316375.106366255874-59.1063662558744
115398464.864989196216-66.8649891962161
116394515.546883764625-121.546883764625
117431407.55404299830123.4459570016993
118431441.367396683969-10.367396683969


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
119415.894057518493370.117254719446461.67086031754
120406.642333118478357.656358905109455.628307331848
121416.914953425497364.473432897251469.356473953742
122385.423295300731331.314231281724439.532359319739
123366.87274006942310.844594442455422.900885696386
124337.324017241984280.33001388933394.318020594639
125317.963806162545259.61746165562376.310150669471
126339.857506927664276.953324752322402.761689103007
127437.892047535513362.264104046423513.519991024603
128483.199372564462400.109727283842566.289017845081
129446.77259110999366.237817302377527.307364917603
130465.193408486715388.409600198748541.977216774682
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/18/t13057294802178k5on53126zs/174i11305729680.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t13057294802178k5on53126zs/174i11305729680.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t13057294802178k5on53126zs/28j0y1305729680.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t13057294802178k5on53126zs/28j0y1305729680.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t13057294802178k5on53126zs/3jzk01305729680.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t13057294802178k5on53126zs/3jzk01305729680.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=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