Home » date » 2010 » Jun » 06 »

Opgave 10 oefening 2

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 06 Jun 2010 18:49:12 +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/Jun/06/t1275850173lguz0w4xau2xvtx.htm/, Retrieved Sun, 06 Jun 2010 20:49:34 +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/Jun/06/t1275850173lguz0w4xau2xvtx.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
22577.0 22792.0 23932.0 22321.0 21102.0 22824.0 23129.0 23604.0 24746.0 26911.0 27909.0 28922.0 29800.0 30506.0 30771.0 31976.0 33749.0 34371.0 33246.0 35072.0 35762.0 36179.0 37433.0 38298.0 37559.0 37511.0 39364.0 40084.0 42712.0 41938.0 40799.0 38568.0 41134.0 43955.0 43607.0 45082.0 46464.0 46496.0 46774.0 47890.0 45740.0 42660.0 39190.0 39010.0 41150.0 42530.0 44710.0 46620.0 44560.0 46120.0 48060.0 51970.0 57720.0 63490.0 65370.0 64260.0 58700.0 58630.0 59803.0 59266.0 60570.0 63062.0 63846.0 64726.0 63460.0 65220.0 66659.0 66871.0 65672.0 67182.0 68292.0 68318.0 69530.0 70500.0 72044.0 73811.0 76018.0 77818.0 79455.0 81408.0 81815.0
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0311447030224647
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
32393223007925
42232124175.8088502958-1854.80885029578
52110222507.0413794899-1405.04137948988
62282421244.28178299141579.71821700861
72312923015.4816377193113.518362280698
82360423324.0171334001279.982866599868
92474623807.7371166318938.262883368236
102691124978.95903549131932.04096450873
112790927204.1318775581704.868122441872
122892228224.0847859016697.915214098415
132980029258.8211479795541.178852020461
143050630153.6760026078352.323997392246
153077130870.6490288742-99.6490288742243
163197631132.5454894635843.454510536543
173374932363.81462970711385.18537029292
183437134179.9558166959191.04418330409
193324634807.9058310491-1561.90583104909
203507233634.2607377921437.73926220799
213576235505.0387001372256.961299862785
223617936203.0416835097-24.0416835097058
233743336619.2929124166813.70708758336
243829837898.6355780067399.364421993305
253755938776.0736643274-1217.07366432741
263751137999.1682664955-488.168266495471
273936437935.96441081051428.03558918952
284008439833.4401551413250.559844858697
294271240561.24376709882150.75623290122
304193843256.2284312462-1318.2284312462
314079942441.1725982393-1642.17259823927
323856841251.0276203555-2683.02762035548
334113438936.46552191842197.53447808156
344395541570.90708061992384.09291938008
354360744466.158946572-859.158946571966
364508244091.4006963319990.59930366811
374646445597.2526174589866.747382541107
384649647006.2472072836-510.247207283639
394677447022.3557095447-248.355709544747
404789047292.620744727597.379255272957
414574048427.2259442243-2687.22594422429
424266046193.5330902372-3533.53309023717
433919043003.4822515217-3813.48225152168
443901039414.7124793166-404.7124793166
454115039222.10782933881927.8921706612
464253041422.15145845341107.84854154663
474471042836.65507227371873.34492772628
484662045074.99984370641545.00015629361
494456047033.1184147438-2473.11841474382
504612044896.09387617721223.90612382277
514806046494.21206893111565.78793106893
525197048482.97806904043487.02193095963
535772052501.58033151295218.41966848707
546349058414.10646233455075.89353766546
556537064342.19365913881027.80634086121
566426066254.2043823895-1994.20438238951
575870065082.0954791339-6382.0954791339
585863059323.3270107753-693.327010775254
595980359231.7335469272571.266453072793
605926660422.5254709549-1156.52547095485
616057059849.505828624720.494171375947
626306261175.9454056211886.05459437903
636384663726.686015847119.313984152941
646472664514.40201445211.59798555007
656346065400.99217087-1940.99217087004
666522064074.54054613941145.45945386063
676665965870.2155406541788.784459345872
686687167333.7819983892-462.781998389197
696567267531.3687904852-1859.36879048521
706718266274.4593016963907.540698303681
716829267812.7243872258479.275612774218
726831868937.6512838515-619.651283851548
736953068944.3524286385585.647571361493
747050070174.5922483244325.407751675622
757204471154.7269761115889.273023888469
767381172726.42312034641084.57687965357
777601874527.20194516831490.79805483173
787781876780.63240785251037.36759214754
797945578612.940913435842.059086564972
808140880276.16659361351131.83340638653
818181582264.4172089263-449.417208926272


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8282657.42024342179199.521185098786115.3193017435
8383499.840486842278532.896900243988466.7840734405
8484342.260730263378164.592512090390519.9289484363
8585184.680973684377941.792703747692427.569243621
8686027.101217105477806.31884847194247.8835857399
8786869.521460526577728.827945921996010.214975131
8887711.941703947677692.177607605297731.70580029
8988554.361947368777685.3857703499423.3381243974
9089396.782190789877700.9544634141101092.609918165
9190239.202434210877733.5197918933102744.885076528
9291081.62267763277779.1050199977104384.140335266
9391924.04292105377834.6775768833106013.408265223
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275850173lguz0w4xau2xvtx/1aax51275850149.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275850173lguz0w4xau2xvtx/1aax51275850149.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275850173lguz0w4xau2xvtx/2aax51275850149.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275850173lguz0w4xau2xvtx/2aax51275850149.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275850173lguz0w4xau2xvtx/3l1fq1275850149.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275850173lguz0w4xau2xvtx/3l1fq1275850149.ps (open in new window)


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