Home » date » 2010 » Aug » 05 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 05 Aug 2010 14:12:26 +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/05/t1281017511z3vod4puanlqvg6.htm/, Retrieved Thu, 05 Aug 2010 16:11:55 +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/05/t1281017511z3vod4puanlqvg6.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 «
390 389 388 386 406 405 390 380 381 381 382 384 394 393 388 381 399 396 378 368 369 373 374 379 385 385 395 387 400 390 365 350 365 374 367 375 382 380 378 363 375 366 341 326 338 345 336 342 347 360 360 334 347 336 305 289 303 308 294 299 306 313 321 287 296 283 248 235 241 244 237 241 251 259 264 229 237 228 197 182 182 176 172 175 185 195 206 175 185 174 140 130 133 130 131 136 149 155 161 131 145 134 93 87 86 80 79 91 108 105 112 78 87 74 32 25 26 25 22 36
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0112924114735404
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
33883880
4386387-1
5406384.98870758852621.0112924114736
6405405.225975748028-0.225975748027679
7390404.223423936898-14.2234239368979
8380389.06280718124-9.06280718123986
9381378.9604662334442.03953376655602
10381379.983497487951.01650251204990
11382379.994976252582.00502374741995
12384381.017617805752.98238219424985
13394383.05129609265910.9487039073410
14393393.174933362283-0.174933362282616
15388392.172957942775-4.17295794277527
16381387.125835184624-6.12583518462367
17399380.056659733118.9433402669002
18396398.270575726077-2.27057572607691
19378395.244935450696-17.2449354506962
20368377.050198543752-9.05019854375234
21369366.9479999778792.05200002212098
22373367.9711720064735.02882799352744
23374372.0279596014051.97204039859486
24379373.0502286930285.94977130697151
25385378.11741595886.88258404119972
26385384.1951369297950.804863070205272
27395384.20422577476310.7957742252366
28387394.32613609949-7.32613609949016
29400386.24340635614413.7565936438564
30390399.398751472044-9.3987514720443
31365389.292616903084-24.2926169030844
32350364.018294677246-14.0182946772457
33365348.85999432559316.1400056744071
34374364.0422539108549.95774608914644
35367373.154700877041-6.15470087704125
36375366.0851994622418.91480053775888
37382374.1858690581187.81413094188196
38380381.274109440022-1.27410944002190
39378379.259721671963-1.25972167196289
40363377.245496376501-14.2454963765009
41375362.08463036977312.9153696302274
42366374.23047603797-8.23047603797005
43341365.137534115926-24.1375341159261
44326339.864963148732-13.8649631487325
45338324.70839427979213.2916057202085
46345336.8584885607288.14151143927177
47336343.950425857917-7.95042585791703
48342334.8606463777397.1393536222605
49347340.9412668964976.05873310350279
50360346.0096846037113.9903153962897
51360359.167669001810.832330998190173
52334359.177068025924-25.1770680259236
53347332.89275821407814.1072417859225
54336346.052062993081-10.0520629930809
55305334.938550961605-29.9385509616051
56289303.600472525225-14.6004725252251
57303287.43559798176215.5644020182379
58308301.6113576136926.38864238630833
59294306.683500792275-12.6835007922751
60299292.5402734824046.45972651759621
61306297.6132193722478.38678062775296
62313304.7079263500348.29207364996608
63321311.8015638576589.19843614234173
64287319.905436383491-32.9054363834907
65296285.53385465613210.4661453438681
66283294.652042675897-11.6520426758967
67248281.520463015493-33.5204630154932
68235246.141936154339-11.1419361543387
69241233.0161168266727.98388317332802
70244239.1062741206224.89372587937811
71237242.161536086891-5.16153608689055
72241235.1032498975625.89675010243815
73251239.16983842607511.8301615739248
74259249.3034294783669.69657052163356
75264257.4129271425796.58707285742105
76229262.487311079691-33.4873110796911
77237227.1091585838379.8908414161632
78228235.220850034928-7.22085003492765
79197226.139309225145-29.1393092251445
80182194.810256155319-12.8102561553195
81182179.6655974717322.33440252826787
82176179.691958505626-3.69195850562619
83172173.650267391037-1.65026739103743
84175169.6316318926165.36836810738353
85185172.69225371422612.3077462857735
86195182.83123784959712.1687621504026
87206192.96865251892313.0313474810766
88175204.115807856734-29.1158078567344
89185172.78702017403212.2129798259684
90174182.924934167544-8.92493416754445
91140171.824150138550-31.8241501385503
92130137.46477874039-7.46477874039005
93133127.3804833872955.61951661270537
94130130.443941281168-0.443941281167696
95131127.4389281135513.56107188644934
96136128.4791412025797.52085879742069
97149133.56406983475415.4359301652458
98155146.7383787096578.26162129034304
99161152.8316723367068.16832766329392
100131158.923912453731-27.9239124537307
101145128.60858414435216.3914158556479
102134142.793682756828-8.79368275682793
10393131.69438087277-38.6943808727701
1048790.2574280022409-3.25742800224086
1058684.22064378489411.77935621510588
1068083.2407370074331-3.2407370074331
1077977.20414127166761.79585872833236
1089176.224420847376314.7755791526237
10910888.391272766927619.6087272330724
110105105.612702583316-0.612702583315865
111112102.6057836936349.39421630636583
11278109.711867049637-31.7118670496371
1138775.353763598318411.6462364016816
1147484.4852776918843-10.4852776918843
1153271.3668736217732-39.3668736217732
1162528.9223266864093-3.92232668640928
1172621.87803415953274.1219658404673
1182522.92458109388312.07541890611687
1192221.94801757815100.0519824218490292
1203618.948604585047917.0513954149521


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12133.14115595827165.7939052762246460.4884066403185
12230.2823119165431-8.6115200715901869.1761439046764
12327.4234678748147-20.480236321314075.3271720709434
12424.5646238330862-31.060613083090780.1898607492632
12521.7057797913578-40.833225802590784.2447853853062
12618.8469357496294-50.043094929376987.7369664286356
12715.9880917079009-58.83493306356490.8111164793658
12813.1292476661725-67.302487879054693.5609832113995
12910.2704036244440-75.510504523579296.0513117724673
1307.4115595827156-83.5058542099498.3289733753712
1314.55271554098716-91.3237184879251100.429149569899
1321.69387149925872-98.9912731443912102.379016142909
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/05/t1281017511z3vod4puanlqvg6/1namg1281017544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/05/t1281017511z3vod4puanlqvg6/1namg1281017544.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/05/t1281017511z3vod4puanlqvg6/2g2311281017544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/05/t1281017511z3vod4puanlqvg6/2g2311281017544.ps (open in new window)


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