Home » date » 2010 » Nov » 27 »

Workshop 8 Regression Analysis of Time Series single smoothing

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 27 Nov 2010 13:15:31 +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/Nov/27/t1290863616hdvabccwiis6nr4.htm/, Retrieved Sat, 27 Nov 2010 14:13:40 +0100
 
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/Nov/27/t1290863616hdvabccwiis6nr4.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 «
24 25 17 18 18 16 20 16 18 17 23 30 23 18 15 12 21 15 20 31 27 34 21 31 19 16 20 21 22 17 24 25 26 25 17 32 33 13 32 25 29 22 18 17 20 15 20 33 29 23 26 18 20 11 28 26 22 17 12 14 17 21 19 18 10 29 31 19 9 20 28 19 30 29 26 23 13 21 19 28 23 18 21 20 23 21 21 15 28 19 26 10 16 22 19 31 31 29 19 22 23 15 20 18 23 25 21 24 25 17 13 28 21 25 9 16 19 17 25 20 29 14 22 15 19 20 15 20 18 33 22 16 17 16 21 26 18 18 17 22 30 30 24 21 21 29 31 20 16 22 20 28 38 22 20 17 28 22 31
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.0387398850173385
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
225241
31724.0387398850173-7.03873988501734
41823.7660599112048-5.76605991120481
51823.5426834132417-5.54268341324165
61623.3279604951252-7.32796049512516
72023.0440761481324-3.04407614813242
81622.9261489881697-6.92614898816974
91822.6578307727551-4.65783077275509
101722.4773869441883-5.47738694418834
112322.2651936037750.73480639622499
123022.29365991907487.70634008092523
132322.59220264771430.407797352285677
141822.6080006702522-4.60800067025225
151522.4294872541269-7.42948725412686
161222.1416697721642-10.1416697721642
172121.7487826513067-0.748782651306744
181521.7197748974921-6.71977489749214
192021.4594515906209-1.4594515906209
203121.40291260381199.59708739618812
212721.77470266604165.22529733395845
223421.977130083940512.0228699160595
232122.4428946820671-1.44289468206707
243122.38699710799178.61300289200833
251922.7206638496821-3.72066384968208
261622.5765257599572-6.57652575995722
272022.3217519082029-2.32175190820292
282122.2318075062404-1.23180750624035
292222.1840874250851-0.18408742508511
301722.1769558994042-5.17695589940418
312421.97640122312142.02359877687858
322522.05479520705892.94520479294107
332622.16889210209003.83110789791002
342522.31730878154402.68269121845597
351722.4212359308840-5.42123593088404
363222.21121787426979.78878212573028
373322.590434168280310.4095658317197
381322.9936995516815-9.99369955168153
393222.60654478015169.39345521984844
402522.9704461552842.02955384471599
412923.04907083786485.9509291621352
422223.2796091493522-1.27960914935225
431823.2300372380392-5.23003723803921
441723.0274261968012-6.02742619680117
452022.7939243989866-2.7939243989866
461522.6856880890227-7.68568808902272
472022.3879454161749-2.38794541617485
483322.295436685324610.7045633146754
492922.71013023729596.2898697627041
502322.95379906867710.0462009313229039
512622.95558888744423.04441111255576
521823.0735290238902-5.07352902389016
532022.8769810928725-2.87698109287253
541122.7655271761376-11.7655271761376
552822.30973200616565.69026799383435
562622.53017233396463.46982766603537
572222.6645930587768-0.664593058776823
581722.6388468000965-5.63884680009649
591222.4203985234304-10.4203985234304
601422.0167134827978-8.01671348279783
611721.7061469242573-4.70614692425729
622121.5238313335369-0.523831333536862
631921.5035381679072-2.50353816790717
641821.4065513871459-3.40655138714592
651021.2745819781022-11.2745819781022
662920.8378059686528.162194031348
673121.15400842691569.84599157308437
681921.5354410083386-2.53544100833860
69921.4372183152073-12.4372183152073
702020.9554019077406-0.955401907740647
712820.91838974768947.08161025231057
721921.1927305146015-2.19273051460155
733021.10778438659198.89221561340813
742921.45226779700477.54773220299531
752621.74466607469044.25533392530961
762321.90951722166731.09048277833273
771321.9517623991133-8.95176239911326
782121.6049721530691-0.604972153069081
791921.5815356014205-2.58153560142049
802821.48152720905336.5184727909467
812321.73405209546321.26594790453678
821821.7830947717229-3.78309477172292
832121.6365381152567-0.63653811525668
842021.6118787018625-1.61187870186248
852321.54943470629041.45056529370957
862121.6056294389789-0.605629438978887
872121.5821674241497-0.58216742414973
881521.5596143250773-6.55961432507733
892821.30549562036586.69450437963425
901921.5648399502809-2.56483995028085
912621.46547834551914.53452165448090
921021.6411451930223-11.6411451930223
931621.1901685667745-5.19016856677449
942220.98910203327701.01089796672296
951921.0282641042722-2.02826410427215
963120.949689386087910.0503106139121
973121.33903726365939.66096273634065
982921.71330184922207.28669815077803
991921.9955876977392-2.99558769773917
1002221.87953897476940.120461025230600
1012321.88420562103591.11579437896409
1021521.9274313669800-6.92743136697997
1032021.6590634723577-1.65906347235766
1041821.5947915442021-3.59479154420206
1052321.45552973311841.54447026688163
1062521.51536233367013.48463766632993
1072121.6503567961908-0.650356796190774
1082421.62516204868612.3748379513139
1092521.71716299785483.28283700214519
1101721.8443397258486-4.84433972584858
1111321.6566705618843-8.65667056188428
1122821.32131213968396.6786878603161
1132121.5800437394592-0.580043739459242
1142521.55757291168763.44242708831244
115921.6909321412694-12.6909321412694
1161621.1992868893537-5.19928688935374
1171920.9978671130880-1.99786711308803
1181720.9204699708471-3.92046997084708
1192520.76859141496254.23140858503747
1202020.9325156970083-0.932515697008263
1212920.89639014612938.1036098538707
1221421.2103230600936-7.21032306009362
1232220.93099597380771.06900402619227
1241520.9724090668655-5.9724090668655
1251920.7410386263386-1.74103862633862
1262020.6735909901435-0.673590990143516
1271520.6474961526366-5.64749615263664
1282020.4287128010476-0.428712801047638
1291820.4121045164296-2.41210451642959
1303320.318659864813312.6813401351867
1312220.80993352351621.1900664764838
1321620.8560365619782-4.85603656197817
1331720.6679142639271-3.66791426392715
1341620.5258196870892-4.52581968708915
1352120.35048995280210.649510047197886
1362620.37565189734825.62434810265183
1371820.5935384961424-2.59353849614239
1381820.4930651130138-2.49306511301379
1391720.3964840571949-3.3964840571949
1402220.26490465535591.73509534464406
1413020.33212204950169.66787795049843
1423020.70665452966559.29334547033445
1432421.06667766461272.93332233538729
1442121.1803142346044-0.180314234604406
1452121.1733288818888-0.173328881888843
1462921.16661414093437.83338585906571
1473121.47007860841099.52992139158906
1482021.8392666673454-1.83926666734537
1491621.7680136881362-5.76801368813619
1502221.54456150107940.455438498920639
1512021.56220513616-1.56220513616002
1522821.50168548881176.49831451118832
1533821.753429445781616.2465705542184
1542222.3828197209781-0.382819720978119
1552022.3679893290051-2.36798932900506
1561722.2762536946771-5.27625369467712
1572822.0718522332235.92814776677698
1582222.3015079960738-0.301507996073752
1593122.28982761097408.71017238902595


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
16022.627258687806111.149668781840734.1048485937715
16122.627258687806111.141059349664434.1134580259478
16222.627258687806111.132456365820134.1220610097922
16322.627258687806111.123859815840334.1306575597719
16422.627258687806111.115269685311734.1392476903005
16522.627258687806111.106685959874534.1478314157377
16622.627258687806111.098108625222634.1564087503896
16722.627258687806111.089537667102934.1649797085094
16822.627258687806111.080973071315234.1735443042971
16922.627258687806111.072414823712034.1821025519003
17022.627258687806111.063862910198134.1906544654141
17122.627258687806111.055317316730534.1992000588817
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290863616hdvabccwiis6nr4/1secv1290863727.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290863616hdvabccwiis6nr4/1secv1290863727.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290863616hdvabccwiis6nr4/2lncy1290863727.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290863616hdvabccwiis6nr4/2lncy1290863727.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290863616hdvabccwiis6nr4/3lncy1290863727.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290863616hdvabccwiis6nr4/3lncy1290863727.ps (open in new window)


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