Home » date » 2010 » Jun » 03 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 03 Jun 2010 11:16:31 +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/Jun/03/t1275563907lrw6sh97olh64xt.htm/, Retrieved Thu, 03 Jun 2010 13:18:31 +0200
 
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/Jun/03/t1275563907lrw6sh97olh64xt.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
77 70 67 76 85 106 108 120 108 111 109 104 104 117 111 110 116 118 115 111 112 97 106 93 95 97 81 71 75 70 72 80 78 80 81 99 87 100 95 128 112 104 102 108 103 99 96 85 78 74 106 100 109 87 107 106 109 83 84 83 65 68 61 75 66 78 68 68 174 64 48 45
 
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.573314480838667
beta0.0612762739836527
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
367634
47658.433780224181317.5662197758187
58562.262382101010622.7376178989894
610669.854607003656536.1453929963435
710886.40351197247621.5964880275239
812095.370016089176524.6299839108235
9108106.9409328254551.05906717454477
10111105.0355073092075.96449269079287
11109106.1519693351432.84803066485692
12104105.581771508089-1.58177150808878
13104102.4163354051091.58366459489058
14117101.12132470629115.8786752937094
15111108.5796776414362.42032235856384
16110108.4071892672671.5928107327329
17116107.8162328521838.18376714781692
18118111.2914676397036.70853236029654
19115114.1566035615110.843396438488796
20111113.688801129271-2.68880112927089
21112111.1014795519630.898520448036791
2297110.602386922525-13.6023869225255
23106101.3118544354724.68814556452767
2493102.672246335831-9.67224633583125
259595.4598260318778-0.459826031877768
269793.51286573875813.48713426124188
278193.9512599693995-12.9512599693995
287184.5102995335033-13.5102995335033
297574.27420902631830.725790973681683
307072.2253728118176-2.22537281181764
317268.40641303683513.59358696316488
328068.049791941338911.9502080586611
337872.90396041371275.0960395862873
348074.0075616487095.99243835129106
358175.83559908245915.16440091754092
369977.370339039594821.6296609604052
378789.1047134411431-2.10471344114313
3810087.157887510804712.8421124891953
399594.23144412751820.768555872481755
4012894.410055710523233.5899442894768
41112114.585678618271-2.58567861827107
42104113.930456682489-9.93045668248864
43102108.715504468623-6.71550446862338
44108105.1078113793862.89218862061426
45103107.10995211551-4.10995211550997
4699104.953279188854-5.95327918885415
4796101.530658035858-5.53065803585783
488598.156036511712-13.1560365117120
497889.9474959553871-11.9474959553871
507482.012106795492-8.01210679549206
5110676.051463308357529.9485366916425
5210092.90631575492657.09368424507348
5310996.907355544310412.0926444556896
5487104.199193167075-17.1991931670749
5510794.093378561283712.9066214387163
56106101.7010804615544.29891953844636
57109104.5248857318094.47511426819088
5883107.606919330432-24.6069193304317
598493.1513467045852-9.15134670458518
608387.2351856011425-4.23518560114248
616583.9887463421642-18.9887463421642
626871.6167914849716-3.61679148497156
636167.9307409809361-6.93074098093612
647562.101274324827512.8987256751725
656668.0934677023753-2.09346770237528
667865.416874792480312.5831252075197
676871.5966375536399-3.59663755363991
686868.3739560812232-0.373956081223227
6917466.9857472718381107.014252728162
7064130.924225897852-66.9242258978518
714892.7901694014725-44.7901694014725
724565.7723835994909-20.7723835994909


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7351.794596411203112.238068603637591.3511242187687
7449.7259175420393.4227183652077996.0291167188702
7547.6572386728749-5.18286480304995100.497342148800
7645.5885598037109-13.6807573404367104.857876947858
7743.5198809345468-22.132040063258109.171801932352
7841.4512020653827-30.5759253366122113.478329467378
7939.3825231962187-39.0388465094208117.803892901858
8037.3138443270546-47.5392604093633122.166949063473
8135.2451654578906-56.090390439128126.580721354909
8233.1764865887265-64.7018900215527131.054863199006
8331.1078077195624-73.3809003425036135.596515781628
8429.0391288503984-82.1327493535649140.211007054362
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275563907lrw6sh97olh64xt/1gbrk1275563789.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275563907lrw6sh97olh64xt/1gbrk1275563789.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t1275563907lrw6sh97olh64xt/2gbrk1275563789.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275563907lrw6sh97olh64xt/2gbrk1275563789.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/03/t1275563907lrw6sh97olh64xt/382851275563789.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/03/t1275563907lrw6sh97olh64xt/382851275563789.ps (open in new window)


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