Home » date » 2010 » Aug » 17 »

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: Tue, 17 Aug 2010 14:49:25 +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/17/t1282056551x95rzg3b4t7z7c1.htm/, Retrieved Tue, 17 Aug 2010 16:49:12 +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/17/t1282056551x95rzg3b4t7z7c1.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:
Quaglia Laura
 
Dataseries X:
» Textbox « » Textfile « » CSV «
93 92 91 89 87 86 87 89 90 90 91 93 93 87 89 92 98 92 92 87 92 98 101 102 102 90 87 92 105 90 88 83 98 109 118 118 115 107 101 111 128 115 111 105 120 132 135 142 139 127 113 130 143 139 137 134 139 157 152 153 147 132 117 123 139 134 134 128 118 144 140 151 144 135 122 124 146 146 147 148 132 161 159 173
 
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.975824090716957
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
29293-1
39192.024175909283-1.02417590928304
48991.0247603838727-2.0247603838727
58789.0489504233604-2.04895042336041
68687.0495352395606-1.04953523956061
78786.0253734687410.97462653125902
88986.97643751739542.02356248260456
99088.9510785369921.04892146300801
109089.97464136986530.0253586301347184
119189.99938693205831.00061306794169
129390.9758092692422.02419073075798
139392.95106334852160.0489366514783853
148792.9988169119532-5.99881691195324
158987.1450268534691.85497314653104
169288.9551543374873.04484566251301
179891.92638808748226.07361191251778
189297.8531649093826-5.85316490938256
199292.141505583868-0.141505583867925
208792.0034210261586-5.00342102615863
219287.12096225283334.87903774716672
229891.8820448260366.11795517396405
2310197.85209287071653.14790712928348
24102100.9238964828111.076103517189
25102101.9739842189890.0260157810107273
2690101.999371044838-11.9993710448384
278790.2900957058336-3.29009570583359
289287.07954105531684.92045894468323
2910591.881043430922413.1189565690776
3090104.682837296098-14.6828372960978
318890.3549709424881-2.35497094248814
328388.0569335638698-5.05693356386979
339883.122255967090514.8777440329095
3410997.64031700992411.359682990076
35118108.7253693345489.2746306654522
36118117.7757773703980.224222629601698
37115117.994579214048-2.99457921404755
38107115.07239667542-8.0723966754197
39101107.195157529722-6.19515752972168
40111101.1497735664339.85022643356729
41128110.76186181932517.2381381806753
42115127.583252335135-12.5832523351354
43111115.30421156694-4.30421156693987
44105111.104058228377-6.10405822837737
45120105.14757115798814.8524288420123
46132119.64092902768312.3590709723173
47135131.7012082213513.29879177864944
48142134.9202487092167.07975129078429
49139141.828840575047-2.82884057504748
50127139.068389793119-12.0683897931185
51113127.291764296831-14.2917642968308
52130113.34551639713516.6544836028652
53143129.59736271526113.4026372847388
54139142.675979056851-3.67597905685062
55137139.088870136205-2.08887013620478
56134137.050500334917-3.05050033491693
57139134.0737486193654.92625138063516
58157138.88090339351618.1190966064837
59152156.561954364151-4.56195436415095
60153152.1102893948610.889710605138902
61147152.978490437122-5.97849043712199
62132147.144535442457-15.1445354424574
63117132.366132914991-15.3661329149907
64123117.3714902353845.628509764616
65139122.86392565853216.1360743414681
66134138.609895730536-4.60989573053624
67134134.111448420986-0.111448420985738
68128134.002694366915-6.00269436691548
69118128.145120594468-10.1451205944684
70144118.24526751515725.7547324848426
71140143.377355923837-3.3773559238374
72151140.08165065043110.9183493495688
73144150.736038976604-6.73603897660425
74135144.162849867225-9.16284986722542
75122135.221520227164-13.2215202271642
76124122.3196422735961.68035772640415
77146123.95937582404322.0406241759566
78146145.467147869380.532852130619574
79147145.9871178152291.01288218477114
80148146.9755126521871.02448734781345
81132147.975232086818-15.9752320868176
82161132.38621576170628.6137842382935
83159160.30823574801-1.30823574801045
84173159.03162778876513.9683722112353


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85172.662301900589154.070183847756191.254419953423
86172.662301900589146.684963317133198.639640484045
87172.662301900589140.976699711764204.347904089415
88172.662301900589136.150212775787209.174391025392
89172.662301900589131.891136618658213.433467182521
90172.662301900589128.036713000995217.287890800183
91172.662301900589124.489711656504220.834892144675
92172.662301900589121.186543363064224.138060438115
93172.662301900589118.082919500249227.24168430093
94172.662301900589115.146527982545230.178075818634
95172.662301900589112.35293682699232.971666974188
96172.662301900589109.683140412287235.641463388892
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282056551x95rzg3b4t7z7c1/1g41y1282056560.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282056551x95rzg3b4t7z7c1/1g41y1282056560.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/17/t1282056551x95rzg3b4t7z7c1/2rdi01282056560.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282056551x95rzg3b4t7z7c1/2rdi01282056560.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/17/t1282056551x95rzg3b4t7z7c1/3rdi01282056560.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282056551x95rzg3b4t7z7c1/3rdi01282056560.ps (open in new window)


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