Home » date » 2010 » Aug » 20 »

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, 19 Aug 2010 23:27:41 +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/20/t1282260487n4w4f5bb7oxnsdh.htm/, Retrieved Fri, 20 Aug 2010 01:28:10 +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/20/t1282260487n4w4f5bb7oxnsdh.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:
Vanhille Olivier
 
Dataseries X:
» Textbox « » Textfile « » CSV «
31 30 29 27 25 24 25 27 28 28 29 31 31 27 25 16 20 21 25 24 28 27 23 36 37 30 27 22 22 25 33 35 35 29 25 34 31 29 21 19 18 25 23 22 20 15 17 25 26 26 23 24 24 42 40 45 47 40 39 49 55 54 48 44 48 62 57 60 56 57 54 62 65 68 69 67 72 82 72 77 79 78 76 79
 
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.915448264006933
beta0.0348360292320682
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
329290
42728-1
52526.0526611535077-1.05266115350767
62424.0235437681110-0.0235437681110433
72522.93577928215622.06422071784385
82723.82508437159443.17491562840556
92825.83242309747962.16757690252039
102826.98672062548951.01327937451050
112927.11663255480881.88336744519118
123128.10312678282712.89687321717292
133130.1098160846490.890183915350995
142730.3078736322964-3.30787363229643
152526.5573366688268-1.55733666882682
161624.3596613561507-8.35966135615068
172015.66821524722424.33178475277585
182118.73327458541932.26672541458069
192519.98016613119785.01983386880217
202423.90747145807220.0925285419277877
212823.32703446632594.67296553367407
222727.0887741598699-0.088774159869942
232326.4885564576383-3.48855645763829
243622.664761855445813.3352381445542
253734.66754932785092.33245067214909
263036.6722373199588-6.67223731995882
272730.2208177871532-3.22081778715321
282226.8262805187025-4.82628051870249
292221.80811228274780.191887717252165
302521.38993685796763.61006314203244
313324.2160512082828.783948791718
323532.05871543826122.94128456173879
333534.64652211965970.353477880340307
342934.8765982824861-5.87659828248615
352529.215953895161-4.21595389516102
363424.94109430389739.05890569610271
373133.1075756597207-2.10757565972067
382930.9845092278692-1.98450922786923
392128.9108165921893-7.91081659218934
401921.1596156188111-2.15961561881108
411818.6044701924385-0.604470192438495
422517.45370304038517.5462969596149
432324.0051973336536-1.00519733365357
442222.6961846930013-0.696184693001253
452021.6478554024131-1.64785540241308
461519.6757697443529-4.67576974435294
471714.78267213768732.21732786231272
482516.27056064576438.72943935423572
492623.99833721991932.00166278008074
502625.63101660063370.368983399366336
512325.7808295721264-2.78082957212639
522422.95846945207191.04153054792814
532423.66849728418030.331502715819653
544223.739103184691518.2608968153085
554040.8054924244217-0.805492424421665
564540.3919011111584.60809888884199
574745.08112752538001.91887247461996
584047.3697002481117-7.36970024811174
593940.9200411630615-1.92004116306153
604939.39803179576429.6019682042358
615548.73003826067016.2699617393299
625455.2117179236464-1.21171792364638
634854.805664536902-6.80566453690197
644449.0616058278233-5.0616058278233
654844.75272507813613.24727492186387
666248.153752275339113.8462477246609
675761.6991556302958-4.69915563029581
686058.11734286840941.88265713159058
695660.6208782059573-4.6208782059573
705757.0234009112572-0.0234009112572053
715457.6339299561109-3.63392995611092
726254.82331831169527.1766816883048
736562.13813088936532.86186911063474
746865.5942224562272.40577754377293
756968.70950743717820.290492562821754
766769.8976224314738-2.89762243147378
777268.07477622162463.92522377837544
788272.6230704028469.376929597154
797282.4611549585225-10.4611549585225
807773.8048871213853.19511287861501
817977.75211997937431.24788002062567
827879.9565575186297-1.95655751862971
837679.1651025165198-3.16510251651981
847977.16635013123941.83364986876062


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8579.802173101653569.814273261192289.7900729421147
8680.759384482914167.0012531544794.5175158113582
8781.716595864174764.836332507310598.596859221039
8882.673807245435463.0032100717013102.344404419169
8983.63101862669661.3721688342546105.889868419137
9084.588230007956759.875516606963109.300943408950
9185.545441389217358.4729326072083112.617950171226
9286.50265277047857.1382714841564115.867034056799
9387.459864151738655.8535422638901119.066186039587
9488.417075532999254.605809266997122.228341799001
9589.374286914259953.3854521465961125.363121681924
9690.331498295520552.1851223541746128.477874236866
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282260487n4w4f5bb7oxnsdh/112r11282260459.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282260487n4w4f5bb7oxnsdh/112r11282260459.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/20/t1282260487n4w4f5bb7oxnsdh/2pqjg1282260459.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282260487n4w4f5bb7oxnsdh/2pqjg1282260459.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/20/t1282260487n4w4f5bb7oxnsdh/3pqjg1282260459.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282260487n4w4f5bb7oxnsdh/3pqjg1282260459.ps (open in new window)


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