Home » date » 2010 » Aug » 16 »

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: Mon, 16 Aug 2010 19:54:13 +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/16/t1281988470340uuhfym87m2a1.htm/, Retrieved Mon, 16 Aug 2010 21:54:35 +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/16/t1281988470340uuhfym87m2a1.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:
De Cock Nicola
 
Dataseries X:
» Textbox « » Textfile « » CSV «
76 75 74 72 70 69 70 72 73 73 74 76 74 67 66 58 55 58 64 68 66 76 75 88 85 83 77 66 65 65 63 62 57 68 69 79 74 76 82 75 75 76 78 77 67 74 68 87 76 88 95 96 96 105 108 113 101 107 102 116 105 121 134 140 131 141 131 128 123 129 125 144 135 141 156 159 146 154 145 133 126 127 122 148
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.796773318034331
beta0.0131562838165992
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
137479.5803952991453-5.58039529914534
146767.9006174409027-0.900617440902664
156665.98178759041250.0182124095874769
165857.50358109490570.496418905094266
175554.07826719105170.921732808948285
185856.62649419171571.3735058082843
196463.75741307628990.242586923710114
206865.73978890461672.26021109538333
216668.6034466731327-2.60344667313272
227666.81458087626729.18541912373277
237575.806722316124-0.806722316123938
248877.70393553876110.296064461239
258583.04639707800771.95360292199234
268378.55576092748444.44423907251557
277781.3735259620734-4.37352596207342
286669.7384721854195-3.73847218541947
296563.22614097581541.77385902418457
306566.7548600002482-1.75486000024823
316371.3402825192019-8.3402825192019
326266.9810564008034-4.98105640080344
335763.0976976245827-6.09769762458272
346860.89494644776197.10505355223808
356966.15145923255842.84854076744156
367973.20840851527285.79159148472721
377473.21013436443270.789865635567338
387668.2299471187477.77005288125302
398271.872009825274910.1279901747251
407572.03883339179232.96116660820775
417572.17347420968932.8265257903107
427676.0234606411593-0.0234606411592608
437880.8678924035702-2.86789240357020
447781.8267798371326-4.82677983713259
456778.116205179314-11.116205179314
467474.822177474344-0.822177474343988
476873.0385343936094-5.03853439360944
488774.467789471059712.5322105289403
497678.9528460323263-2.95284603232629
508872.498962485911115.5010375140889
519582.950940075624912.0490599243751
529683.382945579741212.6170544202588
539691.47601073115064.52398926884938
5410596.40932444392628.5906755560738
55108107.9395309530190.060469046980586
56113111.2645825296361.73541747036437
57101112.004223348916-11.0042233489161
58107111.392425529664-4.39242552966425
59102106.370787093354-4.37078709335414
60116112.3734885652283.62651143477159
61105106.992949350156-1.99294935015591
62121105.44147388585315.5585261141473
63134115.62559203019118.3744079698090
64140121.66707278578818.3329272142123
65131133.183758226321-2.18375822632143
66141134.0427545345586.95724546544227
67131142.964577073295-11.9645770732949
68128137.349388612978-9.34938861297812
69123126.852321104405-3.85232110440545
70129133.542036585655-4.54203658565527
71125128.663395936463-3.66339593646279
72144137.1202139106216.87978608937868
73135133.4890971238421.51090287615850
74141138.6323794999732.36762050002744
75156139.07637742114816.9236225788518
76159144.13605220726514.8639477927345
77146148.865416773383-2.86541677338283
78154151.17804332842.82195667159999
79145153.055272142834-8.0552721428335
80133151.223082462648-18.2230824626477
81126134.816516929158-8.8165169291583
82127137.402361160027-10.4023611600268
83122127.963138298558-5.96313829855828
84148136.63633641666311.3636635833369


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85135.439853439265120.095201830217150.784505048313
86139.490658625666119.770171825321159.211145426010
87140.918810976790117.544729318343164.292892635238
88131.810654082974105.205008806137158.416299359810
89120.67296936009091.1181499950518150.227788725129
90126.03377417538793.733922765828158.333625584945
91123.03168330915488.141981861168157.921384757140
92125.21547241029387.8581211625884162.572823657998
93125.09538592522785.3691550088904164.821616841564
94134.33127761784492.3176107314006176.344944504287
95134.13915852213389.906277246782178.372039797484
96151.204015049935104.809792228174197.598237871695
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/16/t1281988470340uuhfym87m2a1/1y79g1281988451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t1281988470340uuhfym87m2a1/1y79g1281988451.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/16/t1281988470340uuhfym87m2a1/2y79g1281988451.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/16/t1281988470340uuhfym87m2a1/2y79g1281988451.ps (open in new window)


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