Home » date » 2010 » Aug » 19 »

Tijdsreeks 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, 19 Aug 2010 20:45:19 +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/19/t12822507590s3cwrgfwvxl1pa.htm/, Retrieved Thu, 19 Aug 2010 22:46:03 +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/19/t12822507590s3cwrgfwvxl1pa.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:
Van Boxel Dieter
 
Dataseries X:
» Textbox « » Textfile « » CSV «
356 355 354 352 372 371 356 346 347 347 348 350 353 350 343 346 373 363 349 350 353 356 355 346 349 348 342 342 379 375 363 361 363 373 367 360 358 367 357 346 386 383 367 354 363 370 361 354 363 366 353 351 389 385 364 348 347 352 342 338 343 354 329 320 353 345 324 310 314 313 310 301 294 296 274 269 292 287 271 256 260 265 263 256 246 245 220 224 240 238 222 203 209 214 216 214 206 196 169 177 193 183 164 142 141 137 140 146 136 124 105 114 135 123 100 74 64 57 62 64
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.658681111002325
beta0.0625489335806356
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13353355.748664529915-2.74866452991461
14350350.827694757025-0.82769475702463
15343342.5962639623470.403736037653118
16346344.984253882731.01574611727017
17373371.7755451535951.22445484640519
18363362.2964228847910.703577115208532
19349354.503195530486-5.50319553048615
20350340.8532870464439.1467129535572
21353348.5631726461514.43682735384903
22356352.3952086373453.60479136265491
23355356.327714924480-1.32771492448035
24346358.039904232956-12.0399042329558
25349352.595297336999-3.59529733699878
26348347.6587023504610.341297649539058
27342340.5521101738561.44788982614432
28342343.814308810741-1.81430881074141
29379368.67368862755910.3263113724408
30375365.2479526357509.75204736425047
31363361.9050388652061.09496113479446
32361358.482090664642.51790933536017
33363360.8256188548762.17438114512356
34373363.3977055724669.60229442753405
35367370.358463117726-3.35846311772599
36360367.754464817046-7.75446481704563
37358368.869159432285-10.8691594322851
38367361.0396211073425.96037889265807
39357358.797995448988-1.79799544898844
40346359.461093954553-13.4610939545531
41386380.9652873572805.03471264272036
42383373.8125632383379.18743676166332
43367367.074157386902-0.0741573869016179
44354363.249877859877-9.24987785987696
45363357.1231696160775.87683038392254
46370364.2200523629095.7799476370912
47361363.632646526404-2.63264652640419
48354359.429490602323-5.42949060232343
49363360.5314852997382.46851470026229
50366367.299957423934-1.29995742393447
51353357.397378361618-4.39737836161828
52351352.029755257315-1.02975525731483
53389388.2096521236870.790347876313376
54385379.678228623895.32177137611029
55364367.07274066793-3.07274066792979
56348357.858278913217-9.8582789132165
57347356.185568294151-9.18556829415104
58352352.399206459288-0.399206459287768
59342343.686892149996-1.68689214999563
60338338.007596854715-0.00759685471535931
61343344.455535686608-1.45553568660756
62354346.2702958702937.7297041297071
63329340.547432945162-11.5474329451620
64320330.614313400402-10.6143134004017
65353359.702072631114-6.70207263111399
66345346.073301658595-1.07330165859537
67324324.417926586511-0.417926586511101
68310312.773118377198-2.7731183771981
69314314.425795249205-0.425795249205464
70313318.198099858792-5.19809985879226
71310304.4774383540915.52256164590949
72301303.009182051353-2.00918205135287
73294306.45117348886-12.4511734888599
74296302.512060348188-6.51206034818756
75274278.595657051527-4.5956570515267
76269271.61333597285-2.61333597284994
77292305.68945192654-13.6894519265402
78287287.474495763584-0.474495763584343
79271264.5569691110376.44303088896265
80256255.0298770277820.970122972217894
81260258.5059672706111.49403272938935
82265260.5496704074354.45032959256486
83263255.8766465899177.1233534100827
84256251.9912626787824.00873732121761
85246255.180219583985-9.18021958398452
86245254.904640710207-9.90464071020656
87220228.749827035597-8.74982703559684
88224218.8787988877885.12120111221154
89240253.758644722309-13.7586447223085
90238239.495399990311-1.49539999031083
91222217.7112177309454.28878226905451
92203204.253113520854-1.25311352085350
93209205.7079808726573.29201912734322
94214209.2834610264484.71653897355239
95216205.04754297086410.9524570291362
96214202.12840344136511.871596558635
97206205.825948781970.174051218029859
98196211.681098570010-15.6810985700105
99169182.094117811691-13.0941178116913
100177173.8955642665263.10443573347391
101193200.719399464561-7.71939946456064
102183194.585026907671-11.5850269076714
103164167.6788163532-3.67881635320
104142146.302355948336-4.30235594833587
105141146.395760586422-5.39576058642174
106137143.472721131887-6.47272113188671
107140132.2718313854037.7281686145974
108146125.68653958664920.3134604133506
109136129.4436970445526.55630295544839
110124132.845709923259-8.84570992325857
111105107.680329139749-2.68032913974920
112114111.3353329963092.66466700369078
113135133.62232226031.37767773969989
114123131.982609556056-8.98260955605616
115100109.418318830872-9.41831883087198
1167483.741282029476-9.741282029476
1176479.3476377788613-15.3476377788613
1185768.5605511026289-11.5605511026289
1196257.70447146768714.29552853231285
1206451.861373910028312.1386260899717


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
12143.909154776107330.116352463759657.7019570884551
12235.836348500348219.001029538531852.6716674621646
12317.0669638494532-2.6284330141694236.7623607130758
12422.88736022783480.43008267003235945.3446377856372
12541.44568837401916.279525017321066.6118517307169
12633.77138201767065.9222548060099261.6205092293313
12715.7541508572672-14.769438067466246.2777397820005
128-4.66231768248794-37.863649007492228.5390136425163
129-4.98464670685161-40.875265113940230.905971700237
130-4.16913856730358-42.766542430645134.4282652960379
131-1.32143817223447-42.647501718921440.0046253744524
132-6.81681291113506-50.896674071762237.2630482494921
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507590s3cwrgfwvxl1pa/1th1g1282250717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507590s3cwrgfwvxl1pa/1th1g1282250717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507590s3cwrgfwvxl1pa/2th1g1282250717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507590s3cwrgfwvxl1pa/2th1g1282250717.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507590s3cwrgfwvxl1pa/3mrij1282250717.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t12822507590s3cwrgfwvxl1pa/3mrij1282250717.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