Home » date » 2008 » May » 27 »

Opgave 10: Inschr PW's

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 26 May 2008 17:51:15 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/27/t1211845898phjo7n47x68fao1.htm/, Retrieved Tue, 27 May 2008 01:51:39 +0200
 
User-defined keywords:
 
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
 
Text written by user:
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.567279661944919
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
23969041086-1396
34312940294.07759192492834.92240807511
43786341902.2714172178-4039.27141721782
53595339610.8748931547-3657.87489315472
62913337535.8368603291-8402.83686032911
72469332769.0784068233-8076.07840682331
82220528187.6833783599-5982.68337835992
92172524793.8287739604-3068.82877396042
102719223052.94462450134139.05537549868
112179025400.9465586855-3610.94655868551
121325323352.5300155732-10099.5300155732
133770217623.272042536320078.7279574637
143036429013.52605053031350.47394946971
153260929779.62245605092829.37754394911
163021231384.6707926969-1172.67079269688
172996530719.4385018431-754.438501843117
182835230291.4608835593-1939.46088355932
192581429191.2441691784-3377.2441691784
202241427275.4022385814-4861.40223858143
212050624517.6276201007-4011.62762010068
222880622241.91285992116564.08714007893
232222825965.5859937220-3737.58599372203
241397123845.3294747133-9874.32947471334
253684518243.823188365218601.1768116348
263533828795.89248184716542.10751815295
273502232507.09702315222514.90297684783
283477733933.7503336827843.249666317322
292688734412.1087193263-7525.10871932633
302397030143.2675889281-6173.26758892813
312278026641.2984379855-3861.29843798546
321735124450.8623654166-7099.86236541663
332138220423.2548429076958.74515709237
342456120967.13147151433593.86852848568
351740923005.8599954282-5596.85999542816
361151419830.8751492686-8316.87514926863
373151415112.881026153416401.1189738466
382707124416.90225315552654.0977468445
392946225922.51792575423539.48207424578
402610527930.3941202925-1825.39412029247
412239726894.8851608167-4497.88516081671
422384324343.3263873215-500.326387321544
432170524059.5014034597-2354.50140345966
441808922723.8406432562-4634.84064325623
452076420094.5898099813669.410190018734
462531620474.33259627764841.66740372242
471770423220.9120443110-5516.91204431096
481554820091.2800448344-4543.28004483439
492802917513.969676879610515.0303231204
502938323478.93252391995904.06747608007
513643826828.18992585069609.81007414938
523203432279.6397360690-245.639736068955
532267932140.2933096315-9461.29330963152
542431926773.0940393820-2454.09403938203
551800425380.9364023404-7376.93640234035
561753721196.1504138316-3659.15041383155
572036619120.38880406761245.61119593242
582278219826.99870221092955.00129778907
591916921503.3108394675-2334.31083946751
601380720179.1037755800-6372.10377558002
612974316564.338899891013178.6611001090
622559124040.32531364751550.67468635250
632909624919.99152550814176.00847449191
642648227288.956201197-806.956201196976
652240526831.1863601776-4426.1863601776
662704424320.30085807082723.69914192916
671797025865.3999865441-7895.39998654408
681873021386.5001512574-2656.50015125744
691968419879.5216434955-195.521643495493
701978519768.606191670516.3938083295470
711847919777.9060657176-1298.90606571763
721069819041.0630718591-8343.06307185913


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7314308.21307286971802.3110965900926814.1150491494
7414308.2130728697-69.801353238155628686.2274989776
7514308.2130728697-1724.7845705660730341.2107163056
7614308.2130728697-3224.2347890652831840.6609348048
7714308.2130728697-4605.180134815733221.6062805552
7814308.2130728697-5891.9393331289234508.3654788684
7914308.2130728697-7101.5013535915635717.9274993310
8014308.2130728697-8246.289502440536862.71564818
8114308.2130728697-9335.714287379237952.1404331187
8214308.2130728697-10377.106767346638993.5329130861
8314308.2130728697-11376.310092079839992.7362378193
8414308.2130728697-12338.070810776840954.4969565163
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211845898phjo7n47x68fao1/1a77m1211845868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211845898phjo7n47x68fao1/1a77m1211845868.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211845898phjo7n47x68fao1/2crid1211845868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211845898phjo7n47x68fao1/2crid1211845868.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211845898phjo7n47x68fao1/3uovd1211845868.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/27/t1211845898phjo7n47x68fao1/3uovd1211845868.ps (open in new window)


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