Home » date » 2010 » Jun » 02 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 02 Jun 2010 14:51:29 +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/Jun/02/t1275490558fe5o88k86g7s6dl.htm/, Retrieved Wed, 02 Jun 2010 16:56:02 +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/Jun/02/t1275490558fe5o88k86g7s6dl.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
182900 191400 189300 192200 187900 193900 189100 193100 194800 200200 211500 202100 200300 199200 204900 207300 200000 197700 202200 200200 208300 215100 210700 208100 209000 211000 210200 205500 211400 211700 209300 207500 203300 207100 206900 228700 226900 226500 227100 228100 226500 225200 217800 221300 215300 231300 227100 237800 230200 233400 231100 237200 243700 239700 248400 241000 254500 242800 268300 253900 262100 264100 261000 269300 260400 263200 279200 272200 269200 289600 283200 284300 283000 289100 289600 289100 287400 279600 289300 295000 299600 293600 294400 290200 301000 307900 298800 310300 293900 305000 311300 317300 296200 306800 291800 301900 314600 321500 329400 311700 309700 306500 307100 301300 292200 310100 316800 284400 284600 301200 287600 314300 298200 299400 301900 265500 287100 274000 290100 263100 245200 258600 259800 269800 274600 274800 271100 257800 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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.469466513979295
beta0.144645237637946
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3189300199900-10600
4192200202703.850339757-10503.8503397570
5187900204839.564261275-16939.5642612747
6193900202803.626335014-8903.62633501447
7189100203935.681673547-14835.6816735474
8193100201275.402455368-8175.40245536788
9194800201186.741644174-6386.74164417389
10200200201504.098500822-1304.09850082250
11211500204119.0298784727380.970121528
12202100211312.523007717-9212.52300771713
13200300210090.340295885-9790.34029588458
14199200207932.067933169-8732.06793316864
15204900205677.658368631-777.658368631004
16207300207104.769989691195.230010308791
172e+05209001.877434223-9001.87743422337
18197700205969.968559552-8269.96855955201
19202200202720.085118221-520.085118221497
20200200203073.195490144-2873.19549014387
21208300202126.4918514726173.50814852817
22215100205846.1314668179253.86853318344
23210700211640.291213897-940.291213896795
24208100212584.782816620-4484.78281661961
25209000211560.710212642-2560.71021264163
26211000211266.037434506-266.037434506172
27210200212030.571122817-1830.57112281691
28205500211936.301697029-6436.30169702874
29211400209242.7318766762157.26812332356
30211700210730.046977676969.95302232419
31209300211725.823119757-2425.82311975677
32207500210962.667897779-3462.66789777894
33203300209477.612515452-6177.61251545162
34207100206298.484002521801.515997479146
35206900206450.250445021449.749554979178
36228700206467.41505824722232.5849417532
37226900218220.6195008558679.38049914513
38226500224200.4311414042299.56885859565
39227100227341.289593690-241.28959368958
40228100229272.915051679-1172.91505167884
41226500230687.525472085-4187.52547208508
42225200230402.518742895-5202.51874289528
43217800229287.723926667-11487.7239266667
44221300224442.149265384-3142.14926538398
45215300223301.171359468-8001.17135946755
46231300219335.71698342511964.2830165752
47227100225555.822618161544.17738184004
48237800226988.89664198610811.1033580144
49230200233506.621915997-3306.62191599744
50233400233172.008136766227.991863234492
51231100234512.259203966-3412.25920396566
52237200233911.8210933393288.17890666079
53243700236680.3016954267019.69830457433
54239700241677.286004391-1977.28600439106
55248400242316.2176812996083.78231870066
56241000247152.676905797-6152.67690579701
57254500245826.7240093128673.27599068786
58242800252050.027843088-9250.0278430884
59268300249230.80743314719069.1925668532
60253900261001.427118797-7101.4271187972
61262100260003.5870239912096.41297600884
62264100263466.184074342633.815925657982
63261000266285.180750871-5285.18075087119
64269300265966.510702733333.48929726979
65260400269920.381879722-9520.38187972165
66263200267193.299003204-3993.29900320445
67279200266789.82711381812410.1728861817
68272200274929.962374402-2729.96237440204
69269200275776.930027378-6576.9300273782
70289600274371.26154853215228.7384514681
71283200284236.748402727-1036.74840272655
72284300286395.732309285-2095.73230928456
73283000287915.245734581-4915.24573458085
74289100287777.3168748371322.68312516279
75289600290657.704977912-1057.70497791219
76289100292348.755961102-3248.7559611015
77287400292790.571544784-5390.57154478412
78279600291860.823766810-12260.8237668098
79289300286873.1379586602426.86204134038
80295000288945.6275307756054.37246922497
81299600293132.2405728456467.7594271549
82293600297952.125238165-4352.12523816549
83294400297396.900536047-2996.90053604660
84290200297274.400636552-7074.40063655243
85301000294757.2560540516242.7439459489
86307900298915.9852812918984.01471870928
87298800304971.718703352-6171.71870335226
88310300303493.2454694286806.75453057158
89293900308569.950944454-14669.9509444539
90305000302567.8832788732432.11672112654
91311300304759.8192523686540.18074763153
92317300309324.471861887975.52813812008
93296200315104.558982385-18904.5589823847
94306800306981.610519747-181.610519746842
95291800307636.126941984-15836.1269419839
96301900299866.0025633242033.997436676
97314600300623.42400522613976.5759947739
98321500307936.58087467313563.4191253268
99329400315976.81326302113423.1867369785
100311700324862.727441040-13162.7274410397
101309700320373.615742594-10673.6157425942
102306500316328.255066415-9828.2550664153
103307100312012.364493019-4912.36449301912
104301300309670.740437935-8370.74043793522
105292200305137.100384565-12937.1003845652
106310100297581.19927155912518.8007284414
107316800302826.09419180713973.9058081926
108284400309703.025603326-25303.0256033264
109284600296422.523272784-11822.5232727844
110301200288667.84398390412532.1560160962
111287600293197.880862827-5597.88086282689
112314300288836.34229754325463.6577024575
113298200300786.293532488-2586.29353248753
114299400299392.1068483237.89315167651512
115301900299216.3399364972683.66006350319
116265500300478.992865488-34978.9928654882
117287100281685.004587465414.99541253992
118274000282222.352367533-8222.35236753296
119290100275799.07418045214300.9258195483
120263100280920.840921366-17820.8409213655
121245200269752.370082469-24552.3700824693
122258600253756.4161275384843.58387246166
123259800251889.7870698227910.21293017824
124269800251999.98933998417800.0106600162
125274600257961.84969771416638.1503022856
126274800264508.08734656810291.9126534319
127271100268773.8625328212326.13746717875
128257800269457.931924182-11657.9319241816
129290300262785.30436882127514.6956311793
130262200276371.329263852-14171.3292638522
131270000269424.841731724575.158268276486
132290600269440.39304702321159.6069529773


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
133280556.520018531260532.393989006300580.646048056
134281738.920076654259006.735971873304471.104181435
135282921.320134776257159.897689650308682.742579902
136284103.720192898255028.651911064313178.788474733
137285286.120251021252642.955308814317929.285193228
138286468.520309143250026.804547836322910.23607045
139287650.920367265247199.408877287328102.431857244
140288833.320425388244176.265935517333490.374915258
141290015.72048351240970.030102301339061.410864719
142291198.120541632237591.177285395344805.063797870
143292380.520599755234048.503042373350712.538157136
144293562.920657877230349.493589252356776.347726502
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275490558fe5o88k86g7s6dl/1gpt81275490286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275490558fe5o88k86g7s6dl/1gpt81275490286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t1275490558fe5o88k86g7s6dl/2ryat1275490286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275490558fe5o88k86g7s6dl/2ryat1275490286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t1275490558fe5o88k86g7s6dl/3ryat1275490286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275490558fe5o88k86g7s6dl/3ryat1275490286.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Double ; 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