Home » date » 2008 » May » 26 »

exponential smoothing weekend aan zee

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 26 May 2008 03:23:08 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/26/t1211793852zg9xmwv9l593qcr.htm/, Retrieved Mon, 26 May 2008 11:24:12 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
104,7 104,7 104,7 104,7 106 107 107 107 107 107 107 107 107 107 107 107 107,6 109,9 109,9 109,9 109,9 109,9 109,9 109,9 109,9 109,9 109,9 109,9 110,6 114,3 114,3 114,3 114,3 114,3 114,3 114,3 114,3 114,3 114,3 114,3 114,3 119,01 119,01 119,01 119,01 119,01 119,01 119,01 119,01 119,01 119,01 119,01 121,27 123,54 123,54 123,54 123,54 123,54 123,54 123,54 123,54 123,54 123,54 123,54 123,54 125,24 125,24 125,24 125,24 125,24 125,24 125,24 125,24 125,24 125,24 125,24 125,24 128,35 128,35 128,35 128,35 128,35 128,35 128,35
 
Text written by user:
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0267675815717632
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3104.7104.70
4104.7104.70
5106104.71.30000000000000
6107106.0347978560430.965202143956702
7107107.060633983165-0.060633983164891
8107107.059010958075-0.0590109580745093
9107107.057431377441-0.0574313774406221
10107107.055894078360-0.0558940783601969
11107107.054397929058-0.054397929058311
12107107.052941828055-0.0529418280549123
13107107.051524703354-0.0515247033538913
14107107.050145511654-0.0501455116539091
15107107.048803237580-0.048803237580259
16107107.047496892937-0.0474968929373603
17107.6107.0462255159810.553774484018746
18109.9107.6610487196552.23895128034543
19109.9110.020980030686-0.120980030686439
20109.9110.017741687846-0.117741687846475
21109.9110.014590027613-0.114590027612650
22109.9110.011522729701-0.111522729701221
23109.9110.008537535937-0.108537535936833
24109.9110.00563224859-0.105632248590055
25109.9110.002804728759-0.102804728759310
26109.9110.000052894796-0.100052894796278
27109.9109.997374720773-0.097374720773331
28109.9109.994768234992-0.094768234992003
29110.6109.9922315185310.607768481468554
30114.3110.7085000109363.59149998906410
31114.3114.504635779858-0.204635779858151
32114.3114.499158174928-0.1991581749283
33114.3114.493827192235-0.193827192235219
34114.3114.488638907056-0.188638907056244
35114.3114.483589499724-0.183589499724008
36114.3114.478675252814-0.178675252814429
37114.3114.473892548410-0.173892548409853
38114.3114.469237865436-0.169237865435576
39114.3114.464707777068-0.164707777067505
40114.3114.460298948209-0.160298948209345
41114.3114.456008133037-0.156008133037275
42119.01114.4518321726104.55816782738967
43119.01119.283843301748-0.273843301747789
44119.01119.276513178830-0.266513178830365
45119.01119.269379265576-0.259379265576072
46119.01119.262436309927-0.252436309926750
47119.01119.255679200409-0.245679200409114
48119.01119.249102962372-0.239102962371675
49119.01119.242702754322-0.232702754322332
50119.01119.236473864364-0.226473864364038
51119.01119.230411706726-0.220411706725798
52119.01119.224511818387-0.214511818386654
53121.27119.218769855792.05123014421011
54123.54121.5336763259972.00632367400253
55123.54123.857380758601-0.317380758600706
56123.54123.848885243256-0.308885243255546
57123.54123.840617132310-0.300617132310393
58123.54123.832570338699-0.292570338699406
59123.54123.824738938293-0.28473893829279
60123.54123.817117165535-0.277117165535387
61123.54123.809699409202-0.269699409201976
62123.54123.802480208266-0.262480208266311
63123.54123.795454247881-0.255454247880564
64123.54123.788616355463-0.248616355462573
65123.54123.781961496888-0.241961496887654
66125.24123.7754847727821.46451522721750
67125.24125.51468630359-0.274686303590116
68125.24125.507333615552-0.267333615552118
69125.24125.500177741191-0.260177741190958
70125.24125.493213412280-0.253213412280473
71125.24125.486435501612-0.246435501612183
72125.24125.479839019221-0.239839019220611
73125.24125.473419108710-0.233419108709526
74125.24125.467171043677-0.227171043676734
75125.24125.461090224234-0.221090224234374
76125.24125.455172173622-0.215172173622463
77125.24125.449412534913-0.209412534913056
78128.35125.4438070678032.90619293219738
79128.35128.631598824178-0.281598824178502
80128.35128.624061104682-0.274061104681778
81128.35128.616725151707-0.266725151706567
82128.35128.609585564451-0.259585564451015
83128.35128.602637086680-0.252637086679727
84128.35128.595874602854-0.245874602853974


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85128.589293134366126.862852891432130.315733377299
86128.828586268731126.354138023071131.303034514392
87129.067879403097125.996859077791132.138899728403
88129.307172537463125.714167906135132.900177168791
89129.546465671828125.476734149762133.616197193895
90129.785758806194125.269728005185134.301789607203
91130.025051940560125.084463706656134.965640174463
92130.264345074925124.915362033262135.613328116589
93130.503638209291124.758603147685136.248673270897
94130.742931343657124.611446356432136.874416330881
95130.982224478022124.471853393146137.492595562898
96131.221517612388124.33826477553138.104770449246
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211793852zg9xmwv9l593qcr/14arq1211793782.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211793852zg9xmwv9l593qcr/14arq1211793782.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211793852zg9xmwv9l593qcr/23lc11211793782.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211793852zg9xmwv9l593qcr/23lc11211793782.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211793852zg9xmwv9l593qcr/3ga5g1211793782.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t1211793852zg9xmwv9l593qcr/3ga5g1211793782.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=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