Home » date » 2010 » Jun » 04 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 04 Jun 2010 12:18:00 +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/04/t12756539108jp94jq6d9fxfv8.htm/, Retrieved Fri, 04 Jun 2010 14:18:31 +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/04/t12756539108jp94jq6d9fxfv8.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 «
2953 2635 2404 2413 2136 1565 1451 2037 2477 2785 2994 2681 3098 2708 2517 2445 2087 1801 1216 2173 2286 3121 3458 3511 3524 2767 2744 2603 2527 1846 1066 2327 3066 3048 3806 4042 3583 3438 2957 2885 2744 1837 1447 2504 3248 3098 4318 3561 3316 3379 2717 2354 2445 1542 1606 2590 3588 3202 4704 4005 3810 3488 2781 2944 2817 1960 1937 2903 3357 3552 4581 3905 4581 4037 3345 3175 2808 2050 1719 3143 3756 4776 4540 4309 4563 3506 3665 3361 3094 2440 1633 2935 4159 4159 4894 4921 4577 4155 3851 3429 3370 2726
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.0739209572408732
beta0.0457595802441608
gamma0.330408735129191


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1330983043.7513395881554.248660411848
1427082676.1476047433131.8523952566948
1525172499.0315056382217.968494361784
1624452429.6729784390915.3270215609109
1720872052.4833123189834.5166876810194
1818011740.22968219760.7703178030013
1912161479.02638528787-263.026385287868
2021732046.24268410856126.757315891436
2122862498.10879770803-212.108797708034
2231212790.63405895328330.365941046718
2334583035.43251390506422.56748609494
2435112745.82958857622765.170411423783
2535243268.87831897298255.121681027018
2627672885.73433583387-118.734335833874
2727442683.6500813541360.3499186458675
2826032614.73872898148-11.7387289814774
2925272216.85245011382310.147549886176
3018461910.12665563092-64.1266556309245
3110661512.13470404602-446.134704046022
3223272238.3636353224288.636364677583
3330662610.05431782677455.945682173229
3430483166.8416959311-118.841695931104
3538063430.05153765498375.948462345018
3640423222.6200002145819.379999785502
3735833622.01234825892-39.0123482589183
3834383065.99529840135372.004701598646
3929572946.197059666110.8029403338951
4028852846.3452049444338.6547950555669
4127442525.2917641732218.708235826795
4218372059.96935124306-222.969351243057
4314471488.53965796715-41.5396579671487
4425042510.41768909839-6.41768909838584
4532483039.95282066349208.047179336514
4630983440.21107317002-342.211073170018
4743183880.64978432776437.35021567224
4835613802.38664979137-241.386649791374
4933163865.93410822792-549.934108227915
5033793369.510646790669.48935320933651
5127173096.84754101386-379.847541013864
5223542969.45203176324-615.45203176324
5324452643.90816159447-198.908161594466
5415422002.43623879537-460.436238795372
5516061466.69192742223139.308072577772
5625902509.8619949996680.1380050003377
5735883106.16889657423481.831103425772
5832023352.77704040259-150.777040402587
5947044044.55265104991659.447348950087
6040053765.26463767186239.735362328138
6138103763.6505830362546.3494169637484
6234883471.6696762223716.3303237776299
6327813065.73113731036-284.731137310358
6429442863.3517076119180.648292388094
6528172709.43587516602107.564124833983
6619601968.08867639479-8.0886763947949
6719371626.66791923682310.332080763182
6829032755.36853261452147.631467385484
6933573546.86017041421-189.860170414209
7035523554.69355056176-2.69355056176073
7145814582.35179879189-1.35179879189491
7239054097.16659814172-192.166598141725
7345814000.65408916199580.345910838008
7440373720.09301337571316.906986624292
7533453208.18326799286136.816732007139
7631753146.5290951154628.4709048845352
7728082987.08280068018-179.082800680183
7820502127.23032372058-77.2303237205765
7917191858.74341484165-139.743414841654
8031432966.90568577197176.094314228026
8137563697.4496866781258.5503133218754
8247763786.76089529729989.239104702712
8345404981.53083543739-441.530835437393
8443094364.64607760225-55.6460776022477
8545634528.98569643534.0143035649944
8635064098.53767225567-592.537672255672
8736653430.0431700927234.956829907297
8833613335.5910326636225.4089673363828
8930943098.50112839995-4.50112839995199
9024402232.42957136688207.570428633124
9116331946.07136552366-313.071365523663
9229353216.87679167235-281.876791672346
9341593912.437485424246.562514576004
9441594314.22352711335-155.223527113348
9548945002.97302409231-108.973024092307
9649214506.96988076895414.030119231046
9745774739.32609311007-162.326093110073
9841554072.1335387119282.8664612880757
9938513685.92421974168165.07578025832
10034293512.22381455546-83.2238145554611
10133703244.77846622642125.22153377358
10227262411.44519592482314.554804075179


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1031947.581908061761726.600268381292168.56354774222
1043337.575801942953103.661152444673571.49045144124
1054282.253223543324032.083126184554532.42332090209
1064562.614244115064302.009076719794823.21941151034
1075331.335921899445049.295643161045613.37620063784
1084980.993505402464699.381454065865262.60555673906
1095009.494023993844720.00003813815298.98800984958
1104389.905538875474108.793051444984671.01802630597
1113998.28704417143720.500552464624276.07353587817
1123719.662543208563442.820903063823996.5041833533
1133509.417032880833232.098110929843786.73595483183
1142672.449291151052536.403441862982808.49514043912
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/04/t12756539108jp94jq6d9fxfv8/1m52r1275653876.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/04/t12756539108jp94jq6d9fxfv8/1m52r1275653876.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/04/t12756539108jp94jq6d9fxfv8/2fekc1275653876.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/04/t12756539108jp94jq6d9fxfv8/2fekc1275653876.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/04/t12756539108jp94jq6d9fxfv8/3fekc1275653876.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/04/t12756539108jp94jq6d9fxfv8/3fekc1275653876.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=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