Home » date » 2009 » Dec » 11 »

workshop 9 - review link 4

*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: Fri, 11 Dec 2009 05:15:32 -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/11/t12605338092cs0pfvmhr1avql.htm/, Retrieved Fri, 11 Dec 2009 13:16:53 +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/11/t12605338092cs0pfvmhr1avql.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 «
5.4 5.4 5.6 5.7 5.8 5.8 5.8 5.9 6.1 6.4 6.4 6.3 6.2 6.2 6.3 6.4 6.5 6.6 6.6 6.6 6.8 7 7.2 7.3 7.5 7.6 7.6 7.7 7.7 7.7 7.7 7.6 7.7 7.9 7.9 7.9 7.8 7.6 7.4 7 7 7.2 7.5 7.8 7.8 7.7 7.6 7.6 7.5 7.5 7.6 7.6 7.9 7.6 7.5 7.5 7.6 7.7 7.8 7.9 7.9
 
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
alpha1
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
136.25.832225097658950.367774902341054
146.26.198772533445050.00122746655494854
156.36.30285764898377-0.0028576489837695
166.46.40700240339455-0.00700240339454616
176.56.50289753406811-0.00289753406810789
186.66.586242011763240.0137579882367573
196.66.529893577728470.070106422271528
206.66.69937666821261-0.0993766682126065
216.86.81497786457103-0.0149778645710335
2277.13045746695204-0.130457466952037
237.26.997341264414020.202658735585979
247.37.078320228772430.221679771227565
257.57.168353528337360.331646471662637
267.67.485985648199150.114014351800849
277.67.71249733960818-0.11249733960818
287.77.71657530472002-0.0165753047200248
297.77.81140647404256-0.111406474042564
307.77.79085739637863-0.0908573963786266
317.77.60820343688340.0917965631165982
327.67.80587460308918-0.20587460308918
337.77.83818804107117-0.138188041071166
347.98.06569609505028-0.165696095050285
357.97.888821994637140.0111780053628561
367.97.760464430579660.139535569420337
377.87.752573017457510.0474269825424853
387.67.78303482852702-0.183034828527020
397.47.71249733960818-0.312497339608179
4077.51510255066995-0.515102550669953
4177.10682473713324-0.106824737133241
427.27.088165088686320.111834911313681
437.57.118062591812980.381937408187021
447.87.604693160384350.195306839615652
457.88.0428300763712-0.242830076371194
467.78.16961149817231-0.469611498172314
477.67.69071516569867-0.0907151656986738
487.67.468116915519420.131883084480577
497.57.460463272897440.0395367271025613
507.57.485985648199150.0140143518008493
517.67.61180879027787-0.0118087902778656
527.67.71657530472002-0.116575304720025
537.97.710751940198370.189248059801626
547.67.99162662714786-0.391626627147859
557.57.51017526786932-0.0101752678693172
567.57.60469316038435-0.104693160384348
577.67.73586702342115-0.135867023421153
587.77.96178069192826-0.261780691928258
597.87.690715165698670.109284834301326
607.97.663015258892920.236984741107084
617.97.752573017457510.147426982542486


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
627.882051221969647.500422791050298.263679652889
637.996490623377847.45492526865218.53805597810358
648.115985593954857.450201333400868.78176985450883
658.23011483449687.458927037493799.0013026314998
668.323011134085037.459903651651879.18611861651818
678.218929844380837.290756399259759.14710328950192
688.327869876864837.319229968353649.33650978537602
698.582951906247167.482602534875569.68330127761876
708.983219127800657.777782233116610.1886560224847
718.961787526907567.7082567887773910.2153182650377
728.795167580624287.5153872627932910.0749478984553
738.624196928506252.3622032079412114.8861906490713
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605338092cs0pfvmhr1avql/1ss7r1260533730.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605338092cs0pfvmhr1avql/1ss7r1260533730.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t12605338092cs0pfvmhr1avql/28i381260533730.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605338092cs0pfvmhr1avql/28i381260533730.ps (open in new window)


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