Home » date » 2008 » May » 25 »

Exponential Smoothing - Blue Jeans - Raf Pleysier

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 25 May 2008 12:32:25 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/25/t12117403882x5ko8vix6yn29e.htm/, Retrieved Sun, 25 May 2008 20:33:12 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
48,04 48,06 48,04 48,09 48,12 48,16 48,16 48,16 48,08 48,13 48,16 48,15 48,15 48,15 48,27 48,47 48,51 48,53 48,53 48,53 48,68 48,64 48,67 48,66 48,66 48,67 48,71 48,96 49,01 49,04 49,04 49,04 49,06 49,13 49,19 49,26 49,26 49,26 49,29 49,43 49,43 49,45 49,45 49,46 49,57 49,68 49,71 49,7 49,7 49,8 49,84 50,09 50,2 50,16 50,16 50,29 50,36 51,02 51,03 51,04
 
Text written by user:
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.641886638714992
beta0.220255401384085
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1348.1547.94121420020610.208785799793937
1448.1548.11243316910760.0375668308924375
1548.2748.2894889364246-0.0194889364246436
1648.4748.5014620378868-0.0314620378868113
1748.5148.5450348788863-0.0350348788863499
1848.5348.5613471793674-0.0313471793674367
1948.5348.5555781352128-0.0255781352128324
2048.5348.5494716676626-0.0194716676625859
2148.6848.6974952763094-0.0174952763093756
2248.6448.6555254862202-0.0155254862201915
2348.6748.6801321428864-0.0101321428863912
2448.6648.6659297909034-0.00592979090337309
2548.6648.7202147708866-0.0602147708866454
2648.6748.62345074169950.0465492583005158
2748.7148.7547096337696-0.0447096337695783
2848.9648.91219052154520.0478094784548233
2949.0148.98110963777370.0288903622263064
3049.0449.02438514905090.0156148509490635
3149.0449.0418771340071-0.00187713400707423
3249.0449.047569435257-0.00756943525704656
3349.0649.2016115087932-0.14161150879319
3449.1349.05897599335390.071024006646148
3549.1949.13220649088290.0577935091170616
3649.2649.16342022849430.0965797715056667
3749.2649.2793112363648-0.0193112363647714
3849.2649.2674177178635-0.00741771786351819
3949.2949.345126988948-0.055126988948004
4049.4349.543328825983-0.113328825982990
4149.4349.491164915695-0.0611649156950378
4249.4549.44816323066670.00183676933328769
4349.4549.4247495688270.0252504311729567
4449.4649.4239130888320.0360869111679563
4549.5749.54301309250270.0269869074972533
4649.6849.59311309947870.0868869005212929
4749.7149.6822742049980.0277257950020555
4849.749.714040595124-0.0140405951239799
4949.749.7077549457867-0.00775494578667946
5049.849.69947109604880.100528903951229
5149.8449.83713320153980.00286679846015403
5250.0950.06940506979110.020594930208901
5350.250.15680460851360.043195391486428
5450.1650.2528716384357-0.0928716384357244
5550.1650.2126194865499-0.0526194865499079
5650.2950.19021969838170.099780301618317
5750.3650.3820976336702-0.0220976336702066
5851.0250.44965445291740.570345547082638
5951.0350.92266000000860.107339999991410
6051.0451.0958790705607-0.0558790705606853


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
6151.164425811331450.963950046181551.3649015764813
6251.30119402706751.046567435875151.5558206182589
6351.426076674619751.111222401480751.7409309477587
6451.755735433531951.374279172017552.1371916950463
6551.92300811505651.470890190136752.3751260399754
6652.019056773910651.492469516918452.5456440309028
6752.143239219483951.537949927499552.7485285114683
6852.308531629588751.620270691919852.9967925672575
6952.478187730166451.703201470329253.2531739900036
7052.868531062365951.999844943034753.7372171816972
7152.809521703122551.850846103493853.7681973027512
7252.843561121879251.157848570272354.5292736734862
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117403882x5ko8vix6yn29e/1kbx11211740340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117403882x5ko8vix6yn29e/1kbx11211740340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117403882x5ko8vix6yn29e/2dihw1211740340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117403882x5ko8vix6yn29e/2dihw1211740340.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117403882x5ko8vix6yn29e/34gbd1211740340.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t12117403882x5ko8vix6yn29e/34gbd1211740340.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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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