Home » date » 2010 » Jan » 27 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 26 Jan 2010 18:09:50 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/27/t12645546453a4mhkn8rajo50i.htm/, Retrieved Wed, 27 Jan 2010 02:10: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/2010/Jan/27/t12645546453a4mhkn8rajo50i.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 «
2,46 2,46 2,45 2,45 2,46 2,43 2,44 2,44 2,43 2,43 2,42 2,43 2,43 2,42 2,41 2,42 2,39 2,4 2,39 2,4 2,41 2,41 2,41 2,41 2,42 2,43 2,43 2,43 2,44 2,42 2,44 2,42 2,42 2,42 2,43 2,44 2,43 2,44 2,44 2,45 2,45 2,43 2,44 2,45 2,46 2,44 2,43 2,42 2,41 2,43 2,41 2,43 2,43 2,44 2,43 2,44 2,43 2,44 2,44 2,43 2,43 2,43 2,43 2,44 2,47 2,48 2,49 2,5 2,51 2,49 2,49 2,48 2,48 2,48 2,5 2,5 2,5 2,5 2,5 2,48 2,49 2,48 2,5 2,5 2,49 2,48 2,47 2,46 2,43 2,42 2,43 2,45 2,45 2,46 2,44 2,45 2,45 2,42 2,41 2,39 2,39 2,38 2,37 2,37 2,38 2,39 2,41 2,42 2,48 2,53 2,56 2,56 2,53 2,57 2,56 2,57 2,58 2,57 2,6 2,63 2,72 2,83 2,9 2,92 2,94 2,95 2,98 3,02 3,16 3,2 3,18 3,17
 
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.900361087365125
beta0.157393226075154
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
132.432.45106837606838-0.0210683760683770
142.422.419815829452030.000184170547967710
152.412.406474347760390.00352565223960877
162.422.415807695599080.00419230440092111
172.392.385918698978870.00408130102113136
182.42.396508123407180.00349187659282268
192.392.40456168941889-0.0145616894188882
202.42.388463646044670.0115363539553281
212.412.387914757259390.0220852427406060
222.412.409576726791990.000423273208014052
232.412.403045084239650.00695491576034746
242.412.42337986471044-0.0133798647104402
252.422.410577366231440.00942263376856367
262.432.414274115830340.0157258841696613
272.432.422839954403730.00716004559627015
282.432.44360825013825-0.0136082501382502
292.442.403254993978210.0367450060217869
302.422.45339734278777-0.0333973427877710
312.442.431413380042670.00858661995733367
322.422.44701284489899-0.0270128448989913
332.422.415599292541930.00440070745806898
342.422.419466786272140.000533213727855308
352.432.413986882103350.0160131178966529
362.442.44203677083343-0.00203677083342546
372.432.44491219797826-0.0149121979782634
382.442.427071383232130.0129286167678688
392.442.431613299633310.0083867003666911
402.452.4509386467256-0.000938646725600734
412.452.428327120527820.0216728794721806
422.432.45709169193994-0.0270916919399391
432.442.44504339288516-0.00504339288516498
442.452.44296737807560.00703262192440146
452.462.44830520509970.0116947949002988
462.442.46235646261533-0.0223564626153276
472.432.43856807665296-0.0085680766529559
482.422.43996221513687-0.0199622151368728
492.412.42014982038177-0.0101498203817703
502.432.40478021783520.0252197821647990
512.412.41708718398364-0.00708718398364105
522.432.416509579066540.0134904209334632
532.432.40614546437380.0238545356261985
542.442.429327681896570.0106723181034329
552.432.45614127886923-0.0261412788692317
562.442.435946774862290.00405322513770656
572.432.43831837567344-0.00831837567343552
582.442.427373414633570.0126265853664287
592.442.437829428795360.00217057120464359
602.432.4506518752853-0.0206518752853011
612.432.43399344837853-0.00399344837852489
622.432.43136063103556-0.00136063103555939
632.432.416419505226810.0135804947731857
642.442.439332344930770.000667655069228168
652.472.419470397073180.0505296029268201
662.482.470151105934110.00984889406589273
672.492.49723332970381-0.00723332970381296
682.52.50442888684123-0.004428886841227
692.512.504086356829780.00591364317021581
702.492.51621464035644-0.0262146403564376
712.492.49332583718102-0.00332583718102297
722.482.50081476438049-0.0208147643804906
732.482.48753565957262-0.00753565957262392
742.482.48334008836706-0.00334008836706134
752.52.469189127578970.0308108724210334
762.52.50985431087844-0.00985431087844457
772.52.487521312392870.0124786876071328
782.52.496531180750690.00346881924931042
792.52.51190495870566-0.0119049587056574
802.482.51024975401399-0.0302497540139908
812.492.479106503808140.0108934961918634
822.482.48463979002433-0.00463979002432513
832.52.478636709980430.0213632900195657
842.52.50529085526093-0.00529085526092743
852.492.50819056065946-0.0181905606594572
862.482.49418843034905-0.0141884303490531
872.472.47150413971845-0.00150413971844499
882.462.47227425528616-0.0122742552861648
892.432.44289668298617-0.0128966829861699
902.422.417474873429620.00252512657037984
912.432.419646481146740.0103535188532646
922.452.428537673744260.0214623262557447
932.452.447715179724980.00228482027501853
942.462.442391630234260.0176083697657399
952.442.46060545010448-0.0206054501044814
962.452.442463967732280.00753603226772137
972.452.45309208148258-0.00309208148258167
982.422.45268730938122-0.0326873093812163
992.412.41159421423757-0.00159421423756534
1002.392.40818036048418-0.0181803604841848
1012.392.369556437226260.0204435627737425
1022.382.376547465060490.00345253493950493
1032.372.38132347653303-0.0113234765330308
1042.372.36972194136280.000278058637201095
1052.382.362830618991790.0171693810082090
1062.392.369460160375130.0205398396248695
1072.412.383945988706020.0260540112939807
1082.422.414671213592330.00532878640766699
1092.482.425992602081240.0540073979187623
1102.532.485880318994390.0441196810056139
1112.562.539754882553910.0202451174460863
1122.562.58016210654684-0.0201621065468354
1132.532.56913192617182-0.0391319261718244
1142.572.537877632272080.0321223677279168
1152.562.58814450077408-0.0281445007740806
1162.572.58132013547017-0.0113201354701720
1172.582.58279189600329-0.00279189600329000
1182.572.58607879445085-0.0160787944508543
1192.62.577248687372020.0227513126279781
1202.632.611571855880400.0184281441195968
1212.722.650030603722910.0699693962770889
1222.832.736059591491730.0939404085082711
1232.92.852227005876150.0477729941238461
1242.922.93710916464554-0.0171091646455368
1252.942.95108627446372-0.0110862744637235
1262.952.98030593665009-0.0303059366500880
1272.982.98763614517666-0.00763614517666156
1283.023.02313560213474-0.00313560213474151
1293.163.056168514204260.103831485795738
1303.23.19258311413710.00741688586290401
1313.183.25055823275868-0.0705582327586756
1323.173.22899703712107-0.0589970371210691


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1333.220467374890363.172684297028313.26825045275241
1343.253558367859593.184546737520153.32256999819903
1353.274904339798723.185673298087113.36413538151033
1363.297897736591583.188473577371363.4073218958118
1373.317892909748483.187936333873953.447849485623
1383.346763762965953.195770131234473.49775739469743
1393.379518294675173.20690182589273.55213476345763
1403.419302836311933.224437446696393.61416822592747
1413.463222722834193.245463672066353.68098177360203
1423.479236527099803.237932567949943.72054048624967
1433.504405041599223.238905488599863.76990459459859
1443.539163164530423.248822083974663.82950424508619
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/27/t12645546453a4mhkn8rajo50i/1tbs31264554588.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t12645546453a4mhkn8rajo50i/1tbs31264554588.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t12645546453a4mhkn8rajo50i/2ds1d1264554588.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t12645546453a4mhkn8rajo50i/2ds1d1264554588.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t12645546453a4mhkn8rajo50i/3jz841264554588.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t12645546453a4mhkn8rajo50i/3jz841264554588.ps (open in new window)


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