Home » date » 2010 » May » 31 »

Opgave 10 oef 1 Laura Quaglia

*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 19:43:47 +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/t1275335110wh5ohuxf87n630x.htm/, Retrieved Mon, 31 May 2010 21:45:11 +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/t1275335110wh5ohuxf87n630x.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:
KDGP2W61
 
Dataseries X:
» Textbox « » Textfile « » CSV «
41086 39690 43129 37863 35953 29133 24693 22205 21725 27192 21790 13253 37702 30364 32609 30212 29965 28352 25814 22414 20506 28806 22228 13971 36845 35338 35022 34777 26887 23970 22780 17351 21382 24561 17409 11514 31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.567263099764302
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
23969041086-1396
34312940294.1007127292834.89928727096
43786341902.234469946-4039.23446994597
53595339610.9258038496-3657.9258038496
62913337535.9194736501-8402.91947365005
72469332769.2533259575-8076.2533259575
82220528187.8928297931-5982.8928297931
92172524794.018497607-3069.01849760705
102719223053.07755142054138.92244857951
112179025400.9355292858-3610.93552928576
121325323352.5850478941-10099.5850478941
133770217623.463127292520078.5368727075
143036429013.27619243641350.72380756362
153260929779.49196644042829.50803355964
163021231384.5674643654-1172.56746436539
172996530719.4132098467-754.413209846713
182835230291.4624339259-1939.46243392593
192581429191.2769617807-3377.27696178069
202241427275.4723636784-4861.47236367841
212050624517.7384812397-4011.73848123971
222880622242.02727492796563.97272507206
232222825965.5267897207-3737.52678972065
241397123845.3657575316-9874.3657575316
253684518244.002429707718600.9975702923
263533828795.661970146542.33802986002
273502232506.88892066422515.11107933575
283477733933.6186277798843.38137222021
292688734412.0377592689-7525.0377592689
302397030143.3615141026-6173.36151410261
312278026641.4413256471-3861.44132564712
321735124450.9881497026-7099.98814970256
332138220423.4268636125958.573136387527
342456120967.19003231043593.80996768955
351740923005.8258145459-5596.82581454587
361151419830.9530541457-8316.95305414572
373151415113.052484056816400.9475159432
382707124416.70481102242654.29518897762
392946225922.38852761133539.6114723887
402610527930.2795033998-1825.2795033998
412239726894.865794365-4497.86579436498
422384324343.3925015297-500.392501529677
432170524059.5383000131-2354.53830001314
441808922723.8956054339-4634.89560543392
452076420094.6903572115669.309642788467
462531620474.36501988194841.63498011814
471770423220.8458866309-5516.84588663095
481554820091.3427880587-4543.34278805874
492802917514.072074812810514.9279251872
502938323478.80268345275904.19731654731
513643826828.03595485749609.9640451426
523203432279.4139477285-245.413947728477
532267932140.1996710146-9461.19967101463
542431926773.2102181459-2454.21021814588
551800425381.0273223272-7377.02732232722
561753721196.3119364179-3659.31193641793
572036619120.5193043611245.48069563901
582278219827.03454446582954.96545553423
591916921503.2774084686-2334.27740846855
601380720179.1279700309-6372.1279700309
612974316564.454905656413178.5450943436
622559124040.15724625741550.84275374263
632909624919.89311399244176.10688600758
642648227288.8444510961-806.844451096127
652240526831.1513667397-4426.15136673971
662704424320.35902241692723.64097758306
671797025865.3800460058-7895.38004600578
681873021386.6222872913-2656.62228729132
691968419879.6184936995-195.618493699516
701978519768.651340592316.3486594076967
711847919777.9253318049-1298.9253318049
721069819041.0929217229-8343.09292172288


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7314308.36416932481802.4654353410626814.2629033084
7414308.3641693248-69.544331462215328686.2726701117
7514308.3641693248-1724.446020075930341.1743587254
7614308.3641693248-3223.8277153682831840.5560540178
7714308.3641693248-4604.7133696175433221.441708267
7814308.3641693248-5891.4192875935634508.1476262431
7914308.3641693248-7100.9329097186835717.6612483682
8014308.3641693248-8245.6765136936862.4048523395
8114308.3641693248-9335.0598814220437951.7882200715
8214308.3641693248-10376.413539939338993.1418785888
8314308.3641693248-11375.580237018439992.3085756679
8414308.3641693248-12337.306210316240954.0345489657
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/31/t1275335110wh5ohuxf87n630x/1gasq1275335022.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275335110wh5ohuxf87n630x/1gasq1275335022.ps (open in new window)


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


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


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