Home » date » 2010 » Dec » 29 »

Exponential Smoothing - NWWZ

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 29 Dec 2010 21:45:07 +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/Dec/29/t12936590471x22j3m6ly7gfgg.htm/, Retrieved Wed, 29 Dec 2010 22:44:08 +0100
 
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/Dec/29/t12936590471x22j3m6ly7gfgg.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
206010 198112 194519 185705 180173 176142 203401 221902 197378 185001 176356 180449 180144 173666 165688 161570 156145 153730 182698 200765 176512 166618 158644 159585 163095 159044 155511 153745 150569 150605 179612 194690 189917 184128 175335 179566 181140 177876 175041 169292 166070 166972 206348 215706 202108 195411 193111 195198 198770 194163 190420 189733 186029 191531 232571 243477 227247 217859 208679 213188 216234 213586 209465 204045 200237 203666 241476 260307 243324 244460 233575 237217 235243 230354 227184 221678 217142 219452 256446 265845 248624 241114 229245 231805 219277 219313 212610 214771 211142 211457 240048 240636 230580 208795 197922 194596 194581 185686 178106 172608 167302 168053 202300 202388 182516 173476 166444 171297 169701 164182 161914 159612 151001 158114 186530 187069 174330 169362 166827 178037 186413 189226 191563 188906 186005 195309 223532 226899 etc...
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.786721671208237
beta0.155737227444934
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13180144192256.77590812-12112.7759081197
14173666174646.428106397-980.428106396546
15165688164180.8073711871507.19262881341
16161570159602.1658100821967.83418991757
17156145154188.6069701641956.39302983636
18153730152119.1230186171610.87698138296
19182698179952.3484015222745.65159847814
20200765200442.561219332322.438780667988
21176512176164.427462602347.572537397995
22166618164082.6938745692535.30612543056
23158644157564.6031125531079.39688744652
24159585162699.575040562-3114.57504056211
25163095157033.5205933086061.47940669156
26159044158060.686855116983.313144883898
27155511151876.2857412753634.71425872456
28153745151536.0705339162208.92946608434
29150569148805.6999799931763.30002000669
30150605148982.9099334391622.09006656095
31179612179540.64902107471.3509789262025
32194690199556.1218355-4866.12183550018
33189917172711.69245961517205.3075403846
34184128177934.6383742216193.36162577895
35175335178007.834878522-2672.83487852153
36179566182860.560671384-3294.56067138413
37181140182552.108246818-1412.10824681763
38177876179243.047588606-1367.04758860619
39175041174113.551861834927.448138166044
40169292173346.18218413-4054.18218412981
41166070166832.87427879-762.874278790143
42166972165922.4910065951049.50899340509
43206348196558.7952843899789.20471561147
44215706225216.873886494-9510.87388649434
45202108200907.0069691031200.99303089728
46195411190710.8561367064700.14386329436
47193111187055.8402206386055.1597793616
48195198199049.339913743-3851.339913743
49198770199042.997871197-272.997871196945
50194163197117.93077686-2954.93077686024
51190420191512.249043427-1092.2490434272
52189733188129.6788898931603.32111010668
53186029187498.596717085-1469.59671708496
54191531187061.5533571314469.44664286866
55232571223314.1931842799256.80681572098
56243477248433.712722975-4956.712722975
57227247231545.874832781-4298.87483278071
58217859218649.860480711-790.860480711417
59208679211171.888635607-2492.88863560685
60213188213488.229628962-300.229628961562
61216234216634.512356744-400.51235674409
62213586213617.211916038-31.211916037777
63209465210647.255498068-1182.25549806794
64204045207696.056936062-3651.05693606203
65200237201559.353700861-1322.35370086058
66203666201806.3581361031859.64186389704
67241476236008.6293294935467.37067050653
68260307253632.974070166674.02592983964
69243324245978.10496673-2654.1049667302
70244460235268.2824712669191.71752873395
71233575236647.931624635-3072.93162463498
72237217240271.63520002-3054.63520001969
73235243242188.152693052-6945.15269305155
74230354234257.517648547-3903.51764854742
75227184227677.911670693-493.911670693051
76221678224508.313359514-2830.31335951379
77217142219381.134929034-2239.13492903442
78219452219340.378779068111.621220931673
79256446252477.5642737663968.4357262344
80265845268537.035194253-2692.03519425297
81248624249733.664875924-1109.66487592363
82241114241164.041968422-50.0419684220105
83229245229923.595156386-678.595156385709
84231805232994.61627415-1189.61627415035
85219277233336.866000631-14059.8660006305
86219313217374.183298221938.81670178048
87212610213750.413699219-1140.41369921915
88214771207127.0340285967643.96597140448
89211142209202.7514305281939.24856947243
90211457212298.996501291-841.996501291404
91240048244740.097239514-4692.09723951353
92240636250736.072567315-10100.0725673146
93230580223704.9450285866875.05497141436
94208795219884.192553616-11089.1925536162
95197922196713.5364857431208.46351425743
96194596198279.950262188-3683.95026218813
97194581190729.0900505363851.90994946379
98185686191278.927945051-5592.92794505064
99178106179159.001172259-1053.00117225942
100172608172574.58126699833.4187330016284
101167302164610.4379122552691.56208774468
102168053164961.7541554043091.2458445956
103202300197414.3760947654885.62390523526
104202388208703.725659619-6315.72565961938
105182516187645.695259936-5129.6952599361
106173476168453.7592840065022.24071599363
107166444160459.7414514645984.25854853578
108171297165203.671089956093.32891004978
109169701168613.714556011087.28544399026
110164182166297.126878907-2115.12687890694
111161914159630.5798763552283.42012364493
112159612158060.5395547471551.46044525341
113151001154201.424991105-3200.42499110513
114158114151624.5621344916489.43786550936
115186530189171.601050891-2641.60105089133
116187069193266.148679687-6197.14867968677
117174330173684.922388921645.077611079323
118169362163039.4116295696322.58837043142
119166827158271.0023488318555.99765116919
120178037167373.95077015410663.0492298462
121186413176183.81580852910229.1841914707
122189226184368.8393573224857.16064267812
123191563188972.4008920422590.59910795817
124188906192372.294027718-3466.29402771773
125186005187821.724755116-1816.72475511601
126195309192839.2157924062469.78420759359
127223532229223.087110724-5691.08711072433
128226899233733.221800341-6834.22180034057
129214126218605.044575766-4479.04457576631
130206903208006.298620989-1103.29862098902
131204442199829.4202577154612.57974228458
132220375207753.52926872612621.4707312738
133214320219725.686840236-5405.68684023627
134212588214263.16287187-1675.16287187024
135205816212242.323659019-6426.32365901885
136202196205149.9623062-2953.96230619974
137195722199310.402816274-3588.40281627362
138198563201587.356456262-3024.35645626215
139229139228974.239624869164.760375131242
140229527235630.868228266-6103.86822826631
141211868219452.446170659-7584.44617065854
142203555204622.969306613-1067.96930661306
143195770195189.669246083580.330753916613


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
144198652.31584729188946.127403192208358.504291388
145192306.353232713179187.823603671205424.882861755
146188010.82132942171506.694169197204514.948489644
147182618.374637975162670.69897198202566.05030397
148178433.511095258154949.581220176201917.440970341
149172255.700582945145126.928102198199384.473063691
150175388.800333859144499.251040227206278.34962749
151204118.502515161169349.186596989238887.818433332
152207571.683921239168802.856144804246340.511697675
153194890.525319255152002.965606995237778.085031515
154187357.973538446140233.710876374234482.236200517
155179187.517956523127710.236010429230664.799902617
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936590471x22j3m6ly7gfgg/1sz161293659102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936590471x22j3m6ly7gfgg/1sz161293659102.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936590471x22j3m6ly7gfgg/2sz161293659102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936590471x22j3m6ly7gfgg/2sz161293659102.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t12936590471x22j3m6ly7gfgg/338091293659102.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t12936590471x22j3m6ly7gfgg/338091293659102.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