Home » date » 2009 » Jun » 06 »

Ben Eysackers, opgave 10, oef 2

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 06 Jun 2009 08:27: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/06/t12442985311htsfc9ee4p66hw.htm/, Retrieved Sat, 06 Jun 2009 16:28:54 +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/06/t12442985311htsfc9ee4p66hw.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 «
46 33 34 25 33 18 26 21 23 24 26 32 47 45 47 43 48 48 43 44 46 36 32 18 31 37 32 29 29 40 26 29 19 30 12 24 40 43 49 49 48 33 46 46 43 44 38 38 39 47 41 36 38 11 24 30 18 21 22 15 15 16 26 39 28 25 25 13 20 13 10 19 31 36 26 33 42 44 45 42 60 42 63 71
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.770094354773406
beta0.00308092481798597
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
134736.057637861091310.9423621389087
144542.47814430007622.52185569992385
154745.91940984811661.0805901518834
164342.81199294708370.188007052916312
174848.7905776544218-0.790577654421796
184850.2640287424153-2.26402874241529
194340.14260503229172.85739496770831
204434.64042082258349.35957917741658
214645.40879189735830.59120810264168
223647.0515459369091-11.0515459369091
233241.1804620027384-9.18046200273838
241841.0580182564942-23.0580182564942
253134.1925531755259-3.19255317552587
263730.70235500421056.29764499578953
273237.0085270935604-5.00852709356036
282930.7125533282961-1.71255332829606
292933.8115427512704-4.81154275127042
304031.92743194478018.07256805521995
312631.7731366027537-5.77313660275368
322922.66361893470516.33638106529493
331930.1976331330650-11.1976331330650
343022.63552604250877.36447395749127
351230.4856433037945-18.4856433037945
362420.15548359099073.84451640900933
374033.86842008876256.13157991123752
384336.93956057262586.0604394273742
394942.98873791565766.01126208434241
404943.47026351305745.52973648694257
414853.9199901029233-5.91999010292332
423351.3365903810986-18.3365903810986
434630.982084226229715.0179157737703
444634.727449039710711.2725509602893
454346.9839975693075-3.98399756930755
464445.0172850121569-1.01728501215685
473847.0249415113234-9.02494151132343
483847.9268770335403-9.9268770335403
493957.7376485077695-18.7376485077695
504741.21236875297445.78763124702562
514146.9819512891653-5.98195128916534
523638.775022580714-2.77502258071402
533841.6640069362547-3.66400693625471
541140.6440713520483-29.6440713520483
552415.37947569937238.62052430062773
563018.369584576213611.6304154237864
571829.8904874376668-11.8904874376668
582121.7151636263480-0.715163626348044
592222.9711162989545-0.97111629895446
601527.0381213660788-12.0381213660788
611526.283383542732-11.2833835427320
621617.5381210367758-1.53812103677583
632617.68065739426998.31934260573013
643922.532063227276716.4679367727233
652840.0448912488407-12.0448912488407
662532.4286864783348-7.42868647833483
672522.4679956986732.53200430132701
681320.2441149134746-7.24411491347459
692016.42840048002553.57159951997445
701320.1198125513801-7.11981255138008
711016.1398077524889-6.1398077524889
721914.37215030994224.62784969005781
733126.46021894903524.53978105096484
743628.83989705413847.16010294586158
752635.5854394083182-9.5854394083182
763326.13084007379416.8691599262059
774235.82205733344546.17794266655459
784442.29649393177441.70350606822559
794535.97937999624359.02062000375651
804234.92677967963347.07322032036662
816043.658452970319416.3415470296806
824257.2809909808047-15.2809909808047
836348.245827072891714.7541729271083
847170.60553118699010.394468813009908


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85100.26297339180585.7994225502783114.726524233332
8693.36241886420273.7236598143192113.001177914085
8794.398881651064770.0465346184716118.751228683658
8884.69996249188258.7341826226396110.665742361125
8994.369192556881262.3566150954734126.381770018289
9096.625497546117861.1752602937451132.075734798490
9178.44880090271946.5546361139309110.342965691507
9263.13408199776833.942312418087292.3258515774488
9367.759022926178433.5893163466899101.928729505667
9468.800604442332931.5851829369906106.016025947675
9572.449131773329831.0975794990895113.80068404757
9685.554146874425436.1588133095561134.949480439295
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442985311htsfc9ee4p66hw/1bn2g1244298470.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442985311htsfc9ee4p66hw/1bn2g1244298470.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442985311htsfc9ee4p66hw/2hmih1244298470.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442985311htsfc9ee4p66hw/2hmih1244298470.ps (open in new window)


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