Home » date » 2009 » Jun » 02 »

exponentiol smoothing - sigaretten - caroline thys

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 02 Jun 2009 09:44:56 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/02/t12439575339kyaz6ceny42vfj.htm/, Retrieved Tue, 02 Jun 2009 17:45:33 +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/2009/Jun/02/t12439575339kyaz6ceny42vfj.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 «
106.07 106.07 106.07 106.07 106.07 106.2 107.5 108.31 108.53 108.61 108.62 108.62 108.62 108.62 110.1 110.74 110.77 110.77 110.78 110.78 110.78 110.84 110.84 110.84 110.84 110.84 111.01 112.66 114.04 114.16 114.2 114.2 114.23 114.23 114.23 114.23 114.23 114.23 115.97 116.96 117.08 117.08 117.08 117.63 119.12 119.47 119.5 119.52 119.49 119.49 119.5 119.5 119.56 122.35 122.92 122.92 123.04 123.04 123.04 123.06 123.33 128.21 129.57 129.79 131.66 135.01 136.01 136.31 136.37 136.4 136.4 136.4 137.34 142.18 143.79 144.08 144.08 144.09 144.09 144.11 144.11 144.15 144.15 144.16 144.2 144.38 144.38 144.28 144.46 144.53 144.53 145.34 147.98 150.42 150.53 150.64
 
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
R Framework
error message
Warning: there are blank lines in the 'Data' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.912394349585859
beta0.0280522073302993
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13108.62106.5169884203352.10301157966508
14108.62108.5321032689030.0878967310965066
15110.1110.234617744641-0.134617744641417
16110.74110.901450987309-0.161450987309451
17110.77110.930653037448-0.160653037448185
18110.77110.926647260655-0.156647260654680
19110.78110.787947354488-0.00794735448762651
20110.78111.719939359441-0.939939359441027
21110.78111.105905222161-0.325905222160614
22110.84110.8104042216860.029595778314075
23110.84110.7404955589460.0995044410535684
24110.84110.7313802715620.108619728438001
25110.84110.981899150867-0.141899150866962
26110.84110.7207984735410.119201526458681
27111.01112.415447209349-1.40544720934903
28112.66111.8491834016530.810816598347444
29114.04112.7124222068091.32757779319113
30114.16114.0489402795790.111059720421025
31114.2114.1526613251180.0473386748822264
32114.2115.065099160724-0.865099160723517
33114.23114.570732180148-0.34073218014764
34114.23114.282120240736-0.0521202407359311
35114.23114.1273900851900.102609914809790
36114.23114.1053593405240.124640659475560
37114.23114.339315024196-0.10931502419551
38114.23114.1152403379510.114759662049394
39115.97115.7025757893280.267424210672488
40116.96116.9246500960310.035349903969248
41117.08117.139651691333-0.0596516913332152
42117.08117.080106413129-0.000106413129444149
43117.08117.0499685103640.0300314896364142
44117.63117.858802189427-0.228802189426958
45119.12117.9892398962851.13076010371493
46119.47119.0930612541960.376938745804239
47119.5119.3715384357940.128461564205878
48119.52119.4025290795660.117470920433689
49119.49119.646361181752-0.156361181752075
50119.49119.4252939807280.0647060192721369
51119.5121.079187694063-1.57918769406268
52119.5120.613136997018-1.11313699701826
53119.56119.735993557495-0.175993557494678
54122.35119.5331745217432.8168254782574
55122.92122.0978632660390.82213673396123
56122.92123.685780969789-0.765780969789162
57123.04123.494749552160-0.454749552159853
58123.04123.077507473430-0.0375074734297982
59123.04122.9351853461740.104814653826082
60123.06122.9222637263760.137736273624370
61123.33123.1455903584590.184409641541293
62128.21123.2426466066094.96735339339098
63129.57129.4281535689540.141846431046389
64129.79130.804727386048-1.01472738604818
65131.66130.2696649080331.39033509196744
66135.01131.9623923834153.04760761658491
67136.01134.7294654933541.28053450664638
68136.31136.863746972248-0.553746972247865
69136.37137.152179022137-0.782179022136518
70136.4136.669465768531-0.269465768530750
71136.4136.504127863033-0.104127863033256
72136.4136.472284947038-0.0722849470375877
73137.34136.6934024941460.646597505854146
74142.18137.8374069788834.34259302111724
75143.79143.3180055923030.471994407697025
76144.08145.183920713335-1.10392071333521
77144.08145.008404497298-0.928404497297578
78144.09144.887975793587-0.797975793586716
79144.09143.9974211442780.0925788557218539
80144.11144.925313799889-0.815313799889253
81144.11144.985009562717-0.875009562716826
82144.15144.462951067344-0.312951067344301
83144.15144.261999563211-0.111999563210901
84144.16144.213755672225-0.0537556722247245
85144.2144.519250742944-0.319250742944433
86144.38145.101504902410-0.721504902409691
87144.38145.490871864122-1.11087186412220
88144.28145.595826178109-1.31582617810915
89144.46145.055643725257-0.595643725257219
90144.53145.07194655305-0.541946553050053
91144.53144.3197629524640.210237047535742
92145.34145.1074877269420.232512273057523
93147.98145.9778279979502.00217200205046
94150.42148.0560889055612.36391109443937
95150.53150.2965974087760.233402591223864
96150.64150.5562767927800.083723207220146


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
97150.967001580134148.798316128932153.135687031336
98151.839994870281148.863773277691154.816216462871
99152.917718259413149.273165210047156.562271308780
100154.121148005582149.878767475583158.363528535581
101154.964054812409150.177147464209159.750962160608
102155.653990657130150.357425393060160.950555921199
103155.544544249315149.785820313667161.303268184963
104156.279732299861150.047437889816162.512026709906
105157.237873790305150.53597825365163.939769326959
106157.572832559082150.436017864066164.709647254098
107157.446350755637149.903141624874164.9895598864
108157.457640068931148.927131069726165.988149068137
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t12439575339kyaz6ceny42vfj/1jltv1243957491.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t12439575339kyaz6ceny42vfj/1jltv1243957491.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t12439575339kyaz6ceny42vfj/2162o1243957491.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t12439575339kyaz6ceny42vfj/2162o1243957491.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t12439575339kyaz6ceny42vfj/3uk1l1243957491.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t12439575339kyaz6ceny42vfj/3uk1l1243957491.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