Home » date » 2010 » Jan » 17 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 17 Jan 2010 05:31:49 -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/17/t1263731998ujzkqj7amo6i1d0.htm/, Retrieved Sun, 17 Jan 2010 13:40:02 +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/17/t1263731998ujzkqj7amo6i1d0.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3,81 3,95 3,99 4 4,06 4,16 4,19 4,2 4,2 4,2 4,2 4,2 4,23 4,38 4,43 4,44 4,44 4,44 4,44 4,44 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,46 4,46 4,46 4,48 4,58 4,67 4,68 4,68 4,69 4,69 4,69 4,69 4,69 4,69 4,69 4,73 4,78 4,79 4,79 4,8 4,8 4,81 5,16 5,26 5,29 5,29 5,29 5,3 5,3 5,3 5,3 5,3 5,3 5,3 5,3 5,35 5,44 5,47 5,47 5,48 5,48 5,48 5,48 5,48
 
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
alpha1
beta0.344199179309432
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
33.994.09-0.0999999999999996
444.09558008206906-0.0955800820690573
54.064.07268149626256-0.0126814962625597
64.164.128316535656570.0316834643434296
74.194.23922195808126-0.049221958081259
84.24.25227980050569-0.0522798005056861
94.24.24428513607717-0.0442851360771686
104.24.2290422285838-0.0290422285838003
114.24.21904591733994-0.0190459173399393
124.24.21249032822234-0.0124903282223370
134.234.20819116749890.0218088325010974
144.384.245697749747480.134302250252522
154.434.44192447406381-0.0119244740638056
164.444.48782007987735-0.0478200798773463
174.444.48136044762905-0.041360447629053
184.444.46712421549926-0.0271242154992626
194.444.457788082785-0.0177880827850041
204.444.45166543928892-0.0116654392889171
214.454.447650204659390.00234979534061175
224.454.45845900228717-0.00845900228717156
234.454.45554742064215-0.00554742064215041
244.454.45363800300984-0.00363800300983819
254.454.45238580535953-0.00238580535952693
264.454.45156461311279-0.00156461311278555
274.454.45102607456343-0.00102607456342785
284.454.45067290054079-0.000672900540785726
294.464.450441288726890.00955871127310903
304.464.46373138930235-0.00373138930235051
314.464.4624470481668-0.00244704816679775
324.484.461604776196060.0183952238039451
334.584.487936397132590.0920636028674133
344.674.619624613683820.0503753863161807
354.684.72696378031124-0.0469637803112448
364.684.72079888567085-0.0407988856708457
374.694.7067559427062-0.0167559427062001
384.694.71098856097817-0.0209885609781715
394.694.7037643155146-0.0137643155145986
404.694.69902664941072-0.00902664941071762
414.694.69591968409163-0.00591968409163446
424.694.69388213368552-0.00388213368552304
434.694.692545906457-0.00254590645699615
444.734.69166960754390.0383303924561007
454.784.74486289716990.0351371028301015
464.794.80695705912733-0.0169570591273303
474.794.8111204532922-0.0211204532922018
484.84.80385081060238-0.00385081060238246
494.84.81252536475337-0.0125253647533663
504.814.808214144484710.0017858555152932
515.164.818828834487440.341171165512565
525.265.2862596696609-0.0262596696609032
535.295.37722111291468-0.0872211129146834
545.295.37719967743099-0.087199677430994
555.295.3471856200232-0.0571856200231986
565.35.32750237654291-0.0275023765429125
575.35.32803608110778-0.0280360811077829
585.35.31838608499943-0.0183860849994311
595.35.31205760963191-0.0120576096319134
605.35.30790739029218-0.0079073902921758
615.35.30518567304313-0.00518567304312967
625.35.30340076863752-0.00340076863751726
635.35.30223022686346-0.00223022686346219
645.355.301462584607380.048537415392615
655.445.368169123151320.0718308768486766
665.475.48289325201172-0.0128932520117164
675.475.50845540525065-0.0384554052506534
685.485.49521908632337-0.0152190863233663
695.485.49998068930103-0.0199806893010246
705.485.49310335244158-0.0131033524415756
715.485.48859318928498-0.00859318928498265
725.485.48563542058544-0.00563542058544098


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
735.483695713444875.373459342726255.59393208416349
745.487391426889745.302704494871775.6720783589077
755.491087140334615.228883022307595.75329125836162
765.494782853779485.149881925092855.8396837824661
775.498478567224345.065343946837965.93161318761073
785.502174280669214.975318295566316.02903026577212
795.505869994114084.87996990399056.13177008423767
805.509565707558954.779493064642866.23963835047504
815.513261421003824.674082038740776.35244080326687
825.516957134448694.563920817678556.46999345121882
835.520652847893564.44918002809836.59212566768881
845.524348561338434.330016628302076.71868049437478
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/17/t1263731998ujzkqj7amo6i1d0/1655y1263731507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/17/t1263731998ujzkqj7amo6i1d0/1655y1263731507.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/17/t1263731998ujzkqj7amo6i1d0/2kvil1263731507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/17/t1263731998ujzkqj7amo6i1d0/2kvil1263731507.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/17/t1263731998ujzkqj7amo6i1d0/3v3rc1263731507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/17/t1263731998ujzkqj7amo6i1d0/3v3rc1263731507.ps (open in new window)


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