Home » date » 2011 » May » 19 »

iko opgave 10 oplossing 10

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 19 May 2011 14:54:11 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/19/t1305816815x7vm4i8wshqqo16.htm/, Retrieved Thu, 19 May 2011 16:53:38 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
5939520,00 89948768,00 80953652,00 85942882,00 8944937,00 82975432,00 24940816,00 21973899,00 37950221,00 45949881,00 85950373,00 48960313,00 81954506,00 24960419,00 65973338,00 22950513,00 54963528,00 90995659,00 91967517,00 28999053,00 96990529,00 38979852,00 81496957,00 74982424,00 70976192,00 90990000,00 12998850,00 92986156,00 67994976,00 91022206,00 87992489,00 421022698,00 11018942,00 79100042,00 65996442,00 51000620,00 12996871,00 44994249,00 99996135,00 91977037,00 63974211,00 15998036,00 65974265,00 33984410,00 45939098,00 67935827,00 66921032,00 89911836,00 71890975,00 72880342,00 28871286,00 41844334,00 82847667,00 24871401,00 3867451,00 99896846,00 41890361,00 45884264,00 69884586,00 95896400,00 39904491,00 81900399,00 27909863,00 88900470,00 89917101,00 2945005,00 4934411,00 61957264,00 31946515,00 3938309,00 52933321,00 21947613,00
 
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'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0
beta0
gamma0.286265298869626


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
138195450682670206.492058-715700.492057994
142496041924260878.9253186699540.074681383
156597333862298285.86150933675052.13849071
162295051321293438.82478721657074.17521282
175496352852326926.82754682636601.17245318
189099565986895100.88072754100558.1192725
199196751727317458.618904864650058.3810952
202899905324279160.99970024719892.00029981
219699052945374218.187519651616310.8124804
223897985259576165.711869-20596313.711869
2381496957114931601.835332-33434644.8353319
247498242463545904.386176811436519.6138232
2570976192101479198.219442-30503006.219442
269099000029994766.172077760995233.8279223
271299885077416359.0218578-64417509.0218578
289298615626513226.044835566472929.9551645
296799497664447135.88879943547840.11120062
3091022206106595034.952606-15572828.9526062
318799248955298053.65011332694435.349887
3242102269830839239.9434361390183458.056564
331101894272171123.251915-61152181.2519149
347910004264232338.834542714867703.1654573
3565996442125737853.013862-59741411.0138623
365100062079538202.4456177-28537582.4456177
3712996871110125036.648192-97128165.6481924
384499424956210505.7607682-11216256.7607682
399999613569691380.086481230304754.9135188
409197703753693397.465422238283639.5345778
416397421177007309.225137-13033098.2251369
4215998036119888372.911339-103890336.911339
436597426575734271.9633996-9760006.96339965
4433984410166610301.805772-132625891.805772
454593909863770534.8285065-17831436.8285065
466793582779739828.9412088-11804001.9412088
4766921032126241809.09482-59320777.0948201
488991183682781001.24820317130834.75179686
497189097595310850.7855739-23419875.7855739
507288034261254507.724493311625834.2755067
512887128690415968.6659298-61544682.6659298
524184433474467698.2197461-32623364.2197461
538284766784261613.9031556-1413946.90315555
5424871401103495984.002679-78624583.0026795
55386745183608611.813972-79741160.813972
5699896846147233099.632839-47336253.6328389
574189036167042348.4970693-25151987.4970693
584588426487135343.8397751-41251079.8397751
5969884586124497918.506727-54613332.5067266
609589640096515843.4937258-619443.493725821
6139904491100683039.185061-60778548.1850609
628190039973285908.02719678614490.97280332
632790986382499353.0998738-54589490.0998738
648890047073712889.79060215187580.209398
658991710194789309.1321042-4872208.13210419
66294500591433527.4400052-88488522.4400052
67493441168537080.0952366-63602669.0952366
6861957264150560507.456261-88603243.4562607
693194651567318949.9976144-35372434.9976144
70393830984640988.4722276-80702679.4722276
7152933321122188136.380414-69254815.380414
7221947613108010565.90497-86062952.9049697


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7393273828.090191354404802.8448809132142853.335502
7484748127.339867545879102.0945571123617152.585178
7574736105.519629335867080.2743189113605130.76494
7687150998.158421248281972.9131108126020023.403732
77104166162.33232865297137.0870173143035187.577638
7873653624.033055834784598.7877453112522649.278366
7956025123.648077617156098.402767194894148.893388
80139231249.065672100362223.820362178100274.310983
8163545164.365853624676139.1205432102414189.611164
8268310686.336822129441661.0915117107179711.582132
83113525142.77406574656117.5287547152394168.019376
8492383422.827128692383391.139232492383454.5150247
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t1305816815x7vm4i8wshqqo16/14bkt1305816848.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305816815x7vm4i8wshqqo16/14bkt1305816848.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305816815x7vm4i8wshqqo16/2nszd1305816848.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305816815x7vm4i8wshqqo16/2nszd1305816848.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305816815x7vm4i8wshqqo16/3tlbg1305816848.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305816815x7vm4i8wshqqo16/3tlbg1305816848.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=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