Home » date » 2010 » May » 27 »

Opgave 10 - Oef 2 - Kelly Janbroers

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 27 May 2010 13:08:49 +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/27/t127496577225qif42t6jshsns.htm/, Retrieved Thu, 27 May 2010 15:09:39 +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/27/t127496577225qif42t6jshsns.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 «
18450 21845 26488 22394 28057 25451 24872 33424 24052 28449 33533 37351 19969 21701 26249 24493 24603 26485 30723 34569 26689 26157 32064 38870 21337 19419 23166 28286 24570 24001 33151 24878 26804 28967 33311 40226 20504 23060 23562 27562 23940 24584 34303 25517 23494 29095 32903 34379 16991 21109 23740 25552 21752 20294 29009 25500 24166 26960 31222 38641 14672 17543 25453 32683 22449 22316 27595 25451 25421 25288 32568 35110 16052 22146 21198 19543 22084 23816 29961 26773 26635 26972 30207 38687 16974 21697 24179 23757 25013 24019 30345 24488 25156 25650 30923 37240 17466 19463 24352 26805 25236 24735 29356 31234 22724 28496 32857 37198
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.0417042970576116
beta0.236464322500064
gamma0.389615920130008


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131996919924.850961538544.1490384615245
142170121437.2682796208263.731720379161
152624925911.3606167889337.639383211073
162449324231.0732116472261.926788352805
172460324587.294610836915.7053891631185
182648526546.6107329119-61.6107329118859
193072325566.42819472815156.57180527188
203456934405.1765614212163.823438578773
212668925186.57142477081502.42857522918
222615729714.1498581573-3557.14985815730
233206434816.6013508793-2752.60135087927
243887038703.8359796606166.164020339413
252133721143.2097783096193.790221690389
261941922760.522964851-3341.52296485098
272316627092.9720931864-3926.97209318636
282828625145.6243615613140.37563843899
292457025497.405387452-927.405387452018
302400127346.6688183811-3345.66881838112
313315128103.58586698955047.41413301054
322487834998.3370284753-10120.3370284753
332680425673.89541596941130.10458403063
342896728116.4595623729850.540437627114
353331133566.1837072657-255.183707265744
364022638535.03225172111690.96774827888
372050420951.0380417289-447.038041728905
382306021118.06255747811941.93744252192
392356225400.7772352218-1838.77723522178
402756226148.33545724791413.66454275213
412394024861.4038320330-921.403832032975
422458425760.1512279307-1176.15122793065
433430329714.77782255284588.22217744715
442551730896.2375642800-5379.23756428004
452349425985.8220585579-2491.8220585579
462909528152.9935916037942.00640839626
473290333174.6304539567-271.630453956706
483437938850.1995380444-4471.19953804443
491699120130.9636085841-3139.96360858411
502110920971.0987993930137.901200607033
512374023642.643688377497.3563116225669
522555225580.0569757276-28.0569757276498
532175223241.6983276031-1489.69832760314
542029423896.5638280095-3602.56382800948
552900929753.2314133507-744.231413350717
562550026789.1998708837-1289.19987088374
572416622966.17525891441199.82474108557
582696026444.5412489753515.458751024737
593122230866.2083247087355.791675291282
603864134877.10072541193763.89927458807
611467216956.6935179304-2284.69351793037
621754319023.1286695400-1480.12866954005
632545321562.88441131563890.11558868438
643268323599.87722060509083.12277939496
652244921173.84588098411275.15411901591
662231621260.48960229791055.51039770208
672759528529.9094106494-934.90941064943
682545125503.8547735041-52.8547735040884
692542122823.30606141392597.69393858611
702528826279.8292364979-991.82923649788
713256830739.53711747521828.46288252484
723511036259.3605514502-1149.36055145023
731605216002.288782315849.7112176841747
742214618616.08374816613529.91625183393
752119823568.8671685197-2370.86716851967
761954327420.9196792999-7877.91967929986
772208421342.3081661458741.691833854205
782381621289.44372340912526.55627659088
792996127856.30898649192104.69101350815
802677325295.57844556561477.42155443435
812663523692.79725986222942.20274013776
822697225851.19520514711120.80479485288
833020731500.5653688285-1293.56536882849
843868735796.1285193432890.87148065702
851697416212.8524878368761.14751216318
862169720220.33447133691476.66552866307
872417922928.70331314761250.29668685243
882375724955.7053393662-1198.70533936620
892501322519.87865163652493.12134836352
902401923369.6902909646649.309709035435
913034529845.4670083883499.532991611715
922448827112.4745894691-2624.47458946912
932515625973.9588685829-817.958868582908
942565027346.8412441745-1696.84124417454
953092332000.8199366293-1077.81993662930
963724037893.4031727671-653.403172767066
971746617357.8851532992108.114846700802
981946321589.5826406051-2126.58264060513
992435224011.9268908782340.073109121793
1002680525026.38031535841778.61968464160
1012523624062.27803529531173.72196470474
1022473524124.7847249024610.215275097609
1032935630498.7623583523-1142.76235835233
1043123426470.43442965484763.56557034523
1052272426326.9407162732-3602.94071627317
1062849627240.48231608401255.51768391603
1073285732262.7751126759594.22488732406
1083719838414.1078886004-1216.10788860044


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
10918164.454166462112951.262490200623377.6458427235
11021581.219338706316361.101222496526801.3374549161
11125058.130609169219828.199215785030288.0620025534
11226637.064944632821393.945530779331880.1843584863
11325396.954802699320136.795526597230657.1140788014
11425212.559769190819931.045622364630494.073916017
11530913.009134556525605.379207279236220.6390618339
11629155.263025275523816.331209556934494.194840994
11725660.046568971520284.225684257731035.8674536853
11828544.084227466223125.413427598033962.7550273344
11933260.978712783427793.153904976938728.80352059
12038699.618022301833176.024907616444223.2111369873
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/27/t127496577225qif42t6jshsns/1tkmx1274965727.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/27/t127496577225qif42t6jshsns/1tkmx1274965727.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/27/t127496577225qif42t6jshsns/2tkmx1274965727.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/27/t127496577225qif42t6jshsns/2tkmx1274965727.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/27/t127496577225qif42t6jshsns/34um01274965727.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/27/t127496577225qif42t6jshsns/34um01274965727.ps (open in new window)


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