Home » date » 2010 » Jun » 06 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 06 Jun 2010 12:26:40 +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/06/t12758272189txivpnb7ts4han.htm/, Retrieved Sun, 06 Jun 2010 14:27:03 +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/06/t12758272189txivpnb7ts4han.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 «
15136 16733 20016 17708 18019 19227 22893 23739 21133 22591 26786 29740 15028 17977 20008 21354 19498 22125 25817 28779 20960 22254 27392 29945 16933 17892 20533 23569 22417 22084 26580 27454 24081 23451 28991 31386 16896 20045 23471 21747 25621 23859 25500 30998 24475 23145 29701 34365 17556 22077 25702 22214 26886 23191 27831 35406 23195 25110 30009 36242 18450 21845 26488 22394 28057 25451 24872 33424 24052 28449 33533 37351 19969 21701 26249 24493 24603 26485 30723 34569 26689 26157 32064 38870 21337 19419 23166 28286 24570 24001 33151 24878 26804 28967 33311 40226 20504 23060 23562 27562 23940 24584 34303 25517 23494 29095 32903 34379 16991 21109 23740 25552 21752 20294 29009 25500 24166 26960 31222 38641 14672 17543 25453 32683 22449 22316 27595 25451 25421 25288 32568 35110 16052 22146 21198 19543 22084 23816 29961 26773 26635 26972 30207 38687 16974 21697 24 etc...
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.105758688735590
beta0.252901562163533
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
320016183301686
41770820150.403811591-2442.40381159101
51801921468.8672041317-3449.86720413167
61922722588.5105864599-3361.5105864599
72289323627.5896795422-734.589679542187
82373924924.8407526724-1185.84075267245
92113326142.6509697466-5009.65096974655
102259126822.069214296-4231.06921429602
112678627470.6627925741-684.662792574109
122974028476.00730461651263.99269538354
131502829721.2464940077-14693.2464940077
141797728885.8755211648-10908.8755211648
152000828158.9600108681-8150.96001086813
162135427505.7080702293-6151.70807022935
171949826899.3575021194-7401.35750211938
182212525962.8849620395-3837.88496203946
192581725300.6304707266516.369529273419
202877925112.68732186293666.31267813710
212096025355.9391998904-4395.93919989038
222225424628.9617379726-2374.96173797259
232739224052.19819898343339.80180101664
242994524169.14869273775775.85130726235
251693324698.2166120922-7765.2166120922
261789223587.5062861785-5695.50628617848
272053322543.3507373981-2010.35073739807
282356921835.16248566921733.83751433078
292241721569.3288240807847.671175919346
302208421232.4476415138851.552358486184
312658020918.75300489525661.24699510484
322745421265.14412184516188.8558781549
332408121832.86492883812248.13507116191
342345122043.95009980681407.04990019323
352899122203.71691903046787.28308096957
363138623114.02646662838271.97353337174
371689624402.6015807340-7506.60158073395
382004523821.6796792766-3776.67967927656
392347123534.2163221827-63.216322182714
402174723637.793162665-1890.79316266499
412562123497.51570252742123.48429747262
422385923838.578815386520.421184613464
432550023957.77092708351542.22907291651
443099824279.15673343156718.84326656846
452447525327.7202630050-852.720263005034
462314525552.7178474413-2407.71784744133
472970125548.86281043934152.13718956073
483436526349.82473388058015.17526611954
491755627773.7146854087-10217.7146854087
502207726996.0296138491-4919.02961384907
512570226647.1595169896-945.159516989592
522221426693.2809662264-4479.28096622644
532688626245.8331084042640.166891595793
542319126356.9335909077-3165.93359090773
552783125980.82811537771850.17188462227
563540626184.70506936599221.29493063413
572319527414.7800427328-4219.78004273276
582511027110.4800461699-2000.48004616995
593000926987.38439239443021.61560760560
603624227476.23674510918765.76325489092
611845028807.0364373378-10357.0364373378
622184527838.4190447335-5993.41904473353
632648827170.9888979208-682.988897920768
642239427046.9152918226-4652.91529182262
652805726378.53810215601678.46189784395
662545126424.6521062091-973.652106209138
672487226164.2401881545-1292.24018815447
683342425835.57186153407588.42813846596
692405226649.0755507145-2597.07555071447
702844926315.91094676512133.08905323493
713353326540.05509538576992.9449046143
723735127465.20829007349885.79170992658
731996928960.7158692159-8991.71586921592
742170128219.2657336652-6518.26573366523
752624927565.0634016127-1316.06340161271
762449327425.8390274885-2932.83902748850
772460327037.1832938873-2434.18329388730
782648526636.1587618226-151.158761822597
793072326472.54093711454250.45906288545
803456926888.11750497837680.88249502166
812668927871.9281692378-1182.92816923780
822615727886.6746076956-1729.67460769559
833206427797.33505283184266.66494716819
843887028456.279020912510413.7209790875
852133730043.8585541696-8706.85855416957
861941929376.3923484836-9957.39234848358
872316628310.3455597085-5144.34555970848
882828627615.7268562301670.273143769922
892457027553.9820881668-2983.98208816681
902400127025.9568893690-3024.95688936896
913315126412.69112616436738.30887383574
922487827012.2019794645-2134.20197946448
932680426616.2852056513187.714794348689
942896726470.95202599372496.04797400629
953331126636.50577755376674.49422244627
964022627422.486135939812803.5138640602
972050429199.1132397529-8695.1132397529
982306028469.5095583037-5409.50955830367
992356227942.7013631452-4380.70136314523
1002756227407.5299799715154.470020028504
1012394027356.1239136712-3416.12391367116
1022458426835.7270282541-2251.72702825411
1033430326378.24932899487924.75067100516
1042551727208.9822088981-1691.98220889814
1052349426977.4073637444-3483.40736374444
1062909526463.20465723802631.79534276196
1073290326666.12918339796236.87081660208
1083437927417.13646422666961.86353577337
1091699128431.0237691588-11440.0237691588
1102110927192.7705766478-6083.77057664779
1112374026358.2678998734-2618.26789987343
1122555225820.2426411903-268.242641190329
1132175225523.5784104743-3771.57841047426
1142029424755.5293188553-4461.52931885529
1152900923795.18146222235213.81853777769
1162550023997.53730149441502.46269850560
1172416623847.5706888225318.429311177541
1182696023580.89913922993379.10086077014
1193122223728.29944757767493.70055242236
1203864124511.284967526914129.7150324731
1211467226374.0076316197-11702.0076316197
1221754325191.8129919368-7648.81299193684
1232545324233.69963830181219.30036169824
1243268324246.07838746778436.92161253226
1252244925247.4417369959-2798.44173699589
1262231624985.719164088-2669.71916408799
1272759524666.20437771492928.79562228514
1282545125017.1163162308433.883683769211
1292542125115.7745258777305.225474122319
1302528825208.989736595479.0102634046125
1313256825280.3939742367287.60602576403
1323511026309.08807586408800.91192413595
1331605227733.2213465966-11681.2213465966
1342214626678.7588342230-4532.75883422303
1352119826259.0727390713-5061.07273907133
1361954325648.1466858226-6105.1466858226
1372208424763.5092056757-2679.50920567567
1382381624169.4950598106-353.495059810586
1392996123812.02235108626148.97764891375
1402677324306.70649142442466.29350857559
1412663524477.8795980972157.12040190298
1422697224674.05046433902297.94953566095
1433020724946.57742874685260.42257125317
1443868725673.109746873613013.8902531264
1451697427567.7151450833-10593.7151450833
1462169726682.2659518072-4985.26595180724
1472417926256.6203878581-2077.62038785814
1482375726082.9144542511-2325.91445425109
1492501325820.7391073714-807.739107371366
1502401925697.5197700472-1678.51977004722
1513034525437.3132195314907.686780469
1522448826004.9188665105-1516.91886651054
1532515625852.4943171327-696.494317132703
1542565025768.2079808666-118.207980866635
1553092325741.91879503375181.08120496634
1563724026414.651467949210825.3485320508
1571746627973.8550437266-10507.8550437266
1581946326995.8382428453-7532.83824284528
1592435226130.9779765428-1778.97797654277
1602680525827.0569258444977.943074155562
1612523625840.8608216128-604.860821612812
1622473525671.0915201350-936.091520134974
1632935625441.25448727813914.74551272188
1643123425829.14150631165404.85849368837
1652272426519.1821711696-3795.18217116956
1662849626134.73061638232361.26938361774
1673285726464.5330856316392.46691436901
1683719827391.64607640719806.35392359288
1691365228942.0932946437-15290.0932946437
1702278427429.4161080429-4645.4161080429
1712356526918.2572261389-3353.25722613894
1722632326454.0673527633-131.067352763261
1732377926327.1464573749-2548.14645737492
1742754925876.44435029651672.55564970352
1752966025916.85323616843743.14676383162
1762335626276.3613388152-2920.36133881520


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
17725853.036007811614859.919289310036846.1527263133
17825738.564262635214649.360906990136827.7676182804
17925624.092517458914397.548622938436850.6364119793
18025509.620772282514098.394275956836920.8472686081
18125395.149027106113746.726697321837043.5713568904
18225280.677281929713338.435013874437222.9195499851
18325166.205536753312870.547046709337461.8640267973
18425051.733791576912341.232250598237762.2353325557
18524937.262046400611749.731942061938124.7921507393
18624822.790301224211096.231194942138549.3494075062
18724708.318556047810381.693759359439034.9433527362
18824593.84681087149607.6827099766539580.0109117662
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758272189txivpnb7ts4han/1hacy1275827198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758272189txivpnb7ts4han/1hacy1275827198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t12758272189txivpnb7ts4han/2hacy1275827198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758272189txivpnb7ts4han/2hacy1275827198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t12758272189txivpnb7ts4han/3hacy1275827198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t12758272189txivpnb7ts4han/3hacy1275827198.ps (open in new window)


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