Home » date » 2011 » May » 19 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 19 May 2011 15:14:42 +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/May/19/t1305817834qes68n6oyk2jauj.htm/, Retrieved Thu, 19 May 2011 17:10:34 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
7989 41102 9123 22109 47115 9105 5496 23102 6994 84101 5884 6383 6292 36109 49127 26116 63120 60115 77117 18110 3999 79105 2286 7487 7789 3788 83108 52100 93102 598 8983 3488 2780 7974 9171 3071 4166 7968 6580 7183 2779 5273 1568 1860 9853 6757 6745 5144 9444 2248 7349 8149 7949 3545 1043 4038 4335 5432 8027 8626 24 4829 931 232 9034 1337 5138 9736 7730 7133 8126 424
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.130272576604942
beta0
gamma0.756196503879971


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1362923969.895182234532322.10481776547
143610924218.994151326511890.0058486735
154912737503.280438528711623.7195614713
162611622073.25666506774042.74333493228
176312057952.24850692665167.75149307344
186011558656.18572391981458.81427608016
19771179000.8577964150668116.142203585
201811077741.508506714-59631.508506714
21399920338.4378290079-16339.4378290079
2279105208355.093671417-129250.093671417
23228613327.3391535333-11041.3391535333
24748712001.2948668556-4514.29486685558
25778913376.7178792542-5587.71787925417
26378866467.1031031926-62679.1031031926
278310875982.29710368287125.70289631725
285210039835.998368987412264.0016310126
299310298687.992310571-5585.992310571
3059892585.4502551047-91987.4502551047
31898342059.566646475-33076.566646475
32348820870.6444833256-17382.6444833256
3327805119.41688566289-2339.41688566289
34797475784.64362913-67810.64362913
3591713311.837126605385859.16287339462
3630717850.61766997836-4779.61766997836
3741668163.82272799007-3997.82272799007
38796816670.7621802862-8702.7621802862
39658073579.1865338919-66999.1865338919
40718338136.3750859982-30953.3750859982
41277966325.4788897944-63546.4788897944
42527314475.6405510821-9202.64055108208
43156811966.8807954418-10398.8807954418
4418605432.85327309944-3572.85327309944
4598532452.379683693457400.62031630655
46675726344.8634434983-19587.8634434983
4767456841.41442528839-96.414425288388
4851443841.186475057791302.81352494221
4994445262.203403812634181.79659618737
50224812136.3145672137-9888.3145672137
51734925980.0288444426-18631.0288444426
52814917335.7305034508-9186.73050345076
53794921665.7055815168-13716.7055815168
5435459551.71632794744-6006.71632794744
5510435120.4980987671-4077.4980987671
5640383450.25478430826587.745215691737
5743357901.08376871055-3566.08376871055
58543210890.7115911266-5458.7115911266
5980276341.707652627411685.29234737259
6086264526.406157078744099.59384292126
61248050.75015126546-8026.75015126546
6248294006.12339519448822.876604805523
6393111822.1852087524-10891.1852087524
6423210015.9619410109-9783.96194101088
65903410302.9809753101-1268.98097531013
6613374914.04300285116-3577.04300285116
6751381971.264446163373166.73555383663
6897364743.137179226734992.86282077327
6977307372.833264847357.166735153004
70713310141.4695586494-3008.46955864941
71812610818.5795433004-2692.5795433004
724249370.53568691316-8946.53568691316


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
732094.44494119407-41922.156115890646111.0459982788
745464.74013895725-42242.713665813753172.1939437282
754300.82807973095-42235.204698159650836.8608576215
763474.69829651008-42464.349866045149413.7464590653
7714041.2414442036-59580.274396786287662.7572851935
783445.71919191919-42801.527871458349692.9662552966
795970.33200457656-45610.021339598657550.6853487517
8010111.1696160544-53516.742245060573739.0814771693
818826.03055893003-50364.07537310568016.1364909651
829285.47075522608-51059.529592554569630.4711030067
8310689.7387909515-53767.007440636175146.4850225392
843240.56676757367-10861.743757979117342.8772931264
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t1305817834qes68n6oyk2jauj/11jnw1305818078.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305817834qes68n6oyk2jauj/11jnw1305818078.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305817834qes68n6oyk2jauj/2kmj51305818078.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305817834qes68n6oyk2jauj/2kmj51305818078.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305817834qes68n6oyk2jauj/3wsfi1305818078.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305817834qes68n6oyk2jauj/3wsfi1305818078.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