Home » date » 2009 » Dec » 06 »

*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: Sun, 06 Dec 2009 08:52:59 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/06/t1260114884l797xirkc1d9tb9.htm/, Retrieved Sun, 06 Dec 2009 16:54:49 +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/2009/Dec/06/t1260114884l797xirkc1d9tb9.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
62 64 62 64 64 69 69 65 56 58 53 62 55 60 59 58 53 57 57 53 54 53 57 57 55 49 50 49 54 58 58 52 56 52 59 53 52 53 51 50 56 52 46 48 46 48 48 49 53 48 51 48 50 55 52 53 52 55 53 53 56 54 52 55 54 59 56 56 51 53 52 51 46 49 46 55 57 53 52 53 50 54 53 50 51 52 47 51 49 53 52 45 53 51 48 48 48 48 40 43 40 39 39 36 41 39 40 39 46 40 37 37 44 41 40 36 38 43 42 45 46
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.423371990682941
beta0.0195569935214878
gamma0.730774983925955


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
135558.9023392751817-3.90233927518170
146062.8634077747937-2.86340777479365
155960.546313553452-1.54631355345199
165858.475457358636-0.47545735863595
175352.64098541744080.359014582559205
185756.12416287586270.875837124137291
195761.2947882409337-4.29478824093374
205355.6947116162030-2.69471161620295
215446.5546054961237.44539450387703
225351.16572132873511.83427867126492
235747.45152837746539.54847162253474
245760.6274256909451-3.62742569094512
255551.24920268211453.7507973178855
264958.6305811592515-9.63058115925155
275054.0261322304602-4.0261322304602
284951.4089408524789-2.40894085247891
295445.72574689048798.27425310951212
305852.55446522796845.44553477203164
315857.43090981050220.569090189497842
325254.6943984799615-2.69439847996153
335649.76456079609456.23543920390546
345251.61945786800720.380542131992812
355950.35663405989458.64336594010547
365357.555527799128-4.55552779912804
375251.08148272007310.91851727992691
385351.37073310957371.62926689042625
395154.0787039994874-3.07870399948737
405052.7136347268283-2.71363472682827
415651.33802822135264.66197177864736
425255.5220162897591-3.5220162897591
434654.5521144379234-8.55211443792344
444847.00633666985340.993663330146553
454647.249880566214-1.24988056621404
464843.84211495343544.15788504656458
474847.11880144585650.88119855414353
484945.61743718220743.38256281779258
495345.01743386227367.98256613772642
504848.5925208556935-0.5925208556935
515148.33590866504292.66409133495714
524849.5868036537874-1.58680365378743
535051.7158859689251-1.71588596892507
545549.80875956933275.19124043066726
555250.27202467485891.72797532514111
565351.33863241668191.66136758331808
575251.05628155923710.943718440762858
585550.98756329332254.01243670667746
595353.1057351936292-0.105735193629229
605352.36217088597260.637829114027426
615652.49674458657583.50325541342418
625450.55989165834233.44010834165772
635253.6694461616626-1.66944616166263
645551.35290957402683.64709042597318
655456.1215125883556-2.12151258835559
665957.25500605584151.74499394415845
675654.7409330054831.25906699451698
685655.7645886202560.235411379743958
695154.6501131039374-3.65011310393743
705353.9979510761349-0.997951076134868
715252.3255943171342-0.325594317134190
725151.8514706285443-0.851470628544305
734652.5242473405578-6.52424734055778
744946.56002514887062.43997485112942
754647.0591717230597-1.05917172305969
765547.05528769349297.9447123065071
775751.10874163722155.89125836277847
785357.2586583767913-4.25865837679129
795252.1779199812679-0.177919981267898
805352.13553677816450.8644632218355
815049.76947734132060.230522658679448
825451.83153301252222.16846698747776
835351.84569968176211.15430031823792
845051.8421779770833-1.84217797708325
855149.61410428967841.38589571032156
865250.93943424403121.06056575596885
874749.3879241678224-2.38792416782242
885152.7086080942778-1.70860809427776
894951.7175238785488-2.71752387854877
905349.88161898638343.11838101361658
915249.71273369840292.28726630159712
924551.1621189657747-6.16211896577473
935345.7525110491427.24748895085803
945151.5505192219968-0.550519221996836
954850.0404845254472-2.04048452544724
964847.50144917991120.498550820088795
974847.61451050295830.385489497041654
984848.3219208580364-0.321920858036364
994044.9262089909116-4.92620899091164
1004346.9442843611873-3.94428436118725
1014044.5513370720774-4.55133707207737
1023944.0083697566031-5.00836975660307
1033940.2145498272243-1.21454982722427
1043637.0151467322396-1.01514673223964
1054138.51536696938932.48463303061067
1063938.92019377461570.0798062253843028
1074037.27939764296232.7206023570377
1083937.78256505320491.21743494679509
1094638.02200273917257.97799726082753
1104041.5297337835317-1.52973378353173
1113736.28688206563460.713117934365442
1123740.5493501836833-3.54935018368331
1134438.05243304668645.94756695331359
1144141.7288759229973-0.728875922997325
1154041.4643457946619-1.46434579466186
1163638.2481997700295-2.24819977002948
1173840.8968713160479-2.89687131604788
1184338.09649231067844.90350768932164
1194239.66634272363642.33365727636360
1204539.43026187041175.56973812958829
1214644.42624795072521.57375204927482


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12241.249575391141535.035659898981347.4634908833018
12337.587489490319230.727015422353344.4479635582851
12439.813714222428432.068729761142047.5586986837148
12542.968507246999834.217652285926851.7193622080729
12641.371896547315432.155064328052450.5887287665783
12741.159732195254631.323300484278950.9961639062304
12838.216778612230728.221464160553548.212093063908
12941.787938943820830.494473061912553.0814048257292
13043.690123719449331.380288027240755.9999594116578
13142.112869122834029.547261700123954.678476545544
13242.184818659475128.990922503200455.3787148157497
13343.09017516148086.8418621588705679.3384881640911
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260114884l797xirkc1d9tb9/1pk4d1260114777.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260114884l797xirkc1d9tb9/1pk4d1260114777.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t1260114884l797xirkc1d9tb9/2b7de1260114777.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260114884l797xirkc1d9tb9/2b7de1260114777.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t1260114884l797xirkc1d9tb9/3gpku1260114777.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260114884l797xirkc1d9tb9/3gpku1260114777.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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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