Home » date » 2010 » May » 31 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 31 May 2010 20:29:45 +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/May/31/t1275337831r18zpwocgzb0jaq.htm/, Retrieved Mon, 31 May 2010 22:30: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/May/31/t1275337831r18zpwocgzb0jaq.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 «
1 1 3 3 1 1 -2 1 1 -1 -4 -2 -1 -5 -4 -5 0 -2 -4 -6 -2 -2 -2 1 -2 0 -1 2 3 2 3 4 5 5 4 5 6 4 6 6 3 5 5 5 3 5 5 6 6 5 4 4 0 2 3 3 2 3 5 6 6 5 4 7 5 6 5 6 5 6 6 6 6
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.427178567563865
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13-11.35890151515151-2.35890151515151
14-5-3.27377065511514-1.72622934488486
15-4-2.5945121672831-1.40548783271690
16-5-4.02823977972488-0.97176022027512
1700.514978414695782-0.514978414695782
18-2-1.91334266015361-0.0866573398463941
19-4-4.908694151791420.908694151791417
20-6-1.18718615234217-4.81281384765783
21-2-2.701450411069510.701450411069507
22-2-3.776805829251751.77680582925175
23-2-5.642792460272863.64279246027286
241-1.920002928494392.92000292849439
25-2-0.815536271769387-1.18446372823061
260-4.584105611691674.58410561169167
27-1-1.025479663819300.0254796638192989
282-1.599480158614293.59948015861429
2935.15812836103317-2.15812836103317
3022.27324033745255-0.273240337452547
313-0.2316567446170193.23165674461702
3241.204768679800592.79523132019941
3356.09918700935527-1.09918700935527
3454.870624508235190.129375491764812
3543.369768080373340.630231919626659
3655.39162698075596-0.391626980755959
3762.730309846854183.26969015314582
3844.16881973408876-0.168819734088759
3963.085819195611872.91418080438813
4065.79307399912110.206926000878902
4137.80337453365337-4.80337453365337
4254.868198296848220.131801703151781
4354.544006660579470.455993339420527
4454.544734330759360.455265669240639
4536.20876319934777-3.20876319934777
4654.782781894948780.217218105051216
4753.606351245254361.39364875474564
4865.368982776652460.631017223347541
4965.241798254231680.75820174576832
5053.637801962097961.36219803790204
5144.97482818702663-0.97482818702663
5244.47000812582455-0.470008125824545
5303.32112938065024-3.32112938065024
5423.84611122637495-1.84611122637495
5532.86270149557620.137298504423799
5632.72687273757740.273127262422599
5722.21426171745076-0.214261717450755
5834.02994278494165-1.02994278494165
5952.994636422658132.00536357734187
6064.581727729494051.41827227050595
6164.86369571074261.1363042892574
6253.767198742774951.23280125722505
6343.710250726482200.289749273517804
6474.034802804029312.96519719597069
6552.720186786268892.27981321373111
6666.48269327847014-0.482693278470141
6757.21784607675214-2.21784607675214
6866.1537556538837-0.153755653883697
6955.1796025474472-0.179602547447201
7066.542849672042-0.542849672041998
7167.45430758632294-1.45430758632294
7267.22720303786996-1.22720303786996
7366.21756336344099-0.217563363440993


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
744.597998682339560.7877409747445368.4082563899346
753.47422400272556-0.6691251585576967.61757316400881
765.207555312006410.7559689940377279.65914162997509
772.23366796905158-2.506152620416476.97348855851963
783.43986419232116-1.571640341685038.45136872632735
793.38728050246528-1.881918314089658.65647931902021
804.45296162244616-1.061903257349469.96782650224179
813.52968398139548-2.220360637250769.27972860004171
824.76157772670089-1.2143984772713010.7375539306731
835.38282675822359-0.81084501742461911.5764985338718
845.9070615940509-0.49690971588487512.3110329039867
856-0.60758102579906512.6075810257991
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/31/t1275337831r18zpwocgzb0jaq/1fay41275337781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275337831r18zpwocgzb0jaq/1fay41275337781.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275337831r18zpwocgzb0jaq/2fay41275337781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275337831r18zpwocgzb0jaq/2fay41275337781.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275337831r18zpwocgzb0jaq/3fay41275337781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275337831r18zpwocgzb0jaq/3fay41275337781.ps (open in new window)


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