Home » date » 2009 » Dec » 04 »

WS9

*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, 04 Dec 2009 13:22:41 -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/04/t1259958211ile6fnt35pvjzur.htm/, Retrieved Fri, 04 Dec 2009 21:23:35 +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/04/t1259958211ile6fnt35pvjzur.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 «
14,3 14,2 15,9 15,3 15,5 15,1 15 12,1 15,8 16,9 15,1 13,7 14,8 14,7 16 15,4 15 15,5 15,1 11,7 16,3 16,7 15 14,9 14,6 15,3 17,9 16,4 15,4 17,9 15,9 13,9 17,8 17,9 17,4 16,7 16 16,6 19,1 17,8 17,2 18,6 16,3 15,1 19,2 17,7 19,1 18 17,5 17,8 21,1 17,2 19,4 19,8 17,6 16,2 19,5 19,9 20 17,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' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.200675449151377
beta0.0641812341628278
gamma0.793209546372447


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1314.814.75227088571220.0477291142878205
1414.714.68022614674420.0197738532557867
151615.98504639602280.0149536039771938
1615.415.38229857849130.0177014215086970
171515.0053857569075-0.00538575690746335
1815.515.46401047192690.035989528073074
1915.115.09207218224650.00792781775353646
2011.712.1474515255814-0.447451525581389
2116.315.71848999244940.581510007550612
2216.716.9362623346833-0.236262334683264
231515.1112839739173-0.111283973917345
2414.913.69653512823361.20346487176636
2514.615.0868015630430-0.486801563042963
2615.314.89582559234660.40417440765343
2717.916.31285026295401.58714973704605
2816.416.03561755542300.364382444577032
2915.415.7310352789970-0.331035278996975
3017.916.20452058163401.69547941836603
3115.916.1731589235234-0.273158923523402
3213.912.70088402734371.19911597265633
3317.817.76095914976370.0390408502363222
3417.918.4833715355693-0.583371535569281
3517.416.56742250256930.83257749743074
3616.716.17104137046970.528958629530273
371616.4232263059147-0.423226305914714
3816.616.9278212185080-0.327821218507950
3919.119.2134443381708-0.113444338170758
4017.817.73377130718730.0662286928127145
4117.216.88701528357380.312984716426204
4218.618.9695030778725-0.369503077872515
4316.317.1702752957141-0.870275295714109
4415.114.33754048407130.76245951592867
4519.218.80635459694140.393645403058638
4617.719.2234752859687-1.52347528596867
4719.117.95550799550971.14449200449032
481817.38029611893660.619703881063401
4917.517.01554176623490.484458233765114
5017.817.8099268127378-0.00992681273780605
5121.120.47871464220390.62128535779609
5217.219.1746546782697-1.97465467826973
5319.418.02913843885121.37086156114875
5419.820.0044238261271-0.204423826127147
5517.617.7805499364049-0.180549936404915
5616.216.00287086896420.19712913103578
5719.520.4239154419124-0.923915441912413
5819.919.28754390029340.612456099706606
592020.2094019111936-0.209401911193577
6017.318.9532929550498-1.6532929550498


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
6117.996883483613716.752990730912219.2407762363153
6218.362135335057317.076843176999519.6474274931151
6321.491332203979520.132946536522422.8497178714365
6418.280409399825216.916625695592619.6441931040579
6519.682664107958018.245435647335821.1198925685803
6620.368655531431218.862457351780421.8748537110819
6718.114656237576216.612792807439319.616519667713
6816.548051866519815.037860049033518.0582436840061
6920.268787522614518.564599328217921.9729757170111
7020.270448277684318.500515280205422.0403812751631
7120.527128811077418.676686918559022.3775707035958
7218.3039957835319-0.15000295718634536.7579945242501
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259958211ile6fnt35pvjzur/1fre61259958160.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259958211ile6fnt35pvjzur/1fre61259958160.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259958211ile6fnt35pvjzur/26de01259958160.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259958211ile6fnt35pvjzur/26de01259958160.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259958211ile6fnt35pvjzur/3zeb11259958160.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259958211ile6fnt35pvjzur/3zeb11259958160.ps (open in new window)


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