Home » date » 2010 » Aug » 11 »

Tijdreeks 2 stap 27

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 11 Aug 2010 21:53:03 +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/Aug/11/t1281563639kxh8szcxmek1y1o.htm/, Retrieved Wed, 11 Aug 2010 23:53:59 +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/Aug/11/t1281563639kxh8szcxmek1y1o.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:
Marianne Nykjaer
 
Dataseries X:
» Textbox « » Textfile « » CSV «
190 189 188 186 184 183 184 186 187 187 188 190 190 190 197 187 185 182 182 191 183 192 178 181 179 175 183 179 178 175 170 179 169 178 161 168 167 165 181 181 184 181 177 183 162 166 151 162 159 152 164 158 160 161 151 149 131 138 130 147 151 140 149 143 145 139 136 133 118 130 121 142 148 131 137 128 130 119 107 113 93 106 98 118
 
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.568079894207184
beta0.000575352159398017
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
31881880
4186187-1
5184185.431593259799-1.43159325979897
6183183.617539155709-0.617539155709011
7184182.2657309807501.73426901924967
8186182.2505045838993.74949541610104
9187183.381313292933.61868670706988
10187184.4389949576272.56100504237335
11188184.8966659883763.10333401162416
12190185.6634375148924.33656248510823
13190187.1321987302332.86780126976689
14190187.7675235591042.23247644089611
15197188.0426628023848.95733719761637
16187192.140987902678-5.14098790267758
17185188.228657660198-3.22865766019768
18182185.401628505733-3.40162850573324
19182182.475226282986-0.47522628298637
20191181.2110989995389.78890100046155
21183185.781015520477-2.78101552047681
22192183.2093062302268.7906937697743
23178187.214125532419-9.2141255324185
24181180.9877573901850.0122426098149049
25179180.002707487556-1.00270748755614
26175178.440757110062-3.44075711006178
27183175.4926751632657.50732483673465
28179178.7664321896240.23356781037603
29178177.9081904346630.0918095653368596
30175176.969448678446-1.9694486784461
31170174.859103850756-4.8591038507565
32179171.1056158398587.89438416014173
33169174.599708196800-5.59970819680032
34178170.4262477529987.57375224700206
35161173.738840775034-12.7388407750336
36168165.5080944629642.49190553703585
37167165.9304433738931.06955662610659
38165165.545134046275-0.545134046274711
39181164.24237323743316.7576267625668
40181172.7744401215448.22555987845578
41184176.4622998440547.5377001559458
42181179.761863955271.23813604472991
43177179.483177032441-2.48317703244112
44183177.0896753539565.91032464604399
45162179.466284986945-17.4662849869454
46166168.557403907428-2.55740390742821
47151166.117122537089-15.1171225370889
48162156.5369765654005.46302343459979
49159158.6497833074010.350216692599275
50152157.858221803227-5.85822180322677
51164153.53785647882510.4621435211753
52158158.492182071028-0.492182071028481
53160157.2234146719642.77658532803605
54161157.8124758269393.18752417306109
55151158.636024907028-7.63602490702755
56149153.308437566603-4.30843756660343
57131149.869777494934-18.8697774949343
58138138.152945466085-0.152945466085100
59130137.068719406465-7.06871940646536
60147132.05347083581414.946529164186
61151139.54952755730211.4504724426977
62140145.063287287351-5.0632872873507
63149141.1942572218257.80574277817519
64143144.638415670228-1.63841567022797
65145142.7170020767882.28299792321172
66139143.024010891378-4.0240108913776
67136139.746819573972-3.7468195739722
68133136.625870437866-3.62587043786621
69118133.572444972977-15.5724449729770
70130123.727320918796.27267908120999
71121126.294022826277-5.29402282627674
72142122.28818360768019.7118163923197
73148132.49410161516515.5058983848348
74131140.315790206682-9.31579020668195
75137134.0337317403782.96626825962232
76128134.729833261155-6.7298332611553
77130129.9155748367470.0844251632531439
78119128.972387211203-9.97238721120311
79107122.312867241108-15.3128672411078
80113112.6145229912970.385477008703418
8193111.834218473762-18.8342184737621
82106100.1294354909995.87056450900097
8398102.460861781987-4.46086178198679
8411898.921754503778419.0782454962216


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85108.76097644601693.0027355991867124.519217292846
86107.76223070510289.6362377274199125.888223682783
87106.76348496418786.5428672163812126.984102711993
88105.76473922327383.6448954247714127.884583021774
89104.76599348235880.8956353538283128.636351610888
90103.76724774144478.2644448033138129.270050679574
91102.76850200052975.7299291040873129.807074896971
92101.76975625961573.2764509061585130.263061613071
93100.77101051870070.8921703835138130.649850653887
9499.772264777785768.567867797423130.976661758148
9598.773519036871266.296197529809131.250840543933
9697.774773295956764.0711947771293131.478351814784
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/11/t1281563639kxh8szcxmek1y1o/1mzje1281563579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/11/t1281563639kxh8szcxmek1y1o/1mzje1281563579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/11/t1281563639kxh8szcxmek1y1o/2xq0z1281563579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/11/t1281563639kxh8szcxmek1y1o/2xq0z1281563579.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/11/t1281563639kxh8szcxmek1y1o/3xq0z1281563579.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/11/t1281563639kxh8szcxmek1y1o/3xq0z1281563579.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=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