Home » date » 2009 » Dec » 01 »

*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, 01 Dec 2009 06:02:40 -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/01/t1259672609ign9ui3u2fjohwh.htm/, Retrieved Tue, 01 Dec 2009 14:03:33 +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/01/t1259672609ign9ui3u2fjohwh.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 «
149 139 135 130 127 122 117 112 113 149 157 157 147 137 132 125 123 117 114 111 112 144 150 149 134 123 116 117 111 105 102 95 93 124 130 124 115 106 105 105 101 95 93 84 87 116 120 117 109 105 107 109 109 108 107 99 103 131 137 135
 
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.854437321125315
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13147149.288219344397-2.28821934439665
14137137.177584627027-0.177584627026732
15132131.8130095780900.186990421909599
16125124.9314977621850.0685022378148687
17123123.182653686134-0.182653686133733
18117117.321542481451-0.321542481451047
19114113.8008677966730.199132203327082
20111108.9893853819032.01061461809660
21112111.6204458070890.379554192910774
22144147.648085339519-3.64808533951887
23150152.372496893666-2.3724968936659
24149150.421482435404-1.42148243540382
25134139.411758519791-5.41175851979096
26123125.732170895332-2.73217089533193
27116118.720865136260-2.72086513625989
28117110.1387914241906.86120857581037
29111114.270120056966-3.27012005696565
30105106.262273153879-1.26227315387895
31102102.307675073961-0.307675073961406
329597.7915659352005-2.79156593520051
339395.9518846525865-2.95188465258649
34124122.6600297595491.33997024045141
35130130.653539756426-0.653539756425857
36124130.233414809786-6.23341480978584
37115116.133800319431-1.13380031943082
38106107.668146841762-1.66814684176249
39105102.1576181939402.84238180606027
40105100.1289005367134.87109946328657
41101101.392730999395-0.39273099939534
429596.5511775195222-1.55117751952220
439392.71937405583540.280625944164555
448488.7222787488008-4.72227874880082
458785.11556577195931.88443422804066
46116114.5426802607471.45731973925284
47120121.888524286081-1.88852428608079
48117119.589642046601-2.5896420466008
49109109.755994811509-0.755994811508714
50105101.9046306297953.09536937020516
51107101.1541908679065.84580913209362
52109101.9159798298817.08402017011852
53109104.2083767553754.79162324462484
54108103.3055905365724.69440946342796
55107104.8198220389872.18017796101297
5699100.985479211867-1.98547921186665
57103100.9712395316682.02876046833154
58131135.526496637099-4.52649663709906
59137138.072947082428-1.07294708242770
60135136.297600139550-1.29760013955027


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
61126.741319375095120.730490886514132.752147863676
62119.051526714288111.336387163918126.766666264658
63115.650338489133106.521277130421124.779399847845
64111.230583689697101.00551139822121.455655981173
65107.03142523768595.879654992898118.183195482473
66102.08098230699990.2098149136444113.952149700353
6799.355642851332886.6655226424536112.045763060212
6893.480434418082380.413172565572106.547696270593
6995.60196350672881.2700500731836109.933876940272
70125.139112970981105.822930274115144.455295667848
71131.729924465956110.732392899101152.727456032812
72130.85816129314599.2467189532628162.469603633027
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672609ign9ui3u2fjohwh/1l3ef1259672558.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672609ign9ui3u2fjohwh/1l3ef1259672558.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672609ign9ui3u2fjohwh/271a81259672558.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672609ign9ui3u2fjohwh/271a81259672558.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672609ign9ui3u2fjohwh/3pqjy1259672558.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259672609ign9ui3u2fjohwh/3pqjy1259672558.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
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