Home » date » 2009 » Jun » 02 »

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 02 Jun 2009 09:41:52 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/02/t1243957372qyd3gj2wykn53bt.htm/, Retrieved Tue, 02 Jun 2009 17:42:55 +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/2009/Jun/02/t1243957372qyd3gj2wykn53bt.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 «
4.43 4.44 4.44 4.44 4.45 4.47 4.48 4.48 4.5 4.52 4.52 4.53 4.53 4.63 4.66 4.67 4.68 4.69 4.69 4.7 4.71 4.72 4.72 4.72 4.73 4.74 4.76 4.81 4.82 4.83 4.83 4.84 4.89 4.92 4.95 4.95 5.01 5.05 5.08 5.11 5.14 5.17 5.18 5.2 5.22 5.24 5.28 5.29 5.33 5.4 5.43 5.46 5.46 5.46 5.47 5.49 5.5 5.54 5.55 5.55 5.56 5.6 5.61 5.63 5.64 5.66 5.67 5.69 5.77 5.77 5.78 5.8 5.82 5.85 5.87 5.88 5.9 5.91 5.94 5.97 5.98 6 6.01 6.02
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.793999311610606
beta0.0134193323937087
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
134.534.423015872781060.106984127218944
144.634.608525874091240.0214741259087559
154.664.656760266376290.00323973362370555
164.674.6714010798474-0.00140107984740201
174.684.68275686774525-0.00275686774524875
184.694.69342170442019-0.00342170442019096
194.694.689379288673160.000620711326839718
204.74.696268616705530.00373138329446832
214.714.72139034061084-0.0113903406108378
224.724.73263663761863-0.0126366376186278
234.724.72142954082522-0.00142954082522362
244.724.72999254138796-0.00999254138796157
254.734.74519011869151-0.0151901186915113
264.744.81861215888169-0.0786121588816897
274.764.78245801993673-0.0224580199367317
284.814.773898944474780.0361010555252168
294.824.813296869650320.00670313034968029
304.834.829991584792718.415207288337e-06
314.834.827810291963420.00218970803657914
324.844.835137282833150.00486271716684783
334.894.856957267574390.0330427324256100
344.924.902654450706860.0173455492931449
354.954.916543111151850.0334568888481543
364.954.95061577380595-0.000615773805945352
375.014.972534209285640.0374657907143590
385.055.07832615284318-0.0283261528431797
395.085.09627139944495-0.0162713994449462
405.115.106250709811150.00374929018884895
415.145.114087777200270.0259122227997324
425.175.145345473484520.0246545265154818
435.185.163288002577540.0167119974224645
445.25.183471152354410.0165288476455903
455.225.22249238500372-0.00249238500372240
465.245.237955444507010.00204455549299443
475.285.243199149613940.0368008503860553
485.295.272949657024460.0170503429755353
495.335.318892837351480.0111071626485151
505.45.394062030971450.00593796902855104
515.435.44485234825027-0.0148523482502698
525.465.46218031798748-0.00218031798747997
535.465.47066968608911-0.0106696860891091
545.465.47313146498262-0.0131314649826244
555.475.458818514980910.0111814850190921
565.495.474475818933160.0155241810668363
575.55.50951006943973-0.00951006943972654
585.545.520794556884840.0192054431151565
595.555.546988216319410.00301178368058519
605.555.54498172322430.00501827677569988
615.565.58090218580957-0.0209021858095735
625.65.63143873107618-0.0314387310761832
635.615.6485507245144-0.038550724514403
645.635.64928596073528-0.0192859607352833
655.645.64110475250088-0.00110475250088182
665.665.649471395504980.0105286044950210
675.675.657664575556860.0123354244431413
685.695.674090721267570.0159092787324298
695.775.703592337273280.066407662726724
705.775.78149934471408-0.0114993447140765
715.785.779343511923160.000656488076837825
725.85.774750167901680.0252498320983214
735.825.82174776315338-0.00174776315338043
745.855.8876809894394-0.0376809894394032
755.875.89950454879958-0.0295045487995811
765.885.91244902444505-0.0324490244450510
775.95.897358380931630.00264161906837401
785.915.91096243344079-0.000962433440787613
795.945.909652818558290.0303471814417087
805.975.940837903102440.0291620968975597
815.985.99193331108579-0.0119333110857864
8265.990771808155080.0092281918449233
836.016.006975145950990.00302485404900654
846.026.008355824466290.0116441755337133


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
856.038727699073245.989770375946076.08768502220042
866.099804418082096.036799064296146.16280977186804
876.144316868504926.069560616644466.21907312036539
886.181224290413366.096073357511916.26637522331481
896.19981882753796.105340362077236.29429729299858
906.21088394917336.10781303057376.31395486777289
916.216825674277856.105729113125196.32792223543051
926.223476037670316.104737360083836.34221471525679
936.243042851848376.116761666875796.36932403682094
946.25564215826676.122205787030576.38907852950283
956.262862032334766.122597499604736.4031265650648
966.262922093690483.870352031788018.65549215559295
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243957372qyd3gj2wykn53bt/102fl1243957311.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243957372qyd3gj2wykn53bt/102fl1243957311.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243957372qyd3gj2wykn53bt/22ws31243957311.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243957372qyd3gj2wykn53bt/22ws31243957311.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243957372qyd3gj2wykn53bt/3fwv31243957311.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243957372qyd3gj2wykn53bt/3fwv31243957311.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