Home » date » 2010 » Aug » 12 »

TIJDREEKS B - 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: Thu, 12 Aug 2010 10:59:46 +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/12/t12816107728yhhb92ajyv9j1b.htm/, Retrieved Thu, 12 Aug 2010 12:59:36 +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/12/t12816107728yhhb92ajyv9j1b.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:
Hoes Isabelle
 
Dataseries X:
» Textbox « » Textfile « » CSV «
158 157 156 154 152 151 152 154 155 155 156 158 156 152 145 141 140 145 143 141 144 139 141 142 141 132 122 122 127 128 122 123 128 128 128 129 124 121 109 110 107 107 104 110 114 118 117 122 113 106 102 111 106 110 105 104 106 110 107 111 101 105 108 124 122 128 124 121 125 134 126 126 111 117 118 128 127 129 124 113 120 127 114 107
 
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.651858880178058
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13156160.703792735043-4.70379273504273
14152153.644722364827-1.64472236482683
15145145.663067513859-0.663067513859033
16141141.446313094764-0.446313094764434
17140140.537518635241-0.537518635241184
18145145.569271034237-0.569271034236692
19143141.2886586833131.7113413166866
20141143.78635041225-2.7863504122499
21144142.7271818473761.27281815262432
22139143.647351690988-4.64735169098773
23141141.750072916546-0.75007291654552
24142143.101603253086-1.10160325308632
25141138.4614017479132.53859825208713
26132137.188336440680-5.18833644068019
27122127.238499705538-5.23849970553798
28122120.1146703078351.88532969216513
29127120.6940255053796.30597449462076
30128130.175715356769-2.17571535676947
31122125.641902946422-3.64190294642171
32123123.084203429563-0.0842034295629617
33128125.1996168606212.80038313937911
34128125.0544889470072.94551105299306
35128129.463488174994-1.46348817499435
36129130.227590275046-1.22759027504605
37124126.772566839210-2.77256683920956
38121119.3473077063921.65269229360759
39109113.839392406047-4.83939240604742
40110109.4558225895980.544177410402057
41107110.699943994466-3.69994399446594
42107110.706362021562-3.7063620215618
43104104.664343801024-0.664343801023676
44110105.2861741481374.71382585186279
45114111.5334687719822.46653122801831
46118111.2212415196466.77875848035424
47117116.5940231945530.405976805447352
48122118.6588784023393.34112159766116
49113117.644140500555-4.64414050055491
50106110.539494126684-4.53949412668369
5110298.7349854832373.26501451676295
52111101.5085873125369.49141268746362
53106107.107490307248-1.10749030724834
54110108.8015879126671.19841208733287
55105107.015841880096-2.01584188009632
56104108.629048208371-4.62904820837105
57106108.003731742752-2.00373174275182
58110106.2787875007433.72121249925684
59107107.439853327636-0.439853327636115
60111109.9751912468511.02480875314947
61101104.670546159156-3.67054615915649
6210598.23697760820186.76302239179823
6310896.517185104476311.4828148955237
64124106.81529831780617.1847016821935
65122113.7392261040468.26077389595392
66128122.3428893640265.65711063597391
67124122.3445715988111.65542840118896
68121125.441163484024-4.441163484024
69125125.852301958648-0.852301958647857
70134126.871015945647.12898405436003
71126128.804829805718-2.80482980571782
72126130.308445903248-4.30844590324787
73111119.892625290399-8.8926252903986
74117113.6873523238203.31264767618043
75118111.3615562693516.63844373064903
76128120.4868843709887.51311562901176
77127117.9995166903439.00048330965656
78129126.1789238574282.82107614257187
79124122.9387616888081.06123831119189
80113123.525551161327-10.5255511613273
81120121.219957768385-1.21995776838538
82127124.7776259011392.22237409886121
83114120.054653408804-6.05465340880444
84107118.916372539674-11.9163725396738


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85101.94531604382092.080500692086111.810131395554
86105.78593723920094.0103058742817117.561568604119
87102.45860874281489.0415894702222115.875628015407
88107.56111760223992.6826997334002122.439535471077
89100.69407263094584.4854875477726116.902657714116
90100.85512909575183.417550636656118.292707554845
9195.16335147861576.5778718066847113.748831150545
9291.024525471894671.3580319676019110.691018976187
9398.819765776658978.1286595019078119.51087205141
94104.37109148523882.703770677356126.038412293121
9595.31787107616872.7164617592613117.919280393075
9696.085664335664372.5872683217018119.584060349627
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/12/t12816107728yhhb92ajyv9j1b/1aglo1281610784.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t12816107728yhhb92ajyv9j1b/1aglo1281610784.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/12/t12816107728yhhb92ajyv9j1b/28tsx1281610784.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t12816107728yhhb92ajyv9j1b/28tsx1281610784.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/12/t12816107728yhhb92ajyv9j1b/38tsx1281610784.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t12816107728yhhb92ajyv9j1b/38tsx1281610784.ps (open in new window)


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