Home » date » 2010 » Aug » 12 »

TIJDREEKS A - STAP 32

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 12 Aug 2010 09:23:07 +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/Aug/12/t1281604990xfuy8et1afuse1v.htm/, Retrieved Thu, 12 Aug 2010 11:23: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/Aug/12/t1281604990xfuy8et1afuse1v.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:
Hoes Isabelle
 
Dataseries X:
» Textbox « » Textfile « » CSV «
698 697 696 694 714 713 698 688 689 689 690 692 688 679 677 673 694 690 673 659 657 654 644 643 638 626 621 615 640 633 620 610 601 595 585 584 580 574 560 550 580 569 551 536 535 526 517 512 510 501 496 491 524 514 495 479 479 467 451 459 461 460 452 449 483 470 442 419 419 406 393 396 390 389 373 371 407 391 357 327 321 317 300 304 296 296 283 279 319 295 255 227 228 233 210 219 212 209 201 198 245 216 173 144 143 152 127 141 129 127 113 117 174 143 103 81 92 104 81 89
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.390729284726388
beta0.122141405310284
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13688698.392361111112-10.3923611111115
14679684.902081797484-5.90208179748402
15677680.176280501588-3.17628050158783
16673674.613944074414-1.61394407441389
17694695.168367346843-1.1683673468433
18690691.424464403764-1.42446440376432
19673670.7625153826252.23748461737478
20659659.596512633478-0.596512633478483
21657658.669716063091-1.66971606309073
22654656.368901580986-2.36890158098629
23644654.723507518725-10.7235075187252
24643650.38528651341-7.38528651340994
25638634.8755211921743.12447880782577
26626627.938899260585-1.93889926058478
27621625.14795665825-4.14795665824988
28615618.837047553824-3.83704755382394
29640637.3674239770552.63257602294527
30633633.70713348529-0.707133485290683
31620614.3453240258325.65467597416762
32610601.7396683503088.26033164969238
33601602.994136681446-1.99413668144632
34595599.49959347137-4.49959347136951
35585591.188798507169-6.18879850716928
36584590.130056430245-6.13005643024474
37580581.047698397987-1.04769839798746
38574568.7304626561115.26953734388906
39560567.088716376729-7.08871637672928
40550559.3564116933-9.35641169329995
41580578.9467732780931.05322672190709
42569571.834034522757-2.83403452275684
43551554.615179000695-3.61517900069487
44536538.630604842518-2.63060484251844
45535527.5176922252147.48230777478591
46526524.7874020181211.21259798187907
47517516.5399843676570.460015632343129
48512517.29286799924-5.29286799923955
49510510.852059573827-0.852059573827432
50501501.687412756266-0.687412756266042
51496489.1315390881546.86846091184623
52491485.0801169572715.91988304272934
53524517.3197564126856.68024358731498
54514510.6439028184483.3560971815524
55495496.269843131521-1.2698431315207
56479482.815520472513-3.8155204725125
57479478.3585668345880.641433165412195
58467469.766359294742-2.76635929474162
59451459.946790759489-8.9467907594888
60459453.5112342304655.48876576953495
61461454.4954635833246.50453641667639
62460449.16333977575810.8366602242417
63452447.1215799305794.8784200694206
64449443.0274251689885.97257483101197
65483477.0662082577565.93379174224356
66470469.3530551704310.646944829568554
67442452.25237432666-10.2523743266601
68419434.458996661324-15.4589966613245
69419428.334101003334-9.33410100333401
70406413.457831128752-7.45783112875159
71393397.505653553361-4.50565355336096
72396401.278533359715-5.27853335971474
73390397.838674058958-7.8386740589578
74389388.0212865886620.978713411337651
75373376.5067066705-3.5067066704998
76371367.411849798453.58815020155026
77407397.990520150829.00947984918042
78391385.8999734992835.10002650071704
79357361.753091982011-4.75309198201086
80327341.053137330405-14.0531373304053
81321337.393300057954-16.3933000579545
82317318.74908429431-1.74908429430985
83300304.945735761255-4.94573576125543
84304306.17434607908-2.17434607907967
85296300.634286378242-4.63428637824171
86296295.8407713796590.159228620340798
87283279.6336987723973.366301227603
88279276.2355639682022.76443603179825
89319308.4446794315710.55532056843
90295293.2992335964881.7007664035122
91255260.381729032973-5.38172903297345
92227232.300684944992-5.30068494499199
93228229.583381261816-1.58338126181627
94233225.3034049182187.69659508178216
95210213.349200152569-3.34920015256853
96219217.0724100304581.92758996954242
97212212.014348766512-0.0143487665121427
98209212.54503141966-3.54503141966003
99201197.2662928435943.7337071564063
100198194.0842711053433.91572889465706
101245231.98418840669813.0158115933016
102216213.016933151932.98306684806994
103173176.958125888556-3.95812588855557
104144150.223465408778-6.22346540877811
105143150.10717204787-7.10717204786951
106152149.756011476522.24398852348037
107127129.114317441323-2.11431744132344
108141136.7668430228594.23315697714131
109129131.768316473222-2.76831647322248
110127129.282219346418-2.28221934641766
111113119.202305010908-6.20230501090795
112117112.0453887143874.95461128561318
113174155.74171739423118.2582826057694
114143132.80646009193910.1935399080613
11510395.7763131479727.22368685202804
1168173.00453546927927.99546453072082
1179279.558191390461212.4418086095388
11810495.12835180234568.87164819765435
1198177.32276367682033.67723632317968
1208994.283819984435-5.28381998443496


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12184.025019544200571.767024419902896.283014668498
12285.77294567972772.388463990013399.1574273694406
12377.161481230157162.510175607182491.8127868531318
12482.486683049532866.440122007804298.5332440912614
125135.377295911256117.818170014486152.936421808027
126102.5476775510683.3685858841437121.726769217976
12761.391988969953740.494129181785282.2898487581222
12837.589999399540814.881932117964360.2980666811172
12944.669115647856520.065673963491669.2725573322214
13053.54942246006126.970783092854980.1280618272672
13129.03594558331930.40685266920842357.6650384974302
13238.84832257830518.0974449995050869.5992001571051
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281604990xfuy8et1afuse1v/19jow1281604981.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281604990xfuy8et1afuse1v/19jow1281604981.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/12/t1281604990xfuy8et1afuse1v/29jow1281604981.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281604990xfuy8et1afuse1v/29jow1281604981.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/12/t1281604990xfuy8et1afuse1v/32t6h1281604981.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281604990xfuy8et1afuse1v/32t6h1281604981.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