Home » date » 2010 » Aug » 19 »

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 13:03:28 +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/19/t1282223215fg3ame2ox2mf9wr.htm/, Retrieved Thu, 19 Aug 2010 15:07:22 +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/19/t1282223215fg3ame2ox2mf9wr.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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.980528379652752
beta0.0160501661027135
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
391910
48990-1
58788.0037339769854-1.00373397698540
68685.98801027620770.0119897237923254
78784.96842117992552.03157882007453
88985.9610687707173.03893122928294
99087.98927960293672.01072039706328
109089.0409445344080.959055465592002
119189.07651542756791.92348457243214
129390.08800754436062.91199245563942
139392.11458759288780.885412407112241
148792.1679826948873-5.16798269488729
158986.2045202375732.79547976242705
169288.09345298348093.9065470165191
179891.13329854745126.86670145254875
189297.1837252426362-5.18372524263619
199291.33678695711270.663213042887264
208791.2333750049651-4.23337500496513
219286.26209616238475.73790383761535
229891.15824029062646.84175970937362
2310197.2444196024473.75558039755299
24102100.3636164992441.63638350075622
25102101.4306335165970.569366483402618
2690101.460370553521-11.4603705535213
278789.5142498014155-2.51424980141554
289286.30048596785265.69951403214738
2910591.230247596037313.7697524039627
3090104.289810430864-14.2898104308641
318889.6112876452242-1.61128764522421
328387.3390583926644-4.33905839266441
339882.323885955542915.6761140444571
3410997.18086320879411.8191367912061
35118108.4419701652229.55802983477786
36118117.6364184462240.363581553776100
37115117.821171169280-2.82117116928025
38107114.838784879479-7.8387848794786
39101106.813121947869-5.8131219478692
40111100.68219416827910.3178058317211
41128110.53047681516217.4695231848377
42115127.666150415616-12.6661504156162
43111115.053605452864-4.05360545286425
44105110.822111050179-5.82211105017912
45120104.76492041243115.2350795875688
46132119.59466703989212.4053329601081
47135131.8449974978123.15500250218807
48142135.0747687247606.92523127523967
49139142.110343081477-3.11034308147725
50127139.256802505169-12.2568025051685
51113127.242005704005-14.2420057040052
52130113.05652522047816.943474779522
53143129.71594374754713.2840562524532
54139142.996258295498-3.99625829549751
55137139.269842332020-2.26984233201986
56134137.200504246709-3.20050424670862
57139134.1682573477704.83174265222971
58157139.08789672829617.9121032717042
59152157.115095205459-5.11509520545908
60153152.4829725277620.517027472238311
61147153.381442767199-6.38144276719882
62132147.415338290274-15.4153382902737
63117132.348641777841-15.3486417778411
64123117.1057916382845.89420836171597
65139122.78491987437016.2150801256298
66134138.839142925832-4.83914292583168
67134134.172946058252-0.172946058252222
68128134.079365880996-6.0793658809956
69118128.098698553294-10.0986985532942
70144118.01803175688825.9819682431121
71140143.724377661202-3.72437766120177
72151140.24419542317810.7558045768222
73144151.131513828580-7.13151382857978
74135144.367575680336-9.36757568033582
75122135.263691862564-13.2636918625639
76124122.1308163054981.8691836945015
77146123.86557124425122.134428755749
78146145.8193178319510.180682168049259
79147146.2496363622290.750363637771272
80148147.2503526962540.749647303745604
81132148.262164326352-16.2621643263521
82161132.33748372137228.6625162786277
83159160.913807855457-1.91380785545707
84173159.47905960511813.5209403948819


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85173.391307784884154.584681314348192.197934255419
86174.045890187874147.498913051365200.592867324383
87174.700472590865142.035915484475207.365029697254
88175.355054993855137.400367725493213.309742262217
89176.009637396846133.281752146576218.737522647116
90176.664219799836129.520925825549223.807513774123
91177.318802202827126.023700576817228.613903828836
92177.973384605817122.729025355155233.21774385648
93178.627967008808119.594750086866237.66118393075
94179.282549411798116.590388314423241.974710509173
95179.937131814789113.693086674408246.18117695517
96180.591714217779110.885220549799250.298207885760
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282223215fg3ame2ox2mf9wr/10jqg1282223005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282223215fg3ame2ox2mf9wr/10jqg1282223005.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282223215fg3ame2ox2mf9wr/2aspi1282223005.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282223215fg3ame2ox2mf9wr/2aspi1282223005.ps (open in new window)


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