Home » date » 2011 » May » 20 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 20 May 2011 05:13:58 +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/20/t1305868185r4a318h7dmcukkb.htm/, Retrieved Fri, 20 May 2011 07:09:49 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
116 111 104 100 93 91 119 139 134 124 113 109 109 106 101 98 93 91 122 139 140 132 117 114 113 110 107 103 98 98 137 148 147 139 130 128 127 123 118 114 108 111 151 159 158 148 138 137 136 133 126 120 114 116 153 162 161 149 139 135 130 127 122 117 112 113 149 157 157 147 137 132 125 123 117 114 111 112 144 150 149 134 123 116 117 111 105 102 95 93 124 130 124 115 106 105 105 101 95 93 84 87 116 120 117 109 105 107 109 109 108 107 99 103 131 137 135 124 118 121 121 118 113 107 100 102 130 136 133 120 112 109 110
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.704179612610166
beta0.524677975873149
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13109109.640224358974-0.640224358974436
14106105.9197782073310.0802217926689366
15101100.6112948955520.388705104447524
169897.33031982573940.669680174260606
179392.57796008748950.422039912510485
189190.93214717129220.0678528287077569
19122120.2703256822481.7296743177517
20139143.084450176702-4.08445017670226
21140135.1286483366214.87135166337885
22132130.1541458522211.84585414777933
23117122.606132879058-5.60613287905841
24114114.655965145873-0.655965145872997
25113113.634855366808-0.634855366807756
26110109.7965662946570.203433705343414
27107104.3768784391132.62312156088674
28103103.288772862142-0.288772862142409
299897.97043654236850.0295634576314967
309895.98067018453952.01932981546045
31137127.9428433069239.05715669307683
32148157.662365409917-9.6623654099169
33147149.83263003488-2.83263003487951
34139137.0963776204931.90362237950694
35130125.9641784203364.03582157966406
36128128.410012365075-0.41001236507546
37127129.801187176186-2.80118717618612
38123126.117850090049-3.1178500900493
39118119.280524046228-1.28052404622775
40114113.3452319156810.654768084318576
41108107.8971748480970.102825151903474
42111105.6863657346445.31363426535576
43151142.4061465004658.59385349953482
44159166.446521110303-7.4465211103028
45158163.200913059292-5.20091305929236
46148150.326440336971-2.32644033697068
47138135.4117906562812.58820934371946
48137133.5537569860833.44624301391727
49136136.408510850104-0.408510850104221
50133134.655829420832-1.65582942083194
51126130.27117331286-4.27117331285996
52120122.577104284392-2.57710428439202
53114113.2705591748470.729440825152636
54116111.8545843241564.14541567584354
55153147.1025869697095.89741303029055
56162161.883368002290.116631997709533
57161164.806469005864-3.80646900586419
58149154.458058981884-5.45805898188368
59139138.3288054426120.671194557387906
60135134.2031627433730.79683725662747
61130131.901564742916-1.90156474291572
62127126.026508436090.973491563910187
63122120.9891287541571.01087124584305
64117117.736686186467-0.73668618646721
65112111.6052223845550.39477761544515
66113111.7414052865671.25859471343276
67149145.1855631381673.81443686183283
68157155.7306090039131.26939099608742
69157157.671960226961-0.671960226960522
70147149.567366715528-2.56736671552824
71137138.879988156976-1.87998815697571
72132133.645593352486-1.64559335248589
73125128.574015451709-3.57401545170879
74123121.5020097490071.4979902509933
75117116.1690702836430.830929716357488
76114111.5305121519832.46948784801722
77111108.4336167224412.56638327755869
78112111.5990084778680.400991522131619
79144146.122947035791-2.12294703579136
80150150.468078343708-0.468078343708015
81149148.7036558863030.29634411369662
82134139.169987762389-5.16998776238887
83123124.341418228908-1.34141822890814
84116117.242777366841-1.242777366841
85117109.7203803443817.27961965561892
86111113.637744340642-2.6377443406417
87105105.513213568765-0.513213568765011
88102100.2342775177941.76572248220648
899596.2318715322436-1.23187153224357
909394.2401138450171-1.24011384501715
91124124.413523012446-0.413523012445992
92130128.6352524757461.36474752425391
93124127.248082740082-3.24808274008224
94115111.1523807903583.84761920964181
95106104.6890398885431.31096011145678
96105101.3499421657133.65005783428663
97105103.4644348924451.53556510755456
98101101.951308819141-0.951308819141275
999597.8140087446414-2.81400874464141
1009392.91018393325790.0898160667421024
1018487.5428249343067-3.54282493430665
1028783.76941601692463.23058398307543
103116118.835412855658-2.83541285565775
104120122.482826865252-2.48282686525222
105117116.2052319487740.794768051226427
106109105.7327060120883.2672939879122
10710598.57313472427826.42686527572175
108107101.8814850577855.11851494221469
109109107.3000516556131.69994834438724
110109108.1232735383210.876726461679084
111108108.353874353415-0.353874353414867
112107110.582036718822-3.58203671882218
11399104.738394300042-5.73839430004222
114103103.795400768742-0.795400768742255
115131135.117243154089-4.11724315408915
116137138.378033310129-1.37803331012915
117135134.6678890245320.332110975467685
118124125.249954354437-1.24995435443698
119118114.8240792431523.17592075684782
120121113.2350103303067.76498966969389
121121118.2625415801032.73745841989678
122118118.712810177377-0.712810177376781
123113116.012751793762-3.01275179376238
124107112.983958647061-5.98395864706129
125100101.493933084416-1.49393308441631
126102103.253127330707-1.25312733070673
127130131.351950659423-1.35195065942264
128136136.473974686256-0.47397468625627
129133133.344023063385-0.344023063384981
130120122.169829299251-2.16982929925145
131112111.2534650586580.746534941342077
132109107.2616371040541.73836289594612
133110102.2818762509647.7181237490357


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
134102.78274401895196.4486997256334109.116788312269
13597.731598610017188.4381973980278107.024999822006
13694.885830467202881.8504686086489107.921192325757
13790.08915630673972.7186793600399107.459633253438
13894.674871416268572.476695095659116.873047736878
139125.79316576353898.3350041215887153.251327405487
140134.792709206092101.68286792142167.902550490764
141134.87586162360795.7524009696718173.999322277542
142126.37181492179380.8959456519968171.84768419159
143121.6158054587669.4675224480622173.764088469457
144120.88555054720761.7605585974631180.010542496952
145119.30220130261852.909643464552185.694759140685
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/20/t1305868185r4a318h7dmcukkb/1rq1o1305868436.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t1305868185r4a318h7dmcukkb/1rq1o1305868436.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/20/t1305868185r4a318h7dmcukkb/2b3mr1305868436.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t1305868185r4a318h7dmcukkb/2b3mr1305868436.ps (open in new window)


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