Home » date » 2011 » Jan » 16 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 16 Jan 2011 20:44:32 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/Jan/16/t12952105537rpcnfj52vaz4n1.htm/, Retrieved Sun, 16 Jan 2011 21:42:36 +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/2011/Jan/16/t12952105537rpcnfj52vaz4n1.htm/},
    year = {2011},
}
@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 = {2011},
    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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
47 19 52 136 80 42 54 66 81 63 137 72 107 58 36 52 79 77 54 84 48 96 83 66 61 53 30 74 69 59 42 65 70 100 63 105 82 81 75 102 121 98 76 77 63 37 35 23 40 29 37 51 20 28 13 22 25 13 16 13 16 17 9 17 25 14 8 7 10 7 10 3
 
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' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.434895061810831
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13107109.712152105484-2.71215210548438
145857.96958354020170.0304164597983032
153636.1277445966824-0.12774459668244
165251.86290816481120.137091835188784
177979.4599600239307-0.459960023930705
187779.6279980698353-2.62799806983531
195452.5353043614241.46469563857601
208461.232211872579122.7677881274209
214885.879172493516-37.8791724935161
229656.724638417532339.2753615824677
2383167.882856301175-84.8828563011751
246667.1347028385988-1.13470283859881
256195.2099895082458-34.2099895082458
265343.46808962710219.53191037289793
273029.568840105820.431159894179963
287442.890116252750231.1098837472498
296985.9622315902852-16.9622315902852
305977.7094009460039-18.7094009460039
314248.1821119025566-6.18211190255661
326560.86286551224814.13713448775189
337044.243604980892925.7563950191071
3410085.285339543199214.7146604568008
3563101.593273536218-38.593273536218
3610567.945435454346237.0545645456538
378292.1827854617672-10.1827854617672
388169.737759632433811.2622403675662
397542.049013188278932.9509868117211
40102105.998614544043-3.99861454404311
41121106.47341611217414.526583887826
4298107.921527005735-9.9215270057353
437678.2912045478421-2.2912045478421
4477116.488186049249-39.4881860492494
456385.5098420440093-22.5098420440093
4637100.655582674904-63.6555826749038
473554.9861524299234-19.9861524299234
482362.2536123864517-39.2536123864517
494036.86768932377893.1323106762211
502935.1133023270487-6.11330232704866
513722.278434769810214.7215652301898
525139.464877494041111.5351225059589
532049.6151912998426-29.6151912998426
542830.7866838335932-2.78668383359322
551323.0690447967357-10.0690447967357
562222.0015794539673-0.0015794539672811
572520.14456994839974.85543005160029
581317.8948314310559-4.89483143105591
591617.5785870884904-1.5785870884904
601315.1833106324713-2.18331063247129
611623.7335877527623-7.73358775276226
621715.83681871094311.16318128905692
63916.0705550843557-7.07055508435574
641715.6619480506821.338051949318
65258.4742409160065616.5257590839934
661422.7636241575371-8.7636241575371
67810.8087440393825-2.80874403938249
68716.1523853797942-9.15238537979418
691012.3907371346961-2.39073713469611
7076.605486014664930.394513985335066
71108.573006307300471.42699369269953
7237.8845311083214-4.88453110832141


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
738.10083159762423-34.615157321455750.8168205167041
748.1926835661484-38.753448497571655.1388156298684
755.26004867967327-41.068987964096151.5890853234426
769.4250564486454-54.902293041297873.7524059385886
777.36489625833425-52.502946497426167.2327390140946
784.80830968310635-48.109456709323857.7260760755365
793.00917633805022-45.871487879486251.8898405555866
803.39472623537472-52.225662868840959.0151153395903
815.16297917021532-71.873312386826682.1992707272572
823.43656612422804-59.87232129251266.7454535409681
834.45423749090523-76.469427732624185.3779027144346
841.77232110726812-46.035006648690549.5796488632268
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/16/t12952105537rpcnfj52vaz4n1/1pg2k1295210670.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t12952105537rpcnfj52vaz4n1/1pg2k1295210670.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t12952105537rpcnfj52vaz4n1/2dinc1295210670.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t12952105537rpcnfj52vaz4n1/2dinc1295210670.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t12952105537rpcnfj52vaz4n1/3us9e1295210670.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t12952105537rpcnfj52vaz4n1/3us9e1295210670.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