Home » date » 2011 » May » 18 »

Jonas Cloots, smoothing, eigen reeks

*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 May 2011 14:28:47 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/18/t1305728677lrwphkx2ximmsiw.htm/, Retrieved Wed, 18 May 2011 16:24:49 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
193.230 199.068 195.076 191.563 191.067 186.665 185.508 184.371 183.046 175.714 175.768 171.029 170.465 170.102 156.389 124.291 99.360 86.675 85.056 128.236 164.257 162.401 152.779 156.005 153.387 153.190 148.840 144.211 145.953 145.542 150.271 147.489 143.824 134.754 131.736 126.304 125.511 125.495 130.133 126.257 110.323 98.417 105.749 120.665 124.075 127.245 146.731 144.979 148.210 144.670 142.970 142.524 146.142 146.522 148.128 148.798 150.181 152.388 155.694 160.662 155.520 158.262 154.338 158.196 160.371 154.856 150.636 145.899 141.242 140.834 141.119 139.104 134.437 129.425 123.155 119.273 120.472 121.523 121.983 123.658 124.794 124.827 120.382 117.395 115.790 114.283 117.271 117.448 118.764 120.550 123.554 125.412 124.182 119.828 115.361 114.226 115.214 115.864 114.276 113.469
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.552989692908948
beta0.0295901195828147
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13170.465207.245518963675-36.7805189636754
14170.102187.558447053806-17.4564470538065
15156.389161.51912234837-5.13012234836955
16124.291122.0429338047432.24806619525653
1799.3694.0255926552425.33440734475802
1886.67580.11954509038466.55545490961539
1985.056130.497241356276-45.4412413562759
20128.23699.996077407736228.2399225922638
21164.257111.17734508374353.0796549162567
22162.401132.5523560892329.8486439107699
23152.779151.1644384093311.61456159066933
24156.005150.760033339265.24496666073952
25153.387140.54713232990712.8398676700929
26153.19158.197271180859-5.00727118085931
27148.84146.0155019382562.82449806174367
28144.211115.82971984857728.3812801514226
29145.953105.66447858772140.2885214122787
30145.542114.22654755418231.3154524458176
31150.271158.051387579526-7.78038757952632
32147.489184.926952533316-37.4379525333157
33143.824173.432384685126-29.6083846851264
34134.754139.8839698318-5.12996983180008
35131.736127.1466664569244.58933354307621
36126.304130.673137371871-4.36913737187135
37125.511119.0444483461116.46655165388854
38125.495125.593780731209-0.0987807312086346
39130.133120.10898209050910.0240179094909
40126.257105.92815564946720.3288443505326
41110.32397.10044807153113.2225519284691
4298.41786.70916738007911.7078326199209
43105.749101.9190189991653.82998100083454
44120.665121.851808429496-1.1868084294959
45124.075134.390873293255-10.3158732932555
46127.245123.2560322335183.98896776648211
47146.731120.8581597098525.8728402901501
48144.979133.45004789659111.5289521034087
49148.21137.01703034618511.1929696538152
50144.67144.883117628554-0.213117628554159
51142.97145.496081997442-2.52608199744199
52142.524130.41218042555512.1118195744453
53146.142115.16013858063530.9818614193645
54146.522115.49925568024131.0227443197592
55148.128139.7714018516368.35659814836379
56148.798161.941704836099-13.1437048360992
57150.181165.569189583037-15.3881895830371
58152.388159.722069264883-7.33406926488345
59155.694162.357959314038-6.66395931403792
60160.662151.5260349174739.13596508252749
61155.52154.5609441714290.959055828571394
62158.262152.4430977410465.81890225895393
63154.338156.23044388111-1.89244388110993
64158.196148.9232546324269.27274536757426
65160.371141.37290545298118.9980945470185
66154.856135.74387555665419.1121244433456
67150.636143.743154384486.89284561552034
68145.899155.914792482287-10.0157924822865
69141.242160.741487049079-19.4994870490792
70140.834156.626677459884-15.7926774598837
71141.119155.15172300185-14.0327230018497
72139.104147.45423456936-8.35023456936031
73134.437137.024722977956-2.58772297795556
74129.425134.920339864682-5.49533986468185
75123.155128.62123421982-5.46623421982039
76119.273123.887511080068-4.61451108006807
77120.472112.3365265919198.13547340808147
78121.52399.905349345140321.6176506548597
79121.983103.02281040379418.9601895962059
80123.658113.7014838022689.95651619773177
81124.794125.052411468094-0.258411468094167
82124.827133.268604243429-8.44160424342937
83120.382136.799624923598-16.4176249235977
84117.395130.438606619549-13.043606619549
85115.79120.027978352996-4.23797835299553
86114.283115.722650746629-1.43965074662866
87117.271111.7570377096895.51396229031072
88117.448113.7333761905923.71462380940821
89118.764112.8813789243815.8826210756188
90120.55105.58789325232714.9621067476727
91123.554104.08491327636119.4690867236391
92125.412111.27651246046914.1354875395305
93124.182120.6968166208753.48518337912515
94119.828127.711090173143-7.88309017314333
95115.361128.380621834525-13.0196218345246
96114.226125.857508714401-11.631508714401
97115.214120.637692373302-5.42369237330206
98115.864117.38188628516-1.51788628516026
99114.276116.934394197804-2.6583941978038
100113.469113.906504100356-0.437504100355554


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
101111.97892179512179.9180345773319144.039809012909
102105.64615524257568.7529674352971142.539343049853
10397.794249798522156.3968842244165139.191615372628
10491.427196457038545.7505652645833137.103827649494
10587.630352119798437.8358139991373137.42489024046
10686.939017718966733.1457422714544140.732293166479
10789.104123634171531.4017281424934146.80651912585
10894.046657778881832.5032068585045155.590108699259
10997.86966021080632.5369988634746163.202321558137
11099.283540180691730.200997188216168.366083173167
11199.114946491503226.3119924844305171.917900498576
11298.542722856386722.0409308872323175.044514825541
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/18/t1305728677lrwphkx2ximmsiw/1wu931305728924.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305728677lrwphkx2ximmsiw/1wu931305728924.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305728677lrwphkx2ximmsiw/222hp1305728924.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305728677lrwphkx2ximmsiw/222hp1305728924.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305728677lrwphkx2ximmsiw/3sumw1305728924.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305728677lrwphkx2ximmsiw/3sumw1305728924.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