Home » date » 2010 » Nov » 30 »

Workshop 8 - blog 2

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 30 Nov 2010 19:48:44 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/30/t129114699062lxe92rvy7ef0e.htm/, Retrieved Tue, 30 Nov 2010 20:56:34 +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/Nov/30/t129114699062lxe92rvy7ef0e.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 «
219,3 211,1 215,2 240,2 242,2 240,7 255,4 253 218,2 203,7 205,6 215,6 188,5 202,9 214 230,3 230 241 259,6 247,8 270,3 289,7 322,7 315 320,2 329,5 360,6 382,2 435,4 464 468,8 403 351,6 252 188 146,5 152,9 148,1 165,1 177 206,1 244,9 228,6 253,4 241,1 261,4 273,7 263,7 272,5 263,2 279,8 298,1 267,6 264,3 264,3 268,7 269,1 288,6
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13188.5190.796474358974-2.29647435897439
14202.9204.36351981352-1.46351981351984
15214213.4676864801860.532313519813528
16230.3225.9676864801864.33231351981354
17230222.9593531468537.04064685314682
18241233.4010198135207.59898018648019
19259.6278.26351981352-18.6635198135199
20247.8260.246853146853-12.4468531468532
21270.3214.81351981352055.4864801864803
22289.7257.68435314685332.0156468531468
23322.7293.94268648018728.7573135198135
24315334.617686480186-19.6176864801865
25320.2289.13435314685331.0656468531469
26329.5336.06351981352-6.56351981351986
27360.6340.06768648018620.5323135198136
28382.2372.5676864801869.63231351981352
29435.4374.85935314685360.5406468531468
30464438.8010198135225.1989801864802
31468.8501.26351981352-32.4635198135198
32403469.446853146853-66.4468531468532
33351.6370.01351981352-18.4135198135197
34252338.984353146853-86.9843531468532
35188256.242686480187-68.2426864801865
36146.5199.917686480186-53.4176864801865
37152.9120.63435314685332.2656468531468
38148.1168.76351981352-20.6635198135199
39165.1158.6676864801866.43231351981353
40177177.067686480186-0.0676864801864667
41206.1169.65935314685336.4406468531468
42244.9209.50101981352035.3989801864802
43228.6282.16351981352-53.5635198135199
44253.4229.24685314685324.1531468531469
45241.1220.41351981352020.6864801864803
46261.4228.48435314685332.9156468531468
47273.7265.6426864801878.05731351981348
48263.7285.617686480186-21.9176864801865
49272.5237.83435314685334.6656468531469
50263.2288.36351981352-25.1635198135199
51279.8273.7676864801866.03231351981356
52298.1291.7676864801866.33231351981357
53267.6290.759353146853-23.1593531468532
54264.3271.00101981352-6.70101981351985
55264.3301.56351981352-37.2635198135198
56268.7264.9468531468533.7531468531468
57269.1235.71351981352033.3864801864803
58288.6256.48435314685332.1156468531469


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
59292.842686480187228.635746171010357.049626789363
60304.760372960373213.958047176656395.56269874409
61278.894726107226167.685043293191390.104408921261
62294.758245920746166.344365302394423.172126539098
63305.325932400932161.754849242343448.897015559522
64317.293618881119160.0193771783474.567860583938
65309.952972027972140.077375525523479.828568530421
66313.353991841492131.749340274059494.958643408925
67350.617511655012157.996690727483543.23833258254
68351.264364801865148.224191834392554.304537769337
69318.277884615385105.327554673102531.228214557668
70305.66223776223883.2428721341672528.081603390308
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t129114699062lxe92rvy7ef0e/1uj1i1291146521.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t129114699062lxe92rvy7ef0e/1uj1i1291146521.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t129114699062lxe92rvy7ef0e/2nsil1291146521.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t129114699062lxe92rvy7ef0e/2nsil1291146521.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t129114699062lxe92rvy7ef0e/3nsil1291146521.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t129114699062lxe92rvy7ef0e/3nsil1291146521.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=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