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 19:54:41 +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/t1275508496kzp6u5qllal319o.htm/, Retrieved Wed, 02 Jun 2010 21:54:56 +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/t1275508496kzp6u5qllal319o.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 «
464 675 703 887 1139 1077 1318 1260 1120 963 996 960 530 883 894 1045 1199 1287 1565 1577 1076 918 1008 1063 544 635 804 980 1018 1064 1404 1286 1104 999 996 1015 615 722 832 977 1270 1437 1520 1708 1151 934 1159 1209 699 830 996 1124 1458 1270 1753 2258 1208 1241 1265 1828 809 997 1164 1205 1538 1513 1378 2083 1357 1536 1526 1376 779 1005 1193 1522 1539 1546 2116 2326 1596 1356 1553 1613 814 1150 1225 1691 1759 1754 2100 2062 2012 1897 1964 2186 966 1549 1538 1612 2078 2137 2907 2249 1883 1739 1828 1868 1138 1430 1809 1763 2200 2067 2503 2141 2103 1972 2181 2344 970 1199 1718 1683 2025 2051 2439 2353 2230 1852 2147 2286 1007 1665 1642 1518 1831 2207 2822 2393 2306 1785 2047 2171 1212 1335 2011 1860 1954 2152 2835 2224 2182 1992 2389 2724 891 1247 2017 2257 2255 2255 3057 3330 1896 2096 2374 2535 1041 1728 2201 2455 2204 2660 3670 2665 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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.129074112205745
beta0.000500934054976076
gamma0.322462326005777


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13530488.83695900046341.163040999537
14883814.76918013628568.230819863715
15894834.64924201163159.3507579883687
161045999.19216524897245.8078347510281
1711991167.6015349569231.3984650430839
1812871265.8749276645721.1250723354269
1915651471.6836405559193.3163594440866
2015771416.83455770272160.165442297285
2110761269.50663614626-193.506636146263
229181065.72885869940-147.728858699401
2310081084.2152672451-76.2152672451004
2410631035.0381755838027.9618244161961
25544582.173549598269-38.1735495982692
26635950.279703272534-315.279703272534
27804917.8820476586-113.882047658599
289801063.43198202462-83.4319820246214
2910181215.98034271037-197.980342710371
3010641282.32424149349-218.324241493494
3114041473.86706678750-69.8670667874956
3212861417.88509443065-131.885094430645
3311041147.80505570157-43.8050557015699
34999982.5233897030116.4766102969901
359961041.06932055722-45.0693205572168
3610151025.42181012321-10.4218101232145
37615559.2035589790555.7964410209495
38722857.541913373212-135.541913373212
39832905.609678642965-73.6096786429654
409771069.12052501393-92.1205250139342
4112701190.3251274667779.6748725332277
4214371289.52881127662147.471188723384
4315201593.65374322978-73.6537432297798
4417081511.62678785961196.373212140391
4511511278.03622592088-127.036225920883
469341101.04125811502-167.041258115022
4711591121.0921475061437.9078524938625
4812091124.7664482118484.2335517881563
49699638.4276383008960.5723616991103
50830908.01061953216-78.0106195321601
51996989.4832224861966.51677751380385
5211241178.42304517839-54.4230451783903
5314581375.4535377775882.5464622224167
5412701505.99433837198-235.994338371978
5517531717.6584481686435.3415518313609
5622581723.28938701246534.710612987541
5712081396.55030916633-188.550309166326
5812411177.6247619925463.3752380074559
5912651298.02429530364-33.0242953036384
6018281305.41735025192522.582649748082
61809774.8326609436334.1673390563706
629971039.36945363520-42.3694536352036
6311641168.33975232397-4.33975232396506
6412051367.08090456414-162.080904564136
6515381626.2868854581-88.2868854581002
6615131646.33742562572-133.337425625715
6713781994.69039876606-616.690398766055
6820832063.1693690067219.8306309932782
6913571427.09831942623-70.0983194262324
7015361284.01934919386251.980650806142
7115261408.61492913749117.385070862512
7213761600.33223898861-224.332238988606
73779810.845167194428-31.8451671944277
7410051050.49573693738-45.4957369373781
7511931192.709374407260.290625592740071
7615221350.22596016804171.774039831964
7715391688.93680276946-149.936802769462
7815461688.23615636363-142.236156363628
7921161902.69253111387213.307468886131
8023262290.5926720051635.4073279948379
8115961558.1729423276237.8270576723808
8213561511.12962890956-155.129628909558
8315531548.211416314364.78858368563692
8416131632.52638986099-19.5263898609867
85814866.013219630146-52.0132196301461
8611501117.0259702048432.9740297951616
8712251295.3822019996-70.3822019995996
8816911506.36868386985184.631316130150
8917591772.35514762486-13.3551476248631
9017541791.71838832041-37.718388320415
9121002149.20213814788-49.202138147878
9220622475.75202043459-413.75202043459
9320121647.94559089079364.054409109214
9418971579.19509767656317.804902323442
9519641733.09269504805230.907304951946
9621861848.74678049347337.25321950653
97966990.637162874265-24.6371628742654
9815491315.29531853704233.704681462955
9915381516.3056595086721.6943404913313
10016121865.89816072850-253.898160728497
10120782047.4138842663830.5861157336158
10221372065.9720585653271.0279414346755
10329072492.28903847496414.710961525036
10422492815.40117186052-566.401171860515
10518832075.63354545762-192.633545457625
10617391899.78141450023-160.781414500229
10718281973.93893170057-145.938931700572
10818682075.68898702426-207.688987024259
10911381014.12589478372123.874105216275
11014301448.76050845518-18.7605084551751
11118091560.14900034589248.850999654105
11217631871.68832633665-108.688326336651
11322002167.1395733262232.8604266737848
11420672197.97278776171-130.972787761711
11525032712.60059138710-209.600591387104
11621412675.05191677941-534.051916779406
11721032038.6226254684964.377374531513
11819721900.4865422168171.5134577831939
11921812011.98252307719169.017476922813
12023442141.93416303978202.065836960222
1219701141.29282653254-171.292826532538
12211991516.61682348787-317.616823487874
12317181667.4100784798650.5899215201352
12416831853.85438536200-170.854385361998
12520252181.80535089781-156.805350897809
12620512142.05746174646-91.0574617464604
12724392635.84388087434-196.84388087434
12823532505.50343662525-152.503436625251
12922302081.28217536558148.717824634422
13018521953.21950775809-101.219507758093
13121472069.8603723491877.1396276508167
13222862196.4049374747689.5950625252426
13310071083.99651255359-76.9965125535855
13416651428.83744025122236.16255974878
13516421769.46825088515-127.468250885149
13615181874.24915300942-356.24915300942
13718312190.2679331991-359.267933199102
13822072142.4891688881264.5108311118788
13928222636.13763741813185.862362581871
14023932562.88994936457-169.889949364575
14123062207.2804964215498.7195035784575
14217851994.05865432917-209.058654329167
14320472151.59126451920-104.591264519196
14421712259.86660013019-88.8666001301949
14512121069.36234318583142.637656814169
14613351543.63471134505-208.634711345049
14720111723.1722805291287.827719470902
14818601815.8833015816244.1166984183819
14919542199.31242062952-245.312420629516
15021522291.62126002699-139.621260026993
15128352816.8371657230918.1628342769109
15222242613.27011602859-389.270116028592
15321822297.00876454059-115.008764540588
15419921963.9555869164928.0444130835087
15523892187.4827704661201.517229533898
15627242345.20316503874378.79683496126
1578911193.38919948532-302.389199485323
15812471518.69079291897-271.690792918967
15920171833.62108883129183.378911168708
16022571844.12159399804412.878406001957
16122552202.6683818664152.3316181335927
16222552370.2214183267-115.221418326702
16330572973.8904276855283.1095723144804
16433302643.08637504267686.91362495733
16518962519.81158383102-623.81158383102
16620962136.98116213232-40.9811621323188
16723742419.93500335947-45.9350033594742
16825352603.90129612003-68.9012961200287
16910411147.16878251544-106.168782515444
17017281526.39053984195201.609460158049
17122012077.77000369211123.229996307889
17224552145.41238810246309.587611897541
17322042405.83168961193-201.831689611933
17426602500.46608959121159.533910408795
17536703251.46625919908418.533740800921
17626653108.31874948913-443.318749489129
17726392439.44977608105199.550223918949
17822262313.34448108028-87.3444810802825
17925862612.52680620413-26.526806204125
18026842807.31910509382-123.319105093822
18111851210.11578193156-25.1157819315579
18217491729.3410237612019.6589762388023
18324592272.62009321613186.379906783869
18426182406.4619875861211.538012413898
18525852514.6406185491970.3593814508117
18633102763.70256109067546.297438909328
18739233717.7065728895205.293427110496


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1883260.02873534973093.573349242663426.48412145673
1892777.935692564812605.634356102492950.23702902713
1902520.714213099912343.029053724572698.39937247526
1912882.031064138252691.535115777363072.52701249914
1923070.015375190072868.842728025853271.18802235429
1931339.166896369851164.130499484551514.20329325516
1941935.492876539041736.788474493152134.19727858494
1952588.331217896242357.03501925072819.62741654178
1962715.311913395442472.630231855792957.99359493509
1972759.205251370232509.197648878463009.21285386200
1983159.387086232222882.637872936613436.13629952782
1993991.070263793193704.34959518944277.79093239699
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275508496kzp6u5qllal319o/1idjo1275508476.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275508496kzp6u5qllal319o/1idjo1275508476.ps (open in new window)


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


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


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