Home » date » 2010 » Jan » 19 »

KDGP2W62

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 19 Jan 2010 03:33:53 -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/19/t1263897309wy3fw0z9lihkbd5.htm/, Retrieved Tue, 19 Jan 2010 11:35:14 +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/19/t1263897309wy3fw0z9lihkbd5.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
46.5 47 47.5 48.3 49.1 50.1 51.1 52 53.2 53.9 54.5 55.2 55.6 55.7 56.1 56.8 57.5 58.3 58.9 59.4 59.8 60 60 60.3 60.1 59.7 59.5 59.4 59.3 59.2 59.1 59 59.3 59.5 59.5 59.5 59.7 59.7 60.5 60.7 61.3 61.4 61.8 62.4 62.4 62.9 63.2 63.4 63.9 64.5 65 65.4 66.3 67.7 69 70 71.4 72.5 73.4 74.6 75.2 75.9 76.8 77.9 79.2 80.5 82.6 84.4 85.9 87.6
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.983484861538448
beta0.23196686548946
gamma0.942906046720505


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1355.651.40448717948724.19551282051281
1455.756.5915872243153-0.89158722431533
1556.156.922198331552-0.822198331552023
1656.857.487646074217-0.687646074216943
1757.558.0743805019632-0.574380501963169
1858.358.7831397589259-0.483139758925937
1958.958.82141138140920.0785886185908211
2059.459.8800632447548-0.480063244754845
2159.860.6006031302821-0.800603130282092
226060.3315839080673-0.331583908067337
236060.3565251305174-0.356525130517433
2460.360.388100856527-0.0881008565269639
2560.160.4539022893204-0.353902289320388
2659.759.766336626544-0.066336626543972
2759.559.7767516741339-0.276751674133855
2859.459.8722711205326-0.472271120532625
2959.359.7132600061644-0.413260006164435
3059.259.6593296768512-0.459329676851169
3159.158.81262747314110.28737252685886
325959.1984087610925-0.198408761092544
3359.359.3857086112982-0.0857086112982515
3459.559.18492266604860.315077333951415
3559.559.35082535268750.149174647312513
3659.559.5046657042383-0.00466570423825630
3759.759.28815636706930.411843632930747
3859.759.1726335393680.527366460632038
3960.559.71358021954630.786419780453734
4060.761.0441258657622-0.344125865762223
4161.361.23375497853840.0662450214615546
4261.461.981777863726-0.581777863725961
4361.861.32942739445670.470572605543332
4462.462.2327628650130.167237134986983
4562.463.2097862400401-0.809786240040147
4662.962.56629526427390.333704735726137
4763.263.01535705130970.184642948690289
4863.463.4771987033318-0.077198703331824
4963.963.45480725458780.445192745412186
5064.563.64045686964130.859543130358681
516564.85448488400010.145515115999856
5265.465.7332485941135-0.333248594113471
5366.366.13859043142920.161409568570846
5467.767.19045020543340.509549794566581
556968.09709757723270.902902422767326
567069.98883539556610.0111646044338727
5771.471.3294797506240.07052024937596
5872.572.30272346989170.197276530108297
5973.473.31732467859260.0826753214073932
6074.674.35357849960010.246421500399862
6175.275.4102000489749-0.210200048974869
6275.975.56081713422420.339182865775783
6376.876.7363308489680.0636691510320162
6477.977.992844020204-0.0928440202039553
6579.279.16286710259470.0371328974053284
6680.580.5901160574392-0.0901160574392463
6782.681.26851329583531.33148670416469
6884.484.02103316566870.378966834331351
6985.986.2614008780557-0.361400878055647
7087.687.2503650017040.349634998296025


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7188.886316715465487.48071823057190.2919152003597
7290.29824214645988.090054142041492.5064301508767
7391.503615321550788.508363074093294.4988675690082
7492.315684318033488.512042950806896.1193256852599
7593.522114900594288.877741487829898.1664883133585
7695.067836391243489.5465374927368100.589135289750
7796.706638469566590.2710379304204103.142239008713
7898.46235916365191.0750390828492105.849679244453
7999.639053335688591.2630741202454108.015032551132
80101.15101505640591.7501534424879110.551876670322
81103.00446123282892.5433108641415113.465611601514
82104.43969435408492.883696477012115.995692231156
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263897309wy3fw0z9lihkbd5/1n1u01263897231.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263897309wy3fw0z9lihkbd5/1n1u01263897231.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/19/t1263897309wy3fw0z9lihkbd5/25j081263897231.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263897309wy3fw0z9lihkbd5/25j081263897231.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/19/t1263897309wy3fw0z9lihkbd5/34g551263897232.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263897309wy3fw0z9lihkbd5/34g551263897232.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