Home » date » 2010 » Jan » 27 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 26 Jan 2010 18:30:26 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/27/t1264556003ueggivinw1v7cir.htm/, Retrieved Wed, 27 Jan 2010 02:33:27 +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/Jan/27/t1264556003ueggivinw1v7cir.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:
KDGP2W61
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1 4 -3 -3 0 6 -1 0 -1 1 -4 -1 -1 0 3 0 8 8 8 8 11 13 5 12 13 9 11 7 12 11 10 13 14 10 13 12 13 17 15 6 9 6 11 12 13 11 16 16 19 14 15 12 14 16 13 13 15 12 13 12 15 10 8 11 8 13 9 8 8 6 8 6 12 16
 
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.715895076963664
beta0
gamma0.990005082021168


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13-1-2.912393162393161.91239316239316
140-0.6892993331959450.689299333195945
1532.533187645014350.466812354985652
160-0.5702693758312980.570269375831298
1787.525337975223780.474662024776218
1887.510833827670330.489166172329673
1985.298379794612612.70162020538739
2089.04481071182932-1.04481071182932
21117.775856845892793.22414315410721
221312.27135936969860.728640630301447
2357.89701058882804-2.89701058882804
24128.968742616062093.03125738393791
251311.78071570351411.21928429648594
26913.1636024334441-4.16360243344406
271112.8493430573329-1.84934305733293
2878.1168606511552-1.11686065115520
291214.9777688897305-2.97776888973049
301112.4957659605931-1.49576596059315
31109.484595371825840.515404628174158
321310.61218423821252.38781576178749
331413.00133943085750.99866056914247
341015.2017316182060-5.20173161820597
35135.562088598291397.43791140170861
361215.6999565737289-3.69995657372891
371313.1834415409131-0.183441540913101
381712.04810440364214.95189559635794
391518.9105060896457-3.91050608964569
40612.9084691124501-6.90846911245007
41915.0997844190741-6.09978441907414
42610.7995819668727-4.79958196687273
43115.988898298480315.01110170151969
441210.86157887943071.13842112056930
451311.96557742274171.03442257725828
461112.4476161776176-1.4476161776176
47169.050619128740116.94938087125989
481615.70605452861480.293945471385197
491917.03782802543821.96217197456183
501418.8829172720305-4.88291727203047
511516.2119386174891-1.21193861748908
521211.29856978660300.701430213397018
531419.1652295139376-5.16522951393758
541615.89977217318160.100227826818426
551317.3562432723403-4.35624327234029
561314.4336369685910-1.43363696859104
571513.66706060488981.33293939511016
581213.6646946612886-1.66469466128865
591312.47407623675390.525923763246066
601212.6590471641812-0.659047164181242
611513.77779218212011.22220781787992
621013.1678585306438-3.16785853064381
63812.7572009630589-4.75720096305892
64115.843960564403375.15603943559663
65815.2495651920529-7.24956519205291
661311.97293273202621.02706726797375
67912.8394728650157-3.83947286501575
68811.1088477421315-3.10884774213148
6989.92113821246912-1.92113821246912
7066.7460636345231-0.7460636345231
7186.829233626585821.17076637341418
7267.14255297975992-1.14255297975992
73128.444290344721163.55570965527884
74168.270125764776077.72987423522393


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7515.21407453026038.5838090620175521.8443399985031
7614.49474159068776.3405776981117222.6489054832636
7716.71989664373537.2848366336131526.1549566538574
7820.961121872629110.399383095220331.5228606500379
7919.72360064848568.1442960661785631.3029052307927
8020.94713475506068.4327325233335633.4615369867876
8122.31909551713628.9347676735323335.7034233607401
8220.84986205207236.6487986963694535.0509254077752
8322.00627312822317.0329578961075536.9795883603386
8420.83079009573785.1231442616887536.5384359297869
8524.27193384644777.8627868163448340.6810808765506
8622.72630195560795.6444380390690739.8081658721467
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264556003ueggivinw1v7cir/1q1jw1264555824.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264556003ueggivinw1v7cir/1q1jw1264555824.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t1264556003ueggivinw1v7cir/2189l1264555824.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264556003ueggivinw1v7cir/2189l1264555824.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t1264556003ueggivinw1v7cir/3hsou1264555824.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264556003ueggivinw1v7cir/3hsou1264555824.ps (open in new window)


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