Home » date » 2011 » 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: Mon, 17 Jan 2011 08:17: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/Jan/17/t129525209938td2rrhmmsvcq7.htm/, Retrieved Mon, 17 Jan 2011 09:15: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/2011/Jan/17/t129525209938td2rrhmmsvcq7.htm/},
    year = {2011},
}
@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 = {2011},
    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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
6715 7703 9856 8326 9269 7035 10342 11682 10304 11385 9777 8882 7897 6930 9545 9110 7459 7320 10017 12307 11072 10749 9589 9080 7384 8062 8511 8684 8306 7643 10577 13747 11783 11611 9946 8693 7303 7609 9423 8584 7586 6843 11811 13414 12103 11501 8213 7982 7687 7180 7862 8043 8340 6692 10065 12684 11587 9843 8110 7940 6475 6121 9669 7778 7826 7403 10741 14023 11519 10236 8075 8157
 
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' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.113673696771336
beta0
gamma0.687041745941993


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1378978033.04353241997-136.043532419971
1469307020.78799293574-90.7879929357387
1595459587.90823085265-42.9082308526486
1691109133.71624314024-23.7162431402376
1774597498.08212829965-39.0821282996476
1873207347.88711799718-27.887117997182
191001710286.1761146323-269.176114632271
201230711554.1148044881752.885195511892
211107210308.4913747681763.508625231909
221074911452.6349210914-703.634921091387
2395899803.733404871-214.733404871011
2490808938.38201277751141.617987222487
2573847874.41139417128-490.411394171285
2680626863.450022440181198.54997755982
2785119623.0059046685-1112.00590466849
2886849061.68444169751-377.684441697515
2983067394.00248774349911.99751225651
3076437358.23379465385284.766205346151
311057710208.6829044251368.317095574934
321374712198.43379690911548.56620309093
331178311015.6951503757767.304849624286
341161111267.6379926474343.362007352556
3599469993.27522487825-47.2752248782454
3686939342.10264062157-649.102640621568
3773037764.4653634404-461.4653634404
3876097772.73111870512-163.73111870512
3994238965.28179842135457.718201578655
4085849028.86834169099-444.86834169099
4175868113.08145946444-527.081459464444
4268437531.0107048825-688.010704882506
431181110278.55574570461532.44425429542
441341413100.3132055348313.686794465231
451210311322.7166137701780.283386229887
461150111318.4278467755182.572153224544
4782139811.5665351329-1598.5665351329
4879828647.77384857799-665.773848577992
4976877227.59298198486459.407018015137
5071807516.56167840749-336.561678407485
5178629029.58391838196-1167.58391838196
5280438380.14685960922-337.146859609222
5383407462.42794031059877.572059689413
5466926951.24651036826-259.246510368259
551006511017.6530699823-952.653069982258
561268412734.0841470802-50.0841470801988
571158711264.0102411256322.989758874404
58984310865.6600082615-1022.6600082615
5981108279.43300262341-169.433002623409
6079407861.3541052566278.6458947433803
6164757232.74301618565-757.743016185649
6261216910.89276064295-789.89276064295
6396697790.988440824861878.01155917514
6477787992.62037207107-214.62037207107
6578267824.376192282771.62380771722565
6674036564.31497236196838.685027638036
671074110270.8576665589470.142333441121
681402312697.4800551631325.51994483697
691151911595.7800622879-76.780062287924
701023610316.0588405195-80.0588405195376
7180758321.69830060509-246.698300605085
7281578041.80556232065115.194437679349


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
736882.672942120085886.811448683387878.53443555678
746613.478862879425606.286616073647620.67110968521
759288.347045424318246.6812462422810330.0128446063
767982.176066392056943.460066229899020.89206655422
777969.903987558616919.518188246599020.28978687064
787198.19838765876147.984124286378248.41265103103
7910596.67643806039462.4741083610911730.8787677595
8013477.469264909512249.074479214714705.8640506043
8111398.449166081310223.767107172112573.1312249904
8210140.96201429988992.519073393811289.4049552058
838077.50061440516975.114858369019179.88637044117
848046.111570614047534.215526077878558.0076151502
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/17/t129525209938td2rrhmmsvcq7/18usq1295252242.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/17/t129525209938td2rrhmmsvcq7/18usq1295252242.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/17/t129525209938td2rrhmmsvcq7/2hclm1295252242.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/17/t129525209938td2rrhmmsvcq7/2hclm1295252242.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/17/t129525209938td2rrhmmsvcq7/374ec1295252242.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/17/t129525209938td2rrhmmsvcq7/374ec1295252242.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