Home » date » 2009 » Aug » 18 »

opgave10_hanne jacobs_verbetering

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 18 Aug 2009 12:12:37 -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/Aug/18/t1250619226un6r2cpxqykitx5.htm/, Retrieved Tue, 18 Aug 2009 20:13:46 +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/Aug/18/t1250619226un6r2cpxqykitx5.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 «
0.88 1.03 0.69 0.71 1.11 1.05 1.03 0.65 0.59 0.77 0.9 1.26 0.96 0.83 0.87 0.79 1.12 0.88 0.64 0.64 0.58 0.5 0.99 1.07 0.89 0.89 0.83 0.86 0.9 1.12 0.88 0.88 0.89 0.82 0.88 0.81 0.88 0.76 1.13 0.85 1.45 1.55 0.71 0.81 0.83 0.73 0.9 0.94 1.78 0.88 1.04 0.83 1.41 0.96 1.3 0.83 1.4 0.91 0.87 0.97 1.19 1.23 1.33 1.17 1.09 0.63 0.89 0.63 1.51 0.97 0.84 0.92 0.95 0.73 1.02 0.79 1.27 0.95 0.75 0.52 0.95 0.82 0.76 1.24 0.94 1.04 1.81 0.95 1.39 0.86 1.15 1.51 0.6 0.72 1.1 1.62 1.84 1.73 1.36 1.07 1 1.49 0.9 1.43 1.54 0.81 1.61 1.3 1.4 1.03 0.79 1.11 1.15 1.03 1.59 1.11 1.33 0.93 1.07 1.14 1.12 0.86 0.82 1.02 1.07 1.31 0.98 0.89 0.8 0.8 0.78 0.97
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.125224748724491
beta0.00097099762190841
gamma0.212367616296001


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
130.960.978218492913525-0.0182184929135246
140.830.85406704310582-0.0240670431058204
150.870.886464128110635-0.0164641281106354
160.790.80824190251969-0.0182419025196893
171.121.14435940868487-0.0243594086848700
180.880.894502420320822-0.0145024203208223
190.640.964826068801091-0.324826068801091
200.640.5818026044293660.0581973955706335
210.580.5309658024316980.049034197568302
220.50.68703651045602-0.187036510456020
230.990.7660314113521030.223968588647897
241.071.11101242327162-0.0410124232716242
250.890.855132072629830.0348679273701705
260.890.7500828402673550.139917159732645
270.830.800378382924720.0296216170752797
280.860.7337730921075180.126226907892482
290.91.06403082131679-0.164030821316790
301.120.8180696905407780.301930309459222
310.880.8670421155886730.0129578844113271
320.880.5958987394137860.284101260586214
330.890.5686954814614760.321304518538524
340.820.7265461820049140.0934538179950863
350.880.947773736420089-0.0677737364200888
360.811.24148598574152-0.431485985741516
370.880.932273251398703-0.0522732513987033
380.760.829555047432056-0.0695550474320562
391.130.8338501733410460.296149826658954
400.850.8146580688620880.0353419311379124
411.451.095143202384100.354856797615897
421.550.9816696714234560.568330328576544
430.711.00501116557717-0.295011165577174
440.810.7183024385183540.0916975614816462
450.830.6663973166286540.163602683371346
460.730.764166112476198-0.0341661124761977
470.90.940479163017474-0.0404791630174745
480.941.16874646554381-0.228746465543811
491.780.9501336892662950.829866310733705
500.880.94065371922092-0.0606537192209202
511.041.025099466377530.0149005336224732
520.830.91158886297128-0.0815888629712807
531.411.265729435466060.144270564533945
540.961.15091707776968-0.190917077769678
551.30.9222845631188720.377715436881128
560.830.7808182205719690.0491817794280308
571.40.7336497721860060.666350227813994
580.910.8640997070327590.0459002929672413
590.871.07809735673952-0.208097356739520
600.971.27699405605982-0.306994056059820
611.191.23016944679741-0.0401694467974052
621.230.942469799508660.28753020049134
631.331.091615158515430.238384841484567
641.170.9767632688734820.193236731126518
651.091.46082417848526-0.370824178485256
660.631.20371914882395-0.57371914882395
670.891.02593397149463-0.135933971494629
680.630.766338727156386-0.136338727156386
691.510.7947821626187960.715217837381204
700.970.8198468064033140.150153193596686
710.840.991272649343572-0.151272649343572
720.921.16859261206379-0.248592612063794
730.951.17684925767621-0.226849257676213
740.730.937075327576103-0.207075327576103
751.021.001103899084000.0188961009159958
760.790.870060874544225-0.0800608745442245
771.271.15120325016740.118796749832599
780.950.944049462285660.00595053771433929
790.750.92121887173072-0.171218871730719
800.520.676875031376488-0.156875031376488
810.950.8293759912964650.120624008703535
820.820.702322080699620.117677919300379
830.760.795489236574378-0.0354892365743783
841.240.938063482483230.301936517516771
850.941.01298720963013-0.0729872096301276
861.040.8138406474873910.226159352512609
871.810.9692863462759720.840713653724028
880.950.9129129135937650.0370870864062351
891.391.274357122761660.115642877238337
900.861.02595622787438-0.165956227874384
911.150.9448512667601920.205148733239808
921.510.7239781330394350.786021866960565
930.61.11708490493514-0.517084904935141
940.720.879906555323419-0.159906555323419
951.10.919124263671980.18087573632802
961.621.192663522558360.427336477441636
971.841.208486960547610.631513039452389
981.731.11310852635190.6168914736481
991.361.4977527443149-0.137752744314901
1001.071.10782758001556-0.0378275800155559
10111.54786348788537-0.547863487885366
1021.491.123694000257560.366305999742438
1030.91.18021747698010-0.280217476980098
1041.430.9687649690577270.461235030942273
1051.541.076457835410130.463542164589874
1060.811.00897401639684-0.198974016396842
1071.611.129663825042020.480336174957979
1081.31.54955081263107-0.249550812631069
1091.41.51167154942183-0.111671549421827
1101.031.30145390491299-0.271453904912995
1110.791.42940411534341-0.639404115343414
1121.111.020481553990350.0895184460096494
1131.151.35629070103301-0.206290701033012
1141.031.14830322506779-0.118303225067790
1151.591.03127416683330.558725833166699
1161.111.057588019146970.0524119808530332
1171.331.107892293668730.222107706331272
1180.930.903191375175950.0268086248240504
1191.071.16216476116275-0.0921647611627545
1201.141.35064595779376-0.210645957793758
1211.121.34040532417100-0.220405324171002
1220.861.11006198056912-0.250061980569117
1230.821.15464873677918-0.334648736779178
1241.020.937095478262950.0829045217370505
1251.071.18979577460339-0.119795774603390
1261.311.023194161515250.286805838484753
1270.981.07499867226716-0.0949986722671556
1280.890.940847153475755-0.0508471534757552
1290.80.998248083419452-0.198248083419452
1300.80.7502041847403290.0497958152596712
1310.780.948974283473725-0.168974283473725
1320.971.07151006727841-0.101510067278412


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1331.068538077373890.893068396869481.24400775787830
1340.891420293203190.7061726078496421.07666797855674
1350.9404550272799660.739415550020051.14149450453988
1360.851881522189260.6445904987020691.05917254567645
1371.031852630742110.7944206904143611.26928457106986
1380.9614217344376850.7211135138904971.20172995498487
1390.912775623329290.6677447615151571.15780648514342
1400.812387168404660.5708461195497261.05392821725959
1410.8427645934193520.5851423403238691.10038684651483
1420.6828092573910780.4422949912792380.923323523502918
1430.8169737427820350.5387503364415431.09519714912253
1440.958537267942376-34.470363407197836.3874379430825
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250619226un6r2cpxqykitx5/1532j1250619151.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250619226un6r2cpxqykitx5/1532j1250619151.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250619226un6r2cpxqykitx5/2ffxo1250619151.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250619226un6r2cpxqykitx5/2ffxo1250619151.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250619226un6r2cpxqykitx5/3q09r1250619151.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250619226un6r2cpxqykitx5/3q09r1250619151.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