Home » date » 2009 » Dec » 04 »

Workshop 9

*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: Fri, 04 Dec 2009 05:15:07 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928958haptvd4bitxhx6n.htm/, Retrieved Fri, 04 Dec 2009 13:16:03 +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/2009/Dec/04/t1259928958haptvd4bitxhx6n.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
130 136.7 138.1 139.5 140.4 144.6 151.4 147.9 141.5 143.8 143.6 150.5 150.1 154.9 162.1 176.7 186.6 194.8 196.3 228.8 267.2 237.2 254.7 258.2 257.9 269.6 266.9 269.6 253.9 258.6 274.2 301.5 304.5 285.1 287.7 265.5 264.1 276.1 258.9 239.1 250.1 276.8 297.6 295.4 283 275.8 279.7 254.6 234.6 176.9 148.1 122.7 124.9 121.6 128.4 144.5 151.8 167.1 173.8 203.7 199.8
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.91594433817239
beta0.254681260792864
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13150.1130.8805847848719.2194152151301
14154.9157.905109673890-3.00510967389044
15162.1163.119940761206-1.01994076120627
16176.7176.837042114557-0.137042114557289
17186.6187.219177521515-0.619177521514899
18194.8194.7363877915690.0636122084314081
19196.3222.232225112377-25.9322251123766
20228.8195.11751715782333.6824828421766
21267.2224.20259410233142.9974058976687
22237.2283.901442079443-46.7014420794433
23254.7244.7895044956329.91049550436773
24258.2271.28539781617-13.0853978161700
25257.9263.814699897086-5.91469989708571
26269.6262.3998148087977.20018519120333
27266.9276.905536256762-10.0055362567618
28269.6284.382714022403-14.7827140224032
29253.9276.767504829663-22.8675048296630
30258.6253.2091972079615.39080279203932
31274.2278.157364936914-3.95736493691419
32301.5270.01184677413331.4881532258671
33304.5288.3297941685516.1702058314501
34285.1302.837171801158-17.7371718011576
35287.7290.070933366641-2.37093336664128
36265.5296.128872327679-30.6288723276792
37264.1261.4499561096002.6500438904003
38276.1259.40542160603016.6945783939705
39258.9273.855365360832-14.9553653608322
40239.1267.417240107409-28.3172401074092
41250.1234.47268399284915.6273160071509
42276.8245.50209411204131.2979058879588
43297.6297.851825910214-0.251825910213597
44295.4299.929471940812-4.52947194081179
45283280.1445643069732.8554356930274
46275.8273.4686885208992.33131147910086
47279.7278.1134499795311.58655002046862
48254.6283.769198230010-29.1691982300104
49234.6252.186511999984-17.586511999984
50176.9227.075627290153-50.1756272901533
51148.1158.405168445699-10.3051684456992
52122.7131.101893376469-8.4018933764694
53124.9101.29293865534123.6070613446595
54121.6104.76782562462816.8321743753722
55128.4111.61479669467216.7852033053279
56144.5114.10681644815330.3931835518466
57151.8128.82379491181322.9762050881868
58167.1143.99362215386223.1063778461379
59173.8170.6139310095883.18606899041225
60203.7178.80198679576624.8980132042344
61199.8213.502594383305-13.7025943833049


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
62205.237717295804164.921283817349245.554150774259
63213.526101489112152.16778895417274.884414024055
64228.756986518236143.997795658477313.516177377995
65248.064929318224136.535302367125359.594556269323
66258.946715255600122.318556216615395.574874294584
67285.912727856994113.677834705983458.147621008005
68297.23670058711696.2403909860852498.233010188147
69288.65522336421672.0672682197685505.243178508664
70285.76173298386850.2384250387331521.285040929004
71291.65969490436129.9406821266919553.378707682029
72301.5297382083989.14505609709352593.914420319703
73305.301865648701-10.1412613150731620.744992612474
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928958haptvd4bitxhx6n/18nai1259928904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928958haptvd4bitxhx6n/18nai1259928904.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928958haptvd4bitxhx6n/2i1xe1259928904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928958haptvd4bitxhx6n/2i1xe1259928904.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928958haptvd4bitxhx6n/3yhf71259928904.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259928958haptvd4bitxhx6n/3yhf71259928904.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