Home » date » 2010 » Aug » 18 »

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, 18 Aug 2010 12:07:22 +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/18/t1282133203yisx0d6e8e9dwel.htm/, Retrieved Wed, 18 Aug 2010 14:06:44 +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/18/t1282133203yisx0d6e8e9dwel.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:
Magali De Reu
 
Dataseries X:
» Textbox « » Textfile « » CSV «
120 119 118 116 114 113 114 116 117 117 118 120 123 125 120 116 111 108 113 112 126 124 124 118 119 122 114 108 104 101 107 104 123 125 134 131 127 124 123 117 112 118 123 124 144 148 152 154 146 132 136 128 120 124 126 121 140 142 142 139 131 117 122 112 98 103 108 102 126 129 126 126 112 99 106 104 90 98 99 91 118 115 119 123
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.989880786698701
beta0.00360535147989007
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
31181180
4116117-1
5114115.006550345142-1.00655034514206
6113113.003024384004-0.0030243840043056
7114111.9928586971222.00714130287761
8116112.9796806244533.02031937554719
9117114.9802071810732.01979281892662
10117115.9975400969931.00245990300682
11118116.0114123529971.98858764700346
12120117.0085305231482.99146947685203
13123119.0090583081613.990941691839
14125122.0131875803582.98681241964178
15120124.034008118388-4.03400811838775
16116119.090656455834-3.09065645583438
17111115.070080333726-4.07008033372648
18108110.065465752751-2.06546575275068
19113107.037809255265.9621907447401
20112111.977853959560.0221460404395657
21126111.03804157524114.9619584247589
22124124.940259684065-0.940259684064742
23124123.0978219582240.902178041776153
24118123.082397692369-5.08239769236896
25119117.1248184834441.87518151655634
26122118.0611055309753.93889446902489
27114121.05427977447-7.05427977446952
28108113.140346255024-5.14034625502431
29104107.10263353542-3.10263353541953
30101103.070940595729-2.07094059572874
31107100.0531097608596.94689023914121
32104105.986648942506-1.98664894250591
33123103.06995924286619.930040757134
34125121.9193072728073.08069272719256
35134124.1008040056939.89919599430729
36131133.067135042123-2.06713504212334
37127130.180847565882-3.18084756588223
38124126.180765434869-2.18076543486922
39123123.162862526143-0.1628625261434
40117122.141861701305-5.1418617013048
41112116.17389462948-4.17389462948026
42118111.1492034845696.85079651543133
43123117.0620918728425.93790812715828
44124122.092521196411.90747880358957
45144123.14011351079820.859886489202
46148143.0227762395514.97722376044925
47152147.2012593468964.79874065310435
48154151.2201915282512.77980847174913
49146153.250542303578-7.25054230357847
50132145.326165332996-13.3261653329964
51136131.3400865312284.65991346877232
52128135.174712180182-7.17471218018213
53120127.268863679613-7.26886367961336
54124119.2438748025794.75612519742128
55126123.1391653589652.86083464103531
56121125.168554150032-4.16855415003194
57140120.2248090144119.7751909855896
58142139.0530921996022.94690780039755
59142141.2338983120650.766101687934878
60139141.258700470207-2.25870047020669
61131138.28124808425-7.2812480842498
62117130.306086500425-13.3060865004248
63122116.3195654570295.68043454297148
64112121.147709522712-9.14770952271184
6598111.265111706129-13.2651117061293
6610397.25943514227385.74056485772621
67108102.0875999663255.91240003367457
68102107.106961705752-5.1069617057522
69126101.20024290461624.7997570953845
70129124.9861175013794.01388249862056
71126128.210779217522-2.21077921752237
72126125.26587791760.734122082400063
73112125.23869781812-13.2386978181196
7499111.332844596001-12.3328445960008
7510698.2796637776357.72033622236505
76104105.104294225687-1.10429422568701
7790103.189651462995-13.1896514629955
789889.26487364356458.73512635643553
799997.07418665454651.92581334545352
809198.1499645192691-7.14996451926913
8111890.21628697064527.783713029355
82115116.961942044908-1.96194204490753
83119114.2559427608974.74405723910347
84123118.205014238574.7949857614305


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85122.221611553997106.5114034321137.931819675894
86121.4917445916999.3468020848194143.636687098562
87120.76187762938493.6373575168301147.886397741938
88120.03201066707888.6817273428426151.382293991312
89119.30214370477184.2064632680227154.397824141519
90118.57227674246580.0710372698533157.073516215076
91117.84240978015876.1919293687375159.492890191579
92117.11254281785272.5147367596157161.710348876088
93116.38267585554569.0016977291876163.763653981903
94115.65280889323965.6253448892086165.680272897269
95114.92294193093262.3649664013723167.480917460492
96114.19307496862659.2044917294697169.181658207782
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/18/t1282133203yisx0d6e8e9dwel/1frtj1282133237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/18/t1282133203yisx0d6e8e9dwel/1frtj1282133237.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/18/t1282133203yisx0d6e8e9dwel/2qis41282133237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/18/t1282133203yisx0d6e8e9dwel/2qis41282133237.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/18/t1282133203yisx0d6e8e9dwel/3qis41282133237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/18/t1282133203yisx0d6e8e9dwel/3qis41282133237.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