Home » date » 2009 » Dec » 06 »

review WS 9 exponential 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: Sun, 06 Dec 2009 13:44:29 -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/t1260132346t2rwamkzoahp6h6.htm/, Retrieved Sun, 06 Dec 2009 21:45:50 +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/t1260132346t2rwamkzoahp6h6.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 «
2360 2214 2825 2355 2333 3016 2155 2172 2150 2533 2058 2160 2260 2498 2695 2799 2947 2930 2318 2540 2570 2669 2450 2842 3440 2678 2981 2260 2844 2546 2456 2295 2379 2479 2057 2280 2351 2276 2548 2311 2201 2725 2408 2139 1898 2537 2069 2063 2524 2437 2189 2793 2074 2622 2278 2144 2427 2139 1828 2072 1800 1758 2246 1987 1868 2514 2121
 
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.347167391002761
beta0.0325187100821525
gamma0.393036024342864


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1322602165.7197168107194.2802831892864
1424982431.5906643154266.4093356845774
1526952639.2105146002655.7894853997418
1627992762.9478895386136.052110461389
1729472925.6953664964721.3046335035256
1829302894.1762987615735.8237012384334
1923182379.93135935169-61.9313593516904
2025402391.95263488983148.047365110167
2125702436.04022753511133.959772464894
2226692938.60901177949-269.609011779486
2324502290.93533203163159.064667968373
2428422464.45787164299377.542128357005
2534402771.97809928578668.021900714218
2626783318.28871966593-640.288719665934
2729813327.19077198552-346.190771985524
2822603326.35191724600-1066.35191724600
2928443102.7683529705-258.768352970502
3025462966.09141466652-420.091414666524
3124562275.01908045422180.980919545777
3222952414.64068780833-119.640687808334
3323792350.5562582082128.4437417917884
3424792675.19009901314-196.190099013143
3520572178.13929213336-121.139292133362
3622802273.96207168086.03792831920009
3723512459.59702725275-108.597027252746
3822762375.02088656453-99.020886564529
3925482562.43586993791-14.4358699379077
4023112458.22504011548-147.225040115482
4122012709.82987514301-508.829875143014
4227252437.61449401645287.385505983555
4324082163.01083964412244.989160355882
4421392240.54876701044-101.548767010440
4518982213.24299379638-315.242993796379
4625372320.30445896899216.695541031008
4720692005.2963166627663.7036833372424
4820632187.28515469447-124.285154694467
4925242282.83423077301241.165769226993
5024372319.83412911981117.165870880190
5121892608.49296364284-419.492963642839
5227932329.36548710150463.634512898496
5320742703.75440279794-629.75440279794
5426222595.6001228952226.39987710478
5522782216.3650064600961.6349935399085
5621442140.462436743903.53756325610357
5724272089.09653730266337.903462697335
5821392595.01466406412-456.014664064122
5918282007.89160094113-179.891600941129
6020722046.6086938547225.3913061452845
6118002276.25230583301-476.252305833008
6217582031.79577134451-273.795771344512
6322462006.10271408423239.897285915774
6419872156.21535900778-169.215359007781
6518682017.54965846487-149.549658464873
6625142189.25953005690324.740469943095
6721211959.88673775854161.113262241463


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
681909.365703954081549.431024529772269.3003833784
691928.653912851781508.700713834472348.60711186910
702067.646427352901577.970324617352557.32253008844
711742.125080082751246.459524309262237.79063585623
721879.590654444891307.609769464572451.57153942521
731950.788381449311313.699865872772587.87689702584
741921.701915366721243.718994275832599.68483645761
752131.05238560251344.973578052352917.13119315265
762093.661645780831272.098146970242915.22514459141
772019.888471554941176.426741107912863.35020200197
782384.095975787821357.620914467663410.57103710799
792000.903229255561147.678233461312854.12822504982
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260132346t2rwamkzoahp6h6/1r7q61260132267.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260132346t2rwamkzoahp6h6/1r7q61260132267.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/06/t1260132346t2rwamkzoahp6h6/3t0qj1260132267.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260132346t2rwamkzoahp6h6/3t0qj1260132267.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