Home » date » 2010 » Jan » 21 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 21 Jan 2010 04:12:44 -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/21/t1264073808b80cu7nw6nlgkt4.htm/, Retrieved Thu, 21 Jan 2010 12:36:52 +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/21/t1264073808b80cu7nw6nlgkt4.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 «
104.0 99.0 105.4 107.1 110.7 117.1 118.7 126.5 127.5 134.6 131.8 135.9 142.7 141.7 153.4 145.0 137.7 148.3 152.2 169.4 168.6 161.1 174.1 179.0 190.6 190.0 181.6 174.8 180.5 196.8 193.8 197.0 216.3 221.4 217.9 229.7 227.4 204.2 196.6 198.8 207.5 190.7 201.6 210.5 223.5 223.8 231.2 244.0 234.7 250.2 265.7 287.6 283.3 295.4 312.3 333.8 347.7 383.2 407.1 413.6 362.7 321.9 239.4 191.0 159.7 163.4 157.6 166.2 176.7 198.3 226.2 216.2 235.9
 
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.936888096626754
beta0.828413409801924
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3105.49411.4
4107.1108.528413856660-1.42841385666023
5110.7109.9294036791920.770596320807812
6117.1113.9887033945203.11129660547955
7118.7122.655750040687-3.95575004068711
8126.5121.6315859050844.86841409491615
9127.5132.653201568736-5.15320156873645
10134.6130.2861270594234.31387294057691
11131.8140.136771032064-8.33677103206435
12135.9131.6647536259364.23524637406433
13142.7138.2584142533184.44158574668188
14141.7148.492642671913-6.79264267191309
15153.4142.92967795170410.4703220482955
16145161.666517380681-16.6665173806808
17137.7142.043779788519-4.34377978851876
18148.3130.59472767829517.7052723217053
19152.2153.544774772892-1.34477477289232
20169.4157.60333856867611.7966614313244
21168.6183.129708171458-14.5297081714576
22161.1172.714263433619-11.6142634336185
23174.1156.01607819118618.0839218088142
24179181.177255412026-2.17725541202628
25190.6185.6661421851494.93385781485097
26190200.646664629951-10.6466646299511
27181.6192.766778181890-11.1667781818905
28174.8175.732724587261-0.93272458726065
29180.5167.56291783362512.9370821663748
30196.8182.42843408555714.3715659144427
31193.8209.792114063494-15.9921140634945
32197196.2964536137740.703546386225923
33216.3198.98880262772117.3111973722788
34221.4230.676413252619-9.27641325261911
35217.9230.254699199796-12.3546991997960
36229.7217.36011480728912.3398851927106
37227.4237.17895585589-9.77895585589027
38204.2228.685170525644-24.4851705256441
39196.6187.4096160977579.19038390224287
40198.8184.81722650944913.9827734905508
41207.5197.5672289368419.93277106315867
42190.7214.231960486689-23.5319604866891
43201.6181.28010730281920.3198926971814
44210.5205.1834251675945.31657483240585
45223.5219.1566698630804.34333013692046
46223.8235.589084885880-11.7890848858802
47231.2227.7573620385253.44263796147504
48244236.8679959005527.13200409944841
49234.7254.970520049637-20.270520049637
50250.2231.66737334592318.5326266540773
51265.7259.1021727077266.59782729227436
52287.6280.4761766807547.12382331924613
53283.3307.871997784259-24.5719977842586
54295.4286.5013004581978.8986995418034
55312.3303.3954546155298.9045453844713
56333.8327.2061763838256.59382361617509
57347.7353.969679125931-6.26967912593091
58383.2363.81542905292319.3845709470772
59407.1412.741300397082-5.64130039708209
60413.6433.842344555343-20.2423445553430
61362.7425.553139948472-62.8531399484724
62321.9328.560139187149-6.66013918714884
63239.4279.044553711655-39.6445537116554
64191167.85690914811123.1430908518893
65159.7133.45632383186626.2436761681338
66163.4122.32916176781641.0708382321836
67157.6156.9697282443270.630271755672595
68166.2154.21118260358211.9888173964179
69176.7171.3992119598665.3007880401336
70198.3186.43541035693511.8645896430654
71226.2216.8296281670949.370371832906
72216.2252.159675901215-35.9596759012148
73235.9217.11113440497118.7888655950291


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
74247.938464450437215.801375336682280.075553564193
75261.162729970801197.417509287621324.907950653982
76274.386995491165172.100652888896376.673338093434
77287.611261011529141.070531905368434.15199011769
78300.835526531893105.022386029901496.648667033884
79314.05979205225764.4349482905303563.684635813983
80327.28405757262019.6677709464701634.90034419877
81340.508323092984-28.9949950765487710.011641262517
82353.732588613348-81.3209647179877788.786141944684
83366.956854133712-137.115284357096871.02899262452
84380.181119654076-196.211408376065956.573647684216
85393.405385174440-258.4647979036911045.27556825257
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/21/t1264073808b80cu7nw6nlgkt4/18k0w1264072362.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/21/t1264073808b80cu7nw6nlgkt4/18k0w1264072362.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/21/t1264073808b80cu7nw6nlgkt4/286yx1264072362.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/21/t1264073808b80cu7nw6nlgkt4/286yx1264072362.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/21/t1264073808b80cu7nw6nlgkt4/3rof41264072362.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/21/t1264073808b80cu7nw6nlgkt4/3rof41264072362.ps (open in new window)


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